|
|
|
|
@ -89,11 +89,11 @@ public class CommHoCController {
|
|
|
|
|
|
|
|
|
|
switch(Integer.parseInt(kind)) {
|
|
|
|
|
case 0: // 면제
|
|
|
|
|
return makeExempt(obj.get(0), workDt, result);
|
|
|
|
|
return checkExempt(obj.get(0), workDt, result);
|
|
|
|
|
case 1: // 감면
|
|
|
|
|
return makeScar(obj.get(0), workDt, result);
|
|
|
|
|
return checkScar(obj.get(0), workDt, result);
|
|
|
|
|
case 2: // 사전등록
|
|
|
|
|
return makePreregist(obj.get(0), workDt, result);
|
|
|
|
|
return checkPreregist(obj.get(0), workDt, result);
|
|
|
|
|
case 3: // RFID
|
|
|
|
|
logger.info("RFID현행화 막음");
|
|
|
|
|
default:
|
|
|
|
|
@ -110,38 +110,16 @@ public class CommHoCController {
|
|
|
|
|
return result.getResult();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Map<String, Object> makeExempt(Map<String, Object> map, String workDt, ResultSmartPlatform result) {
|
|
|
|
|
private Map<String, Object> checkExempt(Map<String, Object> map, String workDt, ResultSmartPlatform result) {
|
|
|
|
|
|
|
|
|
|
Map<String, Object> mapResult = new HashMap<String, Object>();
|
|
|
|
|
try {
|
|
|
|
|
if(map.get("EXEMPT_SENDTIME").toString().equals(workDt) == false) {
|
|
|
|
|
Map<String, Object> mapOrg = new HashMap<String, Object>();
|
|
|
|
|
|
|
|
|
|
// 면제 마스트 생성 쓰레드 호출
|
|
|
|
|
logger.info("============= 면제 마스터 수행 Thread start");
|
|
|
|
|
|
|
|
|
|
mapOrg.put("EXEMPT_FLAG", "0");
|
|
|
|
|
if(commCollectServer2Service.updateMstFlag(mapOrg) < 0) {
|
|
|
|
|
logger.info("============= 2");
|
|
|
|
|
result.setErrorMsg(null, null);
|
|
|
|
|
logger.info(result.getResult().get("resultMessage").toString());
|
|
|
|
|
return result.getResult();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String command = String.format("sh /gpta/source-app/cfs/relay_jar/run_exempt_send.sh");
|
|
|
|
|
shellCmd(command);
|
|
|
|
|
|
|
|
|
|
System.out.println("============= 면제 shell 실행");
|
|
|
|
|
mapResult.put("flag", "0");
|
|
|
|
|
System.out.println("============= makeExempt 2 : " + mapResult);
|
|
|
|
|
}
|
|
|
|
|
else if(map.get("EXEMPT_SENDTIME").toString().equals(workDt) == true
|
|
|
|
|
if(map.get("EXEMPT_SENDTIME").toString().equals(workDt) == true
|
|
|
|
|
&& map.get("EXEMPT_FLAG").toString().equals("1") == true) {
|
|
|
|
|
|
|
|
|
|
mapResult.put("flag", "1");
|
|
|
|
|
System.out.println("============= makeExempt 2 : " + mapResult);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
} else {
|
|
|
|
|
mapResult.put("flag", "0");
|
|
|
|
|
System.out.println("============= makeExempt 3 : " + mapResult);
|
|
|
|
|
}
|
|
|
|
|
@ -159,34 +137,14 @@ public class CommHoCController {
|
|
|
|
|
return result.getResult();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Map<String, Object> makeScar(Map<String, Object> map, String workDt, ResultSmartPlatform result) {
|
|
|
|
|
private Map<String, Object> checkScar(Map<String, Object> map, String workDt, ResultSmartPlatform result) {
|
|
|
|
|
|
|
|
|
|
Map<String, Object> mapResult = new HashMap<String, Object>();
|
|
|
|
|
try {
|
|
|
|
|
if(map.get("RED_SENDTIME").toString().equals(workDt) == false) {
|
|
|
|
|
Map<String, Object> mapOrg = new HashMap<String, Object>();
|
|
|
|
|
|
|
|
|
|
// 면제 마스트 생성 쓰레드 호출
|
|
|
|
|
mapOrg.put("RED_FLAG", "0");
|
|
|
|
|
System.out.println("============= Scar 마스터 수행 Thread start");
|
|
|
|
|
if(commCollectServer2Service.updateMstFlag(mapOrg) < 0) {
|
|
|
|
|
logger.info("============= 2");
|
|
|
|
|
result.setErrorMsg(null, null);
|
|
|
|
|
logger.info(result.getResult().get("resultMessage").toString());
|
|
|
|
|
return result.getResult();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String command = String.format("sh /gpta/source-app/cfs/relay_jar/run_scar_send.sh");
|
|
|
|
|
shellCmd(command);
|
|
|
|
|
|
|
|
|
|
System.out.println("============= 감면 shell 실행");
|
|
|
|
|
mapResult.put("flag", "0");
|
|
|
|
|
}
|
|
|
|
|
else if(map.get("RED_SENDTIME").toString().equals(workDt) == true
|
|
|
|
|
if(map.get("RED_SENDTIME").toString().equals(workDt) == true
|
|
|
|
|
&& map.get("RED_FLAG").toString().equals("1") == true) {
|
|
|
|
|
mapResult.put("flag", "1");
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
} else {
|
|
|
|
|
mapResult.put("flag", "0");
|
|
|
|
|
}
|
|
|
|
|
} catch(RuntimeException e) {
|
|
|
|
|
@ -202,28 +160,17 @@ public class CommHoCController {
|
|
|
|
|
logger.info(result.getResult().get("resultMessage").toString());
|
|
|
|
|
return result.getResult();
|
|
|
|
|
}
|
|
|
|
|
private Map<String, Object> makePreregist(Map<String, Object> map, String workDt, ResultSmartPlatform result) {
|
|
|
|
|
private Map<String, Object> checkPreregist(Map<String, Object> map, String workDt, ResultSmartPlatform result) {
|
|
|
|
|
|
|
|
|
|
Map<String, Object> mapResult = new HashMap<String, Object>();
|
|
|
|
|
try {
|
|
|
|
|
System.out.println("============= makePreregist 1");
|
|
|
|
|
if(map.get("PRP_SENDTIME").toString().equals(workDt) == false) {
|
|
|
|
|
System.out.println("============= makePreregist 2");
|
|
|
|
|
// 사전등록 마스트 생성 쓰레드 호출
|
|
|
|
|
String command = String.format("sh /gpta/source-app/cfs/relay_jar/run_prp_send.sh %s", workDt);
|
|
|
|
|
System.out.println("============= makePreregist 3");
|
|
|
|
|
shellCmd(command);
|
|
|
|
|
|
|
|
|
|
System.out.println("============= 사전등록 shell 실행");
|
|
|
|
|
mapResult.put("flag", "0");
|
|
|
|
|
}
|
|
|
|
|
else if(map.get("PRP_SENDTIME").toString().equals(workDt) == true
|
|
|
|
|
if(map.get("PRP_SENDTIME").toString().equals(workDt) == true
|
|
|
|
|
&& map.get("PRP_FLAG").toString().equals("1") == true) {
|
|
|
|
|
mapResult.put("flag", "1");
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
} else {
|
|
|
|
|
mapResult.put("flag", "0");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} catch(RuntimeException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
logger.info("catch check");
|
|
|
|
|
|