feat: 폐기결과 처리시 기등록 체크에 폐기구분 추가

main
Jonguk. Lim 4 weeks ago
parent 9359896fc2
commit b2f1087cb4

@ -1,6 +1,6 @@
package cokr.xit.adds.nims;
import cokr.xit.foundation.component.QueryRequest;
import cokr.xit.foundation.component.*;
/**
*
@ -14,6 +14,7 @@ public class DsuseMgtRsltQuery extends QueryRequest{
private String deptCd; // 부서 코드
private String userId; // 사용자 ID
private String dsuseMthCd; // 폐기 방법 코드
private String dsuseSeCd; // 폐기 구분 코드
private String dsuseDe; // 폐기 일자
public String getDscdmngId() {
@ -42,7 +43,7 @@ public class DsuseMgtRsltQuery extends QueryRequest{
this.userId = userId;
return self();
}
public String getDsuseMthCd() {
return ifEmpty(dsuseMthCd, () -> null);
}
@ -51,7 +52,16 @@ public class DsuseMgtRsltQuery extends QueryRequest{
this.dsuseMthCd = dsuseMthCd;
return self();
}
public String getDsuseSeCd() {
return ifEmpty(dsuseSeCd, () -> null);
}
public <T extends DsuseMgtRsltQuery> T setDsuseSeCd(String dsuseSeCd) {
this.dsuseSeCd = dsuseSeCd;
return self();
}
public String getDsuseDe() {
return ifEmpty(dsuseDe, () -> null);
}

@ -207,7 +207,8 @@ public class AddsNimsController extends ApplicationController {
.setDscdmngId(dsuseRsltInfo.getDscdmngId())
.setDeptCd(dsuseRsltInfo.getDeptCd())
.setDsuseDe(dsuseRsltInfo.getDsuseDe().replaceAll("-", ""))
.setDsuseMthCd(dsuseRsltInfo.getDsuseMthCd()
.setDsuseMthCd(dsuseRsltInfo.getDsuseMthCd())
.setDsuseSeCd(dsuseRsltInfo.getDsuseSeCd()
)
)
)

@ -10,6 +10,7 @@
, tdm.DSUSE_MTH_CD
, tcc.CODE_VAL AS DSUSE_MTH_NM
, tdm.DSUSE_DE
, tdm.DSUSE_LOC
, IF(#{dscdmngId} = tdm.DSCDMNG_ID, 'Y', 'N') AS SELF_YN
, (SELECT GROUP_CONCAT(dscdmng_id SEPARATOR ',')
FROM tb_dsuse_mgt
@ -30,6 +31,7 @@
AND tdm.use_yn = 'Y'
AND tdm.dept_cd = #{deptCd}
AND tdm.dsuse_mth_cd = #{dsuseMthCd}
AND tdm.dsuse_se_cd = #{dsuseSeCd}
AND tdm.dsuse_de = #{dsuseDe}
</select>
</mapper>

@ -94,7 +94,7 @@
</div>
</div>
</div>
<div class="row my-1 mx-1 g-1 border-card rounded"></div>
</form> <!-- /입력 영역 -->
<input type="file" accept="image/*" id="inputUploadSet--${pageName}" hidden multiple />
@ -161,6 +161,7 @@
let param = {
dscdmngId: $("#dscdmngId--${pageName}").val(),
dsuseDe: $("#dsuseDe--${pageName}").val().replace(/-/g, ""),
dsuseSeCd: $("#dsuseSeCd--${pageName}").val(),
dsuseMthCd: $("#dsuseMthCd--${pageName}").val(),
deptCd: "${currentUser.deptCode}"
};
@ -197,7 +198,6 @@
$('#spnDsuseDe').show();
$('#spnDsuseMthCd').show();
document.getElementById("rsltImgList").innerHTML = '총 ' + dscnmngIds.length + '건 에서 폐기사진 공유<br>폐기사진 공유 폐기관리번호 : [' + dscnmngIds.filter(item => item != $("#dscdmngId--${pageName}").val()).join(', ') + ']';
}
return;
@ -217,7 +217,7 @@
}
// pageObject
let $P = pageObject["${pageName}"];
$P.fileInfos = ${fileInfos};
$P.fileArr = [];
@ -252,7 +252,7 @@
* DatasetControl 이벤트
**************************************************************************/
// Dataset 변경 이벤트
// 현재 선택 자료 변경 이벤트
// 현재 선택 자료 변경 이벤트
$P.control.onCurrentChange = item => {
if (!item) return;
@ -306,7 +306,7 @@
}
});
}
// 저장
$P.control.save = (info, fileArr) => {
let saveData = {
@ -376,11 +376,11 @@
$P.fileArr.push(files[i]);
}
}
$P.fnDisplay();
};
/**************************************************************************
* DataTables 이벤트
**************************************************************************/
@ -415,10 +415,10 @@
/**************************************************************************
* 사용자 함수(function)
**************************************************************************/
// 이미지 표시
$P.fnDisplay = () => {
if($P.fileArr.length > 0){
let tagsText = $P.fnMakeImgTags($P.fileArr);
document.querySelector("#dragAndDrop--${pageName}").innerHTML = tagsText;
@ -427,9 +427,9 @@
document.querySelector("#dragAndDrop--${pageName}").innerHTML = "";
$("#btnImgDel--${pageName}").attr("hidden","hidden");
}
}
// HTML 태그(img,checkbox) 문자열 생성
$P.fnMakeImgTags = (fileArr) => {
let tagsTextArr = [];
@ -438,7 +438,7 @@
let item = fileArr[index];
let template = document.getElementById("imgCheckboxTemplate--${pageName}").innerHTML;
template = template.replace(/{name}/gi, "dsuseDsuseImgFilesSelector");
template = template.replace(/{value}/gi, item.id);
template = template.replace(/{src}/gi, item.url);
@ -447,7 +447,7 @@
return tagsTextArr.join("");
}
// 전자우편 안내문 등록 버튼 이벤트
$P.fnSearchBssh = (title) => {
$P.control.getBsshInfo();
@ -509,7 +509,7 @@
$("#btnBsshSearch--${pageName}").on("click", function() {
$P.fnSearchBssh($(this).attr("title"));
});
//이미지 삭제 버튼
$("#btnImgDel--${pageName}").on("click", function() {
let checkeds = $("#dragAndDrop--${pageName}").find(":checkbox[name='dsuseDsuseImgFilesSelector']:checked");
@ -518,16 +518,16 @@
checkeds.each(function(){
keys.push(this.value);
});
$P.fileArr = $P.fileArr.filter((element) => keys.indexOf(element.id) === -1);
$P.fnDisplay();
}
});
// 버튼 이벤트
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장
$("#dsuseDe--${pageName}, #dsuseMthCd--${pageName}").on("change", () => {
$("#dsuseDe--${pageName}, #dsuseMthCd--${pageName}, #dsuseSeCd--${pageName}").on("change", () => {
isImgSaved = true;
isRsltImgRemove = false;
if(initDataset) searchRsltImgList();
@ -545,7 +545,7 @@
let tmp = $P.fileArr[evt.oldIndex];
$P.fileArr[evt.oldIndex] = $P.fileArr[evt.newIndex];
$P.fileArr[evt.newIndex] = tmp;
$P.fnDisplay();
}
}
@ -593,24 +593,24 @@
$("#hdrDe--${pageName}").datepicker("setDate", new Date()); // 취급 일자
$("#dsuseDe--${pageName}").datepicker("setDate", new Date()); // 폐기 일자
}
if($P.fileInfos.length > 0){
let promiseArr = [];
$P.fileInfos.forEach(f => {
// URL에 c: d: 제거
if(/^[a-zA-Z][\:]/.test(f.URL)){
f.URL = f.URL.substring(2);
}
try{
promiseArr.push(AddsSupport.fnCreateFileFromFileInfo(f));
}catch(e){
console.log(e);
}
});
Promise.all(promiseArr).then((values) => {
$P.fileArr = $P.fileArr.concat(values);
$P.fnDisplay();
@ -621,6 +621,6 @@
});
</script>

@ -63,10 +63,12 @@
<label id="${infoPrefix}Paging--${pageName}PagingInfo" class="dataTables_info" role="status" aria-live="polite"></label>
<ul id="${infoPrefix}Paging--${pageName}" class="pagination pagination-primary" style="display: none;">
</ul>
<span class="container-window-btn-right">
<!-- FIXME:: NIMS API 개발 완료후 적용 -->
<%-- <input type="checkbox" id="chkBsshCd--${pageName}" name="chkBsshCd" title="업체코드적용" style="align-items: baseline"/>&nbsp;<strong>신규API 업체코드 적용</strong>--%>
<%--
<span class="container-window-btn-right">
<input type="checkbox" id="chkBsshCd--${pageName}" name="chkBsshCd" title="업체코드적용" style="align-items: baseline"/>&nbsp;<strong>신규API 업체코드 적용</strong>
</span>
--%>
</div>
</div>
<div class="card col-6">
@ -349,7 +351,7 @@
}
// FIXME:: NIMS API 개발 완료후 적용
<%--let bsshCd = '${bsshCd}';--%>
let bsshCd = '${bsshCd}';
<%--if(!$('#chkBsshCd--${pageName}').is(":checked")){--%>
<%-- bsshCd = '';--%>
<%--}--%>

Loading…
Cancel
Save