|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package cokr.xit.fims.crdn.service.bean;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Iterator;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
@ -34,42 +35,66 @@ public class Crdn06ServiceBean extends AbstractServiceBean implements Crdn06Serv
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<DataObject> getCrackdownList(CrdnQuery req) {
|
|
|
|
|
|
|
|
|
|
List<DataObject> dataObjectList = new ArrayList<DataObject>();
|
|
|
|
|
switch (ifEmpty(req.getGrid(), () -> "")) {
|
|
|
|
|
case "tagInformationUndefinedData":
|
|
|
|
|
return crdn06Mapper.selectTagInformationUndefinedDataList(req.setOrderBy("CRDN_ID"));
|
|
|
|
|
dataObjectList = crdn06Mapper.selectTagInformationUndefinedDataList(req.setOrderBy("CRDN_ID"));
|
|
|
|
|
break;
|
|
|
|
|
case "fineReductionData":
|
|
|
|
|
return crdn06Mapper.selectFineReductionDataList(req.setOrderBy("CRDN_ID"));
|
|
|
|
|
dataObjectList = crdn06Mapper.selectFineReductionDataList(req.setOrderBy("CRDN_ID"));
|
|
|
|
|
break;
|
|
|
|
|
case "photo":
|
|
|
|
|
List<DataObject> dataObjectList = crdn06Mapper.selectPhotoInspectionDataList(req.setOrderBy("VHRNO, CRDN_PLC"));
|
|
|
|
|
Iterator<DataObject> iterator = dataObjectList.iterator();
|
|
|
|
|
while(iterator.hasNext()) {
|
|
|
|
|
DataObject dataObject = iterator.next();
|
|
|
|
|
|
|
|
|
|
if(dataObject.number("ATCH_FILE_CNT").intValue() < 1) {
|
|
|
|
|
dataObject.set("INSP_RSLT", "사진없음");
|
|
|
|
|
dataObject.set("PRCS_MTHD", "해당자료에 사진을 등록하시기 바랍니다.");
|
|
|
|
|
} else if(dataObject.number("CRDN_CNT").intValue() > 1) {
|
|
|
|
|
dataObject.set("INSP_RSLT", "중복자료");
|
|
|
|
|
if(req.getTaskSeCd().equals("PVS")) {
|
|
|
|
|
dataObject.set("PRCS_MTHD", "한건을 시간초과로 처리하십시요.");
|
|
|
|
|
} else {
|
|
|
|
|
dataObject.set("PRCS_MTHD", "한건을 서손으로 처리하십시요.");
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
dataObject.set("INSP_RSLT", "정상자료");
|
|
|
|
|
dataObject.set("PRCS_MTHD", "정상자료");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return dataObjectList;
|
|
|
|
|
dataObjectList = crdn06Mapper.selectPhotoInspectionDataList(req.setOrderBy("VHRNO, CRDN_PLC"));
|
|
|
|
|
break;
|
|
|
|
|
case "sameVehicleMain":
|
|
|
|
|
return crdn06Mapper.selectSameVehicleMainList(req.setOrderBy("VHRNO"));
|
|
|
|
|
dataObjectList = crdn06Mapper.selectSameVehicleMainList(req.setOrderBy("VHRNO"));
|
|
|
|
|
break;
|
|
|
|
|
case "sameVehicleSub":
|
|
|
|
|
return crdn06Mapper.selectSameVehicleSubList(req.setOrderBy("CRDN_ID"));
|
|
|
|
|
dataObjectList = crdn06Mapper.selectSameVehicleSubList(req.setOrderBy("CRDN_ID"));
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
return crdn06Mapper.selectCrackdownList(req.setOrderBy("CRDN_ID"));
|
|
|
|
|
dataObjectList = crdn06Mapper.selectCrackdownList(req.setOrderBy("CRDN_ID"));
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(ifEmpty(req.getGrid(), () -> "").equals("tagInformationUndefinedData")
|
|
|
|
|
|| ifEmpty(req.getGrid(), () -> "").equals("fineReductionData")) {
|
|
|
|
|
Iterator<DataObject> iterator = dataObjectList.iterator();
|
|
|
|
|
while(iterator.hasNext()) {
|
|
|
|
|
DataObject dataObject = iterator.next();
|
|
|
|
|
String state = dataObject.string("CRDN_STTS_CD");
|
|
|
|
|
int advntceLevyAmt = dataObject.number("ADVNTCE_LEVY_AMT").intValue();
|
|
|
|
|
int levyAmt = dataObject.number("LEVY_AMT").intValue();
|
|
|
|
|
int minusAmt = dataObject.number("MINUS_AMT").intValue();
|
|
|
|
|
int adtnAmt = dataObject.number("ADTN_AMT").intValue();
|
|
|
|
|
int rcvmtAmt = dataObject.number("RCVMT_AMT").intValue();
|
|
|
|
|
|
|
|
|
|
dataObject.set("BLNC", crdn06Bean.getBalance(state,advntceLevyAmt,levyAmt,minusAmt,adtnAmt,rcvmtAmt));
|
|
|
|
|
}
|
|
|
|
|
} else if(ifEmpty(req.getGrid(), () -> "").equals("photo")) {
|
|
|
|
|
Iterator<DataObject> iterator = dataObjectList.iterator();
|
|
|
|
|
while(iterator.hasNext()) {
|
|
|
|
|
DataObject dataObject = iterator.next();
|
|
|
|
|
|
|
|
|
|
if(dataObject.number("ATCH_FILE_CNT").intValue() < 1) {
|
|
|
|
|
dataObject.set("INSP_RSLT", "사진없음");
|
|
|
|
|
dataObject.set("PRCS_MTHD", "해당자료에 사진을 등록하시기 바랍니다.");
|
|
|
|
|
} else if(dataObject.number("CRDN_CNT").intValue() > 1) {
|
|
|
|
|
dataObject.set("INSP_RSLT", "중복자료");
|
|
|
|
|
if(req.getTaskSeCd().equals("PVS")) {
|
|
|
|
|
dataObject.set("PRCS_MTHD", "한건을 시간초과로 처리하십시요.");
|
|
|
|
|
} else {
|
|
|
|
|
dataObject.set("PRCS_MTHD", "한건을 서손으로 처리하십시요.");
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
dataObject.set("INSP_RSLT", "정상자료");
|
|
|
|
|
dataObject.set("PRCS_MTHD", "정상자료");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return dataObjectList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|