feat: 일련번호 조회(seqinfo_pub) API 적용

제품조회 반영(업체의 제품 조회 되도록)
main
Jonguk. Lim 1 month ago
parent 0259c17ea6
commit c47a7c9b1c

@ -1,10 +1,10 @@
package cokr.xit.adds.cmm.model;
import java.util.List;
import java.util.*;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.*;
import lombok.Data;
import lombok.*;
/**
* <pre>
@ -93,7 +93,7 @@ public class NimsApiRequest {
* true DB skip
* </pre>
*/
private String dbSkipYn = "N";
//private String dbSkipYn = "N";
/**
* <pre>
@ -162,7 +162,7 @@ public class NimsApiRequest {
*
* </pre>
*/
private String dbSkipYn = "N";
//private String dbSkipYn = "N";
/**
* <pre>

@ -198,13 +198,13 @@
* 버튼 clickEvent
**************************************************************************/
$P.fnSearchList = (dbSkipYn) => {
$P.fnSearchList = () => {
$P.control.query = {
//... $P.formFields.get(),
bc: $P.formFields.get().schBsshCd,
bn: $P.formFields.get().schBsshNm,
rprsntvNm: $P.formFields.get().schRprsntvNm,
dbSkipYn: dbSkipYn? dbSkipYn : "N",
//dbSkipYn: dbSkipYn? dbSkipYn : "N",
userId: "${currentUser.account}"
};
$P.control.query.fetchSize = FETCH_XXL; // 한번에 조회되는 자료 건수

@ -27,6 +27,15 @@
<!-- hidden -->
<input type="hidden" name="dscdmngId" data-map="dscdmngId" />
<input type="hidden" name="prgrsSttsCd" data-map="prgrsSttsCd" />
<input type="hidden" name="indutyNm" data-map="indutyNm"/>
<input type="hidden" name="hdntCd" data-map="hdntCd"/>
<input type="hidden" name="hdntNm" data-map="hdntNm"/>
<input type="hidden" name="chrgNm" data-map="chrgNm"/>
<input type="hidden" name="hptlNo" data-map="hptlNo"/>
<input type="hidden" name="joinYn" data-map="joinYn"/>
<input type="hidden" name="bsshSttusNm" data-map="bsshSttusNm"/>
<label for="bssh--${pageName}" style="margin-top: 10px; padding-left: 20px;"><strong>취급 업체 정보</strong></label>
<div class="row my-1 mx-4 g-1 border-card rounded-3">
<div class="col-md-4">
@ -67,6 +76,13 @@
<div class="row my-1 mx-1 g-1 border-card rounded"></div>
</form>
<form id="product--${pageName}" name="product">
<input type="hidden" name="prdlstMstCd" data-map="prdlstMstCd"/>
<input type="hidden" name="nrcdSeNm" data-map="nrcdSeNm"/>
<input type="hidden" name="prtmSeNm" data-map="prtmSeNm"/>
<input type="hidden" name="bsshCd" data-map="bsshCd"/>
<input type="hidden" name="rgsDt" data-map="rgsDt"/>
<input type="hidden" name="updDt" data-map="updDt"/>
<label for="product--${pageName}" style="margin-top: 10px; padding-left: 20px;"><strong>폐기 제품 정보</strong></label>
<div class="row my-1 mx-4 g-1 border-card rounded-3">
<div class="col-md-6">
@ -231,6 +247,12 @@
mnfNo: prdInfo.mnfSeqInfos[0].mnfNo,
mnfSeq: prdInfo.mnfSeqInfos[0].mnfSeq,
prdlstMstCd: prdInfo.prdlstMstCd,
nrcdSeNm: prdInfo.nrcdSeNm,
prtmSeNm: prdInfo.prtmSeNm,
bsshCd: prdInfo.bsshCd,
rgsDt: prdInfo.rgsDt,
updDt: prdInfo.updDt
}
);
$("#prductCd--${pageName}").prop("readonly", true);
@ -279,9 +301,6 @@
dialog.alert(obj.message);
return false;
}
// obj.data.forEach(item => {
// item.data.dsuseQy = parseFloat(item.data.dsuseQy.toFixed(2)).toString()
// });
return obj.data;
}
, infoSize: "xl"
@ -364,6 +383,13 @@
$P.productControl.getProductInfo = () => {
let dialogTitle = "마약류 제품 조회";
let rowData = $P.bsshFormFields.get();
if(rowData.bsshCd == null || rowData.bsshCd === "") {
dialog.alert({
content: "업체를 먼저 선택해주세요."
});
return false;
}
let params = {
openPage : "product--${pageName}"
, bsshCd: rowData.bsshCd
@ -490,7 +516,7 @@
let bsshData = $P.bsshFormFields.get();
if(bsshData.bsshCd == ""){
if(bsshData.bsshCd === ""){
dialog.alert({
content: "마약류 취급업체 정보를 입력해주세요."
});
@ -502,7 +528,7 @@
}
let dsProd = $P.productList.getDataset();
if(dsProd.length == 0){
if(dsProd.length === 0){
dialog.alert({
content: "폐기 제품 정보를 입력해주세요."
});
@ -551,7 +577,7 @@
}
});
if(dsProd.length != fileCount){
if(dsProd.length !== fileCount){
dialog.alert({
content: "입력되지 않은 폐기 제품 이미지가 있습니다."
});
@ -613,7 +639,7 @@
const prdInfo = ""+prdFrm.prductCd+prdFrm.prdValidDe.replaceAll('-','')+prdFrm.mnfNo+prdFrm.mnfSeq;
let isDup = $P.productList
.getDataset()
.filter(item => prdInfo == ""+item.prductCd+item.prdValidDe.replaceAll('-','')+item.mnfNo+item.mnfSeq)
.filter(item => prdInfo === ""+item.prductCd+item.prdValidDe.replaceAll('-','')+item.mnfNo+item.mnfSeq)
.length > 0;
if(isDup){
const msg = "이미 추가된 제품 입니다<br>제품코드: " + prdFrm.prductCd +"<br>유효기간: "+ prdFrm.prdValidDe +"<br>제조번호: "+ prdFrm.mnfNo +"<br>제조일련번호: "+ prdFrm.mnfSeq;
@ -645,7 +671,7 @@
$P.fnChangeDsusePrvCd = () => {
// validate 확인
let checkData = $("#dsusePrvCd--${pageName} option:selected").val();
if (checkData =="01" || checkData =="02") {
if (checkData ==="01" || checkData ==="02") {
$("#dsuseAcdtDe--${pageName}").prop('disabled', false);
}else{
$("#dsuseAcdtDe--${pageName}").prop('disabled', true);
@ -702,7 +728,7 @@
// 초기 화면 설정
$P.initForm = () => {
if($("input[name='prgrsSttsCd']").val() == '99' || ${currentUser.hasAuthorities("ROLE_MANAGER")} || ${currentUser.hasAuthorities("ROLE_ADMIN")}) {
if($("input[name='prgrsSttsCd']").val() === '99' || ${currentUser.hasAuthorities("ROLE_MANAGER")} || ${currentUser.hasAuthorities("ROLE_ADMIN")}) {
$("#btnSave--${pageName}").prop("disabled", true);
}
AppSupport.initDatepicker("bssh--${pageName}");
@ -728,7 +754,7 @@
for(let p of productInfo){
p.keyCnt = (""+prdRowKey++);
for(let f of fileInfo){
if(p.dscdmngSn == f.SUB_TYPE){
if(p.dscdmngSn === f.SUB_TYPE){
p.fileInfo = f;
}
}

@ -14,7 +14,14 @@
<!-- hidden -->
<input type="hidden" name="dscdmngId" data-map="dscdmngId" />
<input type="hidden" name="prgrsSttsCd" data-map="prgrsSttsCd" />
<input type="hidden" name="bsshCd" data-map="bsshCd"/>
<input type="hidden" name="indutyNm" data-map="indutyNm"/>
<input type="hidden" name="hdntCd" data-map="hdntCd"/>
<input type="hidden" name="hdntNm" data-map="hdntNm"/>
<input type="hidden" name="chrgNm" data-map="chrgNm"/>
<input type="hidden" name="hptlNo" data-map="hptlNo"/>
<input type="hidden" name="joinYn" data-map="joinYn"/>
<input type="hidden" name="bsshSttusNm" data-map="bsshSttusNm"/>
<label for="bssh--${pageName}" style="margin-top: 10px; padding-left: 20px;"><strong>취급 업체 정보</strong></label>
<div class="row my-1 mx-4 g-1 border-card rounded-3">
<div class="col-md-4">
@ -55,6 +62,13 @@
<div class="row my-1 mx-1 g-1 border-card rounded"></div>
</form>
<form id="product--${pageName}" name="product">
<input type="hidden" name="prdlstMstCd" data-map="prdlstMstCd"/>
<input type="hidden" name="nrcdSeNm" data-map="nrcdSeNm"/>
<input type="hidden" name="prtmSeNm" data-map="prtmSeNm"/>
<input type="hidden" name="bsshCd" data-map="bsshCd"/>
<input type="hidden" name="rgsDt" data-map="rgsDt"/>
<input type="hidden" name="updDt" data-map="updDt"/>
<label for="product--${pageName}" style="margin-top: 10px; padding-left: 20px;"><strong>폐기 제품 정보</strong></label>
<div class="row my-1 mx-4 g-1 border-card rounded-3">
<div class="col-md-6">
@ -201,6 +215,12 @@
mnfNo: prdInfo.mnfSeqInfos[0].mnfNo,
mnfSeq: prdInfo.mnfSeqInfos[0].mnfSeq,
prdlstMstCd: prdInfo.prdlstMstCd,
nrcdSeNm: prdInfo.nrcdSeNm,
prtmSeNm: prdInfo.prtmSeNm,
bsshCd: prdInfo.bsshCd,
rgsDt: prdInfo.rgsDt,
updDt: prdInfo.updDt
}
);
$("#prductCd--${pageName}").prop("readonly", true);
@ -334,7 +354,7 @@
$P.productControl.getProductInfo = () => {
let dialogTitle = "마약류 제품 조회";
let rowData = $P.bsshFormFields.get();
if(rowData.bsshCd == null || rowData.bsshCd == "") {
if(rowData.bsshCd == null || rowData.bsshCd === "") {
dialog.alert({
content: "업체를 먼저 선택해주세요."
});
@ -467,7 +487,7 @@
let bsshData = $P.bsshFormFields.get();
if(bsshData.bsshCd == ""){
if(bsshData.bsshCd === ""){
dialog.alert({
content: "마약류 취급업체 정보를 입력해주세요."
});
@ -479,7 +499,7 @@
}
let dsProd = $P.productList.getDataset();
if(dsProd.length == 0){
if(dsProd.length === 0){
dialog.alert({
content: "폐기 제품 정보를 입력해주세요."
});
@ -495,7 +515,7 @@
}
});
if(dsProd.length != fileCount){
if(dsProd.length !== fileCount){
dialog.alert({
content: "입력되지 않은 폐기 제품 이미지가 있습니다."
});
@ -557,7 +577,7 @@
const prdInfo = ""+prdFrm.prductCd+prdFrm.prdValidDe.replaceAll('-','')+prdFrm.mnfNo+prdFrm.mnfSeq;
let isDup = $P.productList
.getDataset()
.filter(item => prdInfo == ""+item.prductCd+item.prdValidDe.replaceAll('-','')+item.mnfNo+item.mnfSeq)
.filter(item => prdInfo === ""+item.prductCd+item.prdValidDe.replaceAll('-','')+item.mnfNo+item.mnfSeq)
.length > 0;
if(isDup){
const msg = "이미 추가된 제품 입니다<br>제품코드: " + prdFrm.prductCd +"<br>유효기간: "+ prdFrm.prdValidDe +"<br>제조번호: "+ prdFrm.mnfNo +"<br>제조일련번호: "+ prdFrm.mnfSeq;
@ -566,7 +586,7 @@
});
return false;
}
debugger
const data = {...$P.productFormFields.get(), keyCnt : ""+prdRowKey++};
data.prdValidDe = data.prdValidDe.replaceAll('-','');
$P.productList.append([data]);
@ -589,7 +609,7 @@
$P.fnChangeDsusePrvCd = () => {
// validate 확인
let checkData = $("#dsusePrvCd--${pageName} option:selected").val();
if (checkData =="01" || checkData =="02") {
if (checkData ==="01" || checkData ==="02") {
$("#dsuseAcdtDe--${pageName}").prop('disabled', false);
}else{
$("#dsuseAcdtDe--${pageName}").prop('disabled', true);
@ -646,7 +666,7 @@
// 초기 화면 설정
$P.initForm = () => {
if($("input[name='prgrsSttsCd']").val() == '99' || ${currentUser.hasAuthorities("ROLE_MANAGER")} || ${currentUser.hasAuthorities("ROLE_ADMIN")}) {
if($("input[name='prgrsSttsCd']").val() === '99' || ${currentUser.hasAuthorities("ROLE_MANAGER")} || ${currentUser.hasAuthorities("ROLE_ADMIN")}) {
$("#btnSave--${pageName}").prop("disabled", true);
}
AppSupport.initDatepicker("bssh--${pageName}");
@ -672,7 +692,7 @@
for(let p of productInfo){
p.keyCnt = (""+prdRowKey++);
for(let f of fileInfo){
if(p.dscdmngSn == f.SUB_TYPE){
if(p.dscdmngSn === f.SUB_TYPE){
p.fileInfo = f;
}
}

@ -303,7 +303,7 @@
bsshCd: row.BSSH_CD,
rprsntvNm: row.RPRSNTV_NM,
prmisnNo: row.PRMISN_NO,
bizrno: row.BIZR_NO,
bizrno: row.BIZRNO,
dsusePrvCd: row.DSUSE_PRV_CD,
dsuseAcdtDe: row.DSUSE_ACDT_DE,
prgrsSttsCd: row.PRGRS_STTS_CD

Loading…
Cancel
Save