|
|
|
|
@ -47,25 +47,11 @@ public class CrdnStngBean extends AbstractBean {
|
|
|
|
|
* @return 잔액
|
|
|
|
|
*/
|
|
|
|
|
public int getBalance(String state, int advntceAmt, int ffnlgAmt, int minusAmt, int adtnAmt, int rcvmtAmt) {
|
|
|
|
|
if (toInt(state) < toInt("51")) {
|
|
|
|
|
return advntceAmt - rcvmtAmt - minusAmt;
|
|
|
|
|
} else if (state.equals("71")
|
|
|
|
|
|| state.equals("72")
|
|
|
|
|
|| state.equals("73")
|
|
|
|
|
|| state.equals("74")
|
|
|
|
|
|| state.equals("75")
|
|
|
|
|
|| state.equals("76")
|
|
|
|
|
|| state.equals("80")
|
|
|
|
|
|| state.equals("81")
|
|
|
|
|
|| state.equals("82")
|
|
|
|
|
|| state.equals("83")
|
|
|
|
|
|| state.equals("84")
|
|
|
|
|
|| state.equals("85")
|
|
|
|
|
) {
|
|
|
|
|
return 0;
|
|
|
|
|
} else {
|
|
|
|
|
return ffnlgAmt - rcvmtAmt - minusAmt + adtnAmt;
|
|
|
|
|
}
|
|
|
|
|
return toInt(state) < toInt("51") ? advntceAmt - rcvmtAmt - minusAmt :
|
|
|
|
|
switch (state) {
|
|
|
|
|
case "71", "72", "73", "74", "75", "76", "80", "81", "82", "83", "84", "85" -> 0;
|
|
|
|
|
default -> ffnlgAmt - rcvmtAmt - minusAmt + adtnAmt;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**기본금액을 계산한다.
|
|
|
|
|
@ -84,14 +70,9 @@ public class CrdnStngBean extends AbstractBean {
|
|
|
|
|
int len = vhrno.length();
|
|
|
|
|
if (len >= 7) {
|
|
|
|
|
String fifthFromLast = vhrno.substring(len-5, len-4);
|
|
|
|
|
|
|
|
|
|
if (fifthFromLast.equals("하")
|
|
|
|
|
|| fifthFromLast.equals("허")
|
|
|
|
|
|| fifthFromLast.equals("호")
|
|
|
|
|
|| fifthFromLast.equals("후")) {
|
|
|
|
|
if ("하허호후".contains(fifthFromLast))
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
@ -131,17 +112,14 @@ public class CrdnStngBean extends AbstractBean {
|
|
|
|
|
|
|
|
|
|
if (!isEmpty(getHeavyEquipmentCarkind(vhrno)))
|
|
|
|
|
return "중기";
|
|
|
|
|
if (vhrno.contains("외교"))
|
|
|
|
|
return "외교";
|
|
|
|
|
if (vhrno.contains("준외"))
|
|
|
|
|
return "준외";
|
|
|
|
|
if (vhrno.contains("영사"))
|
|
|
|
|
return "영사";
|
|
|
|
|
if (vhrno.contains("준영"))
|
|
|
|
|
return "준영";
|
|
|
|
|
|
|
|
|
|
if (vhrno.contains("국기") || vhrno.contains("협정") || vhrno.contains("대표") || vhrno.contains("외빈"))
|
|
|
|
|
for (String str: new String[] {"외교", "준외", "영사", "준영"}) {
|
|
|
|
|
if (vhrno.contains(str))
|
|
|
|
|
return str;
|
|
|
|
|
}
|
|
|
|
|
for (String str: new String[] {"국기", "협정", "대표", "외빈"}) {
|
|
|
|
|
if (vhrno.contains(str))
|
|
|
|
|
return "국제";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (vhrno.substring(0,1).equals("임"))
|
|
|
|
|
return "임시";
|
|
|
|
|
@ -283,22 +261,12 @@ public class CrdnStngBean extends AbstractBean {
|
|
|
|
|
DataObject teamInfo = crdnTeamMapper.selectTeamInfoByName(team);
|
|
|
|
|
|
|
|
|
|
if (teamInfo != null) {
|
|
|
|
|
boolean differ = false;
|
|
|
|
|
if (!ifEmpty(team.getCrdnSeCd(), () -> "").equals(teamInfo.string("CRDN_SE_CD"))) {
|
|
|
|
|
differ = true;
|
|
|
|
|
}
|
|
|
|
|
if (!ifEmpty(team.getTeamer1(), () -> "").equals(teamInfo.string("TEAMER_1"))) {
|
|
|
|
|
differ = true;
|
|
|
|
|
}
|
|
|
|
|
if (!ifEmpty(team.getTeamer2(), () -> "").equals(teamInfo.string("TEAMER_2"))) {
|
|
|
|
|
differ = true;
|
|
|
|
|
}
|
|
|
|
|
if (!ifEmpty(team.getTeamer3(), () -> "").equals(teamInfo.string("TEAMER_3"))) {
|
|
|
|
|
differ = true;
|
|
|
|
|
}
|
|
|
|
|
if (!ifEmpty(team.getTeamer4(), () -> "").equals(teamInfo.string("TEAMER_4"))) {
|
|
|
|
|
differ = true;
|
|
|
|
|
}
|
|
|
|
|
boolean differ =
|
|
|
|
|
!equals(team.getCrdnSeCd(), teamInfo.string("CRDN_SE_CD"))
|
|
|
|
|
|| !equals(team.getTeamer1(), teamInfo.string("TEAMER_1"))
|
|
|
|
|
|| !equals(team.getTeamer2(), teamInfo.string("TEAMER_2"))
|
|
|
|
|
|| !equals(team.getTeamer3(), teamInfo.string("TEAMER_3"))
|
|
|
|
|
|| !equals(team.getTeamer4(), teamInfo.string("TEAMER_4"));
|
|
|
|
|
|
|
|
|
|
if (differ) {
|
|
|
|
|
Team del = new Team();
|
|
|
|
|
@ -352,11 +320,7 @@ public class CrdnStngBean extends AbstractBean {
|
|
|
|
|
* </ul>
|
|
|
|
|
*/
|
|
|
|
|
public boolean createExemptionVehicleInfo(ExmptnVhcl exmptnVhcl) {
|
|
|
|
|
if (exmptnVhclMapper.insertExemptionVehicleInfo(exmptnVhcl) != 1) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return exmptnVhclMapper.insertExemptionVehicleHistory(exmptnVhcl) == 1;
|
|
|
|
|
return exmptnVhclMapper.insert(exmptnVhcl);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**면제차량 정보를 수정한다.
|
|
|
|
|
@ -367,11 +331,7 @@ public class CrdnStngBean extends AbstractBean {
|
|
|
|
|
* </ul>
|
|
|
|
|
*/
|
|
|
|
|
public boolean updateExemptionVehicleInfo(ExmptnVhcl exmptnVhcl) {
|
|
|
|
|
if (exmptnVhclMapper.updateExemptionVehicleInfo(exmptnVhcl) != 1) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return exmptnVhclMapper.insertExemptionVehicleHistory(exmptnVhcl) == 1;
|
|
|
|
|
return exmptnVhclMapper.update(exmptnVhcl);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**면제차량 정보를 삭제한다.
|
|
|
|
|
@ -382,12 +342,7 @@ public class CrdnStngBean extends AbstractBean {
|
|
|
|
|
* </ul>
|
|
|
|
|
*/
|
|
|
|
|
public boolean removeExemptionVehicleInfo(ExmptnVhcl exmptnVhcl) {
|
|
|
|
|
exmptnVhcl.setRemovedBy(currentUser().getId());
|
|
|
|
|
if (exmptnVhclMapper.deleteExemptionVehicleInfo(exmptnVhcl) != 1) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return exmptnVhclMapper.insertExemptionVehicleHistory(exmptnVhcl) == 1;
|
|
|
|
|
return exmptnVhclMapper.delete(exmptnVhcl);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<DataObject> getExemptionVehicleHistoryList(String exmptnVhclId) {
|
|
|
|
|
|