스케쥴러 수동 처리 추가
parent
0bb9c9f53e
commit
25220fc1ff
@ -0,0 +1,86 @@
|
||||
package cfs.schd;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import cfs.trsmrcv.service.CommCollectServerService;
|
||||
|
||||
@Component("brsEndOfDayInfo")
|
||||
public class BrsEndOfDayInfo {
|
||||
|
||||
protected Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
@Resource(name="commCollectServerService")
|
||||
private CommCollectServerService commCollectServerService;
|
||||
|
||||
public void getBrsSummaryInfo(String inYmd) {
|
||||
String targetYMD = "";
|
||||
|
||||
SimpleDateFormat sdf8 = (new SimpleDateFormat("yyyyMMdd"));
|
||||
SimpleDateFormat sdf14 = (new SimpleDateFormat("yyyyMMddHHmmss"));
|
||||
Date now = new Date();
|
||||
|
||||
if(inYmd == null || inYmd.equals("")){
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTime(now);
|
||||
cal.add(Calendar.DAY_OF_MONTH, -1);
|
||||
targetYMD = sdf8.format(cal.getTime());
|
||||
} else {
|
||||
targetYMD = inYmd;
|
||||
}
|
||||
|
||||
Map<String, String> param = new HashMap<String, String>();
|
||||
param.put("insttNo", "BRSMC0300001");
|
||||
param.put("insttCntcJobSe", "006");
|
||||
param.put("requstDt", sdf14.format(now));
|
||||
param.put("startClosDt", targetYMD);
|
||||
param.put("endClosDt", targetYMD);
|
||||
|
||||
try {
|
||||
commCollectServerService.callPreRegistDayCloseSummary(param);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void getBrsRejectInfo(String inYmd) {
|
||||
String targetYMD = "";
|
||||
|
||||
SimpleDateFormat sdf8 = (new SimpleDateFormat("yyyyMMdd"));
|
||||
SimpleDateFormat sdf14 = (new SimpleDateFormat("yyyyMMddHHmmss"));
|
||||
Date now = new Date();
|
||||
|
||||
if(inYmd == null || inYmd.equals("")){
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTime(now);
|
||||
cal.add(Calendar.DAY_OF_MONTH, -1);
|
||||
targetYMD = sdf8.format(cal.getTime());
|
||||
} else {
|
||||
targetYMD = inYmd;
|
||||
}
|
||||
|
||||
Map<String, String> param = new HashMap<String, String>();
|
||||
param.put("insttNo", "BRSMC0300001");
|
||||
param.put("insttCntcJobSe", "018");
|
||||
param.put("requstDt", sdf14.format(now));
|
||||
param.put("startClosDt", targetYMD);
|
||||
param.put("endClosDt", targetYMD);
|
||||
|
||||
try {
|
||||
commCollectServerService.callPreRegistDayCloseReturn(param);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,98 @@
|
||||
package cfs.trsmrcv.web;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import cfs.schd.BrsEndOfDayInfo;
|
||||
import cfs.schd.ExemptCarInfo;
|
||||
import cfs.schd.PrpCarInfo;
|
||||
import cfs.schd.SendStatusInfo;
|
||||
|
||||
@Controller
|
||||
public class SudongController {
|
||||
|
||||
protected Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
@Resource(name="prpCarInfo")
|
||||
private PrpCarInfo prpCarInfo;
|
||||
|
||||
@Resource(name="exemptCarInfo")
|
||||
private ExemptCarInfo exemptCarInfo;
|
||||
|
||||
@Resource(name="sendStatusInfo")
|
||||
private SendStatusInfo sendStatusInfo;
|
||||
|
||||
@Resource(name="brsEndOfDayInfo")
|
||||
private BrsEndOfDayInfo brsEndOfDayInfo;
|
||||
|
||||
@RequestMapping(value="/rest/sudong/checkEgreenStatus", method=RequestMethod.POST)
|
||||
public @ResponseBody Map<String, Object> checkEgreenStatus(@RequestBody Map<String,Object> reqMap) throws Exception {
|
||||
Map result = new HashMap();
|
||||
String ymd = reqMap.get("ymd").toString();
|
||||
sendStatusInfo.checkEgreenStatus(ymd);
|
||||
|
||||
result.put("res", "OK");
|
||||
return result;
|
||||
}
|
||||
@RequestMapping(value="/rest/sudong/checkKtStatus", method=RequestMethod.POST)
|
||||
public @ResponseBody Map<String, Object> checkKtStatus(@RequestBody Map<String,Object> reqMap) throws Exception {
|
||||
Map result = new HashMap();
|
||||
String ymd = reqMap.get("ymd").toString();
|
||||
sendStatusInfo.checkKtStatus(ymd);
|
||||
|
||||
result.put("res", "OK");
|
||||
return result;
|
||||
}
|
||||
|
||||
@RequestMapping(value="/rest/sudong/getBrsSummaryInfo", method=RequestMethod.POST)
|
||||
public @ResponseBody Map<String, Object> getBrsSummaryInfo(@RequestBody Map<String,Object> reqMap) throws Exception {
|
||||
Map result = new HashMap();
|
||||
String ymd = reqMap.get("ymd").toString();
|
||||
brsEndOfDayInfo.getBrsSummaryInfo(ymd);
|
||||
|
||||
result.put("res", "OK");
|
||||
return result;
|
||||
}
|
||||
@RequestMapping(value="/rest/sudong/getBrsRejectInfo", method=RequestMethod.POST)
|
||||
public @ResponseBody Map<String, Object> getBrsRejectInfo(@RequestBody Map<String,Object> reqMap) throws Exception {
|
||||
Map result = new HashMap();
|
||||
String ymd = reqMap.get("ymd").toString();
|
||||
brsEndOfDayInfo.getBrsRejectInfo(ymd);
|
||||
|
||||
result.put("res", "OK");
|
||||
return result;
|
||||
}
|
||||
|
||||
@RequestMapping(value="/rest/sudong/makeExemptMaster", method=RequestMethod.POST)
|
||||
public @ResponseBody Map<String, Object> makeExemptMaster(HttpServletRequest request) throws Exception {
|
||||
Map result = new HashMap();
|
||||
prpCarInfo.makeExemptMaster();
|
||||
result.put("res", "OK");
|
||||
return result;
|
||||
}
|
||||
@RequestMapping(value="/rest/sudong/makeScarMaster", method=RequestMethod.POST)
|
||||
public @ResponseBody Map<String, Object> makeScarMaster(HttpServletRequest request) throws Exception {
|
||||
Map result = new HashMap();
|
||||
prpCarInfo.makeScarMaster();
|
||||
result.put("res", "OK");
|
||||
return result;
|
||||
}
|
||||
@RequestMapping(value="/rest/sudong/makePreregistMaster.do", method=RequestMethod.POST)
|
||||
public @ResponseBody Map<String, Object> makePreregistMaster(HttpServletRequest request) throws Exception {
|
||||
Map result = new HashMap();
|
||||
prpCarInfo.makePreregistMaster();
|
||||
result.put("res", "OK");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue