민원접수자료 메인 화면 수정

main
이범준 1 year ago
parent 48afab9dcf
commit d5d78d9964

@ -27,6 +27,11 @@ public class Crdn extends AbstractEntity {
*/ */
private String crdnId; private String crdnId;
/**
* ID
*/
private String[] crdnIDs;
/** /**
* *
*/ */

@ -27,6 +27,7 @@ public class CrdnQuery extends QueryRequest {
private String schDateFrom; private String schDateFrom;
private String schDateTo; private String schDateTo;
private String vhrno; private String vhrno;
private String cvlcptPrcsPicNm;
private String schCvlcptRcptYmdFrom; private String schCvlcptRcptYmdFrom;
private String schCvlcptRcptYmdTo; private String schCvlcptRcptYmdTo;
private String schRductYmdFrom; private String schRductYmdFrom;
@ -141,6 +142,15 @@ public class CrdnQuery extends QueryRequest {
return self(); return self();
} }
public String getCvlcptPrcsPicNm() {
return ifEmpty(cvlcptPrcsPicNm, () -> null);
}
public <T extends CrdnQuery> T setCvlcptPrcsPicNm(String cvlcptPrcsPicNm) {
this.cvlcptPrcsPicNm = cvlcptPrcsPicNm;
return self();
}
public String getSchCvlcptRcptYmdFrom() { public String getSchCvlcptRcptYmdFrom() {
return ifEmpty(schCvlcptRcptYmdFrom, () -> null); return ifEmpty(schCvlcptRcptYmdFrom, () -> null);
} }

@ -1,6 +1,7 @@
package cokr.xit.fims.crdn.dao; package cokr.xit.fims.crdn.dao;
import java.util.List; import java.util.List;
import java.util.Map;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper; import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
@ -34,4 +35,18 @@ public interface Crdn01Mapper extends AbstractMapper {
* @return * @return
*/ */
List<DataObject> selectCivilComplaintAnswerTargetDataList(CrdnQuery req); List<DataObject> selectCivilComplaintAnswerTargetDataList(CrdnQuery req);
/** .
* @param params
* <ul><li>"crdn" - </li>
* <li>"currentUser" - </li>
* </ul>
* @return
*/
int removeCivilComplaint(Map<String, Object> params);
default boolean removeCivilComplaint(String... crdnIDs) {
if (isEmpty(crdnIDs)) return false;
return removeCivilComplaint(params().set("crdnIDs", crdnIDs)) == 1;
};
} }

@ -7,4 +7,13 @@ package cokr.xit.fims.crdn.service;
*/ */
public interface Crdn01Service extends CrdnService { public interface Crdn01Service extends CrdnService {
/** .
* @param crdn
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
boolean removeCivilComplaint(String... crdnIDs);
} }

@ -16,4 +16,8 @@ public class Crdn01Bean extends AbstractComponent {
@Resource(name = "crdn01Mapper") @Resource(name = "crdn01Mapper")
private Crdn01Mapper crdn01Mapper; private Crdn01Mapper crdn01Mapper;
public boolean removeCivilComplaint(String... crdnIDs) {
return crdn01Mapper.removeCivilComplaint(crdnIDs);
}
} }

@ -30,7 +30,7 @@ public class Crdn01ServiceBean extends AbstractServiceBean implements Crdn01Serv
switch (ifEmpty(req.getGrid(), () -> "")) { switch (ifEmpty(req.getGrid(), () -> "")) {
case "receiptData": case "receiptData":
return crdn01Mapper.selectCivilComplaintReceiptDataList(req.setOrderBy("CRDN_ID")); return crdn01Mapper.selectCivilComplaintReceiptDataList(req.setOrderBy("CVLCPT_RCPT_YMD"));
case "answerTargetData": case "answerTargetData":
return crdn01Mapper.selectCivilComplaintAnswerTargetDataList(req.setOrderBy("CRDN_ID")); return crdn01Mapper.selectCivilComplaintAnswerTargetDataList(req.setOrderBy("CRDN_ID"));
default: default:
@ -39,4 +39,9 @@ public class Crdn01ServiceBean extends AbstractServiceBean implements Crdn01Serv
} }
@Override
public boolean removeCivilComplaint(String... crdnIDs) {
return crdn01Bean.removeCivilComplaint(crdnIDs);
}
} }

@ -33,7 +33,6 @@ public class Crdn05ServiceBean extends AbstractServiceBean implements Crdn05Serv
@Override @Override
public List<DataObject> getCrackdownList(CrdnQuery req) { public List<DataObject> getCrackdownList(CrdnQuery req) {
req.setThisDay("");
req.setCurrentUserId(currentUser().getId()); req.setCurrentUserId(currentUser().getId());
req.setOrderBy("CRDN_ID"); req.setOrderBy("CRDN_ID");
return crdn05Mapper.selectCrackdownList(req); return crdn05Mapper.selectCrackdownList(req);

@ -10,8 +10,10 @@ import org.springframework.web.servlet.ModelAndView;
import cokr.xit.base.code.CommonCode; import cokr.xit.base.code.CommonCode;
import cokr.xit.base.web.ApplicationController; import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.service.Crdn01Service; import cokr.xit.fims.crdn.service.Crdn01Service;
import cokr.xit.foundation.UserInfo;
/** .<br /> /** .<br />
* { }/crdn/crdn01 . * { }/crdn/crdn01 .
@ -33,6 +35,8 @@ public class Crdn01Controller extends ApplicationController {
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM026","FIM054"); Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM026","FIM054");
mav.addObject("FIM054List", commonCodes.get("FIM054")); mav.addObject("FIM054List", commonCodes.get("FIM054"));
addCodes(commonCodes, mav, "FIM026"); addCodes(commonCodes, mav, "FIM026");
mav.addObject("currentUserName", UserInfo.current().getName());
return mav; return mav;
} }
@ -130,4 +134,20 @@ public class Crdn01Controller extends ApplicationController {
"crdn" "crdn"
); );
} }
/** .
* @param crdnId
* @return jsonView
* <pre><code> {
* "affected":
* "saved": true, false
* }</code></pre>
*/
@RequestMapping(name="민원자료 제거", value="/010/remove.do")
public ModelAndView removeCivilComplaint(Crdn crdn) {
boolean saved = crdn01Service.removeCivilComplaint(crdn.getCrdnIDs());
return new ModelAndView("jsonView")
.addObject("saved", saved);
}
} }

@ -164,7 +164,7 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, (SELECT VLTN_ARTCL FROM TB_VLTN_INFO WHERE VLTN_ID = C.VLTN_ID) ASVLTN_ARTCL <!-- 위반내용 --> , (SELECT VLTN_ARTCL FROM TB_VLTN_INFO WHERE VLTN_ID = C.VLTN_ID) ASVLTN_ARTCL <!-- 위반내용 -->
, CC.CVLCPT_RCPT_NO <!-- 민원 접수 번호 --> , CC.CVLCPT_RCPT_NO <!-- 민원 접수 번호 -->
, C.VHRNO <!-- 차량번호 --> , C.VHRNO <!-- 차량번호 -->
, C.CRDN_PLC
FROM TB_CRDN C FROM TB_CRDN C
INNER JOIN TB_CRDN_CVLCPT CC ON (C.CRDN_ID = CC.CRDN_ID) INNER JOIN TB_CRDN_CVLCPT CC ON (C.CRDN_ID = CC.CRDN_ID)
WHERE C.DEL_YN = 'N' WHERE C.DEL_YN = 'N'
@ -177,6 +177,9 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
<if test="schCvlcptRcptYmdFrom != null">AND CC.CVLCPT_RCPT_YMD <![CDATA[ >= ]]> #{schCvlcptRcptYmdFrom} </if> <if test="schCvlcptRcptYmdFrom != null">AND CC.CVLCPT_RCPT_YMD <![CDATA[ >= ]]> #{schCvlcptRcptYmdFrom} </if>
<if test="schCvlcptRcptYmdTo != null">AND CC.CVLCPT_RCPT_YMD <![CDATA[ <= ]]> #{schCvlcptRcptYmdTo} </if> <if test="schCvlcptRcptYmdTo != null">AND CC.CVLCPT_RCPT_YMD <![CDATA[ <= ]]> #{schCvlcptRcptYmdTo} </if>
</if> </if>
<if test="cvlcptPrcsPicNm != null">
AND CC.CVLCPT_PRCS_PIC_NM = #{cvlcptPrcsPicNm}
</if>
<include refid="utility.orderBy" /> <include refid="utility.orderBy" />
<include refid="utility.paging-suffix"/> <include refid="utility.paging-suffix"/>
</select> </select>
@ -217,4 +220,15 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
<include refid="utility.paging-suffix"/> <include refid="utility.paging-suffix"/>
</select> </select>
<update id="removeCivilComplaint" parameterType="map">
/* 민원자료 삭제(crdn01Mapper.removeCivilComplaint) */
UPDATE TB_CRDN
SET DEL_YN = 'Y'
, DEL_DT = <include refid="utility.now" /> /* 삭제일시 */
, DLTR = #{currentUser.id} /* 삭제자 */
WHERE CRDN_ID IN (
<foreach collection="crdnIDs" item="crdnId" separator=",">#{crdnId}</foreach>
)
</update>
</mapper> </mapper>

@ -24,7 +24,7 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
WHERE C.DEL_YN = 'N' WHERE C.DEL_YN = 'N'
AND C.TASK_SE_CD = #{taskSeCd} AND C.TASK_SE_CD = #{taskSeCd}
AND C.RGTR = #{currentUserId} AND C.RGTR = #{currentUserId}
AND SUBSTR(C.REG_DT,1,8) = <include refid="utility.thisDay" /> AND SUBSTR(C.REG_DT,1,8) = <include refid="utility.today" />
<include refid="utility.orderBy" /> <include refid="utility.orderBy" />
<include refid="utility.paging-suffix"/> <include refid="utility.paging-suffix"/>
</select> </select>
@ -173,10 +173,10 @@ INSERT INTO TB_CRDN (
, #{crdn.rcvmtAmt} <!-- 수납 금액 --> , #{crdn.rcvmtAmt} <!-- 수납 금액 -->
, #{crdn.bfrCrdnId} <!-- 이전 단속 ID --> , #{crdn.bfrCrdnId} <!-- 이전 단속 ID -->
, 'N' <!-- 삭제 여부 --> , 'N' <!-- 삭제 여부 -->
, <include refid="utility.now" /> <!-- 등록 일시 --> , #{crdn.createdAt} <!-- 등록 일시 -->
, #{currentUser.id} <!-- 등록자 --> , #{crdn.createdBy} <!-- 등록자 -->
, <include refid="utility.now" /> <!-- 수정 일시 --> , #{crdn.lastModified} <!-- 수정 일시 -->
, #{currentUser.id} <!-- 수정자 --> , #{crdn.modifiedBy} <!-- 수정자 -->
, #{crdn.removedAt} <!-- 삭제 일시 --> , #{crdn.removedAt} <!-- 삭제 일시 -->
, #{crdn.removedBy} <!-- 삭제자 --> , #{crdn.removedBy} <!-- 삭제자 -->
, #{crdn.delRsn} <!-- 삭제 사유 --> , #{crdn.delRsn} <!-- 삭제 사유 -->

@ -42,7 +42,11 @@
<button type="button" class="bx bx-sm bx-calendar bg-white"></button> <button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span> </span>
</div> </div>
<div class="col-12"> <div class="col-6">
<button type="button" onclick="$('#cvlcptPrcsPicNm--${pageName}').val('${currentUserName}');">담당자명 지정</button>
<input type="text" id="cvlcptPrcsPicNm--${pageName}" name="cvlcptPrcsPicNm" class="form-control"/>
</div>
<div class="col-6">
<input type="hidden" id="by--${pageName}" name="by" /> <input type="hidden" id="by--${pageName}" name="by" />
<input type="text" id="byOutput--${pageName}" class="form-control" readonly value="동적 검색" /> <input type="text" id="byOutput--${pageName}" class="form-control" readonly value="동적 검색" />
<input type="text" id="term--${pageName}" name="term" class="form-control" /> <input type="text" id="term--${pageName}" name="term" class="form-control" />
@ -59,8 +63,9 @@
</ul> </ul>
</div> </div>
<span class="container-window-btn-right"> <span class="container-window-btn-right">
<a href="#" id="" class="btn btn-blue" title="민원원본보기">민원원본보기</a> <a href="#" id="" class="btn btn-blue" title="민원원본보기">민원원본보기</a>
<a href="#" id="" class="btn btn-blue" title="처리 잠시 보류">처리 잠시 보류</a> <a href="#" id="btnHold--${pageName}" class="btn btn-blue" title="처리 잠시 보류">처리 잠시 보류</a>
</span> </span>
</span> </span>
</div> </div>
@ -68,7 +73,7 @@
<div class="card-datatable text-nowrap"> <div class="card-datatable text-nowrap">
<div id="DataTables_Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer"> <div id="DataTables_Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer">
<div id="table-responsive--${pageName}" class="table-responsive" <div id="table-responsive--${pageName}" class="table-responsive"
style="overflow-x: scroll;height:400px;overflow-y: scroll;"> style="overflow-x: scroll;height:550px;overflow-y: scroll;">
<table id="DataTables_Table_0--${pageName}" <table id="DataTables_Table_0--${pageName}"
class="datatables-ajax table table-bordered dataTable no-footer"> class="datatables-ajax table table-bordered dataTable no-footer">
<thead id="crdnThead--${pageName}"> <thead id="crdnThead--${pageName}">
@ -113,6 +118,16 @@
</div> </div>
</div> </div>
</div> </div>
위반장소 <input id="bottomCrdnPlc--${pageName}" type="text" size="100" />
<a href="#" id="btnDelete--${pageName}" class="btn btn-blue" title="선택자료 삭제">선택자료 삭제</a>
<a href="#" id="btnDeleteSameRcptYmd--${pageName}" class="btn btn-blue" title="접수일 전체 삭제">접수일 전체 삭제</a>
</div>
<div class="toast-container position-fixed bottom-0 end-0 p-3">
<div id="divToast--${pageName}" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-body bg-black text-white">
삭제 되었습니다.
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -138,12 +153,19 @@ $(document).ready(function(){
var $P = pageObject["${pageName}"]; var $P = pageObject["${pageName}"];
$P.scrollable = true; $P.scrollable = true;
$P.holdList = [];
$P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), {
animation: true,
autohide: true,
delay: 2000,
});
/************************************************************************** /**************************************************************************
* DatasetControl * DatasetControl
**************************************************************************/ **************************************************************************/
$P.crdnControl = new DatasetControl({ $P.crdnControl = new DatasetControl({
prefix:"crdn", prefixName:"종합", infoSize:"xl", urls : { load : "", getInfo : "" }, prefix:"crdn", prefixName:"종합", infoSize:"xl", urls : { load : "", getInfo : "", remove : "" },
keymapper:info => info ? info.CRDN_ID : "", dataGetter:obj => obj.crdnList, appendData:true, keymapper:info => info ? info.CRDN_ID : "", dataGetter:obj => obj.crdnList, appendData:true,
formats : { formats : {
CRDN_REG_SE_CD : FIM026, CRDN_REG_SE_CD : FIM026,
@ -173,28 +195,54 @@ $(document).ready(function(){
}; };
$P.crdnControl.onCurrentChange = item => { $P.crdnControl.onCurrentChange = item => {
if (!item) return; if (!item) {
$("#bottomCrdnPlc--${pageName}").val("");
return;
}
var key = item.data.CRDN_ID; var key = item.data.CRDN_ID;
$("#crdnTbody--${pageName}").setCurrentRow(key); $("#crdnTbody--${pageName}").setCurrentRow(key);
var cur = $P.crdnControl.getCurrent();
$("#bottomCrdnPlc--${pageName}").val(cur["CRDN_PLC"]);
}
$P.crdnControl.onRemove = (selected, resp) => {
if (resp.saved){
var removed = $P.crdnControl.dataset.getKeys("selected");
$P.crdnControl.dataset.remove(removed);
removed.forEach(function(item){
$("#crdnTbody--${pageName}").find("tr[data-key='"+item+"']").remove();
});
$P.toast.show();
}
} }
/************************************************************************** /**************************************************************************
* pageObject.function * pageObject.function
**************************************************************************/ **************************************************************************/
$P.fnReset = () => { $P.fnReset = () => {
$P.holdList = [];
$("#btnDelete--${pageName}").show();
$("#btnDeleteSameRcptYmd--${pageName}").show();
$('#schCvlcptRcptYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date); $('#schCvlcptRcptYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date);
$('#schCvlcptRcptYmdTo--${pageName}').datepicker('setDate', new Date()); $('#schCvlcptRcptYmdTo--${pageName}').datepicker('setDate', new Date());
$P.crdnControl.setData([]); $P.crdnControl.setData([]);
} }
$P.fnResetAndChangeBiz = taskSeCd => { $P.fnResetAndChangeBiz = (taskSeCd) => {
$P.fnReset(); $P.fnReset();
$P.crdnControl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn01/010/list.do"); $P.crdnControl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn01/010/list.do");
$P.crdnControl.urls.getInfo = wctx.url("/"+taskSeCd+"/crdn/crdn01/020/info.do"); $P.crdnControl.urls.getInfo = wctx.url("/"+taskSeCd+"/crdn/crdn01/020/info.do");
$P.crdnControl.urls.remove = wctx.url("/"+taskSeCd+"/crdn/crdn01/010/remove.do");
} }
$P.searchCrdnList = () => { $P.searchCrdnList = () => {
$P.holdList = [];
$("#btnDelete--${pageName}").show();
$("#btnDeleteSameRcptYmd--${pageName}").show();
$P.crdnControl.query = $P.getParams(); $P.crdnControl.query = $P.getParams();
$P.crdnControl.load(1); $P.crdnControl.load(1);
} }
@ -222,6 +270,14 @@ $(document).ready(function(){
$P.clickCrdnList = (dataKey) => { $P.clickCrdnList = (dataKey) => {
$P.crdnControl.setCurrent(dataKey); $P.crdnControl.setCurrent(dataKey);
$("#crdnTbody--${pageName}").setCurrentRow(dataKey); $("#crdnTbody--${pageName}").setCurrentRow(dataKey);
if($P.holdList.includes(dataKey)){
$("#btnDelete--${pageName}").hide();
$("#btnDeleteSameRcptYmd--${pageName}").hide();
} else {
$("#btnDelete--${pageName}").show();
$("#btnDeleteSameRcptYmd--${pageName}").show();
}
} }
$P.dblclickCrdnList = (dataKey) => { $P.dblclickCrdnList = (dataKey) => {
@ -244,6 +300,10 @@ $(document).ready(function(){
fn_securityModeToggle($("#securityMode--top").is(":checked")); fn_securityModeToggle($("#securityMode--top").is(":checked"));
$P.scrollable = true; $P.scrollable = true;
$P.holdList.forEach(function(item){
$("#crdnTbody--${pageName}").find("tr[data-key='"+item+"']").addClass("bg-dark");
});
} }
$P.getParams = () => { $P.getParams = () => {
@ -254,13 +314,65 @@ $(document).ready(function(){
return data; return data;
} }
$P.fnHold = () => {
var curKey = $P.crdnControl.getCurrent()["CRDN_ID"];
if($P.holdList.includes(curKey)){
return;
}
$P.holdList.push(curKey);
$("#crdnTbody--${pageName}").find("tr[data-key='"+curKey+"']").addClass("bg-dark");
$("#btnDelete--${pageName}").hide();
$("#btnDeleteSameRcptYmd--${pageName}").hide();
}
$P.fnRemove = (rcptYmd) => {
if(rcptYmd != null){
var ds = $P.crdnControl.dataset.getDataset();
var crdnIds = ds.map(function(item){
if(item['CVLCPT_RCPT_YMD'] == rcptYmd && !$P.holdList.includes(item['CRDN_ID'])){
return item["CRDN_ID"];
}
});
$P.crdnControl.select(crdnIds,true);
} else {
var cur = $P.crdnControl.getCurrent();
if(cur == null){
return;
}
var curKey = cur["CRDN_ID"];
$P.crdnControl.select(curKey,true);
}
$P.crdnControl.remove();
}
$P.fnRemoveSameRcptYmd = () => {
var cur = $P.crdnControl.getCurrent();
if(cur == null){
return;
}
var curRcptYmd = cur["CVLCPT_RCPT_YMD"];
dialog.alert({
content : "접수일 : "+dateFormat.format(curRcptYmd)+"<br/>모든 자료를 제거하시겠습니까?"
, onOK : () => {
$P.fnRemove(curRcptYmd);
}
});
}
/************************************************************************** /**************************************************************************
* element.on * element.on
**************************************************************************/ **************************************************************************/
$('#btnReset--${pageName}').on('click', () => $P.fnReset()); $('#btnReset--${pageName}').on('click', () => $P.fnReset());
$('#btnSearch--${pageName}').on('click', () => $P.searchCrdnList()); $('#btnSearch--${pageName}').on('click', () => $P.searchCrdnList());
$("#table-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); }); $("#table-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); });
$("#btnHold--${pageName}").on("click", () => $P.fnHold());
$("#btnDelete--${pageName}").on("click", () => $P.fnRemove());
$("#btnDeleteSameRcptYmd--${pageName}").on("click", () => $P.fnRemoveSameRcptYmd());
/************************************************************************** /**************************************************************************
* 초기화 * 초기화
**************************************************************************/ **************************************************************************/

@ -81,7 +81,7 @@
<div class="card-datatable text-nowrap"> <div class="card-datatable text-nowrap">
<div id="DataTables_Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer"> <div id="DataTables_Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer">
<div id="table-responsive--${pageName}" class="table-responsive" <div id="table-responsive--${pageName}" class="table-responsive"
style="overflow-x: scroll;height:400px;overflow-y: scroll;"> style="overflow-x: scroll;height:550px;overflow-y: scroll;">
<table id="DataTables_Table_0--${pageName}" <table id="DataTables_Table_0--${pageName}"
class="datatables-ajax table table-bordered dataTable no-footer"> class="datatables-ajax table table-bordered dataTable no-footer">
<thead id="crdnThead--${pageName}"> <thead id="crdnThead--${pageName}">

Loading…
Cancel
Save