표지정보 미확인 자료 수정 기능 추가

main
이범준 1 year ago
parent e34274eb0d
commit 9dfd5d8826

@ -10,6 +10,11 @@ import lombok.Setter;
@Getter
@Setter
public class Crdn extends AbstractEntity {
/**
*
*/
private String updateInfomation;
/**
* ID
*/

@ -1,6 +1,7 @@
package cokr.xit.fims.crdn.dao;
import java.util.List;
import java.util.Map;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
@ -39,8 +40,24 @@ public interface Crdn06Mapper extends AbstractMapper {
List<DataObject> selectCrackdowns(CrdnQuery req);
/** .
* @param params
* <ul><li>"crdn" - </li>
* <li>"currentUser" - </li>
* </ul>
* @return
*/
int updateTagInformation(Map<String, Object> params);
/** .
* @param crdn
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
default boolean updateTagInformation(Crdn crdn) {
return crdn != null && updateTagInformation(params().set("crdn", crdn)) == 1;
}
}

@ -23,6 +23,12 @@ public interface Crdn06Service {
*/
List<DataObject> getCrackdownList(CrdnQuery req);
/** .
* @param crdn
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
boolean update(Crdn crdn);
}

@ -49,4 +49,20 @@ public class Crdn06Bean extends AbstractComponent {
}
}
/** .
* @param crdn
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean update(Crdn crdn) {
switch (ifEmpty(crdn.getUpdateInfomation(), () -> "")) {
case "TagInformationUndefinedData":
return crdn06Mapper.updateTagInformation(crdn);
default:
return false; //crdn06Mapper.update(crdn);
}
}
}

@ -6,6 +6,7 @@ import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.service.Crdn06Service;
import cokr.xit.foundation.component.AbstractServiceBean;
@ -26,6 +27,9 @@ public class Crdn06ServiceBean extends AbstractServiceBean implements Crdn06Serv
return crdn06Bean.getCrackdownList(req);
}
@Override
public boolean update(Crdn crdn) {
return crdn06Bean.update(crdn);
}
}

@ -1,10 +1,15 @@
package cokr.xit.fims.crdn.web;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.service.Crdn06Service;
/** .<br />
* { }/crdn/crdn06 .
@ -13,6 +18,9 @@ import cokr.xit.fims.crdn.CrdnQuery;
@Controller
public class TaskCrdn06Controller extends Crdn06Controller {
@Resource(name="crdn06Service")
private Crdn06Service crdn06Service;
@RequestMapping(name="주정차과태료업무 단속자료 목록", value="/010/PVS/list.do")
public ModelAndView getPvsCrackdownList(CrdnQuery req) {
return getCrackdownList(req);
@ -35,6 +43,21 @@ public class TaskCrdn06Controller extends Crdn06Controller {
return getCrackdownList(req.setGrid("TagInformationUndefinedData"));
}
/** .
* @param crdn
* @return jsonView
* <pre><code> {
* "saved": true, false
* }</code></pre>
*/
@PostMapping(name = "단속 대장 수정", value = "/030/DPV/update.do")
public ModelAndView update(Crdn crdn) {
crdn.setUpdateInfomation("TagInformationUndefinedData");
boolean saved = crdn06Service.update(crdn);
return new ModelAndView("jsonView")
.addObject("saved", saved);
}
@RequestMapping(name="주정차과태료업무 과태료 감경 자료 목록", value="/040/PVS/list.do")
public ModelAndView getPvsFineReductionDataList(CrdnQuery req) {
return getCrackdownList(req.setGrid("FineReductionData"));

@ -244,12 +244,12 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
<!-- 영상매체 -->
, C.ATCH_FILE_CNT <!-- 사진건수 -->
, C.CRDN_SN <!-- 단속 일련번호 -->
<!-- 표지확인 -->
, C.CRDN_STTS_CD <!-- 단속 상태 코드 -->
FROM TB_CRDN C
LEFT OUTER JOIN TB_CRDN_CVLCPT CC ON (C.CRDN_ID = CC.CRDN_ID)
LEFT OUTER JOIN TB_TEAM_INFO TI ON (C.TEAM_ID = TI.TEAM_ID)
WHERE C.DEL_YN = 'N'
AND PARKNG_PSBLTY_RSLT_CD = '0'
<if test="by != null and by != '' and term != null">
<choose>
<when test="by == 'crdnInptSeCd'">
@ -282,9 +282,6 @@ AND C.ATCH_FILE_CNT = #{term}
</when>
<when test="by == 'crdnSn'">
AND C.CRDN_SN = #{term}
</when>
<when test="by == '표지확인'">
</when>
<when test="by == 'crdnSttsCd'">
AND FN_GET_CODE_NM('FIM010', C.CRDN_STTS_CD) LIKE CONCAT('%', #{term}, '%')
@ -364,4 +361,13 @@ AND FN_GET_CODE_NM('FIM010', C.CRDN_STTS_CD) LIKE CONCAT('%', #{term}, '%')
<include refid="selectCrackdown"/>
</select>
<update id="updateTagInformation" parameterType="map">
/* 표지정보확인 수정(crdn06Mapper.updateTagInformation) */
UPDATE TB_CRDN
SET PARKNG_PSBLTY_RSLT_CD = '2'
, MDFCN_DT = <include refid="utility.now" /> /* 수정일시 */
, MDFR = #{currentUser.id} /* 수정자 */
WHERE CRDN_ID = #{crdn.crdnId} /* 단속 ID */
</update>
</mapper>

@ -32,16 +32,13 @@
</span>
</div>
<div class="col-6">
<select id="schDateOpt--${pageName}" name="schDateOpt" class="form-select">
<option value="crdnYmd">단속일자</option>
<option value="regDt">등록일자</option>
</select>
<label class="form-label fw-bold form-search-title">단속일자</label>
<span class="form-search-linebox">
<input type="text" id="schDateFrom--${pageName}" name="schDateFrom" class="form-control form-date"
<input type="text" id="schCrdnYmdFrom--${pageName}" name="schCrdnYmdFrom" class="form-control form-date"
data-fmt-type="day" title="시작 날짜 선택" />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
~
<input type="text" id="schDateTo--${pageName}" name="schDateTo" class="form-control form-date"
<input type="text" id="schCrdnYmdTo--${pageName}" name="schCrdnYmdTo" class="form-control form-date"
data-fmt-type="day" title="종료 날짜 선택">
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span>
@ -75,7 +72,7 @@
</div>
<div id="searchDetail--${pageName}" class="container-search container-search-detail collapse">
<div class="row">
<div class="col-12">
<div class="col-6">
<label class="form-label fw-bold form-search-title">자료상태</label>
<select id="crdnSttsCd--${pageName}" name="crdnSttsCd" class="form-select">
<option value="">전체</option>
@ -83,6 +80,21 @@
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</div>
<div class="col-6">
<select id="schDateOpt--${pageName}" name="schDateOpt" class="form-select">
<option value="regDt">등록일자</option>
<option value="mdfcnDt">수정일자</option>
</select>
<span class="form-search-linebox">
<input type="text" id="schDateFrom--${pageName}" name="schDateFrom" class="form-control form-date"
data-fmt-type="day" title="시작 날짜 선택" />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
~
<input type="text" id="schDateTo--${pageName}" name="schDateTo" class="form-control form-date"
data-fmt-type="day" title="종료 날짜 선택">
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span>
</div>
</div>
</div>
@ -188,6 +200,12 @@ $(document).ready(function(){
};
$P.crdnControl.onCurrentChange = item => {
if (!item) return;
let key = item.data.CRDN_ID;
$("#crdnTbody--${pageName}").setCurrentRow(key);
}
$P.fnResetAndChangeBiz = taskSeCd => {
$("#crdnTbody--${pageName}").html("");
@ -278,8 +296,8 @@ $(document).ready(function(){
//달력 초기화
initDatepicker("frmSearch--${pageName}");
$('#schDateFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date);
$('#schDateTo--${pageName}').datepicker('setDate', new Date());
$('#schCrdnYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date);
$('#schCrdnYmdTo--${pageName}').datepicker('setDate', new Date());

@ -69,7 +69,7 @@
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','',this.innerText);">영상매체</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','ATCH_FILE_CNT',this.innerText);">사진건수</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','CRDN_SN',this.innerText);">발행번호</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','',this.innerText);">표지확인</th>
<th width="80">표지확인</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','CRDN_STTS_CD',this.innerText);">처리상태</th>
</tr>
</thead>
@ -87,7 +87,7 @@
<td {onclick} {ondblclick} class="text-center">{매체}</td>
<td {onclick} {ondblclick} class="text-end">{ATCH_FILE_CNT}</td>
<td {onclick} {ondblclick} class="text-end">{CRDN_SN}</td>
<td {onclick} {ondblclick} class="text-start">{표지확인}</td>
<td {onclick} {ondblclick} class="text-center"><input type="checkbox" disabled="disabled" /></td>
<td {onclick} {ondblclick} class="text-center">{CRDN_STTS_CD}</td>
</tr>
</template>
@ -156,6 +156,13 @@ $(document).ready(function(){
});
};
$P.crdnControl.onCurrentChange = item => {
if (!item) return;
let key = item.data.CRDN_ID;
$("#crdnTbody--${pageName}").setCurrentRow(key);
};
$P.searchCrdnList = () => {
$P.crdnControl.query = $P.getParams();
$P.crdnControl.load(1);
@ -221,12 +228,15 @@ $(document).ready(function(){
$('#btnUpdateToConfirmData--${pageName}').on('click', () => {
$P.crdnControl.getCurrent();
if(!$P.crdnControl.getCurrent()) {
dialog.alert({content:"선택된 자료가 없습니다.",timeout: 0, onOK:()=>{}});
return;
};
dialog.alert({
content:"현 자료를 장애차량 확인된 자료로 변경하겠습니까?",
onOK:() => {
$P.crdnControl.save({ '표지정보확인' : 'Y' });
$P.crdnControl.save({ 'crdnId' : $P.crdnControl.getCurrent()["CRDN_ID"] });
}
});
});

@ -157,6 +157,13 @@ $(document).ready(function(){
};
$P.crdnControl.onCurrentChange = item => {
if (!item) return;
let key = item.data.CRDN_ID;
$("#crdnTbody--${pageName}").setCurrentRow(key);
}
$P.fnReset = () => {
$('#schRductYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date);
$('#schRductYmdTo--${pageName}').datepicker('setDate', new Date());

Loading…
Cancel
Save