diff --git a/src/main/java/kr/xit/fims/biz/FimsConst.java b/src/main/java/kr/xit/fims/biz/FimsConst.java index a40da119..1882a6e5 100644 --- a/src/main/java/kr/xit/fims/biz/FimsConst.java +++ b/src/main/java/kr/xit/fims/biz/FimsConst.java @@ -76,7 +76,7 @@ public class FimsConst { public enum CtznStmtDtlStsCode { UNPROCESSED("01", "미처리"), ACCEPTANCE("02", "수용"), - NOT_ACCEPTABLE("03", "불수용") + NON_ACCEPTABLE("03", "불수용") ; private final String code; diff --git a/src/main/java/kr/xit/fims/biz/cmm/mapper/IFimsCrackdownMgtMapper.java b/src/main/java/kr/xit/fims/biz/cmm/mapper/IFimsCrackdownMgtMapper.java index 6c7bf09a..0b84e44e 100644 --- a/src/main/java/kr/xit/fims/biz/cmm/mapper/IFimsCrackdownMgtMapper.java +++ b/src/main/java/kr/xit/fims/biz/cmm/mapper/IFimsCrackdownMgtMapper.java @@ -7,6 +7,7 @@ import org.apache.ibatis.session.RowBounds; import egovframework.rte.psl.dataaccess.mapper.Mapper; import kr.xit.fims.biz.cmm.model.FimsCrackdownDTO; +import kr.xit.fims.biz.ec.model.CtznStmtDTO; import kr.xit.framework.biz.cmm.model.CmmAnsTmplDTO; @Mapper @@ -20,6 +21,8 @@ public interface IFimsCrackdownMgtMapper { String selectRegltSts(final String regltId); void updateRtReglt(final FimsCrackdownDTO.Info dto); void updateProcessStsAndProcessDtRtReglt(final FimsCrackdownDTO.Info dto); + void updateStatusEcCtznSttemntDetail(final CtznStmtDTO.Request dto); + void updateStatusEcCtznSttemnt(final CtznStmtDTO.Request dto); CmmAnsTmplDTO.Dtl selectCtznAnswerTmplInfo(final FimsCrackdownDTO.AnsRequest dto); } diff --git a/src/main/java/kr/xit/fims/biz/cmm/service/FimsCrackdownMgtService.java b/src/main/java/kr/xit/fims/biz/cmm/service/FimsCrackdownMgtService.java index 127bfc25..a878c4cb 100644 --- a/src/main/java/kr/xit/fims/biz/cmm/service/FimsCrackdownMgtService.java +++ b/src/main/java/kr/xit/fims/biz/cmm/service/FimsCrackdownMgtService.java @@ -12,6 +12,8 @@ import org.springframework.transaction.annotation.Transactional; import kr.xit.fims.biz.FimsConst; import kr.xit.fims.biz.cmm.mapper.IFimsCrackdownMgtMapper; import kr.xit.fims.biz.cmm.model.FimsCrackdownDTO; +import kr.xit.fims.biz.ec.mapper.IEcCtznSttemntMapper; +import kr.xit.fims.biz.ec.model.CtznStmtDTO; import kr.xit.fims.biz.rt.mapper.IRtCrackdownMgtMapper; import kr.xit.fims.biz.rt.model.RtDTO; import kr.xit.framework.biz.cmm.model.CmmAnsTmplDTO; @@ -23,6 +25,7 @@ import lombok.RequiredArgsConstructor; public class FimsCrackdownMgtService implements IFimsCrackdownMgtService { private final IFimsCrackdownMgtMapper mapper; private final IRtCrackdownMgtMapper rtCrackdownMgtMapper; + private final IEcCtznSttemntMapper ecCtznSttemntMapper; @Override @Transactional(readOnly = true) @@ -94,21 +97,32 @@ public class FimsCrackdownMgtService implements IFimsCrackdownMgtService { ); } + // 2. 외부연계정보 반영 : - // 시민신고 데이타 - if(FimsConst.RegltSeCode.CITIZEN.getCode().equals(saveDTO.getRegltSeCode()) - && (Checks.isNotEmpty(saveDTO.getInterfaceSeqN()) && Checks.isNotEmpty(saveDTO.getCtznSttemntDetailSn()))){ + if(!FimsConst.RegltSeCode.CITIZEN.getCode().equals(saveDTO.getRegltSeCode()) + && Checks.isNotEmpty(saveDTO.getExtrlRegltCntcId())){ return; } - if(!FimsConst.RegltSeCode.CITIZEN.getCode().equals(saveDTO.getRegltSeCode()) - && Checks.isNotEmpty(saveDTO.getExtrlRegltCntcId())){ + // 시민신고 상세 상태 '02-수용' + // 시민신고 마스터 상태 답변가능(시민신고상세의 모든 상태가 수용 또는 미수용인 경우) 변경 + //if(FimsConst.RegltSeCode.CITIZEN.getCode().equals(saveDTO.getRegltSeCode()) + // && (Checks.isNotEmpty(saveDTO.getInterfaceSeqN()) && Checks.isNotEmpty(saveDTO.getCtznSttemntDetailSn()))){ + CtznStmtDTO.Request ctznRequest = getCtznRequestDTO(saveDTO); + + // 시민신고 상세 상태 '02-수용' + ctznRequest.setCtznSttemntDetailProcessSttus(FimsConst.CtznStmtDtlStsCode.ACCEPTANCE.getCode()); + mapper.updateStatusEcCtznSttemntDetail(ctznRequest); + + // 시민신고 마스터 상태 답변가능(시민신고상세의 모든 상태가 수용 또는 미수용인 경우) 변경 + ctznRequest.setCtznSttemntStatusCode(FimsConst.CtznStmtStsCode.ANS_AVAILABLE.getCode()); + mapper.updateStatusEcCtznSttemnt(ctznRequest); + + //} - return; - } /* interfaceSeqN: $('input[name=interfaceSeqN]').val() ,ctznSttemntDetailSn: $('input[name=ctznSttemntDetailSn]').val() @@ -161,20 +175,30 @@ public class FimsCrackdownMgtService implements IFimsCrackdownMgtService { } // 2. 외부연계정보 반영 : - // 시민신고 데이타 - if(FimsConst.RegltSeCode.CITIZEN.getCode().equals(saveDTO.getRegltSeCode()) - && (Checks.isNotEmpty(saveDTO.getInterfaceSeqN()) && Checks.isNotEmpty(saveDTO.getCtznSttemntDetailSn()))){ + if(!FimsConst.RegltSeCode.CITIZEN.getCode().equals(saveDTO.getRegltSeCode()) + && Checks.isNotEmpty(saveDTO.getExtrlRegltCntcId())){ return; } - if(!FimsConst.RegltSeCode.CITIZEN.getCode().equals(saveDTO.getRegltSeCode()) - && Checks.isNotEmpty(saveDTO.getExtrlRegltCntcId())){ + // 시민신고 상세 상태 '03-미수용' + // 시민신고 마스터 상태 답변가능(시민신고상세의 모든 상태가 수용 또는 미수용인 경우) 변경 + //if(FimsConst.RegltSeCode.CITIZEN.getCode().equals(saveDTO.getRegltSeCode()) + // && (Checks.isNotEmpty(saveDTO.getInterfaceSeqN()) && Checks.isNotEmpty(saveDTO.getCtznSttemntDetailSn()))){ + CtznStmtDTO.Request ctznRequest = getCtznRequestDTO(saveDTO); + + // 시민신고 상세 상태 '02-수용' + ctznRequest.setCtznSttemntDetailProcessSttus(FimsConst.CtznStmtDtlStsCode.NON_ACCEPTABLE.getCode()); + mapper.updateStatusEcCtznSttemntDetail(ctznRequest); + + // 시민신고 마스터 상태 답변가능(시민신고상세의 모든 상태가 수용 또는 미수용인 경우) 변경 + ctznRequest.setCtznSttemntStatusCode(FimsConst.CtznStmtStsCode.ANS_AVAILABLE.getCode()); + mapper.updateStatusEcCtznSttemnt(ctznRequest); + + // } - return; - } /* interfaceSeqN: $('input[name=interfaceSeqN]').val() ,ctznSttemntDetailSn: $('input[name=ctznSttemntDetailSn]').val() @@ -213,6 +237,7 @@ public class FimsCrackdownMgtService implements IFimsCrackdownMgtService { erppDTO.setRegister(getUserInfo().getUniqId()); erppDTO.setSysCode(getUserInfo().getOrgnztId()); + erppDTO.setInsttCode(getUserInfo().getPstinstCode()); rtCrackdownMgtMapper.insertRtErpp(erppDTO); } @@ -223,4 +248,13 @@ public class FimsCrackdownMgtService implements IFimsCrackdownMgtService { dto.setResnCode("01"); return mapper.selectCtznAnswerTmplInfo(dto); } + + private CtznStmtDTO.Request getCtznRequestDTO(final FimsCrackdownDTO.SaveRequest saveDTO){ + return CtznStmtDTO.Request + .builder() + .updusr(getUserInfo().getUniqId()) + .interfaceSeqN(saveDTO.getInterfaceSeqN()) + .ctznSttemntDetailSn(saveDTO.getCtznSttemntDetailSn()) + .build(); + } } diff --git a/src/main/java/kr/xit/fims/biz/ec/service/EcCctvCrackdownService.java b/src/main/java/kr/xit/fims/biz/ec/service/EcCctvCrackdownService.java index ea427a91..7ff67a53 100644 --- a/src/main/java/kr/xit/fims/biz/ec/service/EcCctvCrackdownService.java +++ b/src/main/java/kr/xit/fims/biz/ec/service/EcCctvCrackdownService.java @@ -286,7 +286,7 @@ public class EcCctvCrackdownService implements IEcCctvCrackdownService { // 상태 변경 dto.setUpdusr(getUserInfo().getUniqId()); - dto.setExtrlRegltCntcProcessSttus(FimsConst.CtznStmtDtlStsCode.NOT_ACCEPTABLE.getCode()); + dto.setExtrlRegltCntcProcessSttus(FimsConst.CtznStmtDtlStsCode.NON_ACCEPTABLE.getCode()); mapper.updateStatusAndRegltIdOfEcExtrRegltCntc(dto); } diff --git a/src/main/java/kr/xit/fims/biz/ec/service/EcCtznSttemntService.java b/src/main/java/kr/xit/fims/biz/ec/service/EcCtznSttemntService.java index 7a2f6f7e..5b5ea19a 100644 --- a/src/main/java/kr/xit/fims/biz/ec/service/EcCtznSttemntService.java +++ b/src/main/java/kr/xit/fims/biz/ec/service/EcCtznSttemntService.java @@ -132,7 +132,7 @@ public class EcCtznSttemntService implements IEcCtznSttemntService { // 시민신고 상세 상태 변경 dto.setUpdusr(getUserInfo().getUniqId()); - dto.setCtznSttemntDetailProcessSttus(FimsConst.CtznStmtDtlStsCode.NOT_ACCEPTABLE.getCode()); + dto.setCtznSttemntDetailProcessSttus(FimsConst.CtznStmtDtlStsCode.NON_ACCEPTABLE.getCode()); mapper.updateStatusAndRegltIdOfEcCtznSttemntDetail(dto); // 시민신고 상태 답변가능으로 - 시민신고상세의 모든 상태가 수용 또는 미수용인 경우 diff --git a/src/main/java/kr/xit/fims/biz/rt/model/RtDTO.java b/src/main/java/kr/xit/fims/biz/rt/model/RtDTO.java index 96ebb428..ecedc1ed 100644 --- a/src/main/java/kr/xit/fims/biz/rt/model/RtDTO.java +++ b/src/main/java/kr/xit/fims/biz/rt/model/RtDTO.java @@ -200,9 +200,9 @@ public class RtDTO { */ private String regltId; /** - * 시군구 코드 + * 기관 코드 */ - private String signguCode; + private String insttCode; /** * 시스템 코드 */ diff --git a/src/main/resources/sqlmapper/biz/cmm/cmm-fims-crackdown-mysql-mapper.xml b/src/main/resources/sqlmapper/biz/cmm/cmm-fims-crackdown-mysql-mapper.xml index 54967513..fe175c58 100644 --- a/src/main/resources/sqlmapper/biz/cmm/cmm-fims-crackdown-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/biz/cmm/cmm-fims-crackdown-mysql-mapper.xml @@ -222,4 +222,31 @@ AND tcatd.answer_se_code = #{answerSeCode} -- 서손 FIM021:서손, FIM025:계도 FIM028:부과 AND tcatd.resn_code = #{resnCode} -- 사유코드 : 계도의 경우 등록된 템플릿이 없으면 '00' 기본값, 부과의 경우 '01' 기본값 + + + /* cmm-fims-crackdown-mysql-mapper|updateStatusEcCtznSttemntDetail-시민신고 상세 상태 업데이트|julim */ + UPDATE tb_ec_ctzn_sttemnt_detail + SET 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} + + + + /*cmm-fims-crackdown-mysql-mapper|updateStatusEcCtznSttemnt-시민신고 진행상태 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} + diff --git a/src/main/resources/sqlmapper/biz/ec/ec-ctzn-sttemnt-mysql-mapper.xml b/src/main/resources/sqlmapper/biz/ec/ec-ctzn-sttemnt-mysql-mapper.xml index deb1d2fc..f76b403c 100644 --- a/src/main/resources/sqlmapper/biz/ec/ec-ctzn-sttemnt-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/biz/ec/ec-ctzn-sttemnt-mysql-mapper.xml @@ -292,7 +292,7 @@ INSERT INTO tb_rt_erpp ( erpp_id , reglt_id - , signgu_code + , instt_code , sys_code , erpp_process_de -- 서손 처리 일자 , erpp_se_code -- 서손 구분 코드 @@ -301,7 +301,7 @@ , register ) SELECT #{erppId} , #{regltId} - , null + , ecsd.instt_code , ecsd.sys_code , DATE_FORMAT(NOW(), '%Y%m%d') , '' diff --git a/src/main/resources/sqlmapper/biz/ec/ec-extrl-reglt-cntc-mysql-mapper.xml b/src/main/resources/sqlmapper/biz/ec/ec-extrl-reglt-cntc-mysql-mapper.xml index 6eaa9d5b..d590f02c 100644 --- a/src/main/resources/sqlmapper/biz/ec/ec-extrl-reglt-cntc-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/biz/ec/ec-extrl-reglt-cntc-mysql-mapper.xml @@ -224,7 +224,7 @@ INSERT INTO tb_rt_erpp ( erpp_id , reglt_id - , signgu_code + , instt_code , sys_code , erpp_process_de -- 서손 처리 일자 , erpp_se_code -- 서손 구분 코드 @@ -233,7 +233,7 @@ , register ) SELECT #{erppId} , #{regltId} - , null + , instt_code , sys_code , DATE_FORMAT(NOW(), '%Y%m%d') , '' diff --git a/src/main/resources/sqlmapper/biz/rt/rt-reglt-and-erpp-mysql-mapper.xml b/src/main/resources/sqlmapper/biz/rt/rt-reglt-and-erpp-mysql-mapper.xml index b9578287..60a65145 100644 --- a/src/main/resources/sqlmapper/biz/rt/rt-reglt-and-erpp-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/biz/rt/rt-reglt-and-erpp-mysql-mapper.xml @@ -181,7 +181,7 @@ INTO tb_rt_erpp ( erpp_id , reglt_id - , signgu_code + , instt_code , sys_code , erpp_process_de , erpp_se_code @@ -191,7 +191,7 @@ ) VALUES ( LPAD(NEXTVAL(seq_rt_erpp), 12, '0') , #{regltId} - , #{signguCode} + , #{insttCode} , #{sysCode} , #{erppId} , #{erppSeCode} diff --git a/src/main/webapp/WEB-INF/jsp/fims/biz/cmm/cmmCtznAnswerPreviewPopup.jsp b/src/main/webapp/WEB-INF/jsp/fims/biz/cmm/cmmCtznAnswerPreviewPopup.jsp index 70df0feb..f3dc4513 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/biz/cmm/cmmCtznAnswerPreviewPopup.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/biz/cmm/cmmCtznAnswerPreviewPopup.jsp @@ -1,10 +1,10 @@ <%-- ================================================================================ -File : /fims/biz/cmm/cmmEnlightDisallowPopup.jsp -Name : 서손 / 계도 처리 팝업 - 단속관리>단속현황관리 +File : /fims/biz/cmm/cmmCtznAnswerPreviewPopup.jsp +Name : 답변내용 미리 보기 - 단속관리>단속현황관리>답변처리 탭 Auth : lim.jong.uk -Date : 2022-02-03 -Desc : 서손 / 계도 처리 팝업 +Date : 2022-02-06 +Desc : 답변내용 미리 보기 팝업 ================================================================================ Date Author Description ================================================================================ @@ -26,7 +26,7 @@ Date Author Description - + @@ -71,22 +71,19 @@ Date Author Description ,url: fimsApiUrl.FIND_CTZN_ANS_TMPL_INFO ,data: params ,success: (res) => { - // $('#txtTitle').text( - // ComboCodeData.regltSeCode.filter(d => d.value === res.infoDTO.regltSeCode)[0].text - // ); - // cmmImgDownload('#imgList', res.attchFiles, fnPopupBiz.pagePopup, true, '60px'); - window.opener.ARR_NAV[window.opener.CUR_TAB_IDX].reloadNav($('#prev'), $('#next'), $('span#totCnt')) //fnPopupBiz.resetDisplay(res.ctznDTO?.cvplRceptNo); const data = res.data?.contents; const ansTxts = []; - ansTxts.push(data.prface); - ansTxts.push(data.answerCn) - ansTxts.push(data.tlface) - const ansTxt = ansTxts.join('\r\n \r\n'); - - $('#ansPreviewTxt').text(ansTxt); + if(!data){ + ansTxts.push('답변 불가'); + }else{ + ansTxts.push(data.prface); + ansTxts.push(data.answerCn) + ansTxts.push(data.tlface) + } + $('#ansPreviewTxt').text(ansTxts.join('\n\n')); } }) } diff --git a/src/main/webapp/WEB-INF/jsp/fims/biz/cmm/cmmFimsCrackdownEditPopup.jsp b/src/main/webapp/WEB-INF/jsp/fims/biz/cmm/cmmFimsCrackdownEditPopup.jsp index 04f64681..2800d9d6 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/biz/cmm/cmmFimsCrackdownEditPopup.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/biz/cmm/cmmFimsCrackdownEditPopup.jsp @@ -43,12 +43,10 @@ Date Author Description } - -