장비연계파일로 단속파일 처리하는 URL 추가

main
이범준 1 year ago
parent 39803cbffa
commit 97013ca05b

@ -25,7 +25,7 @@ public class ExtractText {
e.printStackTrace();
}
String[] textArr = summaryText.split("\r\n");
String[] textArr = summaryText.split("\r?\n|\r");
for(int i=0; i < textArr.length; i++) {
boolean isNumber = Pattern.matches(REGEXP_PATTERN_NUMBER, textArr[i]);

@ -2,6 +2,8 @@ package cokr.xit.fims.crdn.service;
import java.util.List;
import cokr.xit.foundation.data.DataObject;
/**
* @author mjkhan
*/
@ -11,4 +13,10 @@ public interface ImportService {
* @return
*/
int createCrdns(List<String> interfaceSequences);
/** .
* @param dataObject
* @return
*/
boolean createCrdnByEquipmentLinkFile(String entType, List<DataObject> linkFileInfoList);
}

@ -20,6 +20,7 @@ import cokr.xit.fims.crdn.dao.CrdnInstMapper;
import cokr.xit.fims.crdn.dao.CrdnListMapper;
import cokr.xit.fims.crdn.dao.CrdnUpdtMapper;
import cokr.xit.fims.crdn.dao.GlobalStngMapper;
import cokr.xit.fims.crdn.dao.ImportMapper;
import cokr.xit.fims.crdn.service.CrdnService;
import cokr.xit.fims.cvlc.dao.CrdnCvlcptMapper;
import cokr.xit.fims.cvlc.service.bean.CrdnCvlcptMainBean;
@ -51,6 +52,12 @@ public class CrdnServiceBean extends AbstractServiceBean implements CrdnService
@Resource(name="fileBean")
private FileBean fileBean;
@Resource(name="importBean")
private ImportBean importBean;
@Resource(name="importMapper")
private ImportMapper importMapper;
@Resource(name="crdnStngBean")
protected CrdnStngBean crdnStngBean;

@ -174,6 +174,27 @@ public class ImportBean extends AbstractComponent {
.toList();
}
/** .
* @param crdns
* @param basicInfoMap
*/
public void setVehicleInfo(List<Crdn> crdns) {
Map<String, String> carModelMap = importMapper.selectCarMdl();
BiFunction<String, String, String> getCarModel = (vhctyAsortCd, mxmmLdg) -> {
if (isEmpty(vhctyAsortCd)) return null;
if ("3".equals(vhctyAsortCd)) {
int weight = toInt(mxmmLdg);
if (weight < 1) return null;
vhctyAsortCd = weight <= 4000 ? "3-1" : "3-2";
}
return carModelMap.get(vhctyAsortCd);
};
setVehicleInfo(crdns, getCarModel);
}
/** .
* @param crdns
* @param basicInfoMap

@ -14,6 +14,7 @@ import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.service.CrdnService;
import cokr.xit.fims.crdn.service.ImportService;
import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.foundation.data.DataObject;
import cokr.xit.interfaces.smg.Petition;
import cokr.xit.interfaces.smg.service.bean.SmgReceiverBean;
@ -62,4 +63,18 @@ public class ImportServiceBean extends AbstractServiceBean implements ImportServ
return 0;
}
@Override
public boolean createCrdnByEquipmentLinkFile(String entType, List<DataObject> linkFileInfoList) {
Crdn crdn = new Crdn();
if(entType.equals("이노")) {
}
return true;
}
}

@ -32,6 +32,7 @@ import cokr.xit.fims.crdn.parsing.Ino;
import cokr.xit.fims.crdn.parsing.Knl;
import cokr.xit.fims.crdn.service.CrdnService;
import cokr.xit.fims.crdn.service.CrdnStngService;
import cokr.xit.fims.crdn.service.ImportService;
import cokr.xit.foundation.data.DataObject;
/** .<br />
@ -50,12 +51,16 @@ public class Crdn05Controller extends ApplicationController {
getFileRegistrationScreen = "/020/info.do",
getCrdnFileListFromEquipmentEnterprise = "/020/list.do",
removeLinkFile = "/020/remove.do",
createCrdnByLinkFile = "/020/create.do",
getManualRegistrationScreen = "/030/info.do",
createCrdnDataByManual = "/030/create.do"
;
}
@Resource(name="importService")
private ImportService importService;
@Resource(name="crdnService")
private CrdnService crdnService;
@ -224,6 +229,31 @@ public class Crdn05Controller extends ApplicationController {
return mav;
}
/** .
* @param entType , linkFileInfos
* @return jsonView
* <pre><code> {
* "saved": true, false
* }</code></pre>
*/
public ModelAndView createCrdnByLinkFile(String entType, String[] linkFileInfos) {
ModelAndView mav = new ModelAndView("jsonView");
boolean saved = false;
List<DataObject> linkFileInfoList = new ArrayList<DataObject>();
for(String linkFileInfo : linkFileInfos) {
linkFileInfoList.add(fromJson(linkFileInfo, DataObject.class));
}
saved = importService.createCrdnByEquipmentLinkFile(entType, linkFileInfoList);
mav.addObject("saved", saved);
return mav;
}
/** .
* @param
* @return fims/crdn/crdn05030-info

@ -3,6 +3,7 @@ package cokr.xit.fims.task.web;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
@ -252,6 +253,12 @@ public class DpvController {
return super.removeLinkFile(hReq);
}
@Override
@PostMapping(name="장애인과태료업무 장비업체 단속파일로 단속자료 생성", value=METHOD_URL.createCrdnByLinkFile)
public ModelAndView createCrdnByLinkFile(String entType, String[] linkFileInfos) {
return super.createCrdnByLinkFile(entType, linkFileInfos);
}
@Override
@RequestMapping(name="장애인과태료업무 단속자료 수기 등록 화면", value=METHOD_URL.getManualRegistrationScreen)
public ModelAndView getManualRegistrationScreen(HttpServletRequest hReq) {

@ -3,6 +3,7 @@ package cokr.xit.fims.task.web;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
@ -229,6 +230,12 @@ public class EcaController {
return super.removeLinkFile(hReq);
}
@Override
@PostMapping(name="전기차과태료업무 장비업체 단속파일로 단속자료 생성", value=METHOD_URL.createCrdnByLinkFile)
public ModelAndView createCrdnByLinkFile(String entType, String[] linkFileInfos) {
return super.createCrdnByLinkFile(entType, linkFileInfos);
}
@Override
@RequestMapping(name="전기차과태료업무 단속자료 수기 등록 화면", value=METHOD_URL.getManualRegistrationScreen)
public ModelAndView getManualRegistrationScreen(HttpServletRequest hReq) {

Loading…
Cancel
Save