From 50cb866b65561e59cb03b4396d5549c129929f6b Mon Sep 17 00:00:00 2001 From: "Jonguk. Lim" Date: Thu, 8 Aug 2024 12:24:03 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=8B=A0=EC=B2=AD=EC=84=9C=EC=A0=91?= =?UTF-8?q?=EC=88=98=20=EC=83=81=EC=84=B8=20=EC=B2=98=EB=A6=AC=EC=8B=9C=20?= =?UTF-8?q?=EC=A0=9C=ED=92=88=EB=AA=A9=EB=A1=9D=20=ED=8C=8C=EB=9D=BC?= =?UTF-8?q?=EB=A9=94=ED=84=B0=EB=A1=9C=20=EC=B2=98=EB=A6=AC=20=ED=95=98?= =?UTF-8?q?=EB=8D=98=20=EB=A1=9C=EC=A7=81=20=20=20=20=20=20->=20=EC=83=81?= =?UTF-8?q?=EC=84=B8=EC=A1=B0=ED=9A=8C=20=ED=99=94=EB=A9=B4=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=B2=98=EB=A6=AC=20=EB=90=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=20=20=20=20=20=20->=20=EC=9A=94=EC=B2=AD=20?= =?UTF-8?q?=ED=97=A4=EB=8D=94=20=ED=81=AC=EA=B8=B0=20=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/adds/cmm/model/DsuseReceiptDtl.java | 3 +- .../cokr/xit/adds/nims/dao/ApiKeyMapper.java | 1 - .../adds/nims/dao/DsuseMgtDetailMapper.java | 8 ++++ .../nims/service/DsuseMgtReceiptService.java | 2 + .../bean/DsuseMgtReceiptServiceBean.java | 10 +++++ .../xit/adds/nims/web/AddsNimsController.java | 22 +++------- .../adds/nims/dsuseMgtDetail-mapper.xml | 18 ++++++++ .../jsp/adds/nims/dsuseMgtReceipt-main.jsp | 42 +++++++++---------- 8 files changed, 67 insertions(+), 39 deletions(-) diff --git a/src/main/java/cokr/xit/adds/cmm/model/DsuseReceiptDtl.java b/src/main/java/cokr/xit/adds/cmm/model/DsuseReceiptDtl.java index 3b37311..0992608 100644 --- a/src/main/java/cokr/xit/adds/cmm/model/DsuseReceiptDtl.java +++ b/src/main/java/cokr/xit/adds/cmm/model/DsuseReceiptDtl.java @@ -4,7 +4,7 @@ import lombok.Data; @Data public class DsuseReceiptDtl { - + private String dscdmngId; private String dscdmngSn; private String prductNm; private String prductCd; @@ -16,4 +16,5 @@ public class DsuseReceiptDtl { private String pceQy; private String pceUnit; private String dsuseQy; + private String usrRptLnIdNo; } diff --git a/src/main/java/cokr/xit/adds/nims/dao/ApiKeyMapper.java b/src/main/java/cokr/xit/adds/nims/dao/ApiKeyMapper.java index b16cfbf..cac7689 100644 --- a/src/main/java/cokr/xit/adds/nims/dao/ApiKeyMapper.java +++ b/src/main/java/cokr/xit/adds/nims/dao/ApiKeyMapper.java @@ -5,7 +5,6 @@ import java.util.List; import org.egovframe.rte.psl.dataaccess.mapper.Mapper; import cokr.xit.adds.nims.ApiKeyQuery; -import cokr.xit.adds.nims.DsuseMgtReceiptQuery; import cokr.xit.foundation.component.AbstractMapper; import cokr.xit.foundation.data.DataObject; diff --git a/src/main/java/cokr/xit/adds/nims/dao/DsuseMgtDetailMapper.java b/src/main/java/cokr/xit/adds/nims/dao/DsuseMgtDetailMapper.java index 25cbe84..cfbfcd7 100644 --- a/src/main/java/cokr/xit/adds/nims/dao/DsuseMgtDetailMapper.java +++ b/src/main/java/cokr/xit/adds/nims/dao/DsuseMgtDetailMapper.java @@ -4,6 +4,7 @@ import java.util.List; import org.egovframe.rte.psl.dataaccess.mapper.Mapper; +import cokr.xit.adds.cmm.model.DsuseReceiptDtl; import cokr.xit.adds.nims.DsuseMgtDetailQuery; import cokr.xit.foundation.component.AbstractMapper; import cokr.xit.foundation.data.DataObject; @@ -20,4 +21,11 @@ public interface DsuseMgtDetailMapper extends AbstractMapper { */ List selectDsuseMgtDetailList(DsuseMgtDetailQuery req); + /** + * 신청서접수 상세 페이지용 조회 + * @param dscdmngId + * @return + */ + List selectDsuseMgtDtlList(String dscdmngId); + } diff --git a/src/main/java/cokr/xit/adds/nims/service/DsuseMgtReceiptService.java b/src/main/java/cokr/xit/adds/nims/service/DsuseMgtReceiptService.java index 68bf389..37e52b4 100644 --- a/src/main/java/cokr/xit/adds/nims/service/DsuseMgtReceiptService.java +++ b/src/main/java/cokr/xit/adds/nims/service/DsuseMgtReceiptService.java @@ -2,6 +2,7 @@ package cokr.xit.adds.nims.service; import java.util.List; +import cokr.xit.adds.cmm.model.DsuseReceiptDtl; import cokr.xit.adds.nims.DsuseMgtReceiptQuery; import cokr.xit.foundation.data.DataObject; @@ -16,6 +17,7 @@ public interface DsuseMgtReceiptService { */ List getDsuseMgtReceiptList(DsuseMgtReceiptQuery query); + List getDsuseMgtDetailList(String dscdmngId); /** * 신청서 접수 삭제. diff --git a/src/main/java/cokr/xit/adds/nims/service/bean/DsuseMgtReceiptServiceBean.java b/src/main/java/cokr/xit/adds/nims/service/bean/DsuseMgtReceiptServiceBean.java index 1fe0c76..edfca29 100644 --- a/src/main/java/cokr/xit/adds/nims/service/bean/DsuseMgtReceiptServiceBean.java +++ b/src/main/java/cokr/xit/adds/nims/service/bean/DsuseMgtReceiptServiceBean.java @@ -6,7 +6,9 @@ import javax.annotation.Resource; import org.springframework.stereotype.Service; +import cokr.xit.adds.cmm.model.DsuseReceiptDtl; import cokr.xit.adds.nims.DsuseMgtReceiptQuery; +import cokr.xit.adds.nims.dao.DsuseMgtDetailMapper; import cokr.xit.adds.nims.dao.DsuseMgtReceiptMapper; import cokr.xit.adds.nims.service.DsuseMgtReceiptService; import cokr.xit.foundation.component.AbstractServiceBean; @@ -19,6 +21,9 @@ public class DsuseMgtReceiptServiceBean extends AbstractServiceBean implements D @Resource(name = "dsuseMgtReceiptMapper") private DsuseMgtReceiptMapper dsuseMgtReceiptMapper; + @Resource(name = "dsuseMgtDetailMapper") + private DsuseMgtDetailMapper dsuseMgtDetailMapper; + @Override public List getDsuseMgtReceiptList(DsuseMgtReceiptQuery query){ if(ifEmpty(query.getOrderBy(), ()->"").equals("")) { @@ -28,6 +33,11 @@ public class DsuseMgtReceiptServiceBean extends AbstractServiceBean implements D return dsuseMgtReceiptMapper.selectDsuseMgtReceiptList(query); } + @Override + public List getDsuseMgtDetailList(String dscdmngId){ + return dsuseMgtDetailMapper.selectDsuseMgtDtlList(dscdmngId); + } + /** 신청서 접수 삭제. * @param query DsuseMgtReceiptQuery * @return 저장된 정보수 diff --git a/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java b/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java index 109b634..1cd0c51 100644 --- a/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java +++ b/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java @@ -160,34 +160,24 @@ public class AddsNimsController extends ApplicationController { @RequestMapping(value = "/dsuseMgtReceipt-info.do", name="신청서 접수 상세") - public ModelAndView getDsuseMgtReceiptInfo(DsuseRsltInfo dsuseReceptInfo, String productList) { + public ModelAndView getDsuseMgtReceiptInfo(DsuseRsltInfo dsuseReceptInfo) { ModelAndView mav = new ModelAndView(); setCmmCode("ADDS04", mav); - - List fileInfo = new ArrayList(); - if(fileInfo == null) { fileInfo = new ArrayList();} - fileInfo = fileInfo.stream() - .filter((item) -> item.string("USE_YN").equals("Y")) - .sorted((item1, item2) -> item1.string("SUB_TYPE").compareTo(item2.string("SUB_TYPE"))) - .toList(); + List fileInfo = new ArrayList<>(); if(!isEmpty(dsuseReceptInfo) && !isEmpty(dsuseReceptInfo.getDscdmngId())){ - mav.setViewName("adds/nims/dsuseMgtReceipt-edit"); mav.addObject("dsuseReceptInfo", toJson(dsuseReceptInfo)); + mav.addObject("dsuseReceptDtlInfo", toJson(dsuseMgtReceiptService.getDsuseMgtDetailList(dsuseReceptInfo.getDscdmngId()))); FileQuery fileQuery = new FileQuery().setInfoType("100").setInfoKeys(dsuseReceptInfo.getDscdmngId()).setOrderBy("SUB_TYPE"); fileInfo = fileService.getFileList(fileQuery); + + mav.setViewName("adds/nims/dsuseMgtReceipt-edit"); }else{ + mav.addObject("dsuseReceptDtlInfo", toJson(new ArrayList())); mav.setViewName("adds/nims/dsuseMgtReceipt-info"); } - if(productList != null) { - List DsuseReceiptDtls = fromJson(productList, new TypeReference>() {}); - mav.addObject("dsuseReceptDtlInfo", toJson(DsuseReceiptDtls)); - } else { - mav.addObject("dsuseReceptDtlInfo", toJson(new ArrayList())); - } - mav.addObject("fileInfo", toJson(fileInfo)); return mav.addObject("pageName", "dsuseMgtReceiptInfo"); // View(jsp)에서 사용할 id 뒤에 붙일 suffix } diff --git a/src/main/resources/sql/mapper/adds/nims/dsuseMgtDetail-mapper.xml b/src/main/resources/sql/mapper/adds/nims/dsuseMgtDetail-mapper.xml index d074012..0090c88 100644 --- a/src/main/resources/sql/mapper/adds/nims/dsuseMgtDetail-mapper.xml +++ b/src/main/resources/sql/mapper/adds/nims/dsuseMgtDetail-mapper.xml @@ -35,4 +35,22 @@ + + diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-main.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-main.jsp index b2f0026..5918325 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-main.jsp @@ -308,27 +308,27 @@ dsuseAcdtDe: row.DSUSE_ACDT_DE, prgrsSttsCd: row.PRGRS_STTS_CD }; - let productDS = $P.detailControl.dataset.getDataset(); - if(productDS.length > 0){ - let newArr = []; - for(let product of productDS){ - let newObj = {}; - newObj.dscdmngSn = product.DSCDMNG_SN; - newObj.prductNm = product.PRDUCT_NM; - newObj.prductCd = product.PRDUCT_CD; - newObj.prdValidDe = product.PRD_VALID_DE; - newObj.mnfNo = product.MNF_NO; - newObj.mnfSeq = product.MNF_SEQ; - newObj.minDistbQy = product.MIN_DISTB_QY; - newObj.minDistbUnit = product.MIN_DISTB_UNIT; - newObj.pceQy = product.PCE_QY; - newObj.pceUnit = product.PCE_UNIT; - newObj.dsuseQy = product.DSUSE_QY; - newArr.push(newObj); - } - params.productList = JSON.stringify(newArr); - - } + // let productDS = $P.detailControl.dataset.getDataset(); + // if(productDS.length > 0){ + // let newArr = []; + // for(let product of productDS){ + // let newObj = {}; + // newObj.dscdmngSn = product.DSCDMNG_SN; + // newObj.prductNm = product.PRDUCT_NM; + // newObj.prductCd = product.PRDUCT_CD; + // newObj.prdValidDe = product.PRD_VALID_DE; + // newObj.mnfNo = product.MNF_NO; + // newObj.mnfSeq = product.MNF_SEQ; + // newObj.minDistbQy = product.MIN_DISTB_QY; + // newObj.minDistbUnit = product.MIN_DISTB_UNIT; + // newObj.pceQy = product.PCE_QY; + // newObj.pceUnit = product.PCE_UNIT; + // newObj.dsuseQy = product.DSUSE_QY; + // newArr.push(newObj); + // } + // params.productList = JSON.stringify(newArr); + // + // } } ajax.get({