feat: 시민신고 > 단속자료 생성 진행

main
minuk926 2 years ago
parent 0a4cd497b5
commit dfb9bb9d84

@ -63,12 +63,16 @@ public class FimsConst {
}
/**
*
* <pre>
* () - FIM018
* </pre>
*/
@Getter
@AllArgsConstructor
public enum CtznSttemntStatusCode {
UNTREATED("01", "미처리")
UNPROCESSED("01", "미처리"),
ACCEPTANCE("02", "수용"),
NOT_ACCEPTABLE("03", "불수용")
;
private final String code;
@ -76,19 +80,58 @@ public class FimsConst {
}
/**
*
* <pre>
* - FIM002
* 01, 02...
* etc prefix sequence PK
* </pre>
*/
@Getter
@AllArgsConstructor
public enum FIM002 {
public enum RegltSeCode {
CTZ("CTZ", "민원-시민신고(국민신문고)")
;
private final String code;
private final String desc;
}
/**
* <pre>
*
* </pre>
*/
@Getter
@AllArgsConstructor
public enum InputSeCode {
CITY("01", "시청"),
DISTRICT("02", "구청"),
CITIZEN("03", "시민")
;
private final String code;
private final String desc;
}
/**
* <pre>
* - FIM010
* </pre>
*/
@Getter
@AllArgsConstructor
public enum RegltProcessSttusCode {
CRACKDOWN_UNCONFIRMED("01", "단속미확정"),
CRACKDOWN("10", "단속"),
DESTRUCTION("11", "서손"),
ACCEPT_OPINIONS("12", "의견진술수용"),
IMPOSE("20", "부과")
;
private final String code;
private final String desc;
}
}

@ -34,5 +34,5 @@ public interface IEcCtznSttemntMapper {
//-----------------------------------------------------
void insertRtErppFromCtznStmt(final CtznStmtDTO.Request dto);
void updateRegltIdOfEcCtznSttemntDetail(final CtznStmtDTO.Request dto);
void updateStatusAndRegltIdOfEcCtznSttemntDetail(final CtznStmtDTO.Request dto);
}

@ -222,9 +222,13 @@ public class CtznStmtDTO implements Serializable { //extends ExtlEsbDataType {
private String interfaceSeqN;
private String ctznSttemntDetailSn;
// 단속자료 생성을 위한 필드
private String register;
private String pkPrefix = FimsConst.FIM002.CTZ.getCode();
private String regltSeCode = FimsConst.RegltSeCode.CTZ.getCode();
private String jobSeCode = FimsConst.FileJobSeCode.NATL_NEWS_PAPER_RCV.getCode();
private String inputSeCode = FimsConst.InputSeCode.CITIZEN.getCode();
private String regltProcessSttusCode;
private String ctznSttemntStatusCode;
// 단속ID
private String regltId;
private String updusr;

@ -85,9 +85,12 @@ public class EcCtznSttemntService implements IEcCtznSttemntService {
@Transactional
public void saveRtReglt(final CtznStmtDTO.Request dto) {
dto.setRegister(getUserUniqId());
dto.setUpdusr(getUserUniqId());
dto.setRegltProcessSttusCode(FimsConst.RegltProcessSttusCode.CRACKDOWN.getCode());
mapper.insertRtRegltFromCtznStmt(dto);
mapper.updateRegltIdOfEcCtznSttemntDetail(dto);
dto.setUpdusr(getUserUniqId());
dto.setCtznSttemntStatusCode(FimsConst.CtznSttemntStatusCode.ACCEPTANCE.getCode());
mapper.updateStatusAndRegltIdOfEcCtznSttemntDetail(dto);
}
//-----------------------------------------------------
@ -97,8 +100,11 @@ public class EcCtznSttemntService implements IEcCtznSttemntService {
@Transactional
public void saveRtErpp(final CtznStmtDTO.Request dto) {
dto.setRegister(getUserUniqId());
dto.setUpdusr(getUserUniqId());
dto.setRegltProcessSttusCode(FimsConst.RegltProcessSttusCode.DESTRUCTION.getCode());
mapper.insertRtErppFromCtznStmt(dto);
mapper.updateRegltIdOfEcCtznSttemntDetail(dto);
dto.setUpdusr(getUserUniqId());
dto.setCtznSttemntStatusCode(FimsConst.CtznSttemntStatusCode.NOT_ACCEPTABLE.getCode());
mapper.updateStatusAndRegltIdOfEcCtznSttemntDetail(dto);
}
}

@ -193,7 +193,7 @@ public class EcNatlNewspaperService implements IEcNatlNewspaperService {
dto.setCvplReqstDt(xmlDto.getPetiRegD());
dto.setCvplProcessPd(xmlDto.getPetiEndD());
dto.setCvplRegistDt(xmlDto.getRegD());
dto.setCtznSttemntProcessSttus(FimsConst.CtznSttemntStatusCode.UNTREATED.getCode());
dto.setCtznSttemntProcessSttus(FimsConst.CtznSttemntStatusCode.UNPROCESSED.getCode());
dto.setRegister(getUserUniqId());
//---------------------------------
@ -230,7 +230,7 @@ public class EcNatlNewspaperService implements IEcNatlNewspaperService {
//공통 추가 항목
dtlDto.setInterfaceSeqN(xmlDto.getInterfaceSeqN());
dtlDto.setRegister(getUserUniqId());
dtlDto.setCtznSttemntDetailProcessSttus(FimsConst.CtznSttemntStatusCode.UNTREATED.getCode());
dtlDto.setCtznSttemntDetailProcessSttus(FimsConst.CtznSttemntStatusCode.UNPROCESSED.getCode());
dtlList.add(dtlDto);
isFirst = false;
}
@ -500,7 +500,7 @@ public class EcNatlNewspaperService implements IEcNatlNewspaperService {
dto.setCvplProcessPd(xmlDto.getPetiEndD());
//TODO: ???
dto.setCvplRegistDt(xmlDto.getRegD());
dto.setCtznSttemntProcessSttus(FimsConst.CtznSttemntStatusCode.UNTREATED.getCode());
dto.setCtznSttemntProcessSttus(FimsConst.CtznSttemntStatusCode.UNPROCESSED.getCode());
//dto.setCtznSttemntProcessSttus();
dto.setRegister("");
@ -538,7 +538,7 @@ public class EcNatlNewspaperService implements IEcNatlNewspaperService {
//공통 추가 항목
dtlDto.setInterfaceSeqN(xmlDto.getInterfaceSeqN());
dtlDto.setRegister("");
dtlDto.setCtznSttemntDetailProcessSttus(FimsConst.CtznSttemntStatusCode.UNTREATED.getCode());
dtlDto.setCtznSttemntDetailProcessSttus(FimsConst.CtznSttemntStatusCode.UNPROCESSED.getCode());
dtlList.add(dtlDto);
isFirst = false;
}

@ -0,0 +1,5 @@
CREATE UNIQUE INDEX uix_tb_cmm_file_mastr_01
ON tb_cmm_file_mastr (job_se_code, file_job_id);
CREATE UNIQUE INDEX uix_tb_ec_ctzn_sttemnt_detail_01
ON tb_ec_ctzn_sttemnt_detail (reglt_id);

@ -201,9 +201,9 @@
<insert id="insertRtRegltFromCtznStmt">
/* ec-ctzn-sttemnt-mysql-mapper|insertRtRegltFromCtznStmt-시민신고 단속자료 생성|julim */
<selectKey resultType="string" keyProperty="regltId" order="BEFORE">
SELECT CONCAT(#{pkPrefix}, LPAD(IFNULL(SUBSTR(MAX(reglt_id), 4),1), 13, '0'))
FROM tb_rt_reglt csd
WHERE reglt_id LIKE CONCAT(#{pkPrefix})
SELECT CONCAT(#{regltSeCode}, LPAD(IFNULL(SUBSTR(MAX(reglt_id), 4) + 1, 1), 13, '0'))
FROM tb_rt_reglt
WHERE reglt_id LIKE CONCAT(#{regltSeCode}, '%')
</selectKey>
INSERT INTO tb_rt_reglt (
reglt_id
@ -234,7 +234,7 @@
, ecsd.instt_code
, ecsd.sys_code
, (SELECT code FROM xit_cmmn_detail_code WHERE code_id = 'FIM002' AND etc_1 = 'CTZ')
, '' -- 입력 구분 코드
, #{inputSeCode} -- 입력 구분 코드
, SUBSTR(ecsd.reglt_de_time, 1, 8)
, SUBSTR(ecsd.reglt_de_time, 9) -- 단속 시작 시간
, SUBSTR(ecsd.reglt_de_time, 9) -- 단속 종료 시간
@ -249,14 +249,14 @@
, 'N' -- 견인 여부 코드
, '' -- 이미지 구분 코드
, '' -- 동영상 파일명
, (SELECT COUNT(tcfd.file_id)
, (SELECT COUNT(tcfd.file_id) - 1
FROM tb_cmm_file_mastr tcfm
JOIN tb_cmm_file_detail tcfd
ON tcfm.job_se_code = #{jobSeCode}
AND tcfm.file_job_id = CONCAT(#{interfaceSeqN}, #{ctznSttemntDetailSn})
AND tcfm.file_mastr_id = tcfd.file_mastr_id) -- 이미지 매수 FIXME: 매핑테이블 정의후 반영 (위반 내역 코드)
, ecsd.vhcle_no
, '10' -- 단속:10, 서손:11
, #{regltProcessSttusCode} -- 단속:10, 서손:11
, DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
, #{register}
FROM tb_ec_ctzn_sttemnt_detail ecsd
@ -271,10 +271,11 @@
</insert>
<update id="updateRegltIdOfEcCtznSttemntDetail">
/* ec-ctzn-sttemnt-mysql-mapper|updateRegltIdOfEcCtznSttemntDetail-시민신고 상세 단속ID set|julim */
<update id="updateStatusAndRegltIdOfEcCtznSttemntDetail">
/* ec-ctzn-sttemnt-mysql-mapper|updateStatusAndRegltIdOfEcCtznSttemntDetail-시민신고 상세 단속ID set|julim */
UPDATE tb_ec_ctzn_sttemnt_detail
SET reglt_id = #{regltId}
, ctzn_sttemnt_detail_process_sttus = #{ctznSttemntStatusCode}
, updt_dt = DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
, updusr = #{updusr}
WHERE interface_seq_n = #{interfaceSeqN}

@ -130,10 +130,12 @@
<c:out value="${bizName}"/>(<c:out value="${reqDTO.interfaceSeqN}"/> - ${dtlDTO.ctznSttemntDetailSn}) 상세
</span>
<span class="flr" id="${dtlDTO.ctznSttemntDetailSn}" >
<c:if test="${dtlDTO.regltId eq null or dtlDTO.regltId eq ''}">
<a href="#" class="btn blue" onclick="fnBiz.save('${dtlDTO.ctznSttemntDetailSn}')">저장</a>
<a href="#" class="btn red" onclick="fnBiz.remove('${dtlDTO.ctznSttemntDetailSn}')">삭제</a>
<a href="#" class="btn darkgray" onclick="fnBiz.reglt('${dtlDTO.ctznSttemntDetailSn}')">단속처리</a>
<a href="#" class="btn darkgray" onclick="fnBiz.erpp('${dtlDTO.ctznSttemntDetailSn}')">서손처리</a>
</c:if>
</span>
</div>
<table class="tbl03">

Loading…
Cancel
Save