|
|
|
@ -19,6 +19,7 @@ import cokr.xit.base.file.service.bean.FileBean;
|
|
|
|
|
import cokr.xit.base.file.web.FileInfoFactory;
|
|
|
|
|
import cokr.xit.fims.crdn.Crdn;
|
|
|
|
|
import cokr.xit.fims.crdn.dao.GlobalStngMapper;
|
|
|
|
|
import cokr.xit.fims.crdn.parsing.HiteCom;
|
|
|
|
|
import cokr.xit.fims.crdn.service.CrdnService;
|
|
|
|
|
import cokr.xit.fims.crdn.service.ImportService;
|
|
|
|
|
import cokr.xit.foundation.component.AbstractServiceBean;
|
|
|
|
@ -91,6 +92,7 @@ public class ImportServiceBean extends AbstractServiceBean implements ImportServ
|
|
|
|
|
|
|
|
|
|
List<FileInfo> fileInfoList = new ArrayList<FileInfo>();
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
if(entType.equals("ino")) {
|
|
|
|
|
crdn.setCrdnInptSeCd("11");
|
|
|
|
|
|
|
|
|
@ -133,14 +135,62 @@ public class ImportServiceBean extends AbstractServiceBean implements ImportServ
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
if(entType.equals("knl")) {
|
|
|
|
|
crdn.setCrdnInptSeCd("12");
|
|
|
|
|
|
|
|
|
|
crdn.setVltnCd("01");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
if(entType.equals("hitecom")) {
|
|
|
|
|
crdn.setCrdnInptSeCd("15");
|
|
|
|
|
|
|
|
|
|
crdn.setVltnCd("01");
|
|
|
|
|
|
|
|
|
|
//1. 연계파일정보를 단속 엔티티로 변환
|
|
|
|
|
if(linkFileInfoList.size() != 1) {
|
|
|
|
|
resultMap.put("saved", false);
|
|
|
|
|
resultMap.put("failReason", "그룹핑 오류");
|
|
|
|
|
return resultMap;
|
|
|
|
|
}
|
|
|
|
|
DataObject linkFileInfo = linkFileInfoList.get(0);
|
|
|
|
|
crdn.setSggCd(globalStngMapper.selectSggCdForCurrentUser());
|
|
|
|
|
crdn.setVhrno(linkFileInfo.string("VHRNO"));
|
|
|
|
|
crdn.setCrdnYmd(linkFileInfo.string("CRDN_YMD"));
|
|
|
|
|
crdn.setCrdnTm(linkFileInfo.string("CRDN_TM"));
|
|
|
|
|
crdn.setGpsX(linkFileInfo.string("GPS_X"));
|
|
|
|
|
crdn.setGpsY(linkFileInfo.string("GPS_Y"));
|
|
|
|
|
crdn.setMoscX(linkFileInfo.string("MOSC_X"));
|
|
|
|
|
crdn.setMoscY(linkFileInfo.string("MOSC_Y"));
|
|
|
|
|
|
|
|
|
|
//linkFileInfo.string("EQUIPMENT");
|
|
|
|
|
//linkFileInfo.string("PLATE_WIDTH");
|
|
|
|
|
//linkFileInfo.string("PLATE_HEIGHT");
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
FileInfo FileInfo1 = HiteCom.base64ToFileInfo(linkFileInfo.string("CAR_IMAGE_NM"), linkFileInfo.string("CAR_IMAGE"), 1);
|
|
|
|
|
fileInfoList.add(FileInfo1);
|
|
|
|
|
FileInfo FileInfo2 = HiteCom.base64ToFileInfo(linkFileInfo.string("PLATE_IMAGE_NM"), linkFileInfo.string("PLATE_IMAGE"), 2);
|
|
|
|
|
fileInfoList.add(FileInfo2);
|
|
|
|
|
|
|
|
|
|
int otherPhotoCnt = linkFileInfo.number("PHOTO_CNT").intValue() - 2;
|
|
|
|
|
for(int i=1; i <= otherPhotoCnt; i++){
|
|
|
|
|
String fileName = linkFileInfo.string("MOVING_IMAGE"+i+"_NM");
|
|
|
|
|
String b64str = linkFileInfo.string("MOVING_IMAGE"+i);
|
|
|
|
|
FileInfo FileInfo = HiteCom.base64ToFileInfo(fileName, b64str, i + 2);
|
|
|
|
|
fileInfoList.add(FileInfo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//2. 차적 조회
|
|
|
|
|
List<Crdn> crdns = new ArrayList<Crdn>();
|
|
|
|
|
crdns.add(crdn);
|
|
|
|
|