fix: 마약류 제품 조회 POST, GET 모두 지원하도록 변경

dev
Jonguk. Lim 5 months ago
parent 7ad10bd3be
commit 36d2791570

@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
@ -60,10 +61,18 @@ public class BizNimsController {
return ApiBaseResponse.of(bizNimsService.saveBsshInfoSt(dto));
}
@Operation(summary = "NIMS 마약류 상품 정보 조회", description = "마약류 상품정보 조회<br><br>NIMS API 호출 결과를 DB에 저장후 결과 Return", tags = { "NIMS API" })
@PostMapping(value = "/getNimsProductInfoKd")
// @Operation(summary = "NIMS 마약류 제품 조회", description = "마약류 제품 조회<br><br>NIMS API 호출 결과를 DB에 저장후 결과 Return", tags = { "NIMS API" })
// @PostMapping(value = "/getNimsProductInfoKd")
// public ApiBaseResponse<List<NimsApiDto.ProductInfoKd>> getNimsMnfSeqInfo(
// @RequestBody NimsApiRequest.ProductInfoReq dto
// ) {
// return ApiBaseResponse.of(bizNimsService.saveProductInfoKd(dto, false));
// }
@Operation(summary = "NIMS 마약류 제품 조회", description = "마약류 제품 조회<br><br>NIMS API 호출 결과를 DB에 저장후 결과 Return", tags = { "NIMS API" })
@RequestMapping(value = "/getNimsProductInfoKd", method = { RequestMethod.POST, RequestMethod.GET })
public ApiBaseResponse<List<NimsApiDto.ProductInfoKd>> getNimsMnfSeqInfo(
@RequestBody NimsApiRequest.ProductInfoReq dto
NimsApiRequest.ProductInfoReq dto
) {
return ApiBaseResponse.of(bizNimsService.saveProductInfoKd(dto, false));
}

@ -85,23 +85,66 @@ select *
from tb_dsuse_rpt_info
where use_yn = 'Y';
select tdm.dscdmng_id
, tdm.user_id
, tdri.*
, tbi.rprsntv_nm
, tbi.prmisn_no
select tdm.dscdmng_id,
tdm.dept_cd,
tdm.user_id,
tdm.prgrs_stts_cd,
tdm.bssh_cd,
tdm.rnd_dtl_rpt_cnt,
tdm.hdr_de,
tdm.dsuse_se_cd,
tdm.dsuse_prv_cd,
tdm.dsuse_mth_cd,
tdm.dsuse_loc,
tdm.dsuse_de,
tf.SUB_TYPE,
tf.FILE_ID,
tf.FILE_NM,
tcc.code_val
from tb_dsuse_mgt tdm
join tb_dsuse_rpt_info tdri
on (tdm.org_usr_rpt_id_no = tdri.org_usr_rpt_id_no
and tdm.usr_rpt_id_no = tdri.usr_rpt_id_no)
left outer join tb_bssh_info tbi
on tdri.bssh_cd = tbi.bssh_cd
left join tb_file tf
on (tdm.dscdmng_id = tf.INF_KEY
and tf.INF_TYPE = '200')
left join tb_cmn_code tcc
on (tcc.CODE = tf.SUB_TYPE
and tcc.GRP_ID = 'ADDS12');
select tdm.dscdmng_id,
tdm.dept_cd,
tdm.user_id,
tdm.prgrs_stts_cd,
tdm.bssh_cd,
tdm.rnd_dtl_rpt_cnt,
tdm.hdr_de,
tdm.dsuse_se_cd,
tdm.dsuse_prv_cd,
tdm.dsuse_mth_cd,
tdm.dsuse_loc,
tdm.dsuse_de,
max(case when tf.SUB_TYPE = '01' THEN tf.file_id end) as '폐기결과보고서',
max(case when tf.SUB_TYPE = '02' THEN tf.file_id end) as '폐기처리내역및사진'
-- max(case when tf.SUB_TYPE = '01' THEN tf.file_nm end) as '폐기결과보고서파일',
-- max(case when tf.SUB_TYPE = '02' THEN tf.file_nm end) as '폐기처리내역및사진파일'
from tb_dsuse_mgt tdm
left join tb_file tf
on (tdm.dscdmng_id = tf.INF_KEY
and tf.INF_TYPE = '200')
left join tb_cmn_code tcc
on (tcc.CODE = tf.SUB_TYPE
and tcc.GRP_ID = 'ADDS12')
group by tdm.dscdmng_id,
tdm.dept_cd,
tdm.user_id,
tdm.prgrs_stts_cd,
tdm.bssh_cd,
tdm.rnd_dtl_rpt_cnt,
tdm.hdr_de,
tdm.dsuse_se_cd,
tdm.dsuse_prv_cd,
tdm.dsuse_mth_cd,
tdm.dsuse_loc,
tdm.dsuse_de
order by tdm.dscdmng_id desc;
select tu.USER_ID,
tu.USER_ACNT,
tu.DEPT_CD,
tdaki.dept_nm,
tdaki.api_key
from tb_user tu
join tb_dsuse_api_key_info tdaki
on tu.DEPT_CD = tdaki.dept_cd;
Loading…
Cancel
Save