From c974cd2a32b3d7223697447c30ac7fe25eac8a09 Mon Sep 17 00:00:00 2001 From: leebj Date: Mon, 1 Jul 2024 13:57:31 +0900 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=ED=95=9C=EA=B8=80=EB=AC=B8=EC=84=9C?= =?UTF-8?q?=20=EC=84=9C=EC=8B=9D=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= =?UTF-8?q?(=ED=8F=90=EA=B8=B0=EC=88=98=EB=9F=89=20=ED=91=9C=EC=8B=9C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cokr/xit/adds/cmmn/hwp/format/DisposeProcessDetails.java | 2 +- .../java/cokr/xit/adds/cmmn/hwp/format/DisposeResultReport.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/cokr/xit/adds/cmmn/hwp/format/DisposeProcessDetails.java b/src/main/java/cokr/xit/adds/cmmn/hwp/format/DisposeProcessDetails.java index 1004836..546e0b7 100644 --- a/src/main/java/cokr/xit/adds/cmmn/hwp/format/DisposeProcessDetails.java +++ b/src/main/java/cokr/xit/adds/cmmn/hwp/format/DisposeProcessDetails.java @@ -143,7 +143,7 @@ public class DisposeProcessDetails extends HWPFormat { .set("최소유통단위", one.string("minDistbQy")+one.string("stdPackngStleNm")) .set("제조번호", one.string("mnfNo")) .set("사용기한", DataFormat.yyyy_mm_dd(one.string("prdValidDe"))) - .set("수량", one.string("pceQy")+one.string("pceCoUnitNm")) + .set("수량", one.string("dsuseQy")+one.string("pceCoUnitNm")) ; }).toList(); diff --git a/src/main/java/cokr/xit/adds/cmmn/hwp/format/DisposeResultReport.java b/src/main/java/cokr/xit/adds/cmmn/hwp/format/DisposeResultReport.java index a5d8a56..bbfb324 100644 --- a/src/main/java/cokr/xit/adds/cmmn/hwp/format/DisposeResultReport.java +++ b/src/main/java/cokr/xit/adds/cmmn/hwp/format/DisposeResultReport.java @@ -43,7 +43,7 @@ public class DisposeResultReport extends HWPFormat { .set("제품정보-최소유통단위", one.string("minDistbQy")+one.string("stdPackngStleNm")) .set("제품정보-제조번호", one.string("mnfNo")) .set("제품정보-유효기한", DataFormat.yyyy_mm_dd(one.string("prdValidDe"))) - .set("폐기량-수량", one.string("pceQy")+one.string("pceCoUnitNm")) + .set("폐기량-수량", one.string("dsuseQy")+one.string("pceCoUnitNm")) ; }).toList(); writer.table(0, 3, 1).setValues(list); From d3070b33270b56c7c196edd524910027bc21449f Mon Sep 17 00:00:00 2001 From: leebj Date: Mon, 1 Jul 2024 14:01:18 +0900 Subject: [PATCH 2/3] =?UTF-8?q?fix=20:=201.=EC=82=AD=EC=A0=9C=EC=97=AC?= =?UTF-8?q?=EB=B6=80=EA=B0=80=20Y=EC=9D=B8=20=ED=8C=8C=EC=9D=BC=EC=A0=95?= =?UTF-8?q?=EB=B3=B4=EA=B0=80=20=ED=8F=AC=ED=95=A8=EB=90=A0=20=EA=B2=BD?= =?UTF-8?q?=EC=9A=B0=20=EC=A0=9C=EC=99=B8=202.=EC=A4=91=EB=B3=B5=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=EC=9D=B4=20=EC=A1=B4=EC=9E=AC=ED=95=A0?= =?UTF-8?q?=EC=8B=9C=20=EA=B0=80=EC=9E=A5=20=EB=82=98=EC=A4=91=EC=97=90=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=EB=90=9C=20=EA=B2=83=EC=9D=84=20=EA=B0=80?= =?UTF-8?q?=EC=A0=B8=EC=98=A4=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95=203.?= =?UTF-8?q?=EC=BF=BC=EB=A6=AC=EC=97=90=EC=84=9C=20=EC=A1=B0=ED=9A=8C?= =?UTF-8?q?=ED=95=9C=20=ED=8C=8C=EC=9D=BC=EC=9D=B4=20=EC=A0=95=EB=A0=AC?= =?UTF-8?q?=EB=90=98=EC=A7=80=20=EC=95=8A=EC=95=98=EC=9D=84=20=EA=B2=BD?= =?UTF-8?q?=EC=9A=B0=20=EC=9E=AC=EC=A0=95=EB=A0=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/adds/nims/web/AddsNimsController.java | 61 +++++++++++++++---- 1 file changed, 48 insertions(+), 13 deletions(-) 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 4d89063..87009d3 100644 --- a/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java +++ b/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java @@ -15,9 +15,6 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; -import net.minidev.json.JSONObject; -import net.minidev.json.parser.ParseException; - import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; @@ -45,6 +42,8 @@ import cokr.xit.base.web.ApplicationController; import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.JSON; import cokr.xit.foundation.web.WebClient; +import net.minidev.json.JSONObject; +import net.minidev.json.parser.ParseException; @Controller @RequestMapping( @@ -87,6 +86,11 @@ public class AddsNimsController extends ApplicationController { 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(); if(!isEmpty(dsuseReceptInfo) && !isEmpty(dsuseReceptInfo.getDscdmngId())){ mav.addObject("dsuseReceptInfo", toJson(dsuseReceptInfo)); @@ -144,6 +148,15 @@ public class AddsNimsController extends ApplicationController { FileQuery fileQuery = new FileQuery().setInfoType("110").setInfoKeys(dsuseRsltInfo.getDscdmngId()); List fileInfos = fileService.getFileList(fileQuery); + if(fileInfos == null) { fileInfos = new ArrayList(); } + fileInfos = fileInfos.stream() + .filter((item) -> item.string("USE_YN").equals("Y")) + .sorted((item1, item2) -> { + int a = item1.number("SRT_ORD").intValue(); + int b = item2.number("SRT_ORD").intValue(); + return (a < b) ? -1 : ((a == b) ? 0 : 1); + }) + .toList(); mav.addObject("fileInfos", toJson(fileInfos)); return mav @@ -229,11 +242,17 @@ public class AddsNimsController extends ApplicationController { List fileinfo = fileService.getFileList( new FileQuery().setInfoKeys(infKey).setInfoType("100").setBy("SUB_TYPE").setTerm(subType) ); - if(fileinfo == null || fileinfo.isEmpty()) { - data.put("filePath", ""); - } else { - data.put("filePath", fileinfo.get(0).string("FILE_PATH")); - } + if(fileinfo == null) { fileinfo = new ArrayList(); } + fileinfo = fileinfo.stream() + .filter((item) -> item.string("USE_YN").equals("Y")) + .sorted((item1, item2) -> item1.string("FILE_ID").compareTo(item2.string("FILE_ID"))) + .toList(); + + if(fileinfo.isEmpty()) { + data.put("filePath", ""); + } else { + data.put("filePath", fileinfo.get(fileinfo.size()-1).string("FILE_PATH")); + } } @@ -277,6 +296,16 @@ public class AddsNimsController extends ApplicationController { List dsuseimgs = fileService.getFileList( new FileQuery().setInfoType("110").setInfoKeys(dataForDoc.get(0).string("dscdmngId")) ); + if(dsuseimgs == null) { dsuseimgs = new ArrayList(); } + dsuseimgs = dsuseimgs.stream() + .filter((item) -> item.string("USE_YN").equals("Y")) + .sorted((item1, item2) -> { + int a = item1.number("SRT_ORD").intValue(); + int b = item2.number("SRT_ORD").intValue(); + return (a < b) ? -1 : ((a == b) ? 0 : 1); + }) + .toList(); + List dsuseimgPaths = new ArrayList<>(); for(DataObject dsuseimg : dsuseimgs) { dsuseimgPaths.add(dsuseimg.string("FILE_PATH")); @@ -289,11 +318,17 @@ public class AddsNimsController extends ApplicationController { List fileinfo = fileService.getFileList( new FileQuery().setInfoKeys(infKey).setInfoType("100").setBy("SUB_TYPE").setTerm(subType) ); - if(fileinfo == null || fileinfo.isEmpty()) { - data.put("filePath", ""); - } else { - data.put("filePath", fileinfo.get(0).string("FILE_PATH")); - } + if(fileinfo == null) { fileinfo = new ArrayList(); } + fileinfo = fileinfo.stream() + .filter((item) -> item.string("USE_YN").equals("Y")) + .sorted((item1, item2) -> item1.string("FILE_ID").compareTo(item2.string("FILE_ID"))) + .toList(); + + if(fileinfo.isEmpty()) { + data.put("filePath", ""); + } else { + data.put("filePath", fileinfo.get(fileinfo.size()-1).string("FILE_PATH")); + } } From b82b8f2aa8f71651d45f7aa755b939b57107024a Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Mon, 1 Jul 2024 14:06:16 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=EC=82=AC=EC=9A=A9=EC=9E=90=20=EA=B8=B0?= =?UTF-8?q?=EA=B4=80/=EB=B6=80=EC=84=9C=20=EA=B4=80=EB=A0=A8=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sql/mapper/base/department-mapper.xml | 8 +++----- .../resources/sql/mapper/base/user-mapper.xml | 14 +++++--------- .../webapp/WEB-INF/jsp/base/user/user-info.jsp | 12 +++++++++--- src/main/webapp/WEB-INF/jsp/login.jsp | 16 ++++++++-------- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/main/resources/sql/mapper/base/department-mapper.xml b/src/main/resources/sql/mapper/base/department-mapper.xml index 184bee0..799fab6 100644 --- a/src/main/resources/sql/mapper/base/department-mapper.xml +++ b/src/main/resources/sql/mapper/base/department-mapper.xml @@ -53,11 +53,9 @@ SELECT A.SGG_CD, SGG_NM, A.INST_CD, INST_NM, DEPT_CD, DEPT_NM - FROM TB_SGG A, TB_DEPT B - WHERE A.USE_YN = 'Y' - AND B.USE_YN = 'Y' - AND A.SGG_CD = B.SGG_CD - AND A.INST_CD = B.INST_CD + FROM TB_SGG A LEFT OUTER JOIN TB_DEPT B + ON A.SGG_CD = B.SGG_CD AND A.INST_CD = B.INST_CD + AND A.USE_YN = 'Y' AND B.USE_YN = 'Y' diff --git a/src/main/resources/sql/mapper/base/user-mapper.xml b/src/main/resources/sql/mapper/base/user-mapper.xml index fb66328..95b1d27 100644 --- a/src/main/resources/sql/mapper/base/user-mapper.xml +++ b/src/main/resources/sql/mapper/base/user-mapper.xml @@ -72,12 +72,8 @@ SELECT USER_ID , DEPT_NM FROM TB_USER A LEFT OUTER JOIN ( - SELECT A.SGG_CD, SGG_NM, A.INST_CD, INST_NM, DEPT_CD, DEPT_NM - FROM TB_SGG A LEFT OUTER JOIN TB_DEPT B - ON A.SGG_CD = B.SGG_CD - AND A.INST_CD = B.INST_CD - AND A.USE_YN = 'Y' AND B.USE_YN = 'Y' - ) B ON A.NSTT_CD = B.INST_CD AND A.DEPT_CD = B.DEPT_CD + + ) B ON ORG_ID = B.SGG_CD AND A.NSTT_CD = B.INST_CD AND A.DEPT_CD = B.DEPT_CD AND ${by} LIKE CONCAT('%', #{term}, '%') USER_ID IN (#{userID}) AND STTS != 'D' @@ -94,9 +90,9 @@ SELECT USER_ID + AND USER_ID = #{userID} + AND USER_ACNT = #{account} + AND ORG_ID = #{orgID} /* 사용자 정보 등록(userMapper.insertUser) */ SELECT LPAD(NVL(MAX(USER_ID) + 1, 1), 10, '0') NEW_ID FROM TB_USER diff --git a/src/main/webapp/WEB-INF/jsp/base/user/user-info.jsp b/src/main/webapp/WEB-INF/jsp/base/user/user-info.jsp index ecc3ec4..0328ec5 100644 --- a/src/main/webapp/WEB-INF/jsp/base/user/user-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/base/user/user-info.jsp @@ -47,10 +47,11 @@
- +
+
@@ -174,7 +175,7 @@