diff --git a/src/main/java/cokr/xit/adds/nims/DsuseMgtQuery.java b/src/main/java/cokr/xit/adds/nims/DsuseMgtDetailQuery.java similarity index 71% rename from src/main/java/cokr/xit/adds/nims/DsuseMgtQuery.java rename to src/main/java/cokr/xit/adds/nims/DsuseMgtDetailQuery.java index 52eea8f..d799e6a 100644 --- a/src/main/java/cokr/xit/adds/nims/DsuseMgtQuery.java +++ b/src/main/java/cokr/xit/adds/nims/DsuseMgtDetailQuery.java @@ -12,7 +12,7 @@ import cokr.xit.foundation.component.QueryRequest; * ================================ * */ -public class DsuseMgtQuery extends QueryRequest{ +public class DsuseMgtDetailQuery extends QueryRequest{ private static final long serialVersionUID = 1L; @@ -75,7 +75,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(schDscdmngId, () -> null); } - public T setSchDscdmngId(String schDscdmngId) { + public T setSchDscdmngId(String schDscdmngId) { this.schDscdmngId = schDscdmngId; return self(); } @@ -84,7 +84,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(dscdmngId, () -> null); } - public T setDscdmngId(String dscdmngId) { + public T setDscdmngId(String dscdmngId) { this.dscdmngId = dscdmngId; return self(); } @@ -93,7 +93,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(deptCd, () -> null); } - public T setDeptCd(String deptCd) { + public T setDeptCd(String deptCd) { this.deptCd = deptCd; return self(); } @@ -102,7 +102,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(userId, () -> null); } - public T setUserId(String userId) { + public T setUserId(String userId) { this.userId = userId; return self(); } @@ -111,7 +111,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(prgrsSttsCd, () -> null); } - public T setPrgrsSttsCd(String prgrsSttsCd) { + public T setPrgrsSttsCd(String prgrsSttsCd) { this.prgrsSttsCd = prgrsSttsCd; return self(); } @@ -120,7 +120,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(bsshCd, () -> null); } - public T setBsshCd(String bsshCd) { + public T setBsshCd(String bsshCd) { this.bsshCd = bsshCd; return self(); } @@ -129,7 +129,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(rndDtlRptCnt, () -> null); } - public T setRndDtlRptCnt(String rndDtlRptCnt) { + public T setRndDtlRptCnt(String rndDtlRptCnt) { this.rndDtlRptCnt = rndDtlRptCnt; return self(); } @@ -138,7 +138,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(hdrDe, () -> null); } - public T setHdrDe(String hdrDe) { + public T setHdrDe(String hdrDe) { this.hdrDe = hdrDe; return self(); } @@ -147,7 +147,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(dsuseSeCd, () -> null); } - public T setDsuseSeCd(String dsuseSeCd) { + public T setDsuseSeCd(String dsuseSeCd) { this.dsuseSeCd = dsuseSeCd; return self(); } @@ -156,7 +156,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(dsusePrvCd, () -> null); } - public T setDsusePrvCd(String dsusePrvCd) { + public T setDsusePrvCd(String dsusePrvCd) { this.dsusePrvCd = dsusePrvCd; return self(); } @@ -165,7 +165,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(dsuseMthCd, () -> null); } - public T setDsuseMthCd(String dsuseMthCd) { + public T setDsuseMthCd(String dsuseMthCd) { this.dsuseMthCd = dsuseMthCd; return self(); } @@ -174,7 +174,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(dsuseLoc, () -> null); } - public T setDsuseLoc(String dsuseLoc) { + public T setDsuseLoc(String dsuseLoc) { this.dsuseLoc = dsuseLoc; return self(); } @@ -183,7 +183,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(dsuseDe, () -> null); } - public T setDsuseDe(String dsuseDe) { + public T setDsuseDe(String dsuseDe) { this.dsuseDe = dsuseDe; return self(); } @@ -192,7 +192,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(stts, () -> null); } - public T setStts(String stts) { + public T setStts(String stts) { this.stts = stts; return self(); } @@ -201,7 +201,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(usrRptIdNo, () -> null); } - public T setUsrRptIdNo(String usrRptIdNo) { + public T setUsrRptIdNo(String usrRptIdNo) { this.usrRptIdNo = usrRptIdNo; return self(); } @@ -210,7 +210,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(orgUsrRptIdNo, () -> null); } - public T setOrgUsrRptIdNo(String orgUsrRptIdNo) { + public T setOrgUsrRptIdNo(String orgUsrRptIdNo) { this.orgUsrRptIdNo = orgUsrRptIdNo; return self(); } @@ -219,7 +219,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(rptTyCd, () -> null); } - public T setRptTyCd(String rptTyCd) { + public T setRptTyCd(String rptTyCd) { this.rptTyCd = rptTyCd; return self(); } @@ -228,7 +228,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(useYn, () -> null); } - public T setUseYn(String useYn) { + public T setUseYn(String useYn) { this.useYn = useYn; return self(); } @@ -237,7 +237,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(regDt, () -> null); } - public T setRegDt(String regDt) { + public T setRegDt(String regDt) { this.regDt = regDt; return self(); } @@ -246,7 +246,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(rgtr, () -> null); } - public T setRgtr(String rgtr) { + public T setRgtr(String rgtr) { this.rgtr = rgtr; return self(); } @@ -255,7 +255,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(mdfcnDt, () -> null); } - public T setMdfcnDt(String mdfcnDt) { + public T setMdfcnDt(String mdfcnDt) { this.mdfcnDt = mdfcnDt; return self(); } @@ -264,7 +264,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(mdfr, () -> null); } - public T setMdfr(String mdfr) { + public T setMdfr(String mdfr) { this.mdfr = mdfr; return self(); } @@ -273,7 +273,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(bsshNm, () -> null); } - public T setBsshNm(String bsshNm) { + public T setBsshNm(String bsshNm) { this.bsshNm = bsshNm; return self(); } @@ -282,7 +282,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(indutyNm, () -> null); } - public T setIndutyNm(String indutyNm) { + public T setIndutyNm(String indutyNm) { this.indutyNm = indutyNm; return self(); } @@ -291,7 +291,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(hdntCd, () -> null); } - public T setHdntCd(String hdntCd) { + public T setHdntCd(String hdntCd) { this.hdntCd = hdntCd; return self(); } @@ -299,7 +299,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(hdntNm, () -> null); } - public T setHdntNm(String hdntNm) { + public T setHdntNm(String hdntNm) { this.hdntNm = hdntNm; return self(); } @@ -308,7 +308,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(bizrno, () -> null); } - public T setBizrno(String bizrno) { + public T setBizrno(String bizrno) { this.bizrno = bizrno; return self(); } @@ -317,7 +317,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(rprsntvNm, () -> null); } - public T setRprsntvNm(String rprsntvNm) { + public T setRprsntvNm(String rprsntvNm) { this.rprsntvNm = rprsntvNm; return self(); } @@ -326,7 +326,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(chrgNm, () -> null); } - public T setChrgNm(String chrgNm) { + public T setChrgNm(String chrgNm) { this.chrgNm = chrgNm; return self(); } @@ -335,7 +335,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(hptlNo, () -> null); } - public T setHptlNo(String hptlNo) { + public T setHptlNo(String hptlNo) { this.hptlNo = hptlNo; return self(); } @@ -344,7 +344,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(joinYn, () -> null); } - public T setJoinYn(String joinYn) { + public T setJoinYn(String joinYn) { this.joinYn = joinYn; return self(); } @@ -353,7 +353,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(bsshSttsNm, () -> null); } - public T setBsshSttsNm(String bsshSttsNm) { + public T setBsshSttsNm(String bsshSttsNm) { this.bsshSttsNm = bsshSttsNm; return self(); } @@ -362,7 +362,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(prmisnNo, () -> null); } - public T setPrmisnNo(String prmisnNo) { + public T setPrmisnNo(String prmisnNo) { this.prmisnNo = prmisnNo; return self(); } @@ -372,7 +372,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(dscdmngSn, () -> null); } - public T setDscdmngSn(String dscdmngSn) { + public T setDscdmngSn(String dscdmngSn) { this.dscdmngSn = dscdmngSn; return self(); } @@ -381,7 +381,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(prductCd, () -> null); } - public T setPrductCd(String prductCd) { + public T setPrductCd(String prductCd) { this.prductCd = prductCd; return self(); } @@ -390,7 +390,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(prductNm, () -> null); } - public T setPrductNm(String prductNm) { + public T setPrductNm(String prductNm) { this.prductNm = prductNm; return self(); } @@ -399,7 +399,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(minDistbQy, () -> null); } - public T setMinDistbQy(String minDistbQy) { + public T setMinDistbQy(String minDistbQy) { this.minDistbQy = minDistbQy; return self(); } @@ -408,7 +408,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(minDistbUnit, () -> null); } - public T setMinDistbUnit(String minDistbUnit) { + public T setMinDistbUnit(String minDistbUnit) { this.minDistbUnit = minDistbUnit; return self(); } @@ -417,7 +417,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(minDistb, () -> null); } - public T setMindistb(String minDistb) { + public T setMindistb(String minDistb) { this.minDistb = minDistb; return self(); } @@ -426,7 +426,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(pceQy, () -> null); } - public T setPceqy(String pceQy) { + public T setPceqy(String pceQy) { this.pceQy = pceQy; return self(); } @@ -435,7 +435,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(pceUnit, () -> null); } - public T setPceunit(String pceUnit) { + public T setPceunit(String pceUnit) { this.pceUnit = pceUnit; return self(); } @@ -444,7 +444,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(pce, () -> null); } - public T setPce(String pce) { + public T setPce(String pce) { this.pce = pce; return self(); } @@ -453,7 +453,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(mnfNo, () -> null); } - public T setMnfno(String mnfNo) { + public T setMnfno(String mnfNo) { this.mnfNo = mnfNo; return self(); } @@ -462,7 +462,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(prdValidDe, () -> null); } - public T setPrdvalidde(String prdValidDe) { + public T setPrdvalidde(String prdValidDe) { this.prdValidDe = prdValidDe; return self(); } @@ -471,7 +471,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(mnfSeq, () -> null); } - public T setMnfseq(String mnfSeq) { + public T setMnfseq(String mnfSeq) { this.mnfSeq = mnfSeq; return self(); } @@ -480,7 +480,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(dsuseQy, () -> null); } - public T setDsuseqy(String dsuseQy) { + public T setDsuseqy(String dsuseQy) { this.dsuseQy = dsuseQy; return self(); } @@ -489,7 +489,7 @@ public class DsuseMgtQuery extends QueryRequest{ return ifEmpty(usrRptInIdNo, () -> null); } - public T setUsrrptinidno(String usrRptInIdNo) { + public T setUsrrptinidno(String usrRptInIdNo) { this.usrRptInIdNo = usrRptInIdNo; return self(); } diff --git a/src/main/java/cokr/xit/adds/nims/ProductQuery.java b/src/main/java/cokr/xit/adds/nims/ProductQuery.java new file mode 100644 index 0000000..133f630 --- /dev/null +++ b/src/main/java/cokr/xit/adds/nims/ProductQuery.java @@ -0,0 +1,160 @@ +package cokr.xit.adds.nims; + +import cokr.xit.foundation.component.QueryRequest; + +/**단속 대장 정보 조회 요청 +* +*

상세 설명: +* +*

+* ============ 변경 이력 ============
+* 2023-06-23	leebj 최초 작성
+* ================================
+* 
+*/ +public class ProductQuery extends QueryRequest{ + + private static final long serialVersionUID = 1L; + + //검색조건 + private String schProductCd; // 제품코드 + private String schProductNm; // 제품명 + + //저장소 정보 + private String prductCd; // 제품코드 + private String prdlstMstCd; // ?? + private String prductNm; // 제품명 + private String nrcdSeNm; // 마약/향정구분 + private String prtmSeNm; // 중점/일반구분 + private String prdMinDistbQy; // 최소유통단위 + private String stdPackngStleNm; // 최소유통단위명 + private String prdTotPceQy; // 낱개단위 + private String pceCoUnitNm; // 낱개단위명 + private String bsshCd; // 취급자 번호 + private String rgsDt; // ??일시 + private String updDt; // 수정일시 + + public String getSchProductCd() { + return ifEmpty(schProductCd, () -> null); + } + + public T setSchProductCd(String schProductCd) { + this.schProductCd = schProductCd; + return self(); + } + + public String getSchProductNm() { + return ifEmpty(schProductNm, () -> null); + } + + public T setSchProductNm(String schProductNm) { + this.schProductNm = schProductNm; + return self(); + } + + public String getPrductCd() { + return ifEmpty(prductCd, () -> null); + } + + public T setPrductCd(String prductCd) { + this.prductCd = prductCd; + return self(); + } + + public String getPrdlstMstCd() { + return ifEmpty(prdlstMstCd, () -> null); + } + + public T setPrdlstMstCd(String prdlstMstCd) { + this.prdlstMstCd = prdlstMstCd; + return self(); + } + + public String getPrductNm() { + return ifEmpty(prductNm, () -> null); + } + + public T setPrductNm(String prductNm) { + this.prductNm = prductNm; + return self(); + } + public String getNrcdSeNm() { + return ifEmpty(nrcdSeNm, () -> null); + } + + public T setNrcdSeNm(String nrcdSeNm) { + this.nrcdSeNm = nrcdSeNm; + return self(); + } + + public String getPrtmSeNm() { + return ifEmpty(prtmSeNm, () -> null); + } + + public T setPrtmSeNm(String prtmSeNm) { + this.prtmSeNm = prtmSeNm; + return self(); + } + + public String getPrdMinDistbQy() { + return ifEmpty(prdMinDistbQy, () -> null); + } + + public T setPrdMinDistbQy(String prdMinDistbQy) { + this.prdMinDistbQy = prdMinDistbQy; + return self(); + } + + public String getStdPackngStleNm() { + return ifEmpty(stdPackngStleNm, () -> null); + } + + public T setStdPackngStleNm(String stdPackngStleNm) { + this.stdPackngStleNm = stdPackngStleNm; + return self(); + } + + public String getPrdTotPceQy() { + return ifEmpty(prdTotPceQy, () -> null); + } + + public T setPrdTotPceQy(String prdTotPceQy) { + this.prdTotPceQy = prdTotPceQy; + return self(); + } + + public String getPceCoUnitNm() { + return ifEmpty(pceCoUnitNm, () -> null); + } + + public T setPceCoUnitNm(String pceCoUnitNm) { + this.pceCoUnitNm = pceCoUnitNm; + return self(); + } + + public String getbsshCd() { + return ifEmpty(bsshCd, () -> null); + } + + public T setbsshCd(String bsshCd) { + this.bsshCd = bsshCd; + return self(); + } + public String getRgsDt() { + return ifEmpty(rgsDt, () -> null); + } + + public T setRgsDt(String rgsDt) { + this.rgsDt = rgsDt; + return self(); + } + + public String getUpdDt() { + return ifEmpty(updDt, () -> null); + } + + public T setUpdDt(String updDt) { + this.updDt = updDt; + return self(); + } +} diff --git a/src/main/java/cokr/xit/adds/nims/dao/BsshMapper.java b/src/main/java/cokr/xit/adds/nims/dao/BsshMapper.java index c1a2296..c90c0fc 100644 --- a/src/main/java/cokr/xit/adds/nims/dao/BsshMapper.java +++ b/src/main/java/cokr/xit/adds/nims/dao/BsshMapper.java @@ -5,6 +5,7 @@ import java.util.List; import org.egovframe.rte.psl.dataaccess.mapper.Mapper; import cokr.xit.adds.nims.BsshQuery; +import cokr.xit.adds.nims.ProductQuery; import cokr.xit.foundation.component.AbstractMapper; import cokr.xit.foundation.data.DataObject; diff --git a/src/main/java/cokr/xit/adds/nims/dao/DsuseMgtMapper.java b/src/main/java/cokr/xit/adds/nims/dao/DsuseMgtDetailMapper.java similarity index 73% rename from src/main/java/cokr/xit/adds/nims/dao/DsuseMgtMapper.java rename to src/main/java/cokr/xit/adds/nims/dao/DsuseMgtDetailMapper.java index fde5b1f..ac4e168 100644 --- a/src/main/java/cokr/xit/adds/nims/dao/DsuseMgtMapper.java +++ b/src/main/java/cokr/xit/adds/nims/dao/DsuseMgtDetailMapper.java @@ -5,8 +5,7 @@ import java.util.Map; import org.egovframe.rte.psl.dataaccess.mapper.Mapper; -import cokr.xit.adds.nims.DsuseMgtQuery; -import cokr.xit.adds.nims.DsuseMgtReceiptQuery; +import cokr.xit.adds.nims.DsuseMgtDetailQuery; import cokr.xit.foundation.component.AbstractMapper; import cokr.xit.foundation.data.DataObject; @@ -20,13 +19,13 @@ import cokr.xit.foundation.data.DataObject; * ================================ * */ -@Mapper("dsuseMgtMapper") -public interface DsuseMgtMapper extends AbstractMapper { +@Mapper("dsuseMgtDetailMapper") +public interface DsuseMgtDetailMapper extends AbstractMapper { /**지정한 조건에 따라 전자우편 안내문 목록을 조회하여 반환한다.
* @param req 전자우편 안내문 조회 조건 * @return 전자우편 안내문 목록 */ - List selectDsuseMgtList(DsuseMgtQuery req); + List selectDsuseMgtDetailList(DsuseMgtDetailQuery req); } diff --git a/src/main/java/cokr/xit/adds/nims/service/BsshService.java b/src/main/java/cokr/xit/adds/nims/service/BsshService.java index 42b489f..150dcd0 100644 --- a/src/main/java/cokr/xit/adds/nims/service/BsshService.java +++ b/src/main/java/cokr/xit/adds/nims/service/BsshService.java @@ -3,6 +3,7 @@ package cokr.xit.adds.nims.service; import java.util.List; import cokr.xit.adds.nims.BsshQuery; +import cokr.xit.adds.nims.ProductQuery; import cokr.xit.foundation.data.DataObject; public interface BsshService { diff --git a/src/main/java/cokr/xit/adds/nims/service/DsuseMgtService.java b/src/main/java/cokr/xit/adds/nims/service/DsuseMgtDetailService.java similarity index 62% rename from src/main/java/cokr/xit/adds/nims/service/DsuseMgtService.java rename to src/main/java/cokr/xit/adds/nims/service/DsuseMgtDetailService.java index 188ebf2..fe89c43 100644 --- a/src/main/java/cokr/xit/adds/nims/service/DsuseMgtService.java +++ b/src/main/java/cokr/xit/adds/nims/service/DsuseMgtDetailService.java @@ -3,12 +3,10 @@ package cokr.xit.adds.nims.service; import java.util.List; import java.util.Map; -import cokr.xit.adds.nims.DsuseMgtQuery; -import cokr.xit.adds.nims.DsuseMgtReceiptQuery; -import cokr.xit.base.file.FileInfo; +import cokr.xit.adds.nims.DsuseMgtDetailQuery; import cokr.xit.foundation.data.DataObject; -public interface DsuseMgtService { +public interface DsuseMgtDetailService { /** 단속자료 목록을 조회한다. * @param query 단속자료 목록 조회 조건 @@ -17,6 +15,6 @@ public interface DsuseMgtService { * * @return 단속자료 목록 */ - List getDsuseMgtList(DsuseMgtQuery query); + List getDsuseMgtDetailList(DsuseMgtDetailQuery query); } diff --git a/src/main/java/cokr/xit/adds/nims/service/bean/DsuseMgtDetailServiceBean.java b/src/main/java/cokr/xit/adds/nims/service/bean/DsuseMgtDetailServiceBean.java new file mode 100644 index 0000000..8a7899f --- /dev/null +++ b/src/main/java/cokr/xit/adds/nims/service/bean/DsuseMgtDetailServiceBean.java @@ -0,0 +1,30 @@ +package cokr.xit.adds.nims.service.bean; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import javax.annotation.Resource; + +import org.springframework.stereotype.Service; + +import cokr.xit.adds.nims.DsuseMgtDetailQuery; +import cokr.xit.adds.nims.dao.DsuseMgtDetailMapper; +import cokr.xit.adds.nims.service.DsuseMgtDetailService; +import cokr.xit.foundation.component.AbstractServiceBean; +import cokr.xit.foundation.data.DataObject; + +@Service("dsuseMgtDetailService") +public class DsuseMgtDetailServiceBean extends AbstractServiceBean implements DsuseMgtDetailService { + + /** 전자우편 안내문 정보 DAO */ + @Resource(name = "dsuseMgtDetailMapper") + private DsuseMgtDetailMapper dsuseMgtDetailMapper; + + @Override + public List getDsuseMgtDetailList(DsuseMgtDetailQuery query){ + return dsuseMgtDetailMapper.selectDsuseMgtDetailList(query); + } + +} diff --git a/src/main/java/cokr/xit/adds/nims/service/bean/DsuseMgtServiceBean.java b/src/main/java/cokr/xit/adds/nims/service/bean/DsuseMgtServiceBean.java deleted file mode 100644 index c1ff08d..0000000 --- a/src/main/java/cokr/xit/adds/nims/service/bean/DsuseMgtServiceBean.java +++ /dev/null @@ -1,30 +0,0 @@ -package cokr.xit.adds.nims.service.bean; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import javax.annotation.Resource; - -import org.springframework.stereotype.Service; - -import cokr.xit.adds.nims.DsuseMgtQuery; -import cokr.xit.adds.nims.dao.DsuseMgtMapper; -import cokr.xit.adds.nims.service.DsuseMgtService; -import cokr.xit.foundation.component.AbstractServiceBean; -import cokr.xit.foundation.data.DataObject; - -@Service("dsuseMgtService") -public class DsuseMgtServiceBean extends AbstractServiceBean implements DsuseMgtService { - - /** 전자우편 안내문 정보 DAO */ - @Resource(name = "dsuseMgtMapper") - private DsuseMgtMapper dsuseMgtMapper; - - @Override - public List getDsuseMgtList(DsuseMgtQuery query){ - return dsuseMgtMapper.selectDsuseMgtList(query); - } - -} diff --git a/src/main/java/cokr/xit/adds/nims/web/DsuseMgtController.java b/src/main/java/cokr/xit/adds/nims/web/DsuseMgtController.java deleted file mode 100644 index f9ec2b0..0000000 --- a/src/main/java/cokr/xit/adds/nims/web/DsuseMgtController.java +++ /dev/null @@ -1,80 +0,0 @@ -package cokr.xit.adds.nims.web; - -import java.util.Collection; -import java.util.function.Consumer; -import java.net.http.HttpResponse; -import java.util.ArrayList; -import java.util.List; - -import javax.annotation.Resource; -import javax.json.JsonObject; - -import org.springframework.boot.configurationprocessor.json.JSONException; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.servlet.ModelAndView; - -import net.minidev.json.JSONArray; -import net.minidev.json.JSONObject; -import net.minidev.json.parser.JSONParser; -import net.minidev.json.parser.ParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; - -import cokr.xit.adds.nims.service.DsuseMgtReceiptService; -import cokr.xit.adds.nims.service.DsuseMgtService; -import cokr.xit.adds.nims.BsshQuery; -import cokr.xit.adds.nims.DsuseMgtQuery; -import cokr.xit.foundation.web.AbstractController; -import cokr.xit.foundation.web.WebClient; -import cokr.xit.foundation.web.WebClient.Request.ContentType; -import cokr.xit.foundation.web.WebClient.Request; -import cokr.xit.foundation.data.DataObject; - - - -@Controller -@RequestMapping( - name = "마약류폐기 신청 상세", - value = {"/adds/nims"} -) -public class DsuseMgtController extends AbstractController { - - public static final String CLASS_URL = "/adds/nims"; - - public class METHOD_URL { - public static final String - dsuseMgthMain = "/dsuseMgt-main.do" // 부과 제외 관리 메인 화면 - , getDsuseMgtList = "/dsuseMgt-list.do" // 부과 제외 대장 목록 조회 -// , getLevyExclusionInfo = "/020/info.do" // 부과 제외 대장 조회 -// , createLevyExclusion = "/020/create.do" // 부과 제외 대장 등록 - ; - } - - @Resource(name="dsuseMgtService") - private DsuseMgtService dsuseMgtService; - - @RequestMapping(name="마약류폐기 신청서 접수 메인", value=METHOD_URL.dsuseMgthMain) - public ModelAndView dsuseMgtMain(String dscdmng_id) { - ModelAndView mav = new ModelAndView("adds/nims/dsuseMgt-main"); - - // 사용자 정보 - //ManagedUser managedUser = (ManagedUser)currentUser().getUser(); - - return mav - .addObject("pageName", "dsuseMgthMain") // View(jsp)에서 사용할 id 뒤에 붙일 suffix - .addObject("infoPrefix", "dsuseMgt") // prefix - .addObject("infoPrefixUrl", "/adds/nims") // prefixUrl - .addObject("dscdmng_id", dscdmng_id) - ; - } - - @RequestMapping(name="마약류폐기 신청서 접수 조회", value=METHOD_URL.getDsuseMgtList) - public ModelAndView getDsuseMgtList(DsuseMgtQuery query) throws JsonProcessingException, ParseException { - setFetchSize(query); - - return setCollectionInfo(new ModelAndView("jsonView"), dsuseMgtService.getDsuseMgtList(query),"",""); - - } - -} diff --git a/src/main/java/cokr/xit/adds/nims/web/DsuseMgtDetailController.java b/src/main/java/cokr/xit/adds/nims/web/DsuseMgtDetailController.java new file mode 100644 index 0000000..4d74297 --- /dev/null +++ b/src/main/java/cokr/xit/adds/nims/web/DsuseMgtDetailController.java @@ -0,0 +1,62 @@ +package cokr.xit.adds.nims.web; + +import javax.annotation.Resource; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.servlet.ModelAndView; + +import net.minidev.json.parser.ParseException; +import com.fasterxml.jackson.core.JsonProcessingException; + +import cokr.xit.adds.nims.service.DsuseMgtDetailService; +import cokr.xit.adds.nims.DsuseMgtDetailQuery; +import cokr.xit.foundation.web.AbstractController; + + + +@Controller +@RequestMapping( + name = "마약류폐기 신청 상세", + value = {"/adds/nims"} +) +public class DsuseMgtDetailController extends AbstractController { + + public static final String CLASS_URL = "/adds/nims"; + + public class METHOD_URL { + public static final String + dsuseMgtDetailMain = "/dsuseMgt-info.do" // 부과 제외 관리 메인 화면 + , getDsuseMgtDetailList = "/dsuseMgtDetail-list.do" // 부과 제외 대장 목록 조회 +// , getLevyExclusionInfo = "/020/info.do" // 부과 제외 대장 조회 +// , createLevyExclusion = "/020/create.do" // 부과 제외 대장 등록 + ; + } + + @Resource(name="dsuseMgtDetailService") + private DsuseMgtDetailService dsuseMgtDetailService; + + @RequestMapping(name="마약류폐기 신청서 접수 메인", value=METHOD_URL.dsuseMgtDetailMain) + public ModelAndView dsuseMgtMain(String usrRptIdNo) { + ModelAndView mav = new ModelAndView("adds/nims/dsuseMgt-info"); + + // 사용자 정보 + //ManagedUser managedUser = (ManagedUser)currentUser().getUser(); + + return mav + .addObject("pageName", "dsuseMgtInfo") // View(jsp)에서 사용할 id 뒤에 붙일 suffix + .addObject("infoPrefix", "dsuseMgt") // prefix + .addObject("infoPrefixUrl", "/adds/nims") // prefixUrl + .addObject("usrRptIdNo", usrRptIdNo) + ; + } + + @RequestMapping(name="마약류폐기 신청서 접수 조회", value=METHOD_URL.getDsuseMgtDetailList) + public ModelAndView getDsuseMgtList(DsuseMgtDetailQuery query) throws JsonProcessingException, ParseException { + setFetchSize(query); + + return setCollectionInfo(new ModelAndView("jsonView"), dsuseMgtDetailService.getDsuseMgtDetailList(query),"","dsuseMgtDetail"); + + } + +} diff --git a/src/main/java/cokr/xit/adds/nims/web/ProductController.java b/src/main/java/cokr/xit/adds/nims/web/ProductController.java new file mode 100644 index 0000000..ff6ab9a --- /dev/null +++ b/src/main/java/cokr/xit/adds/nims/web/ProductController.java @@ -0,0 +1,128 @@ +package cokr.xit.adds.nims.web; + +import java.util.Collection; +import java.util.function.Consumer; +import java.net.http.HttpResponse; +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.Resource; +import javax.json.JsonObject; + +import org.springframework.boot.configurationprocessor.json.JSONException; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.servlet.ModelAndView; + +import net.minidev.json.JSONArray; +import net.minidev.json.JSONObject; +import net.minidev.json.parser.JSONParser; +import net.minidev.json.parser.ParseException; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; + +import cokr.xit.adds.nims.service.DsuseMgtReceiptService; +import cokr.xit.adds.nims.BsshQuery; +import cokr.xit.adds.nims.ProductQuery; +import cokr.xit.foundation.web.AbstractController; +import cokr.xit.foundation.web.WebClient; +import cokr.xit.foundation.web.WebClient.Request.ContentType; +import cokr.xit.foundation.web.WebClient.Request; +import cokr.xit.foundation.data.DataObject; + + + +@Controller +@RequestMapping( + name = "마약류폐기 신청서 접수", + value = {"/adds/nims"} +) +public class ProductController extends AbstractController { + + public static final String CLASS_URL = "/adds/nims"; + + public class METHOD_URL { + public static final String + producthMain = "/product-main.do" // 부과 제외 관리 메인 화면 + , getProductList = "/product-list.do" // 부과 제외 대장 목록 조회 +// , getLevyExclusionInfo = "/020/info.do" // 부과 제외 대장 조회 +// , createLevyExclusion = "/020/create.do" // 부과 제외 대장 등록 + ; + } + + @RequestMapping(name="마약류폐기 신청서 접수 메인", value=METHOD_URL.producthMain) + public ModelAndView bsshMain(String openPage) { + ModelAndView mav = new ModelAndView("adds/nims/product-main"); + + // 사용자 정보 + //ManagedUser managedUser = (ManagedUser)currentUser().getUser(); + + return mav + .addObject("pageName", "productMain") // View(jsp)에서 사용할 id 뒤에 붙일 suffix + .addObject("infoPrefix", "product") // prefix + .addObject("infoPrefixUrl", "/adds/nims") // prefixUrl + .addObject("openPage", openPage) + ; + } + + @RequestMapping(name="마약류폐기 신청서 접수 조회", value=METHOD_URL.getProductList) + public ModelAndView getbsshList(ProductQuery query) throws JsonProcessingException, ParseException { + ModelAndView mav = new ModelAndView(); + + System.out.println("취급자 조회 : " + query.getSchProductCd()); + + mav.setViewName("jsonView"); + + String sMethod = "POST"; + + DataObject dataObject = new DataObject(); + dataObject.put("k",""); + dataObject.put("fg","1"); + dataObject.put("pg","1"); + dataObject.put("ymd",""); + dataObject.put("fg2",""); + dataObject.put("p",query.getSchProductCd()); + dataObject.put("pn",query.getSchProductNm()); + dataObject.put("dbSkipYn","N"); + dataObject.put("userId","suji"); + + ObjectMapper mapper = new ObjectMapper(); + + String sJsonData = mapper.writeValueAsString(dataObject); + + Consumer configurer = (request) -> { + request.uri("http://localhost:9076/api/biz/nims/v1/getNimsProductInfoKd") + .contentType(ContentType.JSON) + .bodyData(sJsonData); + }; + + HttpResponse hresp = null; + if(sMethod.equals("POST")) { + hresp = new WebClient() + .post(configurer); + } else if(sMethod.equals("GET")) { + hresp = new WebClient() + .get(configurer); + } + String resBody = hresp.body(); + + System.out.println(resBody); + + JSONParser parser = new JSONParser(); + + Object obj = parser.parse( resBody ); + JSONObject jsonObj = (JSONObject) obj; + JSONArray jsonData = (JSONArray) jsonObj.get("data"); + + System.out.println(jsonData.get(0).toString()); + + ModelAndView result = new ModelAndView("jsonView"); + + result.addObject("productMainList", jsonData) // 발송 정보 + ; + + return result; + + } + +} diff --git a/src/main/resources/sql/mapper/adds/nims/dsuseMgtDetail-mapper.xml b/src/main/resources/sql/mapper/adds/nims/dsuseMgtDetail-mapper.xml new file mode 100644 index 0000000..6f218bb --- /dev/null +++ b/src/main/resources/sql/mapper/adds/nims/dsuseMgtDetail-mapper.xml @@ -0,0 +1,41 @@ + + + + + + + + SELECT + DSCDMNG_ID /* 폐기관리 ID */ + , DSCDMNG_SN /* 폐기관리_순번 */ + , PRDUCT_CD /* 제품_코드 */ + , PRDUCT_NM /* 제품_명 */ + , MIN_DISTB_QY /* 최소_유통단위_수량 */ + , MIN_DISTB_UNIT /* 최소_유통_단위 */ + , CONCAT(MIN_DISTB_QY, MIN_DISTB_UNIT) MIN_DISTB /* 최소_유통_단위_및_수량 */ + , PCE_QY /* 낱개단위_수량 */ + , PCE_UNIT /* 낱개_단위 */ + , CONCAT(PCE_QY, PCE_UNIT) PCE /* 낱개_수량_및_단위 */ + , MNF_NO /* 제조_번호 */ + , PRD_VALID_DE /* 제품_유효기한_일자 */ + , MNF_SEQ /* 제조_일련번호 */ + , DSUSE_QY /* 폐기_수량 */ + , USR_RPT_LN_ID_NO /* 사용자_보고_라인_식별_번호 */ + FROM TB_DSUSE_MGT_DTL + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgt-info.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgt-info.jsp index 46b108d..898d753 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgt-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgt-info.jsp @@ -1,7 +1,7 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> <%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> -폐기관리 등록 +신청서 정보 상세
@@ -115,8 +115,8 @@
- - + +
@@ -126,21 +126,20 @@ 제품명 제품코드 제품번호 - 제조 일련 번호 + 폐기수량 유효기간 최소 유통단위 수량 낱개 단위 수량 폐기 수량 - - + -