diff --git a/src/main/java/cokr/xit/adds/biz/nims/model/BizNimsRequest.java b/src/main/java/cokr/xit/adds/biz/nims/model/BizNimsRequest.java
index ab7528b..20229f2 100644
--- a/src/main/java/cokr/xit/adds/biz/nims/model/BizNimsRequest.java
+++ b/src/main/java/cokr/xit/adds/biz/nims/model/BizNimsRequest.java
@@ -207,6 +207,7 @@ public class BizNimsRequest {
*/
@Schema(name = "DsuseMgtInqReq", description = "마약류 폐기 관리 조회 DTO")
@Getter
+ @Setter
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/src/main/java/cokr/xit/adds/biz/nims/web/BizNimsController.java b/src/main/java/cokr/xit/adds/biz/nims/web/BizNimsController.java
index 4105faa..691b77f 100644
--- a/src/main/java/cokr/xit/adds/biz/nims/web/BizNimsController.java
+++ b/src/main/java/cokr/xit/adds/biz/nims/web/BizNimsController.java
@@ -102,22 +102,6 @@ public class BizNimsController {
}
@Operation(summary = "Nims 폐기 보고 조회", description = "NIMS의 업체 폐기 보고 정보 목록 조회
NIMS API 호출 결과 Return
아래 항목만 set
sdt - 조회시작일(취급일자)
edt - 조회종료일(취급일자)
bc - 마약류취급자식별번호
bn - 마약류취급자업체명
ur - 사용자보고식별번호
userId - 사용자ID
bc, bn, ur는 모두 null 가능", tags = { "NIMS API" })
- // @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = {
- // @Content(mediaType = "application/json", examples = {
- // @ExampleObject(value = """
- // {
- // "sdt": "20240105",
- // "edt": "20240105",
- // "bc": "",
- // "bn": "",
- // "ur": "",
- // "fg2": "0",
- // "ps": "01",
- // "userId": "suji"
- // }
- // """)
- // })
- // })
@RequestMapping(value = "/getNimsDsuseRptInfo", method = { RequestMethod.POST, RequestMethod.GET })
public ApiBaseResponse> getNimsDsuseRptInfo(
@ModelAttribute NimsApiRequest.DsuseRptInfoReq dto
@@ -242,9 +226,9 @@ public class BizNimsController {
}
@Operation(summary = "보고문서 생성을 위한 사고 마약류 폐기 관리 목록 조회", description = "보고문서 생성을 위한 마약류 폐기 관리 목록 조회
사고마약류 결과결과[통보]서, 폐기내역 및 사진 문서 작성을 위한 데이타 조회", tags = { "BIZ API" })
- @PostMapping(value = "/getDsuseMgtListForRptDoc")
+ @RequestMapping(value = "/getDsuseMgtListForRptDoc", method = { RequestMethod.POST, RequestMethod.GET })
public ApiBaseResponse> getDsuseMgtListForRptDoc(
- @RequestBody BizNimsRequest.DsuseMgtInqReq dto
+ @ModelAttribute BizNimsRequest.DsuseMgtInqReq dto
) {
return ApiBaseResponse.of(bizNimsService.getDsuseMgts(dto, true));
}
diff --git a/src/main/resources/sql/work/nims_work.sql b/src/main/resources/sql/work/nims_work.sql
index 49a92be..19f916a 100644
--- a/src/main/resources/sql/work/nims_work.sql
+++ b/src/main/resources/sql/work/nims_work.sql
@@ -81,4 +81,51 @@ select dscdmng_id
select *
from tb_dsuse_rpt_info
-where use_yn = 'Y';
\ No newline at end of file
+where use_yn = 'Y';
+
+ SELECT distinct
+ tdm.DSCDMNG_ID
+ , tdm.DSUSE_MTH_CD
+ , tcc.CODE_VAL AS DSUSE_MTH_NM
+ , tdm.DSUSE_DE
+ , tf.FILE_ID
+ -- , tf.FILE_NM
+ -- , IF(tf.FILE_ID IS NULL, 'Y', 'N') AS ins_yn
+ -- , IFNULL(tf.FILE_ID, 'N') AS ins_yn
+ FROM tb_dsuse_mgt tdm
+ JOIN tb_cmn_code tcc
+ ON tdm.dsuse_mth_cd = tcc.code
+ AND tcc.grp_id = 'ADDS05'
+ LEFT JOIN tb_file tf
+ ON tdm.dscdmng_id = tf.inf_key
+ AND tf.INF_TYPE = '110'
+ WHERE tdm.use_yn = 'Y'
+ AND tdm.dept_cd = '4050149'
+ AND tdm.dsuse_mth_cd = '3'
+ AND tdm.dsuse_de = '20240709';
+
+ SELECT tdm.DSCDMNG_ID
+ , tdm.DSUSE_MTH_CD
+ , tcc.CODE_VAL AS DSUSE_MTH_NM
+ , tdm.DSUSE_DE
+ -- , tf.FILE_ID
+ -- , tf.FILE_NM
+ -- , IF(tf.FILE_ID IS NULL, 'Y', 'N') AS ins_yn
+ -- , IFNULL(tf.FILE_ID, 'N') AS ins_yn
+ FROM tb_dsuse_mgt tdm
+ JOIN tb_cmn_code tcc
+ ON (tdm.dsuse_mth_cd = tcc.code
+ AND tcc.grp_id = 'ADDS05')
+ WHERE EXISTS (
+ select 1
+ from tb_file
+ where tdm.dscdmng_id = inf_key
+ AND INF_TYPE = '110'
+
+ )
+ AND tdm.use_yn = 'Y'
+ AND tdm.dept_cd = '4050149'
+ AND tdm.dsuse_mth_cd = '3'
+ AND tdm.dsuse_de = '20240709'
+ ;
+