feat: 민원신청 답변 반영

main
minuk926 2 years ago
parent 50c850d5e7
commit 40d2402793

@ -49,6 +49,23 @@ public class FimsConst {
private final String desc;
}
/**
* <pre>
* () - FIM017
* </pre>
*/
@Getter
@AllArgsConstructor
public enum CtznStmtStsCode {
UNPROCESSED("01", "미처리"),
ANS_AVAILABLE("02", "답변가능"),
ANS_COMPLETE("03", "답변완료")
;
private final String code;
private final String desc;
}
/**
* <pre>
* () - FIM018
@ -56,7 +73,7 @@ public class FimsConst {
*/
@Getter
@AllArgsConstructor
public enum CtznSttemntStatusCode {
public enum CtznStmtDtlStsCode {
UNPROCESSED("01", "미처리"),
ACCEPTANCE("02", "수용"),
NOT_ACCEPTABLE("03", "불수용")

@ -38,6 +38,7 @@ public interface IEcCtznSttemntMapper {
CtznStmtDTO.CtznStmtAns selectEcCtznSttemntAnswer(final CtznStmtDTO.Request dto);
void updateStatusAndRegltIdOfEcCtznSttemntDetail(final CtznStmtDTO.Request dto);
<T> void updateStmtProcessStsOfEcCtznSttemnt(T t);
void saveEcCtznSttemntAnswer(final CtznStmtDTO.CtznStmtAns dto);
@ -49,4 +50,6 @@ public interface IEcCtznSttemntMapper {
List<CmmFileDTO> dragAndDropIsExists(CmmFileDTO.FileDtl vo);
}

@ -206,6 +206,7 @@ public class CtznStmtDTO implements Serializable { //extends ExtlEsbDataType {
private String register;
private String updtDt;
private String updusr;
private String ctznSttemntProcessSttus;
private Set<Integer> indexs = new HashSet<>();
@ -289,6 +290,9 @@ public class CtznStmtDTO implements Serializable { //extends ExtlEsbDataType {
*/
private String register;
private String ctznSttemntStatusCode = FimsConst.CtznStmtStsCode.ANS_COMPLETE.getCode();
private String updusr;
public static NatlNewspaperSendXmlDTO getCtznStmtAnsDTO(CtznStmtDTO.CtznStmtAns dto) {
return NatlNewspaperSendXmlDTO.builder()
.interfaceSeqN(dto.getInterfaceSeqN())
@ -329,6 +333,7 @@ public class CtznStmtDTO implements Serializable { //extends ExtlEsbDataType {
private String regltProcessSttusCode;
private String ctznSttemntStatusCode;
private String ctznSttemntDetailProcessSttus;
// 단속ID
private String regltId;
private String erppId;

@ -233,7 +233,7 @@ public class EcCctvCrackdownService implements IEcCctvCrackdownService {
mapper.insertRtRegltFromEcExtrRegltCntc(dto);
dto.setUpdusr(getUserInfo().getUniqId());
dto.setExtrlRegltCntcProcessSttus(FimsConst.CtznSttemntStatusCode.ACCEPTANCE.getCode());
dto.setExtrlRegltCntcProcessSttus(FimsConst.CtznStmtDtlStsCode.ACCEPTANCE.getCode());
mapper.updateStatusAndRegltIdOfEcExtrRegltCntc(dto);
}
@ -253,7 +253,7 @@ public class EcCctvCrackdownService implements IEcCctvCrackdownService {
// 상태 변경
dto.setUpdusr(getUserInfo().getUniqId());
dto.setExtrlRegltCntcProcessSttus(FimsConst.CtznSttemntStatusCode.NOT_ACCEPTABLE.getCode());
dto.setExtrlRegltCntcProcessSttus(FimsConst.CtznStmtDtlStsCode.NOT_ACCEPTABLE.getCode());
mapper.updateStatusAndRegltIdOfEcExtrRegltCntc(dto);
}

@ -99,13 +99,19 @@ public class EcCtznSttemntService implements IEcCtznSttemntService {
@Override
@Transactional
public void saveRtReglt(final CtznStmtDTO.Request dto) {
// 단속테이블
dto.setRegister(getUserInfo().getUniqId());
dto.setRegltProcessSttusCode(FimsConst.RegltProcessSttusCode.CRACKDOWN.getCode());
mapper.insertRtRegltFromCtznStmt(dto);
// 시민신고 상세 상태 변경
dto.setUpdusr(getUserInfo().getUniqId());
dto.setCtznSttemntStatusCode(FimsConst.CtznSttemntStatusCode.ACCEPTANCE.getCode());
dto.setCtznSttemntDetailProcessSttus(FimsConst.CtznStmtDtlStsCode.ACCEPTANCE.getCode());
mapper.updateStatusAndRegltIdOfEcCtznSttemntDetail(dto);
// 시민신고 상태 답변가능으로 - 시민신고상세의 모든 상태가 수용 또는 미수용인 경우
dto.setCtznSttemntStatusCode(FimsConst.CtznStmtStsCode.ANS_AVAILABLE.getCode());
mapper.updateStmtProcessStsOfEcCtznSttemnt(dto);
}
//-----------------------------------------------------
@ -122,10 +128,14 @@ public class EcCtznSttemntService implements IEcCtznSttemntService {
// 서손테이블
mapper.insertRtErppFromCtznStmt(dto);
// 상태 변경
// 시민신고 상세 상태 변경
dto.setUpdusr(getUserInfo().getUniqId());
dto.setCtznSttemntStatusCode(FimsConst.CtznSttemntStatusCode.NOT_ACCEPTABLE.getCode());
dto.setCtznSttemntDetailProcessSttus(FimsConst.CtznStmtDtlStsCode.NOT_ACCEPTABLE.getCode());
mapper.updateStatusAndRegltIdOfEcCtznSttemntDetail(dto);
// 시민신고 상태 답변가능으로 - 시민신고상세의 모든 상태가 수용 또는 미수용인 경우
dto.setCtznSttemntStatusCode(FimsConst.CtznStmtStsCode.ANS_AVAILABLE.getCode());
mapper.updateStmtProcessStsOfEcCtznSttemnt(dto);
}
//-----------------------------------------------------
@ -172,6 +182,11 @@ public class EcCtznSttemntService implements IEcCtznSttemntService {
dto.setRegister(getUserInfo().getUniqId());
mapper.saveEcCtznSttemntAnswer(dto);
// 시민신고 상태 - 답변완료 update
dto.setUpdusr(getUserInfo().getUniqId());
dto.setCtznSttemntStatusCode(FimsConst.CtznStmtStsCode.ANS_COMPLETE.getCode());
mapper.updateStmtProcessStsOfEcCtznSttemnt(dto);
return tgtPath + "/" + fileName;
}

@ -214,7 +214,7 @@ public class EcNatlNewspaperService implements IEcNatlNewspaperService {
dto.setCvplReqstDt(xmlDto.getPetiRegD());
dto.setCvplProcessPd(xmlDto.getPetiEndD());
dto.setCvplRegistDt(xmlDto.getRegD());
dto.setCtznSttemntProcessSttus(FimsConst.CtznSttemntStatusCode.UNPROCESSED.getCode());
dto.setCtznSttemntProcessSttus(FimsConst.CtznStmtDtlStsCode.UNPROCESSED.getCode());
dto.setRegister(getUserInfo().getUniqId());
//---------------------------------
@ -250,7 +250,7 @@ public class EcNatlNewspaperService implements IEcNatlNewspaperService {
//공통 추가 항목
dtlDto.setInterfaceSeqN(xmlDto.getInterfaceSeqN());
dtlDto.setCtznSttemntDetailProcessSttus(FimsConst.CtznSttemntStatusCode.UNPROCESSED.getCode());
dtlDto.setCtznSttemntDetailProcessSttus(FimsConst.CtznStmtDtlStsCode.UNPROCESSED.getCode());
dtlDto.setSysCode(getUserInfo().getOrgnztId());
dtlDto.setInsttCode(getUserInfo().getPstinstCode());
dtlDto.setRegister(getUserInfo().getUniqId());

@ -98,23 +98,26 @@
* tb_ec_ctzn_sttemnt_detail : 시민신고 상세
************************************************************************************************************** -->
<sql id="sqlEcCtznStmtDtl">
SELECT interface_seq_n
, ctzn_sttemnt_detail_sn
, vhcle_no
, reglt_id
, instt_code
, sys_code
, reglt_de_time
, reglt_place
, violt_dtls_nm
, gps_x
, gps_y
, ctzn_sttemnt_detail_process_sttus
, regist_dt
, register
, updt_dt
, updusr
FROM tb_ec_ctzn_sttemnt_detail
SELECT tecsd.interface_seq_n
, tecsd.ctzn_sttemnt_detail_sn
, tecsd.vhcle_no
, tecsd.reglt_id
, tecsd.instt_code
, tecsd.sys_code
, tecsd.reglt_de_time
, tecsd.reglt_place
, tecsd.violt_dtls_nm
, tecsd.gps_x
, tecsd.gps_y
, tecsd.ctzn_sttemnt_detail_process_sttus
, tecsd.regist_dt
, tecsd.register
, tecsd.updt_dt
, tecsd.updusr
, (SELECT ctzn_sttemnt_process_sttus
FROM tb_ec_ctzn_sttemnt
WHERE interface_seq_n = tecsd.interface_seq_n) AS ctzn_sttemnt_process_sttus
FROM tb_ec_ctzn_sttemnt_detail tecsd
</sql>
<select id="selectEcCtznSttemntDetails" resultType="kr.xit.fims.biz.ec.model.CtznStmtDTO$CtznStmtDtl">
@ -122,10 +125,10 @@
<include refid="sqlEcCtznStmtDtl"/>
<where>
<if test='interfaceSeqN != null and interfaceSeqN != ""'>
AND interface_seq_n = #{interfaceSeqN}
AND tecsd.interface_seq_n = #{interfaceSeqN}
</if>
<if test='ctznSttemntDetailSn != null and ctznSttemntDetailSn != ""'>
AND ctzn_sttemnt_detail_sn = #{ctznSttemntDetailSn}
AND tecsd.ctzn_sttemnt_detail_sn = #{ctznSttemntDetailSn}
</if>
</where>
</select>
@ -133,8 +136,8 @@
<select id="selectEcCtznSttemntDetail" resultType="kr.xit.fims.biz.ec.model.CtznStmtDTO$CtznStmtDtl">
/* ec-ctzn-sttemnt-mysql-mapper|selectEcCtznSttemntDetail-민원연계(국민신문고) 상세 조회|julim */
<include refid="sqlEcCtznStmtDtl"/>
WHERE interface_seq_n = #{interfaceSeqN}
AND ctzn_sttemnt_detail_sn = #{ctznSttemntDetailSn}
WHERE tecsd.interface_seq_n = #{interfaceSeqN}
AND tecsd.ctzn_sttemnt_detail_sn = #{ctznSttemntDetailSn}
</select>
<insert id="insertEcCtznSttemntDetail">
@ -300,13 +303,28 @@
/* 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}
, ctzn_sttemnt_detail_process_sttus = #{ctznSttemntDetailProcessSttus}
, updt_dt = DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
, updusr = #{updusr}
WHERE interface_seq_n = #{interfaceSeqN}
AND ctzn_sttemnt_detail_sn = #{ctznSttemntDetailSn}
</update>
<update id="updateStmtProcessStsOfEcCtznSttemnt">
/* ec-ctzn-sttemnt-mysql-mapper|updateStmtProcessStsOfEcCtznSttemnt-시민신고 진행상태 update : 답변완료 or 답변가능|julim */
UPDATE tb_ec_ctzn_sttemnt
SET ctzn_sttemnt_process_sttus = IF(#{ctznSttemntStatusCode} = '03', #{ctznSttemntStatusCode}
, IF((SELECT COUNT(interface_seq_n)
FROM tb_ec_ctzn_sttemnt_detail
WHERE interface_seq_n = #{interfaceSeqN}
AND ctzn_sttemnt_detail_process_sttus = '01') > 0, ctzn_sttemnt_process_sttus,
#{ctznSttemntStatusCode})
)
, updt_dt = DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
, updusr = #{updusr}
WHERE interface_seq_n = #{interfaceSeqN}
</update>
<select id="selectEcCtznSttemntAnswer" resultType="kr.xit.fims.biz.ec.model.CtznStmtDTO$CtznStmtAns">
/* ec-ctzn-sttemnt-mysql-mapper|selectEcCtznSttemntAnswer-시민신고답변 생성 데이타 조회|cjm */
SELECT teei.interface_seq_n

@ -240,11 +240,19 @@
},
},
{
header: '단속ID',
name: 'regltId',
header: '민원처리상태',
name: 'ctznSttemntProcessSttus',
minWidth: 80,
sortable: false,
align: 'center'
align: 'center',
formatter: 'listItemText',
disabled: true,
editor: {
type: "select",
options: {
listItems: ComboCodeData.ctznSttemntProcessSttus
}
},
},
{
header: '답변',
@ -256,7 +264,7 @@
type: CustomButtonRenderer,
options: {
formatter: (props)=>{
if(props.grid.getRow(props.rowKey).ctznSttemntDetailProcessSttus === '01') {
if(props.grid.getRow(props.rowKey).ctznSttemntProcessSttus !== '01') {
return {
formatter: '답변 생성'
, element: "text"
@ -268,6 +276,13 @@
}
}
},
{
header: '단속ID',
name: 'regltId',
minWidth: 80,
sortable: false,
align: 'center'
},
{
header: 'GPS 위도',
name: 'gpsX',

Loading…
Cancel
Save