mjkhan21 5 months ago
commit 933e8dfd43

@ -1,12 +1,12 @@
// package cokr.xit.adds;
//
// import org.springframework.boot.builder.SpringApplicationBuilder;
// import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
//
// public class ServletInitializer extends SpringBootServletInitializer {
//
// @Override
// protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
// return application.sources(XitBootApplication.class);
// }
// }
package cokr.xit.adds;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
public class ServletInitializer extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(XitBootApplication.class);
}
}

@ -57,7 +57,7 @@ public class DsuseMgtReceiptQuery extends QueryRequest{
private String chrgNm; // 담당자 명
private String hptlNo; // 요양기관 기호
private String joinYn; // 획원가입 여부
private String bsshSttsNm; // 상태
private String bsshSttsNm; // 상태
private String prmisnNo; // 허가 번호
public String getSchSggCd() {

@ -21,6 +21,12 @@ public interface DsuseMgtReceiptMapper extends AbstractMapper {
DataObject selectDsuseMgtReceiptInfo(String dscdmngId);
/** .
* @param DsuseMgtReceiptQuery
* @return
*/
int removeDsuseMgt(DsuseMgtReceiptQuery query);
/** .
* @param DsuseMgtReceiptQuery
* @return

@ -18,6 +18,12 @@ public interface DsuseMgtReceiptService {
DataObject getDsuseMgtReceiptInfo(String dscdmngId);
/** .
* @param DsuseMgtReceiptQuery
* @return
*/
String removeDsuseMgt(DsuseMgtReceiptQuery query);
/** .
* @param DsuseMgtReceiptQuery
* @return

@ -31,6 +31,18 @@ public class DsuseMgtReceiptServiceBean extends AbstractServiceBean implements D
return dsuseMgtReceiptMapper.selectDsuseMgtReceiptInfo(dscdmngId);
}
/** .
* @param DsuseMgtReceiptQuery
* @return
*/
public String removeDsuseMgt(DsuseMgtReceiptQuery query) {
if(dsuseMgtReceiptMapper.removeDsuseMgt(query) == 1) {
return "[S]";
} else {
return "[F]";
}
}
/** .
* @param DsuseMgtReceiptQuery
* @return

@ -94,6 +94,19 @@ public class AddsNimsController extends ApplicationController {
.addObject("pageName", "dsuseMgtReceiptInfo") // View(jsp)에서 사용할 id 뒤에 붙일 suffix
.addObject("apiHost", apiHost);
}
@RequestMapping(value = "/removeDsuseMgt.do", name="신청서 접수 목록 조회")
public ModelAndView removeDsuseMgt(DsuseMgtReceiptQuery query) {
boolean saved = false;
String rtnMsg = dsuseMgtReceiptService.removeDsuseMgt(query);
if(rtnMsg.contains("[S]")) {
saved = true;
}
return new ModelAndView("jsonView")
.addObject("saved", saved)
.addObject("rtnMsg", rtnMsg);
}
//-------------------------------------------------------------------------------------------------
// 신청서 접수
//-------------------------------------------------------------------------------------------------

@ -43,6 +43,7 @@
, B.PRMISN_NO /* 허가번호 */
FROM TB_DSUSE_MGT A
LEFT OUTER JOIN TB_BSSH_INFO B ON A.BSSH_CD = B.BSSH_CD
WHERE A.USE_YN = "Y"
</sql>
@ -50,22 +51,21 @@
/* 폐기관리접수 목록 조회(dsuseMgtReceiptMapper.selectDsuseMgtReceiptList) */
<include refid="utility.paging-prefix" />
<include refid="select" />
WHERE 1=1
<if test="schSggCd != null">
AND A.DEPT_CD = #{schSggCd} <!-- 관할 관청 -->
</if>
<if test="schDateFrom != null">
AND A.HDR_DE <![CDATA[>=]]> #{schDateFrom} <!-- 취급 일자 시작 -->
</if>
<if test="schDateTo != null">
AND A.HDR_DE <![CDATA[<=]]> #{schDateTo} <!-- 취급 일자 종료 -->
</if>
<if test="schBsshCd != null">
AND B.BSSH_CD = #{schBsshCd}
</if>
<if test="schSttsCd != null">
AND A.PRGRS_STTS_CD = #{schSttsCd} <!-- 진행 상태 -->
</if>
<if test="schSggCd != null">
AND A.DEPT_CD = #{schSggCd} <!-- 관할 관청 -->
</if>
<if test="schDateFrom != null">
AND A.HDR_DE <![CDATA[>=]]> #{schDateFrom} <!-- 취급 일자 시작 -->
</if>
<if test="schDateTo != null">
AND A.HDR_DE <![CDATA[<=]]> #{schDateTo} <!-- 취급 일자 종료 -->
</if>
<if test="schBsshCd != null">
AND B.BSSH_CD = #{schBsshCd}
</if>
<if test="schSttsCd != null">
AND A.PRGRS_STTS_CD = #{schSttsCd} <!-- 진행 상태 -->
</if>
<include refid="utility.orderBy" />
<include refid="utility.paging-suffix" />
</select>
@ -73,9 +73,17 @@
<select id="selectDsuseMgtReceiptInfo" parameterType="string" resultType="dataobject">
/* 폐기관리접수 목록 조회(dsuseMgtReceiptMapper.selectDsuseMgtReceiptInfo) */
<include refid="select" />
WHERE A.DSCDMNG_ID = #{dscdmngId}
AND A.DSCDMNG_ID = #{dscdmngId}
</select>
<update id="removeDsuseMgt" parameterType="map" >
UPDATE tb_dsuse_mgt
SET use_yn = #{useYn}
, mdfcn_dt = DATE_FORMAT(now(), '%Y%m%d%H%i%s')
, mdfr = #{mdfr}
WHERE dscdmng_id = #{dscdmngId}
</update>
<update id="updatePrgsSttusOfDsuseMgt" parameterType="map" >
UPDATE tb_dsuse_mgt
SET prgrs_stts_cd = #{prgrsSttsCd}

@ -353,8 +353,7 @@
data: JSON.stringify({
"dscdmngIds" : [dscdmngId],
"userId" : "${currentUser.account}",
"deptCd": "",
"prgrsSttsCd": ""
"deptCd": ""
}),
success:resp => {
if(!resp.success){
@ -529,9 +528,7 @@
$("#schDateTo--${pageName}").datepicker("setDate", new Date()); // 부과 제외 일자 종료
$('#schSttsCd--${pageName}').val('06');
// FIXME: 로그인 사용자의 관할관청 코드를 설정한다.
<%--$('#schSggCd--${pageName}').val("${currentUser.deptCd}");--%>
$('#schSggCd--${pageName}').val("4050149");
$('#schSggCd--${pageName}').val("${currentUser.deptCode}");
$('input:radio[name="schSttsCd"]').filter('[value="ing"]').prop('checked', true);
}

@ -595,9 +595,7 @@
$("#schDateTo--${pageName}").datepicker("setDate", new Date()); // 부과 제외 일자 종료
$('#schSttsCd--${pageName}').val('06');
// FIXME: 로그인 사용자의 관할관청 코드를 설정한다.
<%--$('#schSggCd--${pageName}').val("${currentUser.deptCd}");--%>
$('#schSggCd--${pageName}').val("4050149");
$('#schSggCd--${pageName}').val("${currentUser.deptCode}");
}
/**************************************************************************

@ -71,6 +71,9 @@
<button type="button" class="btn btn-primary w-px-120" id="btnCreateDsuseMGT--${pageName}" title="등록">
등록
</button>
<button type="button" class="btn btn-danger w-px-120" id="btnRemoveDsuseMGT--${pageName}" title="삭제">
삭제
</button>
<button type="button" class="btn btn-excel w-px-120" id="btnExcel--${pageName}" title="엑셀">
엑셀
</button>
@ -338,6 +341,33 @@
});
}
// 신청서 정보 dialog
$P.control.removeDsuseMgt = (dscdmngId) => {
let params = {
dscdmngId: dscdmngId,
userId: "${currentUser.account}",
useYn: "N"
};
ajax.get({
url : wctx.url("/adds/nims/removeDsuseMgt.do")
, data: params
, success : resp => {
if(resp.saved){
dialog.close("layoutInfoDialog");
dialog.alert({
content:"삭제되었습니다.",
init : () => {
setDialogZindex();
focusClose();
},
onClose : () => $P.fnRefreshList()
});
}
}
});
}
/**************************************************************************
* DataTables 이벤트
@ -464,7 +494,25 @@
$P.control.getInfo();
}
// 전자우편 안내문 등록 버튼 이벤트
// 폐기신청서 접수 등록 버튼 이벤트
$P.fnRemoveDsuseMGT = () => {
const row = $P.control.dataset.getCurrent();
if(row.PRGRS_STTS_CD == "99"){
dialog.alert({
content: "종료된 자료는 삭제하실 수 없습니다.."
});
return false;
}
dialog.alert({
content: "자료를 삭제할 경우 복구가 불가능합니다.<br>아래 자료를 삭제하시겠습니까?<br>폐기관리번호: "+row.DSCDMNG_ID + "<br>업체명: " +row.BSSH_NM+"<br>폐기건수: "+row.RND_DTL_RPT_CNT+"<br>폐기사유: " + row.DSUSE_PRV_NM
, init: () => { setDialogZindex(); }
, onOK: () => {
$P.control.removeDsuseMgt(row.DSCDMNG_ID);
}
});
}
// 업체 검색 버튼 이벤트
$P.fnSearchBssh = (title) => {
$P.control.getBsshInfo();
}
@ -541,6 +589,11 @@
$P.fnCreateDsuseMGT($(this).attr("title"));
});
// 폐기신청서 삭제
$("#btnRemoveDsuseMGT--${pageName}").on("click", function() {
$P.fnRemoveDsuseMGT($(this).attr("title"));
});
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
$("#frmSearch--${pageName}").find(".form-date").each(function() {
$(this).on("input", function() {
@ -589,9 +642,7 @@
$("#schDateFrom--${pageName}").datepicker("setDate", DateUtil.getDateDay(-7).date); // 부과 제외 일자 시작
$("#schDateTo--${pageName}").datepicker("setDate", new Date());
// FIXME: 로그인 사용자의 관할관청 코드를 설정한다.
<%--$('#schSggCd--${pageName}').val("${currentUser.deptCd}");--%>
$('#schSggCd--${pageName}').val("4050149");// 부과 제외 일자 종료
$('#schSggCd--${pageName}').val("${currentUser.deptCode}");
}
/**************************************************************************

@ -1,188 +0,0 @@
<%@ 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>
<!-- inner page html -->
<div class="content-wrapper">
<!-- Content -->
<div class="container flex-grow-1 px-0">
<!-- Page Body -->
<div class="card">
<!-- 입력 영역 -->
<form id="bssh--${pageName}" name="bssh">
<!-- hidden -->
<input type="hidden" name="dscdmngId" data-map="dscdmngId" />
<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">
<label for="bsshNm--${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="bsshNm--${pageName}" name="bsshNm" data-map="bsshNm" readonly>
</div>
<div class="col-md-4">
<label for="bsshCd--${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="bsshNm--${pageName}" name="bsshCd" data-map="bsshCd" readonly>
</div>
<div class="col-md-4">
<label for="rprsntvNm--${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="rprsntvNm--${pageName}" name="rprsntvNm" data-map="rprsntvNm" readonly>
</div>
<div class="col-md-4">
<label for="prmisnNo--${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="prmisnNo--${pageName}" name="prmisnNo" data-map="prmisnNo" readonly>
</div>
<div class="col-md-4">
<label for="bizrNo--${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="bizrno--${pageName}" name="bizrno" data-map="bizrno" readonly>
</div>
<div class="col-md-8">
<label for="dsusePrvCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기사유</label>
<select class="form-select" id="dsusePrvCd--${pageName}" name="dsusePrvCd">
<c:forEach items="${ADDS04}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</div>
</div>
</form>
<div>
</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> <!-- / Content <div class="container flex-grow-1 px-0"> -->
</div> <!-- / inner page html <div class="content-wrapper"> -->
<script>
/**************************************************************************
* Global Variable
**************************************************************************/
pageObject["${pageName}"] = {};
/**************************************************************************
* script 진입
**************************************************************************/
$(document).ready(function() {
// pageObject
let $P = pageObject["${pageName}"];
// FormFields
$P.bsshFormFields = new AddsFormFields("#bssh--${pageName}");
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.control = new DatasetControl({
prefix: "dsuseMgtReceiptBssh"
, prefixName: "폐기 신청서 접수 정보"
, keymapper: info => info ? info.bsshCd : ""
, dataGetter: obj => obj.${infoPrefix}Info
, infoSize: "xl"
});
$P.control.onCurrentChange = item => {
if (!item) return;
// Dataset 셋팅
$P.bsshFormFields.set($P.control, item);
}
// 저장 callback
$P.control.onSave = (resp) => {
let dialogTitle = $("#" + $P.control.prefix + "Dialog--${openerPageName}").find("h5.modal-title").html();
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, dialogTitle);
// 메시지 출력
dialog.alert({
content: showMessage
, init: () => { setDialogZindex(); }
, onOK: () => { }
});
if (resp.saved) {
dialog.close($P.control.prefix + "Dialog--${openerPageName}");
}
}
// 저장
$P.control.save = (jsonBssh) => {
let saveBsshData = {
...jsonBssh,
userId: "${currentUser.account}"
}
ajax.post({
url: '<c:url value="${apiHost}/api/biz/nims/v1/modifyDsuseMgtReceiptMstInfo" />'
, data: JSON.stringify(saveBsshData)
, contentType: "application/json"
, success: resp => {
if(!resp.success){
dialog.alert({
content: resp.message
});
return;
}
//$P.control.onSave(resp)
dialog.alert("정상 처리 하였습니다.");
dialog.close("dsuseMgtReceiptDialog");
//this._load();
}
});
}
/**************************************************************************
* 버튼 clickEvent
**************************************************************************/
// 저장
$P.fnSave = () => {
// validate 확인
if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return;
let bsshData = $P.bsshFormFields.get();
if(bsshData.bsshCd == ""){
dialog.alert({
content: "마약류 취급업체 정보를 입력해주세요."
});
return false;
}
dialog.alert({
content: "현재 " + $P.control.prefixName + " 정보를 저장하시겠습니까?"
, init: () => { setDialogZindex(); }
, onOK: () => {
$P.control.save(bsshData); // formFields
}
});
}
/**************************************************************************
* 초기 셋팅
**************************************************************************/
// 이벤트 설정
$P.setEvent = () => {
// 버튼 이벤트
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장
}
/**************************************************************************
* 최초 실행 함수
**************************************************************************/
// 1. 이벤트 설정
$P.setEvent();
// 2. 초기 화면 설정
//$P.initForm();
// 3. Dataset 설정
$P.control.setData([${dsuseReceptInfo}]);
});
</script>

@ -1,82 +0,0 @@
<%@ 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>
<div class="wrapper" style="padding-top:2em">
<input type="file" id="img1" name="img" accept="image/*"><br>
<input type="file" id="img2" name="img" accept="image/*"><br>
<button id="btnSave">save</button>
</div>
<script type="text/javascript">
document.querySelector("#btnSave").addEventListener("click", function () {
let dsuseMgt =
{
userId: "suji",
prgrsSttsCd: "01",
bsshCd: "H00008333",
rndDtlRptCnt: 2,
dsusePrvCd: "04"
};
let dsuseMgtDtls = [
{
prductCd: "8806717024900",
prductNm: "베리콜시럽",
minDistbQy: 1,
minDistbUnit: "",
pceQy: 1,
pceUnit: "개",
mnfNo: "A1111",
prdValidDe: "20300303",
mnfSeq: "A11111111",
dsuseQy: 10
},
{
prductCd: "8806718050823",
prductNm: "아쿠아폴주20밀리리터(프로포폴) (20㎖)",
minDistbQy: 1,
minDistbUnit: "박스",
pceQy: 5,
pceUnit: "바이알",
mnfNo: "A1111",
prdValidDe: "20300303",
mnfSeq: "A11111111",
dsuseQy: 30
}
];
let formData = new FormData();
formData.append("dsuseMgtJsonStr", JSON.stringify(dsuseMgt));
formData.append("dsuseMgtDtlsJsonStr", JSON.stringify(dsuseMgtDtls));
$("input[type=file]").each(function (i) {
formData.append("dsusePrdImgFiles", $('input[type=file]')[i].files[0]);
});
$.ajax({
url: '<c:url value="${apiHost}/api/biz/nims/v1/saveDsuseMgtReceipt" />',
type: 'POST',
data: formData,
processData: false,
contentType: false,
success: function (res) {
console.log(res);
if (!res.success) {
alert(res.code + ':' + res.message);
return false;
}
console.log(res.data);
},
error: function (error) {
console.log(error);
if (error.responseJSON && typeof error.responseJSON === 'object') {
console.log(error.responseJSON);
}
}
});
}, {passive: true});
</script>

@ -558,9 +558,7 @@
$("#schDateTo--${pageName}").datepicker("setDate", new Date()); // 부과 제외 일자 종료
$('#schSttsCd--${pageName}').val('01');
// FIXME: 로그인 사용자의 관할관청 코드를 설정한다.
<%--$('#schSggCd--${pageName}').val("${currentUser.deptCd}");--%>
$('#schSggCd--${pageName}').val("4050149");
$('#schSggCd--${pageName}').val("${currentUser.deptCode}");
}
/**************************************************************************

Loading…
Cancel
Save