폐기신청 정보 API 반영

dev
Jonguk. Lim 7 months ago
parent b1273b840b
commit d79cabda09

@ -32,6 +32,7 @@ public interface BizNimsService {
List<NimsApiDto.MnfSeqInfo> getMnfSeqInfo(NimsApiRequest.MnfSeqInfoRequest dto); List<NimsApiDto.MnfSeqInfo> getMnfSeqInfo(NimsApiRequest.MnfSeqInfoRequest dto);
List<NimsApiDto.JurisdictionGovInfo> getJurisdictionGovInfo(NimsApiRequest.JurisdictionGovInfoRequest dto); List<NimsApiDto.JurisdictionGovInfo> getJurisdictionGovInfo(NimsApiRequest.JurisdictionGovInfoRequest dto);
List<NimsApiDto.StorageInfo> saveStorageInfo(NimsApiRequest.StorageInfoRequest dto); List<NimsApiDto.StorageInfo> saveStorageInfo(NimsApiRequest.StorageInfoRequest dto);
List<NimsApiDto.DsuseRpt> getDsuseRptInfo(NimsApiRequest.DsuseRptInfoRequest dto);
//------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------
// NIMS BIZ // NIMS BIZ
@ -44,4 +45,6 @@ public interface BizNimsService {
BizNimsAarDto.AarHeader getTgtDsuseRptData(BizNimsRequest.DsuseMgt dto); BizNimsAarDto.AarHeader getTgtDsuseRptData(BizNimsRequest.DsuseMgt dto);
BizNimsAarDto.AarHeader createTgtDsuseRptData(BizNimsAarDto.AarHeader dto); BizNimsAarDto.AarHeader createTgtDsuseRptData(BizNimsAarDto.AarHeader dto);
} }

@ -73,7 +73,7 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe
//------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------
@Override @Override
public List<BsshInfoSt> saveBsshInfoSt(BsshInfoRequest dto) { public List<BsshInfoSt> saveBsshInfoSt(BsshInfoRequest dto) {
NimsApiResult<BsshInfoSt> result = infNimsService.getBsshInfoSt(dto); NimsApiResult.Response<BsshInfoSt> result = infNimsService.getBsshInfoSt(dto);
List<BsshInfoSt> list = result.getResultOrThrow(); List<BsshInfoSt> list = result.getResultOrThrow();
for (BsshInfoSt d : list) { for (BsshInfoSt d : list) {
@ -85,7 +85,7 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe
@Override @Override
public List<ProductInfoKd> saveProductInfoKd(ProductInfoRequest dto) { public List<ProductInfoKd> saveProductInfoKd(ProductInfoRequest dto) {
NimsApiResult<ProductInfoKd> result = infNimsService.getProductInfoKd(dto); NimsApiResult.Response<ProductInfoKd> result = infNimsService.getProductInfoKd(dto);
List<ProductInfoKd> list = result.getResultOrThrow(); List<ProductInfoKd> list = result.getResultOrThrow();
for (ProductInfoKd d : list) { for (ProductInfoKd d : list) {
@ -97,19 +97,20 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe
@Override @Override
public List<NimsApiDto.MnfSeqInfo> getMnfSeqInfo(NimsApiRequest.MnfSeqInfoRequest dto) { public List<NimsApiDto.MnfSeqInfo> getMnfSeqInfo(NimsApiRequest.MnfSeqInfoRequest dto) {
NimsApiResult<NimsApiDto.MnfSeqInfo> result = infNimsService.getMnfSeqInfo(dto); NimsApiResult.Response<NimsApiDto.MnfSeqInfo> response = infNimsService.getMnfSeqInfo(dto);
return result.getResultOrThrow();
return response.getResultOrThrow();
} }
@Override @Override
public List<NimsApiDto.JurisdictionGovInfo> getJurisdictionGovInfo(NimsApiRequest.JurisdictionGovInfoRequest dto) { public List<NimsApiDto.JurisdictionGovInfo> getJurisdictionGovInfo(NimsApiRequest.JurisdictionGovInfoRequest dto) {
NimsApiResult<NimsApiDto.JurisdictionGovInfo> result = infNimsService.getJurisdictionGovInfo(dto); NimsApiResult.Response<NimsApiDto.JurisdictionGovInfo> result = infNimsService.getJurisdictionGovInfo(dto);
return result.getResultOrThrow(); return result.getResultOrThrow();
} }
@Override @Override
public List<NimsApiDto.StorageInfo> saveStorageInfo(NimsApiRequest.StorageInfoRequest dto) { public List<NimsApiDto.StorageInfo> saveStorageInfo(NimsApiRequest.StorageInfoRequest dto) {
NimsApiResult<NimsApiDto.StorageInfo> result = infNimsService.getStorageInfo(dto); NimsApiResult.Response<NimsApiDto.StorageInfo> result = infNimsService.getStorageInfo(dto);
List<NimsApiDto.StorageInfo> list = result.getResultOrThrow(); List<NimsApiDto.StorageInfo> list = result.getResultOrThrow();
for (NimsApiDto.StorageInfo d : list) { for (NimsApiDto.StorageInfo d : list) {
@ -119,9 +120,11 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe
return list; return list;
} }
@Override
public List<NimsApiDto.DsuseRpt> getDsuseRptInfo(NimsApiRequest.DsuseRptInfoRequest dto) {
NimsApiResult.Response<NimsApiDto.DsuseRpt> result = infNimsService.getDsuseRptInfo(dto);
return result.getResultOrThrow();
}
//------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------
// NIMS BIZ // NIMS BIZ

@ -88,7 +88,13 @@ public class BizNimsController {
return ApiBaseResponse.of(bizNimsService.saveStorageInfo(dto)); return ApiBaseResponse.of(bizNimsService.saveStorageInfo(dto));
} }
@Operation(summary = "폐기 보고 정보 조회", description = "폐기 보고 정보 조회<br><br>NIMS API 호출 결과 Return")
@PostMapping("/getDsuseRptInfo")
public ApiBaseResponse<List<NimsApiDto.DsuseRpt>> getDsuseRptInfo(
@RequestBody @Validated NimsApiRequest.DsuseRptInfoRequest dto
) {
return ApiBaseResponse.of(bizNimsService.getDsuseRptInfo(dto));
}
//------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------

@ -0,0 +1,19 @@
package cokr.xit.adds.inf.iros.service;
/**
* <pre>
* description :
*
* packageName : cokr.xit.adds.inf.iros.service
* fileName : InfIrosService
* author : limju
* date : 2024-04-19
* ======================================================================
*
* ----------------------------------------------------------------------
* 2024-04-19 limju
*
* </pre>
*/
public class InfIrosService {
}

@ -0,0 +1,20 @@
package cokr.xit.adds.inf.iros.web;
/**
* <pre>
* description :
*
* packageName : cokr.xit.adds.inf.iros.web
* fileName : InfIrosController
* author : limju
* date : 2024-04-19
* ======================================================================
*
* ----------------------------------------------------------------------
* 2024-04-19 limju
*
* </pre>
*/
public class InfIrosController
{
}

@ -1,8 +1,11 @@
package cokr.xit.adds.inf.nims.model; package cokr.xit.adds.inf.nims.model;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.validation.Valid;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.JsonSerializer;
@ -11,6 +14,7 @@ import com.fasterxml.jackson.databind.SerializerProvider;
import cokr.xit.adds.core.model.AuditDto; import cokr.xit.adds.core.model.AuditDto;
import cokr.xit.adds.core.spring.exception.ApiCustomException; import cokr.xit.adds.core.spring.exception.ApiCustomException;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter; import lombok.Getter;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.Setter; import lombok.Setter;
@ -196,6 +200,186 @@ public class NimsApiDto {
private String updDt; private String updDt;
} }
/**
* response
*/
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
public static class DsuseRpt {
/**
*
*/
@JsonProperty(value = "BSSH_CD", required = true)
private String bsshCd;
/**
*
*/
@JsonProperty(value = "USR_RPT_ID_NO", required = true)
private String usrRptIdNo;
/**
* (0-,1-,2-)
*/
@JsonProperty(value = "RPT_TY_CD", required = true)
private String rptTyCd;
/**
*
*/
@JsonProperty(value = "RND_DTL_RPT_CNT", required = true)
private Integer rndDtlRptCnt;
/**
*
*/
@JsonProperty(value = "HDR_DE", required = true)
private String hdrDe;
/**
*
*/
@JsonProperty(value = "RPT_DE", required = true)
private String rptDe;
/**
*
* 1-, 2-, 4-//
*/
@JsonProperty(value = "DSUSE_SE_CD", required = true)
private String dsuseSeCd;
/**
*
* 01~05, 07~09, 12
*/
@JsonProperty(value = "DSUSE_PRV_CD", required = true)
private String dsusePrvCd;
/**
*
* 1 ~ 9
*/
@JsonProperty(value = "DSUSE_MTH_CD", required = true)
private String dsuseMthCd;
/**
*
*/
@JsonProperty(value = "DSUSE_LOC", required = true)
private String dsuseLoc;
/**
*
*/
@JsonProperty(value = "DSUSE_DE", required = true)
private String dsuseDe;
/**
* (0-,1-,2-)
*/
@JsonProperty(value = "STATUS", required = true)
private String status;
/**
* FIXME:
*
*/
@JsonProperty(value = "DSUSE_RPT_STTUS_CD", required = true)
private String dsuseRptSttusCd;
/**
*
*/
@Builder.Default
@Valid
private List<DsuseRptDtl> dsuseRptDtls = new ArrayList<>();
}
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
public static class DsuseRptDtl {
/**
*
*/
@JsonProperty(value = "USR_RPT_LN_ID_NO", required = true)
private String usrRptLnIdNo;
/**
*
*/
@JsonProperty(value = "PRDCT_CD", required = true)
private String prdctCd;
/**
*
*/
@JsonProperty(value = "PRDCT_NM", required = true)
private String prductNm;
/**
*
*/
@JsonProperty(value = "MIN_DISTB_QY", required = true)
private Integer minDistbQy;
/**
*
*/
@JsonProperty(value = "PCE_QY", required = true)
private Integer pceQy;
/**
*
*/
@JsonProperty(value = "MNF_NO", required = true)
private String mnfNo;
/**
*
*/
@JsonProperty(value = "PRD_VALID_DE", required = true)
private String prdValidDe;
/**
*
*/
@JsonProperty(value = "MNF_SEQ")
private String mnfSeq;
/**
*
*/
@JsonProperty(value = "STORGE_NO", required = true)
private String storgeNo;
/**
*
*/
@JsonProperty(value = "STORGE_NM", required = true)
private String storgeNm;
/**
*
* 1102: , 1170:
*/
@JsonProperty(value = "MVMN_TY_CD", required = true)
private String mvmnTyCd;
/**
*
*/
@JsonProperty(value = "DSUSE_QY", required = true)
private Integer dsuseQy;
}
/** /**
* response * response
*/ */

@ -179,7 +179,109 @@ public class NimsApiRequest {
String pn = StringUtils.EMPTY; String pn = StringUtils.EMPTY;
} }
/** @Schema(name = "DsuseRptInfoRequest", description = "폐기 보고 정보 조회 request")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public static class DsuseRptInfoRequest {
/**
*
*/
@Schema(requiredMode = REQUIRED, title = "인증키", description = "인증키", example = "998003699950fa950b798c9edea1b38f3cfbcf3b77e03e419")
@NotEmpty(message = "인증키는 필수 입니다")
String k;
/**
*
* 1-(, ), 2-(,,)
*/
@Schema(requiredMode = REQUIRED, title = "조회범위(1-취소제외(신규,변경), 2-취소포함)", description = "조회범위(1-취소제외(신규,변경), 2-취소포함)", example = "1", allowableValues = {"1", "2"})
@Pattern(regexp = "[12]", message = "조회범위는 필수 입니다(1-취소제외(신규,변경), 2-취소포함)")
@Builder.Default
String fg = "1";
/**
*
*/
@Schema(requiredMode = REQUIRED, title = "조회 페이지", description = "조회 페이지", example = "1")
@Pattern(regexp = "[0-9]{1,}", message = "조회 페이지는 필수 입니다")
String pg;
/**
*
* 1:
* 2:(, )
*/
@Schema(title = "상태(1:정상, 2:전체(정상,변경,취소))", description = "상태(1:정상, 2:전체(정상,변경,취소))", example = "1", allowableValues = {"1", "2"})
@Pattern(regexp = "[12]", message = "상태는 필수 입니다(상태(1:정상, 2:전체(정상,변경,취소))")
@Builder.Default
String fg2 = "1";
/**
*
* AAR -
*/
@Schema(title = "보고 구분 코드(AAR-폐기보고)", description = "보고 구분 코드(AAR-폐기보고)", example = "AAR")
@Pattern(regexp = "[A-Z]{3}", message = "보고 구분 코드는 필수 입니다(AAR-폐기보고)")
@Builder.Default
String se = "AAR";
/**
*
* 1:
* 2:
*/
@Schema(title = "조회 기준 일자(1:보고 일자, 2:취급 일자)", description = "조회 기준 일자(1:보고 일자, 2:취급 일자)", example = "1", allowableValues = {"1", "2"})
@Pattern(regexp = "[12]", message = "조회 기준 일자는 필수 입니다(1:보고 일자, 2:취급 일자)")
@Builder.Default
String fg3 = "1";
/**
* (yyyyMMdd)
* 1
*/
@Schema(title = "조회 시작일(yyyyMMdd)", description = "조회 시작일(yyyyMMdd)", example = "20240101")
@Pattern(regexp = Constants.DATE_REGX, message = "조회 시작일은 필수 입니다(yyyyMMdd)")
String sdt;
/**
* (yyyyMMdd)
* 1
*/
@Schema(title = "조회 종료일(yyyyMMdd)", description = "조회 종료일(yyyyMMdd)", example = "20240131")
@Pattern(regexp = Constants.DATE_REGX, message = "조회 종료일은 필수 입니다(yyyyMMdd)")
String edt;
/**
*
*/
@Schema(title = "마약류 취급자 식별 번호", description = "마약류 취급자 식별 번호", example = " ")
String bc;
/**
*
*/
@Schema(title = "마약류 취급자 업체명", description = "마약류 취급자 업체명", example = " ")
String bn;
/**
*
*/
@Schema(title = "사용자 보고 식별 번호", description = "사용자 보고 식별 번호", example = " ")
String ur;
/**
* FIXME :
*
* 0: , 1: , 2: , 3:
*/
@Schema(title = "폐기 보고 진행 상태", description = "폐기 보고 진행 상태", example = " ", allowableValues = {"0", "1", "2", "3"})
String ps;
}
/**
* request * request
*/ */
@Schema(name = "MnfSeqInfoRequest", description = "제품 일련 번호 정보 조회 request") @Schema(name = "MnfSeqInfoRequest", description = "제품 일련 번호 정보 조회 request")

@ -18,6 +18,7 @@ import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Getter; import lombok.Getter;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.Setter;
/** /**
* <pre> * <pre>
@ -44,57 +45,9 @@ public class NimsApiResult<T> {
@JsonProperty(value = "response", required = true) @JsonProperty(value = "response", required = true)
private Response<T> response; private Response<T> response;
/**
* API call return
* ApiCustomException throw
* : 0-, 1-, 8-, 9-
* @return List<T> or throw ApiCustomException
*/
@JsonIgnore
public List<T> getResultOrThrow() {
if(!ObjectUtils.isEmpty(getResult())) return getResult();
if(response.header.resultCd == 0 || response.header.resultCd == 8){
throw ApiCustomException.create(ResultCode.NO_CONTENT);
}
throw Objects.requireNonNull(ApiCustomException.of(response.header));
}
/**
* API call return
* null return
* : 0-, 1-, 8-, 9-
* @return List<T> or null
*/
@JsonIgnore
public List<T> getResultOrNull() {
return getResult();
}
/**
* Header return
* @return Header
*/
public Header getHeader() {
return response.header;
}
/**
* Body return
* @return Body<T>
*/
public Body<T> getBody() {
return response.body;
}
private List<T> getResult() {
if(response.header.resultCd == 0 || response.header.resultCd == 8) {
return response.body.list;
}
return null;
}
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
@Getter @Getter
@Setter
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Builder @Builder
@ -106,10 +59,44 @@ public class NimsApiResult<T> {
@Schema(description = "body", requiredMode = REQUIRED) @Schema(description = "body", requiredMode = REQUIRED)
@JsonProperty(value = "body", required = true) @JsonProperty(value = "body", required = true)
private Body<T> body; private Body<T> body;
/**
* API call return
* ApiCustomException throw
* : 0-, 1-, 8-, 9-
* @return List<T> or throw ApiCustomException
*/
@JsonIgnore
public List<T> getResultOrThrow() {
if(!ObjectUtils.isEmpty(getResult())) return getResult();
if(header.resultCd == 0 || header.resultCd == 8){
throw ApiCustomException.create(ResultCode.NO_CONTENT);
}
throw Objects.requireNonNull(ApiCustomException.of(header));
}
/**
* API call return
* null return
* : 0-, 1-, 8-, 9-
* @return List<T> or null
*/
@JsonIgnore
public List<T> getResultOrNull() {
return getResult();
}
private List<T> getResult() {
if(header.resultCd == 0 || header.resultCd == 8) {
return body.list;
}
return null;
}
} }
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
@Getter @Getter
@Setter
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Builder @Builder
@ -128,6 +115,7 @@ public class NimsApiResult<T> {
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
@Getter @Getter
@Setter
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Builder @Builder

@ -20,13 +20,15 @@ import cokr.xit.adds.inf.nims.model.NimsApiResult;
* </pre> * </pre>
*/ */
public interface InfNimsService { public interface InfNimsService {
NimsApiResult<NimsApiDto.BsshInfoSt> getBsshInfoSt(NimsApiRequest.BsshInfoRequest dto); NimsApiResult.Response<NimsApiDto.BsshInfoSt> getBsshInfoSt(NimsApiRequest.BsshInfoRequest dto);
NimsApiResult<NimsApiDto.ProductInfoKd> getProductInfoKd(NimsApiRequest.ProductInfoRequest dto); NimsApiResult.Response<NimsApiDto.ProductInfoKd> getProductInfoKd(NimsApiRequest.ProductInfoRequest dto);
NimsApiResult<NimsApiDto.MnfSeqInfo> getMnfSeqInfo(NimsApiRequest.MnfSeqInfoRequest dto); NimsApiResult.Response<NimsApiDto.MnfSeqInfo> getMnfSeqInfo(NimsApiRequest.MnfSeqInfoRequest dto);
NimsApiResult<NimsApiDto.JurisdictionGovInfo> getJurisdictionGovInfo(NimsApiRequest.JurisdictionGovInfoRequest dto); NimsApiResult.Response<NimsApiDto.JurisdictionGovInfo> getJurisdictionGovInfo(NimsApiRequest.JurisdictionGovInfoRequest dto);
NimsApiResult<NimsApiDto.StorageInfo> getStorageInfo(NimsApiRequest.StorageInfoRequest dto); NimsApiResult.Response<NimsApiDto.StorageInfo> getStorageInfo(NimsApiRequest.StorageInfoRequest dto);
NimsApiResult.Response<NimsApiDto.DsuseRpt> getDsuseRptInfo(NimsApiRequest.DsuseRptInfoRequest dto);
} }

@ -1,5 +1,7 @@
package cokr.xit.adds.inf.nims.service.bean; package cokr.xit.adds.inf.nims.service.bean;
import java.util.List;
import javax.validation.Validation; import javax.validation.Validation;
import javax.validation.Validator; import javax.validation.Validator;
@ -17,7 +19,6 @@ import cokr.xit.adds.inf.nims.model.NimsApiResult;
import cokr.xit.adds.inf.nims.service.InfNimsService; import cokr.xit.adds.inf.nims.service.InfNimsService;
import cokr.xit.foundation.component.AbstractServiceBean; import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.foundation.data.JSON; import cokr.xit.foundation.data.JSON;
import cokr.xit.foundation.web.WebClient;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -41,7 +42,6 @@ import lombok.extern.slf4j.Slf4j;
@Service @Service
public class InfNimsServiceBean extends AbstractServiceBean implements InfNimsService { public class InfNimsServiceBean extends AbstractServiceBean implements InfNimsService {
private static final Validator validator = Validation.buildDefaultValidatorFactory().getValidator(); private static final Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
private static WebClient webClient = new WebClient();
private static JSON json = new JSON(); private static JSON json = new JSON();
@Value("${app.inf.nims.url}") @Value("${app.inf.nims.url}")
@ -56,6 +56,9 @@ public class InfNimsServiceBean extends AbstractServiceBean implements InfNimsSe
@Value("${app.inf.nims.api.productinfoKd}") @Value("${app.inf.nims.api.productinfoKd}")
private String productinfoKd; private String productinfoKd;
@Value("${app.inf.nims.api.reportinfo}")
private String reportinfo;
@Value("${app.inf.nims.api.seqinfo}") @Value("${app.inf.nims.api.seqinfo}")
private String seqinfo; private String seqinfo;
@ -67,7 +70,7 @@ public class InfNimsServiceBean extends AbstractServiceBean implements InfNimsSe
@Override @Override
@TraceLogging @TraceLogging
public NimsApiResult<NimsApiDto.BsshInfoSt> getBsshInfoSt(NimsApiRequest.BsshInfoRequest dto) { public NimsApiResult.Response<NimsApiDto.BsshInfoSt> getBsshInfoSt(NimsApiRequest.BsshInfoRequest dto) {
dto.setK(nimsApiKey); dto.setK(nimsApiKey);
ApiUtil.validate(dto, null, validator); ApiUtil.validate(dto, null, validator);
if(isEmpty(dto.getBi()) && isEmpty(dto.getHp()) && isEmpty(dto.getBn()) && isEmpty(dto.getBc())) { if(isEmpty(dto.getBi()) && isEmpty(dto.getHp()) && isEmpty(dto.getBn()) && isEmpty(dto.getBc())) {
@ -75,35 +78,38 @@ public class InfNimsServiceBean extends AbstractServiceBean implements InfNimsSe
} }
if(!isEmpty(dto.getYmd())) ApiUtil.checkYmdError(dto.getYmd(), null); if(!isEmpty(dto.getYmd())) ApiUtil.checkYmdError(dto.getYmd(), null);
String result = ApiUtil.callNimsApi(nimsUrl + bsshInfoStV1, dto); String rslt = ApiUtil.callNimsApi(nimsUrl + bsshInfoStV1, dto);
return json.parse(result, new TypeReference<NimsApiResult<NimsApiDto.BsshInfoSt>>() {}); NimsApiResult<NimsApiDto.BsshInfoSt> result = json.parse(rslt, new TypeReference<NimsApiResult<NimsApiDto.BsshInfoSt>>() {});
return result.getResponse();
} }
@Override @Override
@TraceLogging @TraceLogging
public NimsApiResult<NimsApiDto.ProductInfoKd> getProductInfoKd(NimsApiRequest.ProductInfoRequest dto) { public NimsApiResult.Response<NimsApiDto.ProductInfoKd> getProductInfoKd(NimsApiRequest.ProductInfoRequest dto) {
dto.setK(nimsApiKey); dto.setK(nimsApiKey);
ApiUtil.validate(dto, null, validator); ApiUtil.validate(dto, null, validator);
if(!isEmpty(dto.getYmd())) ApiUtil.checkYmdError(dto.getYmd(), null); if(!isEmpty(dto.getYmd())) ApiUtil.checkYmdError(dto.getYmd(), null);
String result = ApiUtil.callNimsApi(nimsUrl + productinfoKd, dto); String rslt = ApiUtil.callNimsApi(nimsUrl + productinfoKd, dto);
return json.parse(result, new TypeReference<NimsApiResult<NimsApiDto.ProductInfoKd>>() {}); NimsApiResult<NimsApiDto.ProductInfoKd> result = json.parse(rslt, new TypeReference<NimsApiResult<NimsApiDto.ProductInfoKd>>() {});
return result.getResponse();
} }
@Override @Override
@TraceLogging @TraceLogging
public NimsApiResult<NimsApiDto.MnfSeqInfo> getMnfSeqInfo(NimsApiRequest.MnfSeqInfoRequest dto) { public NimsApiResult.Response<NimsApiDto.MnfSeqInfo> getMnfSeqInfo(NimsApiRequest.MnfSeqInfoRequest dto) {
dto.setK(nimsApiKey); dto.setK(nimsApiKey);
ApiUtil.validate(dto, null, validator); ApiUtil.validate(dto, null, validator);
if(!isEmpty(dto.getYmd())) ApiUtil.checkYmdError(dto.getYmd(), null); if(!isEmpty(dto.getYmd())) ApiUtil.checkYmdError(dto.getYmd(), null);
String result = ApiUtil.callNimsApi(nimsUrl + seqinfo, dto); String rslt = ApiUtil.callNimsApi(nimsUrl + seqinfo, dto);
return json.parse(result, new TypeReference<NimsApiResult<NimsApiDto.MnfSeqInfo>>() {}); NimsApiResult<NimsApiDto.MnfSeqInfo> result = json.parse(rslt, new TypeReference<NimsApiResult<NimsApiDto.MnfSeqInfo>>() {});
return result.getResponse();
} }
@Override @Override
@TraceLogging @TraceLogging
public NimsApiResult<NimsApiDto.JurisdictionGovInfo> getJurisdictionGovInfo( public NimsApiResult.Response<NimsApiDto.JurisdictionGovInfo> getJurisdictionGovInfo(
NimsApiRequest.JurisdictionGovInfoRequest dto) { NimsApiRequest.JurisdictionGovInfoRequest dto) {
dto.setK(nimsApiKey); dto.setK(nimsApiKey);
ApiUtil.validate(dto, null, validator); ApiUtil.validate(dto, null, validator);
@ -111,13 +117,14 @@ public class InfNimsServiceBean extends AbstractServiceBean implements InfNimsSe
throw ApiCustomException.create("필수 파라메터 에러(ocd-기관 코드, onm-기관명, adr-주소 중 하나는 필수)"); throw ApiCustomException.create("필수 파라메터 에러(ocd-기관 코드, onm-기관명, adr-주소 중 하나는 필수)");
} }
String result = ApiUtil.callNimsApi(nimsUrl + officeinfo, dto); String rslt = ApiUtil.callNimsApi(nimsUrl + officeinfo, dto);
return json.parse(result, new TypeReference<NimsApiResult<NimsApiDto.JurisdictionGovInfo>>() {}); NimsApiResult<NimsApiDto.JurisdictionGovInfo> result = json.parse(rslt, new TypeReference<NimsApiResult<NimsApiDto.JurisdictionGovInfo>>() {});
return result.getResponse();
} }
@Override @Override
@TraceLogging @TraceLogging
public NimsApiResult<NimsApiDto.StorageInfo> getStorageInfo(NimsApiRequest.StorageInfoRequest dto) { public NimsApiResult.Response<NimsApiDto.StorageInfo> getStorageInfo(NimsApiRequest.StorageInfoRequest dto) {
dto.setK(nimsApiKey); dto.setK(nimsApiKey);
ApiUtil.validate(dto, null, validator); ApiUtil.validate(dto, null, validator);
if(!isEmpty(dto.getYmd())) ApiUtil.checkYmdError(dto.getYmd(), null); if(!isEmpty(dto.getYmd())) ApiUtil.checkYmdError(dto.getYmd(), null);
@ -127,8 +134,87 @@ public class InfNimsServiceBean extends AbstractServiceBean implements InfNimsSe
} }
} }
String result = ApiUtil.callNimsApi(nimsUrl + placeinfoV1, dto); String rslt = ApiUtil.callNimsApi(nimsUrl + placeinfoV1, dto);
return json.parse(result, new TypeReference<NimsApiResult<NimsApiDto.StorageInfo>>() {}); NimsApiResult<NimsApiDto.StorageInfo> result = json.parse(rslt, new TypeReference<NimsApiResult<NimsApiDto.StorageInfo>>() {});
return result.getResponse();
}
@Override
public NimsApiResult.Response<NimsApiDto.DsuseRpt> getDsuseRptInfo(NimsApiRequest.DsuseRptInfoRequest dto) {
dto.setK(nimsApiKey);
ApiUtil.validate(dto, null, validator);
ApiUtil.checkYmdError(dto.getSdt(), "sdt");
ApiUtil.checkYmdError(dto.getEdt(), "edt");
//String rslt = ApiUtil.callNimsApi(nimsUrl + reportinfo, dto);
//NimsApiResult<NimsApiDto.DsuseRpt> result = json.parse(rslt, new TypeReference<NimsApiResult<NimsApiDto.DsuseRpt>>() {});
//return result.getResponse();
return getDsuseRptResponse();
}
private NimsApiResult.Response<NimsApiDto.DsuseRpt> getDsuseRptResponse() {
NimsApiDto.DsuseRptDtl dtl1 = NimsApiDto.DsuseRptDtl.builder()
.usrRptLnIdNo("dsuseRptDtlIdNo")
.prdctCd("상품코드")
.prductNm("제품명")
.minDistbQy(1)
.pceQy(0)
.mnfNo("제조번호")
.prdValidDe("20240401")
.mnfSeq("-")
.storgeNo("저장소번호")
.storgeNm("저장소명")
.mvmnTyCd("1102")
.dsuseQy(30)
.build();
NimsApiDto.DsuseRptDtl dtl2 = NimsApiDto.DsuseRptDtl.builder()
.usrRptLnIdNo("dsuseRptDtlIdNo1")
.prdctCd("상품코드1")
.prductNm("제품명1")
.minDistbQy(1)
.pceQy(0)
.mnfNo("제조번호1")
.prdValidDe("20240401")
.mnfSeq("-")
.storgeNo("저장소번호1")
.storgeNm("저장소명1")
.mvmnTyCd("1102")
.dsuseQy(10)
.build();
NimsApiDto.DsuseRpt dsuseRpt = NimsApiDto.DsuseRpt.builder()
.bsshCd("bsshCd")
.usrRptIdNo("usrRptIdNo")
.rptTyCd("0")
.rndDtlRptCnt(2)
.hdrDe("20240401")
.rptDe("20240401")
.dsuseSeCd("1")
.dsusePrvCd("01")
.dsuseMthCd("1")
.dsuseLoc("보건소")
.status("0")
.dsuseRptSttusCd("0")
.dsuseRptDtls(List.of(dtl1, dtl2))
.build();
return NimsApiResult.Response.<NimsApiDto.DsuseRpt>builder()
.header(
NimsApiResult.Header.builder()
.resultCd(0)
.resultMsg("성공")
.build()
)
.body(
NimsApiResult.Body.<NimsApiDto.DsuseRpt>builder()
.list(List.of(dsuseRpt))
.isEndYn("Y")
.nRecord(2)
.totalCount(2)
.build()
)
.build();
} }
} }

@ -38,7 +38,7 @@ public class InfNimsController {
@Operation(summary = "마약류 취급자 정보 조회", description = "마약류 취급자 정보 조회") @Operation(summary = "마약류 취급자 정보 조회", description = "마약류 취급자 정보 조회")
@PostMapping("/getBsshInfoSt") @PostMapping("/getBsshInfoSt")
public ApiBaseResponse<NimsApiResult<NimsApiDto.BsshInfoSt>> getBsshInfoSt( public ApiBaseResponse<NimsApiResult.Response<NimsApiDto.BsshInfoSt>> getBsshInfoSt(
@RequestBody NimsApiRequest.BsshInfoRequest dto @RequestBody NimsApiRequest.BsshInfoRequest dto
) { ) {
return ApiBaseResponse.of(infNimsService.getBsshInfoSt(dto)); return ApiBaseResponse.of(infNimsService.getBsshInfoSt(dto));
@ -46,7 +46,7 @@ public class InfNimsController {
@Operation(summary = "마약류 상품 정보 조회", description = "마약류 상품정보 조회") @Operation(summary = "마약류 상품 정보 조회", description = "마약류 상품정보 조회")
@PostMapping("/getProductInfoKd") @PostMapping("/getProductInfoKd")
public ApiBaseResponse<NimsApiResult<NimsApiDto.ProductInfoKd>> getProductInfoKd( public ApiBaseResponse<NimsApiResult.Response<NimsApiDto.ProductInfoKd>> getProductInfoKd(
@RequestBody NimsApiRequest.ProductInfoRequest dto @RequestBody NimsApiRequest.ProductInfoRequest dto
) { ) {
return ApiBaseResponse.of(infNimsService.getProductInfoKd(dto)); return ApiBaseResponse.of(infNimsService.getProductInfoKd(dto));
@ -54,7 +54,7 @@ public class InfNimsController {
@Operation(summary = "제조 일련 번호 정보 조회", description = "제조 일련 번호 정보 조회") @Operation(summary = "제조 일련 번호 정보 조회", description = "제조 일련 번호 정보 조회")
@PostMapping("/getMnfSeqInfo") @PostMapping("/getMnfSeqInfo")
public ApiBaseResponse<NimsApiResult<NimsApiDto.MnfSeqInfo>> getMnfSeqInfo( public ApiBaseResponse<NimsApiResult.Response<NimsApiDto.MnfSeqInfo>> getMnfSeqInfo(
@RequestBody NimsApiRequest.MnfSeqInfoRequest dto @RequestBody NimsApiRequest.MnfSeqInfoRequest dto
) { ) {
return ApiBaseResponse.of(infNimsService.getMnfSeqInfo(dto)); return ApiBaseResponse.of(infNimsService.getMnfSeqInfo(dto));
@ -62,7 +62,7 @@ public class InfNimsController {
@Operation(summary = "관할 허가 관청 정보 조회", description = "관할 허가 관청 정보 조회") @Operation(summary = "관할 허가 관청 정보 조회", description = "관할 허가 관청 정보 조회")
@PostMapping("/getJurisdictionGovInfo") @PostMapping("/getJurisdictionGovInfo")
public ApiBaseResponse<NimsApiResult<NimsApiDto.JurisdictionGovInfo>> getJurisdictionGovInfo( public ApiBaseResponse<NimsApiResult.Response<NimsApiDto.JurisdictionGovInfo>> getJurisdictionGovInfo(
@RequestBody NimsApiRequest.JurisdictionGovInfoRequest dto @RequestBody NimsApiRequest.JurisdictionGovInfoRequest dto
) { ) {
return ApiBaseResponse.of(infNimsService.getJurisdictionGovInfo(dto)); return ApiBaseResponse.of(infNimsService.getJurisdictionGovInfo(dto));
@ -70,9 +70,17 @@ public class InfNimsController {
@Operation(summary = "저장소 정보 조회", description = "저장소 정보 조회") @Operation(summary = "저장소 정보 조회", description = "저장소 정보 조회")
@PostMapping("/getStorageInfo") @PostMapping("/getStorageInfo")
public ApiBaseResponse<NimsApiResult<NimsApiDto.StorageInfo>> getStorageInfo( public ApiBaseResponse<NimsApiResult.Response<NimsApiDto.StorageInfo>> getStorageInfo(
@RequestBody NimsApiRequest.StorageInfoRequest dto @RequestBody NimsApiRequest.StorageInfoRequest dto
) { ) {
return ApiBaseResponse.of(infNimsService.getStorageInfo(dto)); return ApiBaseResponse.of(infNimsService.getStorageInfo(dto));
} }
@Operation(summary = "폐기 보고 정보 조회", description = "폐기 보고 정보 조회")
@PostMapping("/getDsuseRptInfo")
public ApiBaseResponse<NimsApiResult.Response<NimsApiDto.DsuseRpt>> getDsuseRptInfo(
@RequestBody NimsApiRequest.DsuseRptInfoRequest dto
) {
return ApiBaseResponse.of(infNimsService.getDsuseRptInfo(dto));
}
} }

@ -134,8 +134,8 @@ spring:
sql: sql:
init: init:
mode: never # embedded | always | never mode: never # embedded | always | never
schema-locations: classpath:db-init/schema.sql schema-locations: classpath:database/schema.sql
# data-locations: classpath:db-init/data.sql # data-locations: classpath:database/data.sql
# datasource: # datasource:
# hikari: # hikari:

@ -12,3 +12,4 @@ app:
seqinfo: /api/seqinfo.do seqinfo: /api/seqinfo.do
officeinfo: /api/officeinfo.do officeinfo: /api/officeinfo.do
placeinfoV1: /api/placeinfo_v1.do placeinfoV1: /api/placeinfo_v1.do
reportinfo: /api/reportinfo_ggg.do

@ -0,0 +1,265 @@
create table tb_action_grp
(
grp_id varchar(50) not null comment '그룹 id'
primary key,
grp_nm varchar(60) not null comment '그룹 이름',
dscrp varchar(300) null comment '설명',
reg_dt varchar(14) not null comment '등록 일시'
)
comment '기능 그룹';
create table tb_auth_action
(
auth_id varchar(50) not null comment '권한 id',
grp_id varchar(50) not null comment '그룹 id',
reg_dt varchar(14) null comment '등록 일시',
primary key (auth_id, grp_id)
)
comment '권한 기능';
create table tb_auth_user
(
auth_id varchar(50) not null comment '권한 id',
user_id varchar(10) not null comment '사용자 id',
reg_dt varchar(14) null comment '등록 일시',
primary key (auth_id, user_id)
)
comment '권한 사용자';
create table tb_authority
(
auth_id varchar(50) not null comment '권한 id'
primary key,
auth_nm varchar(60) not null comment '권한 이름',
dscrp varchar(300) null comment '설명',
inf_scp varchar(20) null comment '업무정보 범위',
user_inf_scp varchar(20) null comment '사용자정보 범위',
reg_dt varchar(14) null comment '등록 일시'
)
comment '권한';
create table tb_cmn_code
(
grp_id varchar(6) not null comment '그룹 id',
code varchar(15) not null comment '코드',
code_val varchar(100) null comment '코드 값',
dscrp varchar(300) null comment '설명',
etc_1 varchar(300) null comment '기타 1',
etc_2 varchar(300) null comment '기타 2',
etc_3 varchar(300) null comment '기타 3',
srt_ord int null comment '정렬 순서',
use_yn varchar(1) not null comment '사용 여부',
reg_dt varchar(14) null comment '등록 일시',
rgtr varchar(10) null comment '등록자',
mdfcn_dt varchar(14) null comment '수정 일시',
mdfr varchar(10) null comment '수정자',
primary key (grp_id, code)
)
comment '공통 코드';
create table tb_code_ctgr
(
ctgr_id varchar(6) not null comment '분류 id'
primary key,
ctgr_nm varchar(100) null comment '분류 이름',
dscrp varchar(300) null comment '설명',
use_yn varchar(1) not null comment '사용 여부',
reg_dt varchar(14) null comment '등록 일시',
rgtr varchar(10) null comment '등록자',
mdfcn_dt varchar(14) null comment '수정 일시',
mdfr varchar(10) null comment '수정자'
)
comment '공통 코드 분류';
create table tb_code_grp
(
grp_id varchar(6) not null comment '그룹 id'
primary key,
grp_nm varchar(100) null comment '그룹 이름',
dscrp varchar(300) null comment '설명',
ctgr_id varchar(6) null comment '분류 id',
use_yn varchar(1) not null comment '사용 여부',
reg_dt varchar(14) null comment '등록 일시',
rgtr varchar(10) null comment '등록자',
mdfcn_dt varchar(14) null comment '수정 일시',
mdfr varchar(10) null comment '수정자'
)
comment '공통 코드 그룹';
create table tb_dept
(
dept_cd varchar(7) not null comment '부서 코드'
primary key,
dept_nm varchar(100) null comment '부서 명',
dept_telno varchar(20) null comment '부서 전화번호',
dept_fxno varchar(20) null comment '부서 팩스번호',
inst_cd varchar(7) null comment '기관 코드',
sgg_cd varchar(5) null comment '시군구 코드',
pstofc_nm varchar(60) null comment '우체국 명',
vrbacnt_link_se_cd varchar(2) null comment '가상계좌 연계 구분 코드',
rg_no_header varchar(10) null comment '등기 번호 헤더',
sndng_link_se_cd varchar(2) null comment '발송 연계 구분 코드',
egp_rcept_id varchar(5) null comment 'e그린 접수우체국국기호',
egp_apvl_nb varchar(10) null comment 'e그린 후납계약승인번호',
egp_con_org varchar(4) null comment 'e그린 외부기관구분코드',
egp_post_inst_id varchar(20) null comment 'e그린 우정정보센터 기관id',
dtbn_bank_nm varchar(30) null comment '교부 은행 명',
dtbn_actno varchar(20) null comment '교부 계좌번호',
srvr_os varchar(20) null comment '서버 os',
doc_header varchar(60) null comment '문서 머릿말',
cvlcpt_link_se_cd varchar(2) null comment '민원 연계 구분 코드',
nxrp_link_yn varchar(1) not null comment '세외수입 연계 여부',
nxrp_rgn_se_cd varchar(1) null comment '세외수입 지역 구분 코드',
nxrp_link_srvc_url varchar(200) null comment '세외수입 연계 서비스 url',
use_yn varchar(1) not null comment '사용 여부',
reg_dt varchar(14) null comment '등록 일시',
rgtr varchar(10) null comment '등록자',
mdfcn_dt varchar(14) null comment '수정 일시',
mdfr varchar(10) null comment '수정자'
)
comment '부서';
create table tb_file
(
file_id varchar(13) not null comment '파일 id'
primary key,
inf_type varchar(3) not null comment '관련정보 유형',
inf_key varchar(64) null comment '관련정보 key',
sub_type varchar(3) null comment '관련정보 하위 분류',
file_nm varchar(128) not null comment '파일 이름',
file_path varchar(256) not null comment '파일 경로',
mime_type varchar(64) null comment '파일 유형',
file_size int not null comment '파일 크기',
dnld_cnt int not null comment '다운로드 횟수',
srt_ord int not null comment '정렬 순서',
use_yn varchar(1) not null comment '사용 여부',
reg_dt varchar(14) not null comment '등록 일시',
rgtr varchar(10) not null comment '등록자'
)
comment '관련 파일';
create table tb_grp_action
(
grp_id varchar(50) not null comment '그룹 id',
action varchar(60) not null comment '기능',
reg_dt varchar(14) not null comment '등록 일시',
rgtr varchar(10) not null comment '등록자',
primary key (grp_id, action)
)
comment '그룹별 기능';
create table tb_login_policy
(
user_id varchar(10) not null comment '사용자 id'
primary key,
ip_addr varchar(30) null comment 'ip 주소',
dplct_yn varchar(1) not null comment '중복접근 여부',
limit_yn varchar(1) not null comment '접근제한 여부',
sub_ip_addr varchar(30) null comment '보조 ip 주소',
reg_dt varchar(14) null comment '등록 일시',
rgtr varchar(10) null comment '등록자',
mdfcn_dt varchar(14) null comment '수정 일시',
mdfr varchar(10) null comment '수정자'
)
comment '로그인 정책';
create table tb_menu
(
menu_no int not null comment '메뉴 id'
primary key,
menu_nm varchar(60) not null comment '메뉴 이름',
prnt_no int null comment '상위 메뉴 id',
pgrm_file_nm varchar(60) null comment '프로그램 파일',
action varchar(300) null comment '실행기능',
dscrp varchar(300) null comment '설명',
img_nm varchar(60) null comment '이미지 이름',
img_cnf varchar(100) null comment '이미지 설정',
srt_ord int null comment '정렬 순서',
reg_dt varchar(14) not null comment '등록 일시',
rgtr varchar(10) not null comment '등록자'
)
comment '메뉴';
create table tb_sgg
(
sgg_cd varchar(5) not null comment '시군구 코드'
primary key,
inst_cd varchar(7) not null comment '기관 코드',
inst_nm varchar(100) not null comment '기관 명',
inst_addr varchar(200) null comment '기관 주소',
inst_daddr varchar(200) null comment '기관 상세주소',
inst_zip varchar(6) null comment '기관 우편번호',
offcs_file_path varchar(200) null comment '직인 파일 경로',
offcs_file_nm varchar(100) null comment '직인 파일 명',
sgg_nm varchar(60) not null comment '시군구 명',
up_inst_cd varchar(7) null comment '상위 기관 코드',
up_inst_nm varchar(100) null comment '상위 기관 명',
inst_se_cd varchar(2) null comment '기관 구분 코드',
logo_file_nm varchar(100) null comment '로고 파일 명',
symbol_file_nm varchar(100) null comment '상징 파일 명',
symbol_file_path varchar(200) null comment '상징 파일 경로',
logo_file_path varchar(200) null comment '로고 파일 경로',
use_yn varchar(1) not null comment '사용 여부',
reg_dt varchar(14) null comment '등록 일시',
rgtr varchar(10) null comment '등록자',
mdfcn_dt varchar(14) null comment '수정 일시',
mdfr varchar(10) null comment '수정자'
)
comment '시군구';
create table tb_sys_log
(
log_id varchar(24) not null comment '로그 id'
primary key,
log_type varchar(16) null comment '로그 유형',
url varchar(256) null comment 'url',
cls_nm varchar(128) null comment '클래스 이름',
mtd_nm varchar(128) null comment '메소드 이름',
data_cnt int null comment '데이터 수',
data_nm varchar(1000) null comment '데이터 이름',
psnl_info varchar(256) null comment '개인 정보',
ip_addr varchar(32) null comment 'ip 주소',
file_nm varchar(128) null comment '파일 이름',
reg_dt varchar(14) null comment '등록 일시',
user_id varchar(10) null comment '사용자 id'
)
comment '시스템 로그';
create table tb_user
(
user_id varchar(10) not null comment '사용자 id'
primary key,
user_acnt varchar(20) not null comment '사용자 계정',
user_nm varchar(50) not null comment '사용자 이름',
passwd varchar(200) not null comment '비밀번호',
passwd_hint varchar(100) null comment '비밀번호 힌트',
passwd_nsr varchar(100) null comment '비밀번호 힌트 답',
emp_no varchar(20) null comment '사원 번호',
gender varchar(1) null comment '성별',
zip varchar(6) null comment '우편번호',
addr varchar(150) null comment '주소',
daddr varchar(150) null comment '상세주소',
area_no varchar(10) null comment '지역 번호',
eml_adrs varchar(50) null comment '이메일 주소',
org_id varchar(20) null comment '조직 id',
grp_id varchar(20) null comment '그룹 id',
nstt_cd varchar(8) not null comment '소속기관 코드',
pos_nm varchar(60) null comment '직위 이름',
crtfc_dn varchar(20) null comment '인증 dn값',
lock_yn varchar(1) null comment '잠김 여부',
lock_cnt int not null comment '잠김 횟수',
lock_dt varchar(14) null comment '잠김 일시',
stts varchar(3) not null comment '상태',
fxno varchar(20) null comment '팩스번호',
telno varchar(20) null comment '전화번호',
mbl_telno varchar(20) null comment '휴대 전화번호',
brdt varchar(20) null comment '생년월일',
dept_cd varchar(7) null comment '부서 코드',
rsdnt_no varchar(200) null comment '주민등록 번호',
use_yn varchar(1) not null comment '사용 여부',
reg_dt varchar(14) null comment '등록 일시',
rgtr varchar(10) null comment '등록자',
mdfcn_dt varchar(14) null comment '수정 일시',
mdfr varchar(10) null comment '수정자'
)
comment '사용자';

File diff suppressed because it is too large Load Diff

@ -331,7 +331,7 @@ create or replace table tb_dsuse_mgt_dtl
mdfcn_dt varchar(14) null comment '수정_일시', mdfcn_dt varchar(14) null comment '수정_일시',
mdfr varchar(10) null comment '수정자', mdfr varchar(10) null comment '수정자',
primary key (dscdmng_id, dscdmng_sn), primary key (dscdmng_id, dscdmng_sn),
constraint fk_dsuse_mgt_dtl_dsuse_mgt constraint fk_dsuse_mgt_to_dtl_dsuse_mgt
foreign key (dscdmng_id) references tb_dsuse_mgt (dscdmng_id) foreign key (dscdmng_id) references tb_dsuse_mgt (dscdmng_id)
) )
comment '폐기관리_상세'; comment '폐기관리_상세';
@ -567,40 +567,3 @@ create or replace table tb_cmm_refresh_token
/* -------------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------------- */
/* adds */ /* adds */
/* -------------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------------- */
/*
create table xit_user_info
(
user_id varchar(20) not null comment '사용자 id'
primary key,
orgnzt_id varchar(20) null comment '조직 id',
user_nm varchar(50) null comment '사용자 명',
password varchar(200) null comment '비밀번호',
empl_no varchar(20) null comment '사원 번호',
ihidnum varchar(200) null comment '주민등록번호',
sexdstn_code char null comment '성별 코드',
brthdy varchar(20) null comment '생일',
fxnum varchar(20) null comment '팩스번호',
house_adres varchar(150) null comment '주택 주소',
password_hint varchar(100) null comment '비밀번호 힌트',
password_cnsr varchar(100) null comment '비밀번호 정답',
house_end_telno varchar(200) null comment '주택 끝 전화번호',
area_no varchar(200) null comment '지역 번호',
detail_adres varchar(150) null comment '상세 주소',
zip varchar(6) null comment '우편번호',
offm_telno varchar(20) null comment '사무실 전화번호',
mbtlnum varchar(20) null comment '이동전화번호',
email_adres varchar(50) null comment '이메일 주소',
ofcps_nm varchar(60) null comment '직위 명',
house_middle_telno varchar(200) null comment '주택 중간 전화번호',
group_id varchar(20) null comment '그룹 id',
pstinst_code varchar(8) null comment '소속기관 코드',
user_sttus_code varchar(15) null comment '사용자 상태 코드',
esntl_id varchar(20) null comment '고유 id',
crtfc_dn_value varchar(20) null comment '인증 dn 값',
sbscrb_de datetime null comment '가입 일',
login_fail decimal(1) default 0 null,
login_fail_de datetime null
)
comment '사용자 정보';
*/

@ -0,0 +1,226 @@
CREATE TABLE tb_bssh_info
(
bssh_cd varchar(10) NOT NULL COMMENT '마약류취급자식별_번호',
bssh_nm varchar(120) NULL COMMENT '업체_명',
induty_nm varchar(200) NULL COMMENT '업종_명',
hdnt_cd varchar(10) NULL COMMENT '의료업자_구분',
hdnt_nm varchar(200) NULL COMMENT '의료업자구분_명',
bizrno varchar(10) NULL COMMENT '사업자등록번호',
rprsntv_nm varchar(60) NULL COMMENT '대표자_명',
chrg_nm varchar(60) NULL COMMENT '담당자_명',
hptl_no varchar(20) NULL COMMENT '요양기관_기호',
join_yn varchar(200) NULL COMMENT '회원가입_여부',
bssh_stts_nm varchar(200) NULL COMMENT '상태',
prmisn_no varchar(40) NULL COMMENT '허가_번호',
use_yn varchar(1) NOT NULL COMMENT '사용_여부',
reg_dt varchar(14) NOT NULL COMMENT '등록_일시',
rgtr varchar(10) NOT NULL COMMENT '등록자',
mdfcn_dt varchar(14) NULL COMMENT '수정_일시',
mdfr varchar(10) NULL COMMENT '수정자',
PRIMARY KEY (bssh_cd)
) COMMENT '취급자_정보';
CREATE TABLE tb_cmm_api_log
(
request_id varchar(40) NOT NULL COMMENT '요청 id',
system_id varchar(20) NULL COMMENT '시스템 id(ens|fims등)',
req_system_id varchar(20) NULL COMMENT '요청시스템 id(kakao|kt등)',
method varchar(10) NULL COMMENT '메소드(get|put|post|delete)',
uri varchar(255) NULL COMMENT '호출 uri',
success varchar(5) NULL COMMENT '성공/실패(true|false)',
param longtext NULL COMMENT '파라메터',
response longtext NULL COMMENT '호출 결과',
message longtext NULL COMMENT '메세지(에러메세지)',
ip varchar(30) NULL COMMENT 'ip',
access_token varchar(2000) NULL COMMENT '토큰',
session_id varchar(255) NULL COMMENT '세션id',
updt_dt datetime(3) NULL COMMENT '변경일시(now(3)-밀리세컨드까지)',
updt_id varchar(20) NULL COMMENT '변경자',
regist_dt datetime(3) NULL COMMENT '생성일시(now(3)-밀리세컨드까지)',
regist_id varchar(20) NULL COMMENT '생성자',
PRIMARY KEY (request_id)
) COMMENT 'api 호출 로그';
CREATE TABLE tb_cmm_refresh_token
(
id varchar(20) NOT NULL COMMENT 'id',
refresh_token varchar(256) NOT NULL COMMENT 'refreshtoken',
regist_dt timestamp NULL COMMENT '등록일시',
updt_dt timestamp NULL COMMENT '변경일시',
PRIMARY KEY (id)
) COMMENT '리프레쉬토큰';
CREATE TABLE tb_dsuse_mgt
(
dscdmng_id varchar(10) NOT NULL COMMENT '폐기관리_id',
user_id varchar(10) NULL COMMENT '사용자_아이디',
bssh_cd varchar(10) NOT NULL COMMENT '마약류취급자식별_번호',
prgrs_stts_cd varchar(10) NULL COMMENT '진행_상태_코드',
rpt_rcept_no varchar(30) NULL COMMENT '보고_접수_번호',
usr_rpt_id_no varchar(30) NULL COMMENT '사용자_보고_식별_번호',
rpt_ty_cd varchar(1) NULL COMMENT '보고_유형_코드(0-신규,1-취소,2-변경)',
rnd_dtl_rpt_cnt decimal NULL COMMENT '수불_상세_보고_수',
hdr_de varchar(8) NULL COMMENT '취급_일자',
rpt_de varchar(8) NULL COMMENT '보고_일자',
dsuse_se_cd varchar(10) NULL COMMENT '폐기_구분_코드',
dsuse_prv_cd varchar(10) NULL COMMENT '폐기_사유_코드',
dsuse_mth_cd varchar(10) NULL COMMENT '폐기_방법_코드',
dsuse_loc varchar(120) NULL COMMENT '폐기_장소',
dsuse_de varchar(80) NULL COMMENT '폐기_일자',
status varchar(1) NULL COMMENT '처리상태(0-정상,1-취소,2-변경)',
use_yn varchar(1) NOT NULL COMMENT '사용_여부',
reg_dt varchar(14) NOT NULL COMMENT '등록_일시',
rgtr varchar(10) NOT NULL COMMENT '등록자',
mdfcn_dt varchar(14) NULL COMMENT '수정_일시',
mdfr varchar(10) NULL COMMENT '수정자',
PRIMARY KEY (dscdmng_id)
) COMMENT '폐기관리';
CREATE TABLE tb_dsuse_mgt_dtl
(
dscdmng_id varchar(10) NOT NULL COMMENT '폐기관리_id',
dscdmng_sn varchar(3) NOT NULL COMMENT '폐기관리_순번',
usr_rpt_ln_id_no varchar(35) NULL COMMENT '사용자_보고_라인_식별_번호',
prdct_cd varchar(14) NOT NULL COMMENT '제품_코드',
prduct_nm varchar(300) NULL COMMENT '제품_명',
min_distb_qy decimal NULL COMMENT '최소_유통단위_수량',
pce_qy decimal NULL COMMENT '낱개단위_수량',
mnf_no varchar(20) NULL COMMENT '제조_번호',
prd_valid_de varchar(8) NULL COMMENT '제품_유효기한_일자',
mnf_seq varchar(42) NULL COMMENT '제조_일련번호',
storge_no varchar(16) NULL COMMENT '저장소_번호',
storge_nm varchar(100) NULL COMMENT '저장소명',
mvmn_ty_cd varchar(4) NULL COMMENT '이동_유형_코드',
dsuse_qy decimal NOT NULL COMMENT '폐기_수량',
use_yn varchar(1) NOT NULL COMMENT '사용_여부',
reg_dt varchar(14) NOT NULL COMMENT '등록_일시',
rgtr varchar(10) NOT NULL COMMENT '등록자',
mdfcn_dt varchar(14) NULL COMMENT '수정_일시',
mdfr varchar(10) NULL COMMENT '수정자',
PRIMARY KEY (dscdmng_id, dscdmng_sn),
constraint fk_dsuse_mgt_to_dtl_dsuse_mgt
foreign key (dscdmng_id) references tb_dsuse_mgt (dscdmng_id)
) COMMENT '폐기관리_상세';
CREATE TABLE tb_jrdt_gov_info
(
bssh_cd varchar(10) NOT NULL COMMENT '마약류취급자식별_번호',
of_cd varchar(10) NULL COMMENT '기관_코드',
of_nm varchar(100) NULL COMMENT '기관_명',
up_of_nm varchar(100) NULL COMMENT '상위_기관_명',
top_of_nm varchar(100) NULL COMMENT '최상위_기관_명',
bass_adres varchar(200) NULL COMMENT '기본_주소',
bass_dtl_adres varchar(200) NULL COMMENT '상세_주소',
use_yn varchar(1) NOT NULL COMMENT '사용_여부',
reg_dt varchar(14) NOT NULL COMMENT '등록_일시',
rgtr varchar(10) NOT NULL COMMENT '등록자',
mdfcn_dt varchar(14) NULL COMMENT '수정_일시',
mdfr varchar(10) NULL COMMENT '수정자',
PRIMARY KEY (bssh_cd)
) COMMENT '관할_관청_정보';
CREATE TABLE tb_prduct_info
(
prduct_cd varchar(14) NOT NULL COMMENT '제품_코드',
prdlst_mst_cd varchar(14) NULL COMMENT '제품_대표_코드',
prduct_nm varchar(300) NULL COMMENT '품목_명',
nrcd_se_nm varchar(50) NULL COMMENT '마약/항정_구분_명',
prtm_se_nm varchar(200) NULL COMMENT '중점/일반_구분',
prd_min_distb_qy int NULL COMMENT '제품_최소_유통단위_수량',
std_packng_stle_nm varchar(200) NULL COMMENT '제품_최소_유통단위',
prd_tot_pce_qy int NULL COMMENT '제품_총_낱개단위_수량',
pce_co_unit_nm varchar(200) NULL COMMENT '제품_낱개_단위_명',
bssh_cd varchar(10) NULL COMMENT '마약류취급자식별_번호',
rgs_dt date NULL COMMENT '등록_일',
upd_dt date NULL COMMENT '변경_일',
use_yn varchar(1) NOT NULL COMMENT '사용_여부',
reg_dt varchar(14) NOT NULL COMMENT '등록_일시',
rgtr varchar(10) NOT NULL COMMENT '등록자',
mdfcn_dt varchar(14) NULL COMMENT '수정_일시',
mdfr varchar(10) NULL COMMENT '수정자',
PRIMARY KEY (prduct_cd)
) COMMENT '품목_정보';
CREATE TABLE tb_purchase_info
(
rptr_entrps_nm varchar(120) NULL COMMENT '판매_업체_명',
prduct_nm varchar(300) NULL COMMENT '제품_명',
hdr_de char(8) NULL COMMENT '취급_일자',
mnf_no varchar(20) NULL COMMENT '제조_번호',
mnf_seq varchar(42) NULL COMMENT '제조_일련번호',
min_distb_qy decimal NULL COMMENT '최소_유통단위_수량',
prd_min_distb_unit varchar(10) NULL COMMENT '제품_최소_유통_단위',
prd_min_distb_qy decimal NULL COMMENT '제품_최소_유통단위_수량',
pce_qy decimal NULL COMMENT '낱개단위_수량',
prd_tot_pce_qy decimal NULL COMMENT '제품_총_낱개단위_수량',
prd_pce_unit varchar(10) NULL COMMENT '제품_낱개_단위',
storge_no varchar(16) NULL COMMENT '저장소_번호',
storge_nm varchar(100) NULL COMMENT '저장소_명',
bizrno varchar(10) NULL COMMENT '사업자등록번호',
prd_sgtin varchar(68) NULL COMMENT '제품_바코드',
prd_valid_de varchar(8) NULL COMMENT '제품_유효기한_일자',
pcm_rpt_at varchar(1) NULL COMMENT '구입보고존재여부',
usr_rpt_id_no varchar(30) NULL COMMENT '판매사용자_보고_식별_번호',
chrg_nm varchar(120) NULL COMMENT '판매담당자_명',
chrg_tel_no varchar(60) NULL COMMENT '판매담당자_전화_번호',
ref_usr_rpt_id_no varchar(22) NULL COMMENT '참조_사용자_보고_식별_번호',
prtm_se_nm varchar(200) NULL COMMENT '중점/일반_구분',
rpt_de char(8) NULL COMMENT '보고_일자',
rpt_ty_nm varchar(1) NULL COMMENT '보고_유형_명',
induty_cd_nm varchar(200) NULL COMMENT '판매업체업종_명',
bssh_cd varchar(10) NOT NULL COMMENT '판매업체식별_번호',
prduct_cd varchar(14) NOT NULL COMMENT '제품_코드',
use_yn varchar(1) NOT NULL,
reg_dt varchar(14) NOT NULL,
rgtr varchar(10) NOT NULL,
mdfcn_dt varchar(14) NULL ,
mdfr varchar(10) NULL ,
PRIMARY KEY (bssh_cd, prduct_cd)
) COMMENT '구입대상_정보';
CREATE TABLE tb_stock_info
(
storge_no varchar(16) NOT NULL COMMENT '저장소_번호',
prduct_cd varchar(14) NOT NULL COMMENT '제품_코드',
storge_nm varchar(100) NULL COMMENT '저장소_명',
prduct_nm varchar(300) NULL COMMENT '제품_명',
mnf_no varchar(20) NULL COMMENT '제조_번호',
prd_valid_de char(8) NULL COMMENT '제품_유효_기한',
mnf_seq varchar(42) NULL COMMENT '제조_일련번호',
prd_min_distb_unit varchar(100) NULL COMMENT '제품_최소_유통_단위',
prd_tot_pce_qy int NULL COMMENT '제품_총_낱개단위_수량',
pce_invt_qy decimal NULL COMMENT '낱개단위_재고_수량',
prd_pce_unit varchar(100) NULL COMMENT '제품_낱개_단위',
prtm_se_cd varchar(200) NULL COMMENT '중점/일반관리_구분_코드',
storge_se_nm varchar(200) NULL COMMENT '저장소_구분_명',
min_distb_invt_qy decimal NULL COMMENT '최소_유통_단위재고_수량',
hdr_de char(8) NULL COMMENT '취급_일자',
ddln_ym char(8) NULL COMMENT '재고기준_년월',
use_yn varchar(1) NOT NULL,
reg_dt varchar(14) NOT NULL,
rgtr varchar(10) NOT NULL,
mdfcn_dt varchar(14) NULL ,
mdfr varchar(10) NULL ,
PRIMARY KEY (storge_no, prduct_cd)
) COMMENT '재고_정보';
CREATE TABLE tb_storge_info
(
bssh_cd varchar(10) NOT NULL COMMENT '마약류취급자식별_번호',
bssh_nm varchar(120) NULL COMMENT '업체_명',
use_at char NULL COMMENT '사용_유무',
storge_se_nm varchar(200) NULL COMMENT '저장소_유형',
storge_no varchar(16) NULL COMMENT '저장소_번호',
storge_nm varchar(100) NULL COMMENT '저장소_명',
bass_adres varchar(200) NULL COMMENT '기본_주소',
bass_dtl_adres varchar(200) NULL COMMENT '상세_주소',
use_yn varchar(1) NOT NULL COMMENT '사용_여부',
reg_dt varchar(14) NOT NULL COMMENT '등록_일시',
rgtr varchar(10) NOT NULL COMMENT '등록자',
mdfcn_dt varchar(14) NULL COMMENT '수정_일시',
mdfr varchar(10) NULL COMMENT '수정자',
PRIMARY KEY (bssh_cd)
) COMMENT '저장소_정보';

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save