feat: 단속자료 현황관리 진행

main
minuk926 2 years ago
parent ab90b311f1
commit 32091747ea

@ -7,6 +7,7 @@ import org.apache.ibatis.session.RowBounds;
import egovframework.rte.psl.dataaccess.mapper.Mapper; import egovframework.rte.psl.dataaccess.mapper.Mapper;
import kr.xit.fims.biz.rt.model.RtDTO; import kr.xit.fims.biz.rt.model.RtDTO;
import kr.xit.framework.biz.cmm.model.CmmFileDTO;
@Mapper @Mapper
public interface IRtCrackdownMgtMapper { public interface IRtCrackdownMgtMapper {
@ -30,7 +31,10 @@ public interface IRtCrackdownMgtMapper {
void updateRtPayer(final RtDTO.Payer dto); void updateRtPayer(final RtDTO.Payer dto);
/*void modifyProcErpp(FimsTotalPopupVO vo);*/
List<CmmFileDTO.FileDtl> selectRtRegltAttchFiles(final RtDTO.Request dto);
} }

@ -5,12 +5,14 @@ import java.io.Serializable;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor;
public class RtDTO { public class RtDTO {
/** /**
* DTO * DTO
*/ */
@Data @Data
@NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Builder @Builder
public static class Reglt { public static class Reglt {
@ -172,14 +174,13 @@ public class RtDTO {
* *
*/ */
private String lastOpetr; private String lastOpetr;
} }
/** /**
* DTO * DTO
*/ */
@Data @Data
@NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Builder @Builder
public static class Erpp implements Serializable { public static class Erpp implements Serializable {
@ -236,6 +237,7 @@ public class RtDTO {
* / DTO * / DTO
*/ */
@Data @Data
@NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Builder @Builder
public static class Payer implements Serializable { public static class Payer implements Serializable {
@ -382,6 +384,7 @@ public class RtDTO {
* DTO * DTO
*/ */
@Data @Data
@NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Builder @Builder
public static class ProcessSttusChangeHist implements Serializable { public static class ProcessSttusChangeHist implements Serializable {
@ -426,6 +429,7 @@ public class RtDTO {
* DTO * DTO
*/ */
@Data @Data
@NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Builder @Builder
public static class RegltMapng implements Serializable { public static class RegltMapng implements Serializable {
@ -455,12 +459,30 @@ public class RtDTO {
} }
@Data @Data
@NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Builder @Builder
public static class Request{ public static class Request{
private String vhcleNo;
private String regltId; private String regltId;
private String vhcleNo;
/**
*
*/
private String regltDe; private String regltDe;
/**
*
*/
private String registDt; private String registDt;
/**
*
*/
private String regltSeCode;
/**
*
*/
private String jobSeCode;
} }
} }

@ -6,6 +6,7 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds; import org.apache.ibatis.session.RowBounds;
import kr.xit.fims.biz.rt.model.RtDTO; import kr.xit.fims.biz.rt.model.RtDTO;
import kr.xit.framework.biz.cmm.model.CmmFileDTO;
import kr.xit.framework.biz.cmm.model.XitLoginVO; import kr.xit.framework.biz.cmm.model.XitLoginVO;
import kr.xit.framework.core.utils.XitCmmnUtil; import kr.xit.framework.core.utils.XitCmmnUtil;
@ -15,7 +16,7 @@ public interface IRtCrackdownMgtService {
//----------------------------------------------------- //-----------------------------------------------------
List<RtDTO.Reglt> findRtReglts(final Map<String,Object> paraMap, final RowBounds rowBounds); List<RtDTO.Reglt> findRtReglts(final Map<String,Object> paraMap, final RowBounds rowBounds);
RtDTO.Reglt findRtReglt(final RtDTO.Request dto); <T> RtDTO.Reglt findRtReglt(final T t);
void addRtReglt(final RtDTO.Reglt dto); void addRtReglt(final RtDTO.Reglt dto);
void modifyRtReglt(final RtDTO.Reglt dto); void modifyRtReglt(final RtDTO.Reglt dto);
void removeRtReglt(final RtDTO.Reglt dto); void removeRtReglt(final RtDTO.Reglt dto);
@ -28,7 +29,13 @@ public interface IRtCrackdownMgtService {
List<CmmFileDTO.FileDtl> findRtRegltAttchFiles(RtDTO.Request dto);
default XitLoginVO getUserInfo(){ default XitLoginVO getUserInfo(){
return XitCmmnUtil.getUserInfo(); return XitCmmnUtil.getUserInfo();
} }
} }

@ -9,6 +9,8 @@ import org.springframework.transaction.annotation.Transactional;
import kr.xit.fims.biz.rt.mapper.IRtCrackdownMgtMapper; import kr.xit.fims.biz.rt.mapper.IRtCrackdownMgtMapper;
import kr.xit.fims.biz.rt.model.RtDTO; import kr.xit.fims.biz.rt.model.RtDTO;
import kr.xit.fims.biz.utils.FimsBizUtils;
import kr.xit.framework.biz.cmm.model.CmmFileDTO;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor @RequiredArgsConstructor
@ -24,8 +26,8 @@ public class RtCrackdownMgtService implements IRtCrackdownMgtService {
@Override @Override
@Transactional(readOnly = true) @Transactional(readOnly = true)
public RtDTO.Reglt findRtReglt(final RtDTO.Request dto) { public <T> RtDTO.Reglt findRtReglt(final T t) {
return mapper.selectRtReglt(dto); return mapper.selectRtReglt(t);
} }
@Override @Override
@Transactional @Transactional
@ -64,4 +66,9 @@ public class RtCrackdownMgtService implements IRtCrackdownMgtService {
} }
@Override
public List<CmmFileDTO.FileDtl> findRtRegltAttchFiles(final RtDTO.Request dto) {
dto.setJobSeCode(FimsBizUtils.getFileJobSeCode(dto.getRegltSeCode()));
return mapper.selectRtRegltAttchFiles(dto);
}
} }

@ -1,15 +1,21 @@
package kr.xit.fims.biz.rt.web; package kr.xit.fims.biz.rt.web;
import java.util.Map;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import kr.xit.fims.biz.FimsConst; import kr.xit.fims.biz.FimsConst;
import kr.xit.fims.biz.rt.model.RtDTO; import kr.xit.fims.biz.rt.model.RtDTO;
import kr.xit.fims.biz.rt.service.IRtCrackdownMgtService; import kr.xit.fims.biz.rt.service.IRtCrackdownMgtService;
import kr.xit.framework.core.constants.FrameworkConstants; import kr.xit.framework.core.constants.FrameworkConstants;
import kr.xit.framework.core.model.ResultResponse;
import kr.xit.framework.core.validation.XitBeanValidator; import kr.xit.framework.core.validation.XitBeanValidator;
import kr.xit.framework.support.mybatis.MybatisUtils;
import kr.xit.framework.support.util.AjaxMessageMapRenderer; import kr.xit.framework.support.util.AjaxMessageMapRenderer;
import kr.xit.framework.support.util.Checks; import kr.xit.framework.support.util.Checks;
import kr.xit.framework.support.util.constants.MessageKey; import kr.xit.framework.support.util.constants.MessageKey;
@ -62,6 +68,16 @@ public class RtCrackdownMgtController {
return mav; return mav;
} }
@GetMapping(value = "/findRtReglts")
public ModelAndView findRtReglts(@RequestParam final Map<String,Object> paraMap) {
//new RtDTO.Reglt();
return ResultResponse.of(service.findRtReglts(paraMap, MybatisUtils.getPagingInfo(paraMap)));
}
@GetMapping(value = "/findRtReglt")
public ModelAndView findRtReglt(final String regltId) {
return ResultResponse.of(service.findRtReglt(regltId));
}
@PostMapping(value="/addRtReglt") @PostMapping(value="/addRtReglt")
public ModelAndView addRtReglt(RtDTO.Reglt dto){ public ModelAndView addRtReglt(RtDTO.Reglt dto){
@ -90,4 +106,8 @@ public class RtCrackdownMgtController {
return mav; return mav;
} }
@RequestMapping("/findRtRegltAttchFiles")
public ModelAndView findRtRegltAttchFiles(final RtDTO.Request dto) {
return ResultResponse.of(service.findRtRegltAttchFiles(dto));
}
} }

@ -25,22 +25,33 @@
, trr.regist_dt , trr.regist_dt
, trr.spcmnt_matter , trr.spcmnt_matter
, trr.reglt_process_sttus_code , trr.reglt_process_sttus_code
-- , tecsd.interface_seq_n
FROM tb_rt_reglt trr FROM tb_rt_reglt trr
-- JOIN tb_ec_ctzn_sttemnt_detail tecsd LEFT OUTER JOIN tb_rt_erpp tre
-- ON trr.reglt_id = tecsd.reglt_id ON trr.reglt_id = tre.reglt_id
</sql>
<!--
/* TODO : 차적조회를 안하고 바로 자료 전송 하여 payer를 알수 없음 /* TODO : 차적조회를 안하고 바로 자료 전송 하여 payer를 알수 없음
JOIN tb_rt_payer trp JOIN tb_rt_payer trp
ON trr.payer_id = trp.payer_id ON trr.payer_id = trp.payer_id
*/ */
LEFT OUTER JOIN tb_rt_erpp tre -->
ON trr.reglt_id = tre.reglt_id
</sql>
<select id="selectRtReglts" resultType="kr.xit.fims.biz.rt.model.RtDTO$Reglt"> <select id="selectRtReglts" resultType="kr.xit.fims.biz.rt.model.RtDTO$Reglt">
/* rt-reglt-and-erpp-mysql-mapper|selectRtReglts-단속 목록 조회|julim */ /* rt-reglt-and-erpp-mysql-mapper|selectRtReglts-단속 목록 조회|julim */
/** 단속자료 단건 조회 */ /** 단속자료 단건 조회 */
<include refid="sqlRtReglt"/> <include refid="sqlRtReglt"/>
<where>
<if test='sch_date_opt eq "regltDe"'>
AND trr.reglt_de BETWEEN #{sch_date_from} AND #{sch_date_to}
</if>
<if test='sch_date_opt eq "registDt"'>
AND trr.regist_dt BETWEEN #{sch_date_from} AND #{sch_date_to}
</if>
<if test='vhcleNo != null and vhcleNo != ""'>
AND INSTR(trr.vhcle_no, #{vhcleNo}) > 0
</if>
</where>
</select> </select>
<select id="selectRtReglt" resultType="kr.xit.fims.biz.rt.model.RtDTO$Reglt"> <select id="selectRtReglt" resultType="kr.xit.fims.biz.rt.model.RtDTO$Reglt">
@ -146,4 +157,36 @@
</update> </update>
<!-- *************************************************************************************************************
* 단속자료 첨부파일 목록 조회
************************************************************************************************************** -->
<select id="selectRtRegltAttchFiles" resultType="kr.xit.framework.biz.cmm.model.CmmFileDTO$FileDtl">
/* rt-reglt-and-erpp-mysql-mapper|selectRtRegltAttchFiles-단속자료 첨부파일 목록 조회|julim */
SELECT tcfd.file_mastr_id
, tcfd.file_id
, tcfd.orginl_file_nm
, tcfd.file_cntnts_ty
, tcfd.file_extsn
, tcfd.file_cpcty
, tcfd.file_cours
, tcfd.regist_dt
, tcfd.register
FROM tb_cmm_file_mastr tcfm
JOIN tb_cmm_file_detail tcfd
ON tcfm.file_mastr_id = tcfd.file_mastr_id
WHERE tcfm.job_se_code = #{jobSeCode}
<if test='regltSeCode eq "01" or regltSeCode eq "02" or regltSeCode eq "07"'>
-- 외부연계 : CCTV-고정형, CCTV-이동형, CCTV-버스장착형(버스전용차로)
AND tcfm.file_job_id = (SELECT extrl_reglt_cntc_id
FROM tb_ec_extrl_reglt_cntc
WHERE reglt_id = #{regltId})
</if>
<if test='regltSeCode eq "09"'>
-- 시민신고(국민신문고)
AND tcfm.file_job_id = (SELECT CONCAT(interface_seq_n, ctzn_sttemnt_detail_sn)
FROM tb_ec_ctzn_sttemnt_detail
WHERE reglt_id = #{regltId})
</if>
</select>
</mapper> </mapper>

@ -14,8 +14,8 @@
<li> <li>
<span class="title"><label style="padding-right: 26px;">조회일자 :</label></span> <span class="title"><label style="padding-right: 26px;">조회일자 :</label></span>
<select id="sch_date_opt" name="sch_date_opt" class="selectBox"> <select id="sch_date_opt" name="sch_date_opt" class="selectBox">
<option value="1">단속일자</option> <option value="regltDe">단속일자</option>
<option value="2">등록일자</option> <option value="registDt">등록일자</option>
</select> </select>
<!-- tag lib sample --> <!-- tag lib sample -->
@ -41,7 +41,7 @@
<li style="padding-bottom:10px; padding-left: 40px;"> <li style="padding-bottom:10px; padding-left: 40px;">
<span class="title">상태 : </span> <span class="title">상태 : </span>
<select id="sch_opt" name="sch_opt" class="selectBox"> <select id="sch_opt" name="sch_opt" class="selectBox">
<option value="1">차량번호</option> <option value="vhcleNo">차량번호</option>
</select> </select>
</li> </li>
<input type="text" id="sch_word" name="sch_word" value=""> <input type="text" id="sch_word" name="sch_word" value="">
@ -212,11 +212,19 @@
}; };
const gridDatasource = { const gridDatasource = {
initialRequest: false, // 화면 load시 조회 안함 - default initialRequest: true, // 화면 load시 조회 안함 - default
api: { api: {
readData: { readData: {
url: '<c:url value="/fims/biz/rt/findRt0200List.do"/>' url: '<c:url value="/fims/biz/rt/findRtReglts.do"/>'
,serializer: (params) => fnAddPageInfo(document.frmSearch, params) ,serializer: (params) => {
const param = {
sch_date_opt: $('#sch_date_opt').val()
,sch_date_from: $('#sch_date_from').val()
,sch_date_to: $('#sch_date_to').val()
,[$('#sch_opt').val()]: $('#sch_word').val()
}
return getPageParam(param, params);
}
} }
} }
}; };

@ -148,8 +148,8 @@
downloadImg: () => { downloadImg: () => {
cmmAjax({ cmmAjax({
showSuccessMsg: false showSuccessMsg: false
,url: '<c:url value="/fims/biz/ec/findNatlNewspaperAttchFiles.do"/>' ,url: '<c:url value="/fims/biz/rt/findRtRegltAttchFiles.do"/>'
,data: {interfaceSeqN: '${dto.interfaceSeqN}'} ,data: {regltId:'${dto.regltId}', regltSeCode: '${dto.regltSeCode}'}
,success: (res) => { ,success: (res) => {
cmmImgDownload('#imgList', res.data?.contents, true); cmmImgDownload('#imgList', res.data?.contents, true);
} }
Loading…
Cancel
Save