feat : 제품검색화면 추가 조정중

dev
Leeyh1121 5 months ago
parent 98d0701b09
commit 86ad2c53cb

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

@ -0,0 +1,160 @@
package cokr.xit.adds.nims;
import cokr.xit.foundation.component.QueryRequest;
/**
*
* <p> :
*
* <pre>
* ============ ============
* 2023-06-23 leebj
* ================================
* </pre>
*/
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 extends ProductQuery> T setSchProductCd(String schProductCd) {
this.schProductCd = schProductCd;
return self();
}
public String getSchProductNm() {
return ifEmpty(schProductNm, () -> null);
}
public <T extends ProductQuery> T setSchProductNm(String schProductNm) {
this.schProductNm = schProductNm;
return self();
}
public String getPrductCd() {
return ifEmpty(prductCd, () -> null);
}
public <T extends ProductQuery> T setPrductCd(String prductCd) {
this.prductCd = prductCd;
return self();
}
public String getPrdlstMstCd() {
return ifEmpty(prdlstMstCd, () -> null);
}
public <T extends ProductQuery> T setPrdlstMstCd(String prdlstMstCd) {
this.prdlstMstCd = prdlstMstCd;
return self();
}
public String getPrductNm() {
return ifEmpty(prductNm, () -> null);
}
public <T extends ProductQuery> T setPrductNm(String prductNm) {
this.prductNm = prductNm;
return self();
}
public String getNrcdSeNm() {
return ifEmpty(nrcdSeNm, () -> null);
}
public <T extends ProductQuery> T setNrcdSeNm(String nrcdSeNm) {
this.nrcdSeNm = nrcdSeNm;
return self();
}
public String getPrtmSeNm() {
return ifEmpty(prtmSeNm, () -> null);
}
public <T extends ProductQuery> T setPrtmSeNm(String prtmSeNm) {
this.prtmSeNm = prtmSeNm;
return self();
}
public String getPrdMinDistbQy() {
return ifEmpty(prdMinDistbQy, () -> null);
}
public <T extends ProductQuery> T setPrdMinDistbQy(String prdMinDistbQy) {
this.prdMinDistbQy = prdMinDistbQy;
return self();
}
public String getStdPackngStleNm() {
return ifEmpty(stdPackngStleNm, () -> null);
}
public <T extends ProductQuery> T setStdPackngStleNm(String stdPackngStleNm) {
this.stdPackngStleNm = stdPackngStleNm;
return self();
}
public String getPrdTotPceQy() {
return ifEmpty(prdTotPceQy, () -> null);
}
public <T extends ProductQuery> T setPrdTotPceQy(String prdTotPceQy) {
this.prdTotPceQy = prdTotPceQy;
return self();
}
public String getPceCoUnitNm() {
return ifEmpty(pceCoUnitNm, () -> null);
}
public <T extends ProductQuery> T setPceCoUnitNm(String pceCoUnitNm) {
this.pceCoUnitNm = pceCoUnitNm;
return self();
}
public String getbsshCd() {
return ifEmpty(bsshCd, () -> null);
}
public <T extends BsshQuery> T setbsshCd(String bsshCd) {
this.bsshCd = bsshCd;
return self();
}
public String getRgsDt() {
return ifEmpty(rgsDt, () -> null);
}
public <T extends ProductQuery> T setRgsDt(String rgsDt) {
this.rgsDt = rgsDt;
return self();
}
public String getUpdDt() {
return ifEmpty(updDt, () -> null);
}
public <T extends ProductQuery> T setUpdDt(String updDt) {
this.updDt = updDt;
return self();
}
}

@ -5,6 +5,7 @@ import java.util.List;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper; import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.adds.nims.BsshQuery; import cokr.xit.adds.nims.BsshQuery;
import cokr.xit.adds.nims.ProductQuery;
import cokr.xit.foundation.component.AbstractMapper; import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;

@ -5,8 +5,7 @@ import java.util.Map;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper; import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.adds.nims.DsuseMgtQuery; import cokr.xit.adds.nims.DsuseMgtDetailQuery;
import cokr.xit.adds.nims.DsuseMgtReceiptQuery;
import cokr.xit.foundation.component.AbstractMapper; import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
@ -20,13 +19,13 @@ import cokr.xit.foundation.data.DataObject;
* ================================ * ================================
* </pre> * </pre>
*/ */
@Mapper("dsuseMgtMapper") @Mapper("dsuseMgtDetailMapper")
public interface DsuseMgtMapper extends AbstractMapper { public interface DsuseMgtDetailMapper extends AbstractMapper {
/** .<br /> /** .<br />
* @param req * @param req
* @return * @return
*/ */
List<DataObject> selectDsuseMgtList(DsuseMgtQuery req); List<DataObject> selectDsuseMgtDetailList(DsuseMgtDetailQuery req);
} }

@ -3,6 +3,7 @@ package cokr.xit.adds.nims.service;
import java.util.List; import java.util.List;
import cokr.xit.adds.nims.BsshQuery; import cokr.xit.adds.nims.BsshQuery;
import cokr.xit.adds.nims.ProductQuery;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
public interface BsshService { public interface BsshService {

@ -3,12 +3,10 @@ package cokr.xit.adds.nims.service;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import cokr.xit.adds.nims.DsuseMgtQuery; import cokr.xit.adds.nims.DsuseMgtDetailQuery;
import cokr.xit.adds.nims.DsuseMgtReceiptQuery;
import cokr.xit.base.file.FileInfo;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
public interface DsuseMgtService { public interface DsuseMgtDetailService {
/** . /** .
* @param query * @param query
@ -17,6 +15,6 @@ public interface DsuseMgtService {
* </ul> * </ul>
* @return * @return
*/ */
List<DataObject> getDsuseMgtList(DsuseMgtQuery query); List<DataObject> getDsuseMgtDetailList(DsuseMgtDetailQuery query);
} }

@ -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<DataObject> getDsuseMgtDetailList(DsuseMgtDetailQuery query){
return dsuseMgtDetailMapper.selectDsuseMgtDetailList(query);
}
}

@ -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<DataObject> getDsuseMgtList(DsuseMgtQuery query){
return dsuseMgtMapper.selectDsuseMgtList(query);
}
}

@ -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),"","");
}
}

@ -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");
}
}

@ -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<Request> configurer = (request) -> {
request.uri("http://localhost:9076/api/biz/nims/v1/getNimsProductInfoKd")
.contentType(ContentType.JSON)
.bodyData(sJsonData);
};
HttpResponse<String> 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;
}
}

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cokr.xit.adds.nims.dao.DsuseMgtDetailMapper">
<!-- 전자우편 안내문 정보 매퍼
========== 변경 이력 ==========
2023-12-04 JoJH 최초 작성
============================ -->
<sql id="select">
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
</sql>
<select id="selectDsuseMgtDetailList" parameterType="map" resultType="dataobject">/* 전자우편 안내문 목록 조회(epostGdccMapper.selectEpostGdccList) */
<include refid="utility.paging-prefix" />
<include refid="select" />
WHERE 1=1
<if test="schDscdmngId != null">
AND DSCDMNG_ID = #{schDscdmngId}
</if>
<include refid="utility.orderBy" />
<include refid="utility.paging-suffix" />
</select>
</mapper>

@ -1,7 +1,7 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> <%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<c:set var="prefixName" scope="request">폐기관리 등록</c:set> <c:set var="prefixName" scope="request">신청서 정보 상세</c:set>
<!-- inner page html --> <!-- inner page html -->
<div class="content-wrapper"> <div class="content-wrapper">
@ -115,8 +115,8 @@
<div style=" align-content: center; text-align: center;"> <div style=" align-content: center; text-align: center;">
<span> <span>
<!-- 업무 버튼 --> <!-- 업무 버튼 -->
<button type="button" class="btn btn-primary w-px-80" id="btnSave--excl02040" title="저장">추가</button> <button type="button" class="btn btn-primary w-px-80" id="btnSave--${pageName}" title="저장">추가</button>
<button type="button" class="btn btn-primary w-px-80" id="btnSave--excl02040" title="저장">제거</button> <button type="button" class="btn btn-primary w-px-80" id="btnSave--${pageName}" title="저장">제거</button>
</span> </span>
</div> </div>
</div> </div>
@ -126,21 +126,20 @@
<th class="sorting sorting_asc" aria-sort="ascending" style="width: 223.719px;">제품명</th> <th class="sorting sorting_asc" aria-sort="ascending" style="width: 223.719px;">제품명</th>
<th class="sorting" style="width: 146.156px;">제품코드</th> <th class="sorting" style="width: 146.156px;">제품코드</th>
<th class="sorting" style="width: 160.141px;">제품번호</th> <th class="sorting" style="width: 160.141px;">제품번호</th>
<th class="sorting" style="width: 160.141px;">제조 일련 번호</th> <th class="sorting" style="width: 160.141px;">폐기수량</th>
<th class="sorting" style="width: 230.469px;">유효기간</th> <th class="sorting" style="width: 230.469px;">유효기간</th>
<th class="sorting" style="width: 230.469px;">최소 유통단위 수량</th> <th class="sorting" style="width: 230.469px;">최소 유통단위 수량</th>
<th class="sorting" style="width: 230.469px;">낱개 단위 수량</th> <th class="sorting" style="width: 230.469px;">낱개 단위 수량</th>
<th class="sorting" style="width: 230.469px;">폐기 수량</th> <th class="sorting" style="width: 230.469px;">폐기 수량</th>
</tr> </tr>
</thead> </thead>
<tbody id="userList"> <tbody id="tbody--${pageName}">
</tbody> </tbody>
<template id="prductRow"> <template id="${infoPrefix}Row--${pageName}">
<tr data-key="{PRDUCT_CD}"> <tr data-key="DSCDMNG_SN">
<td style="text-align:center;"><input value="{PRDUCT_CD}" onchange="userControl.select('{PRDUCT_CD}', this.checked);" type="checkbox" class="form-check-input"></td> <td style="text-align:center;"><input value="DSCDMNG_SN" onchange="userControl.select('DSCDMNG_SN', this.checked);" type="checkbox" class="form-check-input"></td>
<td {onclick}="" {ondblclick}="">{PRDUCT_CD}</td>
<td {onclick}="" {ondblclick}="">{PRDUCT_NM}</td> <td {onclick}="" {ondblclick}="">{PRDUCT_NM}</td>
<td {onclick}="" {ondblclick}="">{PRDUCT_CD}</td>
<td {onclick}="" {ondblclick}="">{MNF_NO}</td> <td {onclick}="" {ondblclick}="">{MNF_NO}</td>
<td {onclick}="" {ondblclick}="">{PRD_VALID_DE}</td> <td {onclick}="" {ondblclick}="">{PRD_VALID_DE}</td>
<td {onclick}="" {ondblclick}="">{MIN_DISTB_QY}</td> <td {onclick}="" {ondblclick}="">{MIN_DISTB_QY}</td>
@ -187,16 +186,46 @@
* DatasetControl * DatasetControl
**************************************************************************/ **************************************************************************/
$P.control = new DatasetControl({ $P.control = new DatasetControl({
prefix: "dsuseMgtReceiptAllInfo" urls : {
, prefixName: "마약류 폐기 상세정보" load : wctx.url("/adds/nims/dsuseMgt-list.do")
, keymapper: info => info ? info.MNG_ID : "" }
, dataGetter: obj => obj.${infoPrefix}Info , prefix: "dsuseMgt"
, prefixName: "신청서접수"
, keymapper: info => info ? info.DSCDMNG_ID : ""
, dataGetter: obj => obj.dsuseMgtList
, appendData: true
, infoSize: "xl" , infoSize: "xl"
, formats: {
RPT_DE: dateFormat
, HDR_DE: dateFormat
, DSUSE_DE: dateFormat
}
}); });
// $P.control 설정
$P.control.defaultFetchSize = FETCH_XS; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
$P.control.untilPageNum = 0; // 현재 페이지 번호
$P.control.beforeCurrent = null;
$P.control.tableRenderComplete = false; // dataTables 에 자료 추가 완료 여부
/************************************************************************** /**************************************************************************
* DatasetControl 이벤트 * DatasetControl 이벤트
**************************************************************************/ **************************************************************************/
// Dataset 변경 이벤트
$P.control.onDatasetChange = (obj) => {
$P.renderList(obj.${infoPrefix}Total);
$("#paging--${pageName}").setPaging({
list: $P.control.dataset
, prefix: "paging--${pageName}"
, start: obj.dsuseMgtStart
, totalSize: obj.dsuseMgtTotal
, fetchSize: obj.dsuseMgtFetch
, func: "pageObject['${pageName}'].control.load({index})"
});
$P.control.tableRenderComplete = true; // dataTables 에 자료 추가 완료
};
// 현재 선택 자료 변경 이벤트 // 현재 선택 자료 변경 이벤트
$P.control.onCurrentChange = item => { $P.control.onCurrentChange = item => {
if (!item) return; if (!item) return;
@ -256,13 +285,59 @@
}); });
} }
/**************************************************************************
* DataTables 이벤트
**************************************************************************/
// DataTables에 click, dbclick 이벤트
$P.renderList = (totalSize) => {
let ${infoPrefix}List = $P.control.dataset;
let empty = ${infoPrefix}List.empty;
// 업무별 DataTables(그리드) tr, td
let foundContent = document.getElementById("${infoPrefix}Row--${pageName}").content;
let foundTr = $(foundContent).find("tr")[0].cloneNode(false);
let foundTds = $(foundContent).find("td");
foundTds.each(function() {
foundTr.appendChild(this.cloneNode(true));
});
//
let replacer = (str, dataItem) => str;
// .replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("USR_RPT_ID_NO") + "');")
// .replace(/{ondblclick}/gi, "pageObject['${pageName}'].getTotalInfo('" + dataItem.getValue("USR_RPT_ID_NO") + "');");
let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").content.outerHTML]
: ${infoPrefix}List.inStrings(foundTr.outerHTML, replacer);
let noMore = (totalSize == ${infoPrefix}List.length);
let initScroll = ($P.control.query.pageNum < 2) && ($P.control.untilPageNum == 0);
$("#table-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
if ($P.control.untilPageNum != 0) {
$P.control.query.fetchSize = $P.control.defaultFetchSize;
$P.control.query.pageNum = $P.control.untilPageNum;
$P.control.untilPageNum = 0;
}
}
// DataTables에 스크롤이 맨 밑으로 이동했을 때 이벤트
$P.scrollDataList = () => {
$P.control.tableRenderComplete = false; // dataTables 에 자료 추가 false
$P.control.load($P.control.query.pageNum + 1);
}
/************************************************************************** /**************************************************************************
* 사용자 함수(function) * 사용자 함수(function)
**************************************************************************/ **************************************************************************/
// 업무구분에 따른 URL 설정 // 업무구분에 따른 URL 설정
$P.fnSetURL = (taskSeCd) => { $P.fnSetURL = (taskSeCd) => {
$P.control.urls.create = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/040/create.do"); // 등록 //$P.control.urls.create = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/040/create.do"); // 등록
$P.control.urls.update = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/040/update.do"); // 수정 //$P.control.urls.update = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/040/update.do"); // 수정
} }
// 전자우편 안내문 등록 버튼 이벤트 // 전자우편 안내문 등록 버튼 이벤트
@ -301,6 +376,14 @@
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장 $("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장
} }
// DataTables width 변경 조정 (업무별 그리드가 존재 한다면.. crdn06010-main.jsp 참고)
fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
// DataTables 스크롤 이벤트 생성
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDataList);
// 초기 화면 설정 // 초기 화면 설정
$P.initForm = () => { $P.initForm = () => {
// Dialog 마우스로 드래그 할 수 있도록 설정. // Dialog 마우스로 드래그 할 수 있도록 설정.
@ -318,7 +401,7 @@
$P.initForm(); $P.initForm();
// 3. Dataset 설정 // 3. Dataset 설정
$P.control.setData([${opnnDlbrMbrInfo}]); //$P.control.setData([${opnnDlbrMbrInfo}]);
}); });
</script> </script>

@ -11,7 +11,8 @@
<div class="card"> <div class="card">
<!-- 입력 영역 --> <!-- 입력 영역 -->
<form id="frmEdit--${pageName}" name="frmEdit"> <!-- <form id="frmEdit--${pageName}" name="frmEdit"> -->
<form id="bssh--${pageName}" name="bssh">
<!-- hidden --> <!-- hidden -->
<label for="bssh--${pageName}">취급자 정보</label> <label for="bssh--${pageName}">취급자 정보</label>
<div class="row my-1 mx-4 g-1 border-card rounded-3"> <div class="row my-1 mx-4 g-1 border-card rounded-3">
@ -47,42 +48,45 @@
</div> </div>
</div> </div>
<div class="row my-1 mx-1 g-1 border-card rounded"></div> <div class="row my-1 mx-1 g-1 border-card rounded"></div>
<label for="rtpyrNm--${pageName}">폐기정보 상세</label> </form>
<form id="code-form"> <form id="product--${pageName}" name="product">
<label for="product--${pageName}">폐기정보 상세</label>
<div class="row my-1 mx-4 g-1 border-card rounded-3"> <div class="row my-1 mx-4 g-1 border-card rounded-3">
<div class="col-md-6"> <div class="col-md-4">
<label for="rtpyrNm--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제품명</label> <label for="prductNm--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제품명</label>
<input type="text" id="rtpyrNm--${pageName}" name="rtpyrNm" data-map="RTPYR_NM" class="form-control" readonly=""> <input type="text" class="form-control w-60" id="prductNm--${pageName}" name="prductNm" data-map="prductNm" readonly>
<button type="button" class="btn btn-search w-px-120" id="btnSearch--excl02010" title="검색">바코드 검색</button>
</div> </div>
<div class="col-md-4">
<div class="col-md-6"> <label for="prductCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제품코드</label>
<label for="dtlAddr--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제품 코드</label> <input type="text" class="form-control w-60" id="prductCd--${pageName}" name="prductCd" data-map="prductCd" readonly>
<input type="text" id="dtlAddr--${pageName}" name="dtlAddr" data-map="DTL_ADDR" class="form-control w-px-300" readonly="" data-maxlengthb="200">
</div> </div>
<div class="col-md-6"> <button type="button" class="btn btn-search w-px-120" id="btnProductBarcodeSearch--${pageName}" title="검색">바코드 검색</button>
<label for="dtlAddr--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제조 번호</label> <button type="button" class="btn btn-search w-px-120" id="btnProductSearch--${pageName}" title="검색">제품 검색</button>
<input type="text" id="dtlAddr--${pageName}" name="dtlAddr" data-map="DTL_ADDR" class="form-control w-px-300" readonly="" data-maxlengthb="200"> <div class="col-md-4">
<label for="prdlstMstCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제조 번호</label>
<input type="text" class="form-control w-60" id="prdlstMstCd--${pageName}" name="prdlstMstCd" data-map="" readonly>
</div> </div>
<div class="col-md-6"> <div class="col-md-4">
<label for="dtlAddr--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제조 일련 번호</label> <label for="prdlstMstCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제조 일련 번호</label>
<input type="text" id="dtlAddr--${pageName}" name="dtlAddr" data-map="DTL_ADDR" class="form-control w-px-300" readonly="" data-maxlengthb="200"> <input type="text" class="form-control w-60" id="prdlstMstCd--${pageName}" name="prdlstMstCd" data-map="" readonly>
</div> </div>
<div class="col-md-12"> <div class="col-md-4">
<label for="addr--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">유효기간</label> <label for="rgsDt--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">유효기간</label>
<input type="text" id="dtlAddr--${pageName}" name="dtlAddr" data-map="DTL_ADDR" class="form-control w-px-200" readonly="" data-maxlengthb="200"> <input type="text" class="form-control w-60" id="rgsDt--${pageName}" name="rgsDt" data-map="rgsDt" readonly>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<label for="zip--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">최소 유통단위 슈량</label> <label for="prdMinDistbQy--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">최소 유통단위 슈량</label>
<input type="text" id="zip--${pageName}" name="zip" data-map="ZIP" class="form-control w-px-100" readonly=""> <input type="text" class="form-control w-60" id="prdMinDistbQy--${pageName}" name="prdMinDistbQy" data-map="prdMinDistbQy" readonly>
<input type="text" class="form-control w-60" id="stdPackngStleNm--${pageName}" name="stdPackngStleNm" data-map="stdPackngStleNm" readonly>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<label for="addr--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">낱개 단위 수량</label> <label for="prdTotPceQy--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">낱개 단위 수량</label>
<input type="text" id="addr--${pageName}" name="addr" data-map="ADDR" class="form-control w-px-100" data-maxlengthb="320" readonly=""> <input type="text" class="form-control w-60" id="prdTotPceQy--${pageName}" name="prdTotPceQy" data-map="prdTotPceQy" readonly>
<input type="text" class="form-control w-60" id="pceCoUnitNm--${pageName}" name="pceCoUnitNm" data-map="pceCoUnitNm" readonly>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<label for="addr--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기 수량</label> <label for="dsuseQy--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기 수량</label>
<input type="text" id="addr--${pageName}" name="addr" data-map="ADDR" class="form-control w-px-100" data-maxlengthb="320"> <input type="text" class="form-control w-60" id="dsuseQy--${pageName}" name="dsuseQy" data-map="dsuseQy" readonly>
</div> </div>
</div> </div>
<div style=" align-content: center; text-align: center;"> <div style=" align-content: center; text-align: center;">
@ -92,6 +96,7 @@
<button type="button" class="btn btn-primary w-px-80" id="btnSave--excl02040" title="저장">제거</button> <button type="button" class="btn btn-primary w-px-80" id="btnSave--excl02040" title="저장">제거</button>
</span> </span>
</div> </div>
</form>
<table class="datatables-ajax table table-bordered dataTable no-footer" id="DataTables_Table_0" aria-describedby="DataTables_Table_0_info"> <table class="datatables-ajax table table-bordered dataTable no-footer" id="DataTables_Table_0" aria-describedby="DataTables_Table_0_info">
<thead> <thead>
<tr><th style="width: 15.828px;text-align:center;" tabindex="0">No</th> <tr><th style="width: 15.828px;text-align:center;" tabindex="0">No</th>
@ -121,8 +126,7 @@
</tr> </tr>
</template> </template>
</table> </table>
</form> <!-- </form> /입력 영역 -->
</form> <!-- /입력 영역 -->
</div> <!-- <div class="card"> --> </div> <!-- <div class="card"> -->
<!-- 업무 버튼 표시 --> <!-- 업무 버튼 표시 -->
@ -196,9 +200,9 @@
} }
} }
$P.control.getBsshInfo = (gdccId) => { $P.control.getBsshInfo = () => {
let dialogTitle = "취급자 정보 조회"; let dialogTitle = "취급자 정보 조회";
let params = {openPage : "frmEdit--${pageName}"}; let params = {openPage : "bssh--${pageName}"};
ajax.get({ ajax.get({
url : wctx.url("/adds/nims/bssh-main.do") url : wctx.url("/adds/nims/bssh-main.do")
@ -215,6 +219,25 @@
}); });
} }
$P.control.getProductInfo = () => {
let dialogTitle = "취급자 정보 조회";
let params = {openPage : "product--${pageName}"};
ajax.get({
url : wctx.url("/adds/nims/product-main.do")
, data : params
, success : resp => {
dialog.open({
id : "productMainDialog"
, title : dialogTitle
, content : resp
, size : $P.control.infoSize
, onClose : () => { $P.control.setData(); }
});
}
});
}
// 저장 // 저장
$P.control.save = (info) => { $P.control.save = (info) => {
if (!info) return; if (!info) return;
@ -242,6 +265,10 @@
$P.control.getBsshInfo(); $P.control.getBsshInfo();
} }
$P.fnSearchProduct = (title) => {
$P.control.getProductInfo();
}
/************************************************************************** /**************************************************************************
* 버튼 clickEvent * 버튼 clickEvent
**************************************************************************/ **************************************************************************/
@ -269,6 +296,10 @@
$P.fnSearchBssh($(this).attr("title")); $P.fnSearchBssh($(this).attr("title"));
}); });
$("#btnProductSearch--${pageName}").on("click", function() {
$P.fnSearchProduct($(this).attr("title"));
});
// 버튼 이벤트 // 버튼 이벤트
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장 $("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장
} }

@ -77,7 +77,7 @@
<!-- DataTables(그리드) --> <!-- DataTables(그리드) -->
<div class="card-datatable text-nowrap"> <div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_0_wrapper--${pageName}"> <div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_0_wrapper--${pageName}">
<div class="table-responsive ox-scroll oy-scroll h-px-500" id="table-responsive--${pageName}"> <div class="table-responsive ox-scroll oy-scroll h-px-250" id="table-responsive--${pageName}">
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info"> <table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead"> <thead class="sticky-thead">
<tr id="theadTr--${pageName}" <tr id="theadTr--${pageName}"
@ -122,6 +122,50 @@
</div> </div>
</div> </div>
<!-- / DataTables(그리드) --> <!-- / DataTables(그리드) -->
<div class="card">
<div class="row g-1">
<div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_1_wrapper--${pageName}">
<div class="table-responsive ox-scroll oy-scroll h-px-300" id="table-responsive-1--${pageName}">
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer"
id="DataTables_Table_1--${pageName}" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead">
<tr>
<th class="cmn" style="width: 72px;">No.</th>
<th class="sorting sorting_asc" aria-sort="ascending" style="width: 223.719px;">제품명</th>
<th class="sorting" style="width: 146.156px;">제품코드</th>
<th class="sorting" style="width: 160.141px;">폐기수량</th>
<th class="sorting" style="width: 230.469px;">유효기간</th>
<th class="sorting" style="width: 230.469px;">최소 유통단위 수량</th>
<th class="sorting" style="width: 230.469px;">낱개 단위 수량</th>
<th class="sorting" style="width: 230.469px;">폐기 수량</th>
</tr>
</thead>
<tbody id="tbody--${pageName}Detail">
</tbody>
<template id="${infoPrefix}Row--${pageName}Detail">
<tr data-key="DSCDMNG_SN">
<td {onclick}="" {ondblclick}="">{ROW_NUM}</td>
<td {onclick}="" {ondblclick}="">{PRDUCT_NM}</td>
<td {onclick}="" {ondblclick}="">{PRDUCT_CD}</td>
<td {onclick}="" {ondblclick}="">{DSUSE_QY}</td>
<td {onclick}="" {ondblclick}="">{PRD_VALID_DE}</td>
<td {onclick}="" {ondblclick}="">{MIN_DISTB}</td>
<td {onclick}="" {ondblclick}="">{PCE}</td>
<td {onclick}="" {ondblclick}="">{DSUSE_QY}</td>
</tr>
</template>
<template id="${infoPrefix}NotFound--${pageName}Detail">
<tr class="odd">
<td valign="top" colspan="5" class="dataTables_empty text-center">${prefixName} 상세 정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
</div>
</div>
</div> <!-- / DataTables(그리드) -->
</div> <!-- <div class="row g-1"> -->
</div> <!-- <div class="card"> -->
<div class="d-flex flex-row p-3 justify-content-between"> <div class="d-flex flex-row p-3 justify-content-between">
<label id="userPagingInfo" class="dataTables_info" role="status" aria-live="polite">1 ~ 2 / 2</label> <label id="userPagingInfo" class="dataTables_info" role="status" aria-live="polite">1 ~ 2 / 2</label>
@ -174,6 +218,23 @@
$P.control.beforeCurrent = null; $P.control.beforeCurrent = null;
$P.control.tableRenderComplete = false; // dataTables 에 자료 추가 완료 여부 $P.control.tableRenderComplete = false; // dataTables 에 자료 추가 완료 여부
$P.detailControl = new DatasetControl({
urls : {
load : wctx.url("/adds/nims/dsuseMgtDetail-list.do")
// FIXME: POST로 변경
//load : '<c:url value="${apiHost}/api/biz/nims/v1/getDsuseMgts" />'
}
// , query.schDscdmngId : $P.control.getValue("DSCDMNG_ID")
// , data : {"schDscdmngId" : $P.control.getValue("DSCDMNG_ID")}
, prefix : "dsuseMgtDetail"
, prefixName : "신청서접수상세"
, keymapper : info => info ? info.DSCDMNG_SN : ""
, dataGetter : obj => obj.dsuseMgtDetailList
, formats : {
PRD_VALID_DE: dateFormat
}
});
/************************************************************************** /**************************************************************************
* DatasetControl 이벤트 * DatasetControl 이벤트
**************************************************************************/ **************************************************************************/
@ -193,13 +254,28 @@
$P.control.tableRenderComplete = true; // dataTables 에 자료 추가 완료 $P.control.tableRenderComplete = true; // dataTables 에 자료 추가 완료
}; };
$P.detailControl.onDatasetChange = (obj) => {
$P.renderDetailList(obj.${infoPrefix}Total);
};
// 현재 선택 자료 변경 이벤트 // 현재 선택 자료 변경 이벤트
$P.control.onCurrentChange = (item) => { $P.control.onCurrentChange = (item) => {
if (!item) return; if (!item) return;
let key = item.data.LEVY_EXCL_ID; let key = item.data.USR_RPT_ID_NO;
$("#tbody--${pageName}").setCurrentRow(key); $("#tbody--${pageName}").setCurrentRow(key);
$P.detailControl.load(1);
};
// 현재 선택 자료 변경 이벤트
$P.detailControl.onCurrentChange = (item) => {
if (!item) return;
let key = item.data.DSCDMNG_SN;
$("#tbody--${pageName}Detail").setCurrentRow(key);
}; };
// 신청서 정보 dialog // 신청서 정보 dialog
@ -243,7 +319,7 @@
// //
let replacer = (str, dataItem) => str let replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("USR_RPT_ID_NO") + "');"); .replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("USR_RPT_ID_NO") + "');");
//.replace(/{ondblclick}/gi, "pageObject['${pageName}'].getTotalInfo('" + dataItem.getValue("CRDN_ID") + "');"); // .replace(/{ondblclick}/gi, "pageObject['${pageName}'].getTotalInfo('" + dataItem.getValue("USR_RPT_ID_NO") + "');");
let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").content.outerHTML] let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").content.outerHTML]
: ${infoPrefix}List.inStrings(foundTr.outerHTML, replacer); : ${infoPrefix}List.inStrings(foundTr.outerHTML, replacer);
@ -261,6 +337,21 @@
} }
$P.renderDetailList = () => {
let ${infoPrefix}List = $P.detailControl.dataset;
let empty = ${infoPrefix}List.empty;
let trs = empty ?
[document.getElementById("${infoPrefix}NotFound--${pageName}Detail").innerHTML] : <%-- from template#${infoPrefix}NotFound --%>
${infoPrefix}List.inStrings(
document.getElementById("${infoPrefix}Row--${pageName}Detail").innerHTML, <%-- from template#${infoPrefix}Row --%>
(str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].detailControl.setCurrent('" + dataItem.getValue("DSCDMNG_SN") + "');")
);
$("#tbody--${pageName}Detail").html(trs.join());
}
// DataTables에 스크롤이 맨 밑으로 이동했을 때 이벤트 // DataTables에 스크롤이 맨 밑으로 이동했을 때 이벤트
$P.scrollDataList = () => { $P.scrollDataList = () => {
$P.control.tableRenderComplete = false; // dataTables 에 자료 추가 false $P.control.tableRenderComplete = false; // dataTables 에 자료 추가 false
@ -269,22 +360,19 @@
} }
// DataTables에 더블 클릭시 개별총정보 dialog // DataTables에 더블 클릭시 개별총정보 dialog
$P.getTotalInfo = (crdnId) => { $P.getTotalInfo = (usrRptIdNo) => {
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return; if (typeof usrRptIdNo == "undefined" || usrRptIdNo == null || usrRptIdNo == "") return;
let params = { let params = {
callControlName: "pageObject['${pageName}'].control" usrRptIdNo: usrRptIdNo
, sggCd: $P.control.dataset.getValue("SGG_CD")
, taskSeCd: $P.control.dataset.getValue("TASK_SE_CD")
, crdnId: crdnId
} }
ajax.get({ ajax.get({
url : wctx.url("/adds/nims/dsuseMgtReceipt-info.do") url : wctx.url("/adds/nims/dsuseMgt-info.do")
, data: params , data: params
, success: resp => { , success: resp => {
dialog.open({ dialog.open({
id: "dsuseMgtReceiptinfoDialog" id: "dsuseMgtinfoDialog"
, title: "신청서 정보 상세" , title: "신청서 정보 상세"
, content: resp , content: resp
, size: "xl" , size: "xl"

@ -0,0 +1,249 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<c:set var="prefixName" scope="request">취급자 정보 조회</c:set>
<!-- 입력 영역 -->
<form id="frmSearch--${pageName}" name="frmSearch">
<div class="container-search">
<!-- hidden -->
<label for="product--${pageName}">취급자 정보</label>
<div class="row my-1 mx-4 g-1 border-card rounded-3">
<div class="col-md-4">
<label for="ProductNm--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제품명</label>
<input type="text" class="form-control w-60" id="productNm--${pageName}" name="schProductNm" >
</div>
<div class="col-md-4">
<label for="ProductCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제품코드</label>
<input type="text" class="form-control w-60" id="productCd--${pageName}" name="schProductCd" >
</div>
<button type="button" class="btn btn-search w-px-120" id="btnSearch--${pageName}" title="검색">검색</button>
</div>
</div>
</form>
<!-- 업무 버튼 표시 -->
<div>
<span class="container-page-btn">
<span class="container-window-btn-right">
<!-- 업무 버튼 -->
<button type="button" class="btn btn-primary w-px-80" id="btnSave--${pageName}" title="선택">선택</button>
</span>
</span>
</div>
<!-- / 업무 버튼 표시 -->
<div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_0_wrapper--${pageName}">
<div class="table-responsive ox-scroll oy-scroll h-px-500" id="table-responsive--${pageName}">
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info">
<thead>
<tr><th style="width: 15.828px;text-align:center;" tabindex="0">No</th>
<th class="sorting" style="width: 146.156px;">제품코드</th>
<th class="sorting" style="width: 160.141px;">제품명</th>
<th class="sorting" style="width: 160.141px;">마약/향정 구분</th>
<th class="sorting" style="width: 230.469px;">중점/일반 구분</th>
<th class="sorting" style="width: 230.469px;">최소유통단위</th>
<th class="sorting" style="width: 230.469px;">최수유통단위명</th>
<th class="sorting" style="width: 230.469px;">낱개단위</th>
<th class="sorting" style="width: 230.469px;">낱개단위명</th>
<th class="sorting" style="width: 230.469px;">취급자번호</th>
</tr>
</thead>
<tbody id="tbody--${pageName}">
</tbody>
<template id="${infoPrefix}Row--${pageName}">
<tr data-key="productCd">
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prductCd}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prductNm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{nrcdSeNm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prtmSeNm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prdMinDistbQy}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{stdPackngStleNm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prdTotPceQy}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{pceCoUnitNm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{bsshCd}</td>
</tr>
</template>
<template id="${infoPrefix}NotFound--${pageName}">
<tr class="odd">
<td valign="top" colspan="13" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
</div>
</div>
</div>
<script>
/**************************************************************************
* Global Variable
**************************************************************************/
pageObject["${pageName}"] = {};
/**************************************************************************
* script 진입
**************************************************************************/
$(document).ready(function() {
// pageObject
let $P = pageObject["${pageName}"];
// FormFields
$P.formFields = new FimsFormFields("#frmSearch--${pageName}");
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.control = new DatasetControl({
urls : {
load : wctx.url("/adds/nims/product-list.do")
}
, prefix: "productMain"
, prefixName: "취급자 정보 조회"
, keymapper: info => info ? info.productCd : ""
, dataGetter : obj => obj.productMainList
, appendData: true
, infoSize: "xl"
});
// $P.control 설정
$P.control.defaultFetchSize = FETCH_XS; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
$P.control.untilPageNum = 0; // 현재 페이지 번호
$P.control.beforeCurrent = null;
$P.control.tableRenderComplete = false; // dataTables 에 자료 추가 완료 여부
/**************************************************************************
* DatasetControl 이벤트
**************************************************************************/
// Dataset 변경 이벤트
$P.control.onDatasetChange = (obj) => {
$P.renderList(obj.${infoPrefix}Total);
$("#paging--${pageName}").setPaging({
list: $P.control.dataset
, prefix: "paging--${pageName}"
, start: obj.productMainStart
, totalSize: obj.productMainTotal
, fetchSize: obj.productMainFetch
, func: "pageObject['${pageName}'].control.load({index})"
});
$P.control.tableRenderComplete = true; // dataTables 에 자료 추가 완료
};
// 현재 선택 자료 변경 이벤트
$P.control.onCurrentChange = item => {
if (!item) return;
// Dataset 셋팅
$P.formFields.set($P.control, item);
}
// 저장 callback
// 저장
/**************************************************************************
* DataTables 이벤트
**************************************************************************/
// DataTables에 click, dbclick 이벤트
$P.renderList = (totalSize) => {
let ${infoPrefix}List = $P.control.dataset;
let empty = ${infoPrefix}List.empty;
// 업무별 DataTables(그리드) tr, td
let foundContent = document.getElementById("${infoPrefix}Row--${pageName}").content;
let foundTr = $(foundContent).find("tr")[0].cloneNode(false);
let foundTds = $(foundContent).find("td");
foundTds.each(function() {
foundTr.appendChild(this.cloneNode(true));
});
//
let replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("productCd") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].fnSave()");
let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").content.outerHTML]
: ${infoPrefix}List.inStrings(foundTr.outerHTML, replacer);
let noMore = (totalSize == ${infoPrefix}List.length);
let initScroll = ($P.control.query.pageNum < 2) && ($P.control.untilPageNum == 0);
$("#table-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
if ($P.control.untilPageNum != 0) {
$P.control.query.fetchSize = $P.control.defaultFetchSize;
$P.control.query.pageNum = $P.control.untilPageNum;
$P.control.untilPageNum = 0;
}
}
/**************************************************************************
* 사용자 함수(function)
**************************************************************************/
/**************************************************************************
* 버튼 clickEvent
**************************************************************************/
$P.fnSearchList = () => {
// 검색조건
$P.control.query = $P.formFields.get(); // 검색 조건
$P.control.query.fetchSize = $P.control.defaultFetchSize; // 한번에 조회되는 자료 건수
$P.control.query.delYn = "N"; // 삭제 여부
$P.control.load(1);
}
// 저장
$P.fnSave = () => {
console.log("#${openPage}");
dialog.alert({
content: "현재 " + $P.control.prefixName + " 정보를 저장하시겠습니까?"
, init: () => { setDialogZindex(); }
, onOK: () => { var openPage = new FimsFormFields("#${openPage}");
openPage.set (null,$P.control.getCurrent()); // formFields
dialog.close("productMainDialog");
}
});
}
/**************************************************************************
* 초기 셋팅
**************************************************************************/
// 이벤트 설정
$P.setEvent = () => {
// 버튼 이벤트
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장
$("#btnSearch--${pageName}").on("click", () => $P.fnSearchList());
}
// DataTables width 변경 조정 (업무별 그리드가 존재 한다면.. crdn06010-main.jsp 참고)
fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
// DataTables 스크롤 이벤트 생성
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDataList);
// 초기 화면 설정
$P.initForm = () => {
// Dialog 마우스로 드래그 할 수 있도록 설정.
fnMakeDraggableDialog(document.getElementById($P.control.prefix + "Dialog"));
}
/**************************************************************************
* 최초 실행 함수
**************************************************************************/
// 1. 이벤트 설정
$P.setEvent();
// 2. 초기 화면 설정
$P.initForm();
// 3. Dataset 설정
//$P.control.setData([${opnnDlbrMbrInfo}]);
});
</script>

@ -0,0 +1,253 @@
<div class="card m-4 p-3">
<form name="form" id="form" method="post">
<input type="hidden" name="resultType" value="json" /> <!-- 요청 변수 설정 (검색결과형식 설정, json) -->
<input type="hidden" name="confmKey" value="U01TX0FVVEgyMDE3MDQwMzIwMzUzMjIwMzI2" /><!-- 요청 변수 설정 (승인키) -->
<input type="hidden" name="countPerPage" value="10"/><!-- 요청 변수 설정 (페이지당 출력 개수. countPerPage 범위 : 0 < n <= 100) -->
<input type="hidden" id="currentPage" name="currentPage" value="1"/> <!-- 요청 변수 설정 (현재 페이지. currentPage : n > 0) -->
<div class="container-search">
<input type="hidden" id="searchAddrCallback" />
<div class="row g-1">
<div class="col-12 d-flex justify-content-center">
<input type="text" id="dummy" value="" hidden />
<input type="text" name="keyword" class="form-control w-px-400"
placeholder="예) 도움6로 42, 국립중앙박물관, 상암동 1595, 초성검색"
value="" onkeydown="enterSearch();"/><!-- 요청 변수 설정 (키워드) -->
<button type="button" class="btn btn-search ms-2" onClick="getAddr(1);">검색</button>
</div>
</div>
</div>
<div id="list" class="mt-4">
<div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer">
<div id="table-responsive" class="table-responsive ox-scroll oy-scroll h-px-400">
<table id="DataTables_Table_0" class="table-layout-fixed datatables-ajax table table-bordered dataTable no-footer">
<thead>
<tr>
<th style="width: 650px;">주소</th>
<th style="width: 100px;">우편번호</th>
<th clss="dummy-th"></th>
</tr>
</thead>
<tbody id="addrTbody">
</tbody>
<template id="addrRow">
<tr data-key="{TEMP_ID}">
<td onclick="{onclick}" class="text-start">
<strong class="fs-4">{roadAddr}</strong><br/>{jibunAddr}
</td>
<td onclick="{onclick}" class="text-center">{zipNo}</td>
<td class="dummy-td"></td>
</tr>
</template>
<template id="addrNotFound">
<tr>
<td valign="top" colspan="3" class="dataTables_empty text-center">조회 결과가 없습니다.</td>
</tr>
</template>
</table>
</div>
</div>
</div><!-- 검색 결과 리스트 출력 영역 -->
<div>
<span class="container-page-btn">
<div class="d-flex flex-row justify-content-between">
<span id="addrPagingPagingInfo" class="dataTables_info" role="status" aria-live="polite">
</span>
<ul id="addrPaging" class="pagination pagination-primary">
</ul>
</div>
</span>
</div>
</div>
</form>
<div id="formBottom" hidden>
<div>
기본주소 :
<span id="mainAddr"></span>
<br/>
상세주소 :
<input type="text" id="etcAddr" name="etcAddr" class="form-control w-px-400" />
<button type="button" class="btn btn-primary" onClick="fnReturn();">확인</button>
</div>
</div>
</div>
<script language="javascript">
/**************************************************************************
* DatasetControl
**************************************************************************/
var addrControl = new DatasetControl({
urls : { load : "", getInfo : "" },
dataGetter : obj => obj.juso, appendData:false,
keymapper : info => info ? info.TEMP_ID : "",
formats: {}
});
/**************************************************************************
* DatasetControl.on
**************************************************************************/
addrControl.onDatasetChange = (obj) => {
renderAddrList(obj.common.totalCount);
$("#addrPaging").setPaging({
list: addrControl.dataset,
prefix: "addrPaging",
start: (((obj.common.currentPage - 1) * obj.common.countPerPage) + 1),
totalSize: obj.common.totalCount,
fetchSize: obj.common.countPerPage,
func: "getAddr({index})"
});
}
function renderAddrList(total){
var addrList = addrControl.dataset;
var empty = addrList.empty;
var notFound = [document.getElementById("addrNotFound").innerHTML];
var found = document.getElementById("addrRow").innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "fnClickAddrList('" + dataItem.getValue("TEMP_ID") + "');")
var trs = empty ? notFound : addrList.inStrings(found, replacer);
$("#addrTbody").html(trs.join());
}
function getAddr(pageNum){
// 적용예 (api 호출 전에 검색어 체크)
if (!checkSearchedWord(document.form.keyword)) {
return ;
}
$("#currentPage").val(pageNum);
$.ajax({
url :"https://business.juso.go.kr/addrlink/addrLinkApiJsonp.do" //인터넷망
,type:"post"
,data:$("#form").serialize()
,dataType:"jsonp"
,crossDomain:true
,success:function(jsonStr){
$("#list").show();
$("#formBottom").attr("hidden","hidden");
var errCode = jsonStr.results.common.errorCode;
var errDesc = jsonStr.results.common.errorMessage;
if(errCode != "0"){
alert(errCode+"="+errDesc);
}else{
if(jsonStr != null){
var tempId = 0;
jsonStr.results.juso.forEach((item) => item.TEMP_ID = tempId++);
addrControl.setData(jsonStr.results);
}
}
}
,error: function(xhr,status, error){
alert("에러발생");
}
});
}
//특수문자, 특정문자열(sql예약어의 앞뒤공백포함) 제거
function checkSearchedWord(obj){
if(obj.value.length >0){
//특수문자 제거
var expText = /[%=><]/ ;
if(expText.test(obj.value) == true){
alert("특수문자를 입력 할수 없습니다.") ;
obj.value = obj.value.split(expText).join("");
return false;
}
//특정문자열(sql예약어의 앞뒤공백포함) 제거
var sqlArray = new Array(
//sql 예약어
"OR", "SELECT", "INSERT", "DELETE", "UPDATE", "CREATE", "DROP", "EXEC",
"UNION", "FETCH", "DECLARE", "TRUNCATE"
);
var regex;
for(var i=0; i<sqlArray.length; i++){
regex = new RegExp( sqlArray[i] ,"gi") ;
if (regex.test(obj.value) ) {
alert("\"" + sqlArray[i]+"\"와(과) 같은 특정문자로 검색할 수 없습니다.");
obj.value =obj.value.replace(regex, "");
return false;
}
}
}
return true ;
}
function enterSearch() {
var evt_code = (window.netscape) ? ev.which : event.keyCode;
if (evt_code == 13) {
event.keyCode = 0;
getAddr(1); //jsonp사용시 enter검색
}
}
function fnClickAddrList(tempId){
$("#formBottom").removeAttr("hidden");
$("#mainAddr").html("");
$("#etcAddr").val("");
addrControl.dataset.setCurrent(tempId);
$("#mainAddr").html(addrControl.dataset.getCurrent().roadAddr);
$("#addrTbody").setCurrentRow(tempId);
$("#etcAddr").focus();
}
function fnReturn(){
var addrObj = {};
addrObj = addrControl.dataset.getCurrent();
addrObj.etcAddr = $("#etcAddr").val();
addrObj.ZIP = addrObj.zipNo;
addrObj.ADDR = addrObj.roadAddrPart1;
addrObj.DTL_ADDR = addrObj.etcAddr + addrObj.roadAddrPart2;
addrObj.ROAD_NM_CD = addrObj.rnMgtSn;
addrObj.UDGD_SE_CD = addrObj.udrtYn;
addrObj.BMNO = addrObj.buldMnnm;
addrObj.BSNO = addrObj.buldSlno;
addrObj.BLDG_MNG_NO = addrObj.bdMgtSn;
addrObj.STDG_CD = addrObj.admCd;
addrObj.MTN_SE_CD = addrObj.mtYn;
addrObj.MNO = addrObj.lnbrMnnm;
addrObj.SNO = addrObj.lnbrSlno;
addrObj.DONG_CD = "";
var callbackFuncName = $("#searchAddrCallback").val();
if(callbackFuncName.startsWith("pageObject")){
var i1 = callbackFuncName.indexOf("[");
var i2 = callbackFuncName.indexOf("]");
var page = callbackFuncName.substring(i1+2,i2-1);
var func = callbackFuncName.substring(i2+2);
pageObject[page][func](addrObj);
} else {
window[callbackFuncName](addrObj);
}
dialog.close("searchAddrDialog");
}
fnMakeResizableTable($("#table-responsive")[0]);
$("#list").hide();
</script>
Loading…
Cancel
Save