국가유공자,장애인 데몬 스레드 갯수 변경(1개->10개)

main
이범준 6 months ago
parent 560638e753
commit 2d3b5248f3

@ -148,14 +148,16 @@ public class ExemptCarInfo {
}
public boolean getRdcxptInfoNtttnVhcle() {
public boolean getRdcxptInfoNtttnVhcle(String lastDigit) {
ResultSmartPlatform result = new ResultSmartPlatform();
List<Map<String, Object>> dspsnList = new ArrayList<Map<String,Object>>();
String url = "";
try{
//국가유공자 데이터 추출
dspsnList = commSmartPlatformPRPService.exemptNtttn();
Map<String,String> map = new HashMap<String,String>();
map.put("digit", lastDigit);
dspsnList = commSmartPlatformPRPService.exemptNtttn(map);
if(dspsnList == null || dspsnList.size() == 0){
logger.info("getRdcxptInfoNtttnVhcle_조회 실패(국가유공자 목록 없음)");
@ -219,13 +221,15 @@ public class ExemptCarInfo {
return false;
}
public boolean getRdcxptInfoDspsnVhcle() {
public boolean getRdcxptInfoDspsnVhcle(String lastDigit) {
ResultSmartPlatform result = new ResultSmartPlatform();
List<Map<String, Object>> dspsnList = new ArrayList<>();
String url = "";
try {
//장애인 테스트 데이터 추출
dspsnList = commSmartPlatformPRPService.exemptDspsn();
Map<String,String> map = new HashMap<String,String>();
map.put("digit", lastDigit);
dspsnList = commSmartPlatformPRPService.exemptDspsn(map);
if(dspsnList == null || dspsnList.size() == 0){

@ -69,15 +69,15 @@ public class CfsDaemon {
}
ntttnDaemons = new ArrayList<NtttnDaemonThread>();
for(int i=0; i<1; i++){
NtttnDaemonThread daemon = new NtttnDaemonThread();
for(String digit : digits){
NtttnDaemonThread daemon = new NtttnDaemonThread(digit);
daemon.setDaemon(true);
ntttnDaemons.add(daemon);
}
dspsnDaemons = new ArrayList<DspsnDaemonThread>();
for(int i=0; i<1; i++){
DspsnDaemonThread daemon = new DspsnDaemonThread();
for(String digit : digits){
DspsnDaemonThread daemon = new DspsnDaemonThread(digit);
daemon.setDaemon(true);
dspsnDaemons.add(daemon);
}
@ -113,7 +113,7 @@ public class CfsDaemon {
}
result = "시작됨";
} else if(daemonName.equals("getRdcxptInfoNtttnVhcle")){
} else if(daemonName.equals("ITF_FIS_O_012")){
if(ntttnDaemons == null || ntttnDaemons.isEmpty()){
result = "쓰레드없음";
} else {
@ -127,7 +127,7 @@ public class CfsDaemon {
}
result = "시작됨";
} else if(daemonName.equals("getRdcxptInfoDspsnVhcle")){
} else if(daemonName.equals("ITF_CFS_O_013")){
if(dspsnDaemons == null || dspsnDaemons.isEmpty()){
result = "쓰레드없음";
} else {
@ -160,7 +160,7 @@ public class CfsDaemon {
}
return i;
} else if(daemonName.equals("getRdcxptInfoNtttnVhcle")){
} else if(daemonName.equals("ITF_FIS_O_012")){
if(ntttnDaemons == null){
return 0;
}
@ -170,7 +170,7 @@ public class CfsDaemon {
}
}
return i;
} else if(daemonName.equals("getRdcxptInfoDspsnVhcle")){
} else if(daemonName.equals("ITF_CFS_O_013")){
if(dspsnDaemons == null){
return 0;
}
@ -205,7 +205,7 @@ public class CfsDaemon {
result = "종료 요청 완료";
return result;
} else if(daemonName.equals("getRdcxptInfoNtttnVhcle")){
} else if(daemonName.equals("ITF_FIS_O_012")){
if(ntttnDaemons == null || ntttnDaemons.isEmpty()){
result = "쓰레드없음";
return result;
@ -221,7 +221,7 @@ public class CfsDaemon {
}
result = "종료 요청 완료";
return result;
} else if(daemonName.equals("getRdcxptInfoDspsnVhcle")){
} else if(daemonName.equals("ITF_CFS_O_013")){
if(dspsnDaemons == null || dspsnDaemons.isEmpty()){
result = "쓰레드없음";
return result;
@ -276,8 +276,12 @@ public class CfsDaemon {
class NtttnDaemonThread extends Thread {
public NtttnDaemonThread(){
super("getRdcxptInfoNtttnVhcle");
private String lastDigit = null;
public NtttnDaemonThread(String lastDigit){
super("ITF_FIS_O_012"+lastDigit);
this.lastDigit = lastDigit;
}
@Override
@ -285,7 +289,7 @@ public class CfsDaemon {
while(true){
boolean end = exemptCarInfo.getRdcxptInfoNtttnVhcle();
boolean end = exemptCarInfo.getRdcxptInfoNtttnVhcle(lastDigit);
if(end){
break;
}
@ -300,8 +304,12 @@ public class CfsDaemon {
}
class DspsnDaemonThread extends Thread {
public DspsnDaemonThread(){
super("getRdcxptInfoDspsnVhcle");
private String lastDigit = null;
public DspsnDaemonThread(String lastDigit){
super("ITF_CFS_O_013"+lastDigit);
this.lastDigit = lastDigit;
}
@Override
@ -309,7 +317,7 @@ public class CfsDaemon {
while(true){
boolean end = exemptCarInfo.getRdcxptInfoDspsnVhcle();
boolean end = exemptCarInfo.getRdcxptInfoDspsnVhcle(lastDigit);
if(end){
break;
}

@ -96,24 +96,24 @@ public class CfsScheduleCron {
//@Scheduled(cron = "0 0 21 * * *")
public void getRdcxptInfoNtttnVhcleScheduleStart() {
String runWAS = schdDao.selectRunWas("getRdcxptInfoNtttnVhcle");
String runWAS = schdDao.selectRunWas("ITF_FIS_O_012");
if(!WASInfo.getWAS().equals(runWAS)){
return;
}
cfsDaemon.startDaemon("getRdcxptInfoNtttnVhcle");
cfsDaemon.startDaemon("ITF_FIS_O_012");
}
//@Scheduled(cron = "0 55 21 * * *")
public void getRdcxptInfoNtttnVhcleScheduleEnd() {
String runWAS = schdDao.selectRunWas("getRdcxptInfoNtttnVhcle");
String runWAS = schdDao.selectRunWas("ITF_FIS_O_012");
if(!WASInfo.getWAS().equals(runWAS)){
return;
}
cfsDaemon.killDaemon("getRdcxptInfoNtttnVhcle");
cfsDaemon.killDaemon("ITF_FIS_O_012");
}
/**
@ -122,24 +122,24 @@ public class CfsScheduleCron {
//@Scheduled(cron = "0 0 0 * * *")
public void getRdcxptInfoDspsnVhcleScheduleStart() {
String runWAS = schdDao.selectRunWas("getRdcxptInfoDspsnVhcle");
String runWAS = schdDao.selectRunWas("ITF_CFS_O_013");
if(!WASInfo.getWAS().equals(runWAS)){
return;
}
cfsDaemon.startDaemon("getRdcxptInfoDspsnVhcle");
cfsDaemon.startDaemon("ITF_CFS_O_013");
}
//@Scheduled(cron = "0 55 7 * * *")
public void getRdcxptInfoDspsnVhcleScheduleEnd() {
String runWAS = schdDao.selectRunWas("getRdcxptInfoDspsnVhcle");
String runWAS = schdDao.selectRunWas("ITF_CFS_O_013");
if(!WASInfo.getWAS().equals(runWAS)){
return;
}
cfsDaemon.killDaemon("getRdcxptInfoDspsnVhcle");
cfsDaemon.killDaemon("ITF_CFS_O_013");
}
/**

@ -1,16 +0,0 @@
package cfs.schd.config;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.stereotype.Component;
@EnableScheduling
@Component
public class CfsScheduleFixedDelaly {
protected Logger logger = LoggerFactory.getLogger(this.getClass());
}

@ -50,10 +50,10 @@ public interface CommSmartPlatformPRPDao {
public int updateDefaultFare(Map<String, Object> param);
public int InsertDefaultFarLog(Map<String, Object> param);
public List<Map<String, Object>> exemptDspsn();
public List<Map<String, Object>> exemptDspsn(Map<String, String> param);
public int updateExemptDspsn(Map<String, String> param);
public List<Map<String, Object>> exemptNtttn();
public List<Map<String, Object>> exemptNtttn(Map<String, String> param);
public int updateExemptNtttn(Map<String, String> param);
public int insertExemptManyChild(Map<String, String> param);

@ -826,6 +826,7 @@ SELECT FUN_GET_GREEN_TUNNEL_NM(#{FARE_OFFICE_ID}) as insttNo
WHERE EXEMPT_KBN = '3'
AND END_DATE <![CDATA[>]]> SYSDATE
AND TO_CHAR(UPDATE_DATE,'YYYYMMDD') <![CDATA[<]]> TO_CHAR(SYSDATE,'YYYYMMDD')
AND CAR_NO LIKE '%'||#{digit}
ORDER BY UPDATE_DATE
)WHERE ROWNUM <![CDATA[<]]> 501
</select>
@ -856,6 +857,7 @@ SELECT FUN_GET_GREEN_TUNNEL_NM(#{FARE_OFFICE_ID}) as insttNo
WHERE EXEMPT_KBN = '4'
AND END_DATE <![CDATA[>]]> SYSDATE
AND TO_CHAR(UPDATE_DATE,'YYYYMMDD') <![CDATA[<]]> TO_CHAR(SYSDATE,'YYYYMMDD')
AND CAR_NO LIKE '%'||#{digit}
ORDER BY UPDATE_DATE
)WHERE ROWNUM <![CDATA[<]]> 501
</select>

@ -42,11 +42,11 @@ public interface CommSmartPlatformPRPService {
public int updateDefaultFare(Map<String, Object> param) throws Exception;
public int InsertDefaultFarLog(Map<String, Object> param) throws Exception;
public List<Map<String, Object>> exemptDspsn() throws Exception;
public List<Map<String, Object>> exemptDspsn(Map<String, String> param) throws Exception;
public int updateExemptDspsn(Map<String, String> param) throws Exception;
public List<Map<String, Object>> exemptNtttn() throws Exception;
public List<Map<String, Object>> exemptNtttn(Map<String, String> param) throws Exception;
public int updateExemptNtttn(Map<String, String> param) throws Exception;

@ -367,8 +367,8 @@ public class CommSmartPlatformPRPServiceImpl implements CommSmartPlatformPRPServ
}
@Override
public List<Map<String, Object>> exemptDspsn() throws Exception {
return commSmartPlatformPRPDao.exemptDspsn();
public List<Map<String, Object>> exemptDspsn(Map<String, String> param) throws Exception {
return commSmartPlatformPRPDao.exemptDspsn(param);
}
@Override
@ -377,8 +377,8 @@ public class CommSmartPlatformPRPServiceImpl implements CommSmartPlatformPRPServ
}
@Override
public List<Map<String, Object>> exemptNtttn() throws Exception {
return commSmartPlatformPRPDao.exemptNtttn();
public List<Map<String, Object>> exemptNtttn(Map<String, String> param) throws Exception {
return commSmartPlatformPRPDao.exemptNtttn(param);
}
@Override

Loading…
Cancel
Save