diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn06ServiceBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn06ServiceBean.java index ed31287c..e671fbe2 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn06ServiceBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn06ServiceBean.java @@ -1,5 +1,6 @@ package cokr.xit.fims.crdn.service.bean; +import java.util.Iterator; import java.util.List; import javax.annotation.Resource; @@ -40,7 +41,27 @@ public class Crdn06ServiceBean extends AbstractServiceBean implements Crdn06Serv case "fineReductionData": return crdn06Mapper.selectFineReductionDataList(req.setOrderBy("CRDN_ID")); case "photo": - return crdn06Mapper.selectPhotoInspectionDataList(req.setOrderBy("CRDN_ID")); + List dataObjectList = crdn06Mapper.selectPhotoInspectionDataList(req.setOrderBy("VHRNO, CRDN_PLC")); + Iterator 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; case "sameVehicleMain": return crdn06Mapper.selectSameVehicleMainList(req.setOrderBy("VHRNO")); case "sameVehicleSub": diff --git a/src/main/resources/sql/mapper/fims/crdn/crdn06-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/crdn06-mapper.xml index 17bf6b3c..a3b49a63 100644 --- a/src/main/resources/sql/mapper/fims/crdn/crdn06-mapper.xml +++ b/src/main/resources/sql/mapper/fims/crdn/crdn06-mapper.xml @@ -245,12 +245,16 @@ AND C.${by} LIKE CONCAT('%', #{term}, '%')