fix : 민원테이블 수정

main
이범준 1 year ago
parent e06398412e
commit 936eadace7

@ -1,5 +1,3 @@
CREATE UNIQUE INDEX uix_tb_cmm_file_mastr_01
ON tb_cmm_file_mastr (inf_type, inf_key);
CREATE UNIQUE INDEX uix_tb_ec_ctzn_sttemnt_detail_01
ON tb_ec_ctzn_sttemnt_detail (crdn_id);

@ -189,7 +189,7 @@ public class FimsConst {
}
/**
* : tb_ec_ctzn_sttemnt_cmplt
* : tb_cvlcpt_dscsn_cn
*/
@Getter
@AllArgsConstructor

@ -39,8 +39,6 @@ public class FimsCrackdownDTO {
// 시민신고 마스터 / 상세 key
private String interfaceSeqN;
// 민원심사 상세 key
private String ctznSttemntDetailSn;
// 시민신고 마스터 정보
private String cvlcptRcptNo;
@ -67,11 +65,12 @@ public class FimsCrackdownDTO {
@AllArgsConstructor
@SuperBuilder
public static class Ctzn extends CtznStmtDTO.Mst {
private String ctznSttemntDetailSn;
private String crdnPlc;
private String vltnCn;
private String vhrno;
}
@EqualsAndHashCode(callSuper = true)
@ -86,13 +85,22 @@ public class FimsCrackdownDTO {
// 민원심사 마스터 / 상세 key
private String interfaceSeqN;
// 민원심사 상세 key
private String ctznSttemntDetailSn;
private String crdnSttsCd;
private FimsCrackdownDTO.Info infoDTO;
//private FimsCrackdownDTO.Info infoDTO;
//private FimsCrackdownDTO.Info infoDTO;
private String sggCd;
private String sysSeCd;
private String crdnInptSeCd;
private String vltnCn;
private String crdnRegSeCd;
private String gpsX;
private String gpsY;
private String crdnYmdTime;
private String rgtr;
private String mdfr;
}
@Data
@ -127,8 +135,6 @@ public class FimsCrackdownDTO {
// 민원심사 마스터 / 상세 key
private String interfaceSeqN;
// 민원심사 상세 key
private String ctznSttemntDetailSn;
private FimsCrackdownDTO.Info infoDTO;
private FimsCrackdownDTO.Ctzn ctznDTO;
@ -147,8 +153,7 @@ public class FimsCrackdownDTO {
// 민원심사 마스터 / 상세 key
private String interfaceSeqN;
// 민원심사 상세 key
private String ctznSttemntDetailSn;
private String crdnSttsCd;
private String enlightResnCode;
@ -172,15 +177,15 @@ public class FimsCrackdownDTO {
/**
* id
*/
private String cmpltId;
private String cvlcptDscsnId;
/**
*
*/
private String content;
private String dscsnCn;
/**
*
*/
private String gubun;
private String cvlcptSeCd;
/**
*
*/

@ -23,9 +23,6 @@ public interface FimsCrackdownMgtMapper {
String selectRegltSts(final String crdnId);
void updateRtReglt(final FimsCrackdownDTO.Info dto);
void updateProcessStsAndProcessDtRtReglt(final FimsCrackdownDTO.Info dto);
void updateStatusEcCtznSttemntDetail(final CtznStmtDTO.Request dto);
void updateStatusEcCtznSttemnt(final CtznStmtDTO.Request dto);
int selectPossiblecheckAns(final String interfaceSeqN);
void saveEcCtznSttemntAnswer(final CtznStmtDTO.Ans dto);
CtznStmtDTO.Ans selectEcCtznSttemntAnswer(final String interfaceSeqN);

@ -149,10 +149,8 @@ public class FimsCrackdownMgtServiceBean extends AbstractServiceBean implements
// 시민신고인 경우
if(FimsConst.CrdnSeCd.CITIZEN.getCode().equals(saveDTO.getCrdnSeCd())
&& (Checks.isNotEmpty(saveDTO.getInterfaceSeqN()) && Checks.isNotEmpty(saveDTO.getCtznSttemntDetailSn()))) {
ctznDTO.setVhrno(infoDTO.getVhrno());
ctznDTO.setMdfr(getUserInfo().getUniqId());
ecCtznSttemntMapper.updateVhrnoOfEcCtznSttemntDetail(ctznDTO);
&& Checks.isNotEmpty(saveDTO.getInterfaceSeqN()) ) {
updateCtznAndAnswer(saveDTO, infoDTO, FimsConst.CtznStmtDtlStsCode.ACCEPTANCE.getCode(),
FimsConst.AnswerSeCode.IMPOSE.getCode(), "01");
}
@ -208,11 +206,7 @@ public class FimsCrackdownMgtServiceBean extends AbstractServiceBean implements
// 시민신고인 경우
if(FimsConst.CrdnSeCd.CITIZEN.getCode().equals(saveDTO.getCrdnSeCd())
&& (Checks.isNotEmpty(saveDTO.getInterfaceSeqN()) && Checks.isNotEmpty(saveDTO.getCtznSttemntDetailSn()))) {
ctznDTO.setVhrno(infoDTO.getVhrno());
ctznDTO.setMdfr(getUserInfo().getUniqId());
ecCtznSttemntMapper.updateVhrnoOfEcCtznSttemntDetail(ctznDTO);
&& Checks.isNotEmpty(saveDTO.getInterfaceSeqN()) ) {
updateCtznAndAnswer(saveDTO, infoDTO, FimsConst.CtznStmtDtlStsCode.ACCEPTANCE.getCode(),
FimsConst.AnswerSeCode.ENLIGHT.getCode(), infoDTO.getEnlightResnCode());
@ -252,15 +246,8 @@ public class FimsCrackdownMgtServiceBean extends AbstractServiceBean implements
// 시민신고인 경우
if(FimsConst.CrdnSeCd.CITIZEN.getCode().equals(saveDTO.getCrdnSeCd())
&& (Checks.isNotEmpty(saveDTO.getInterfaceSeqN()) && Checks.isNotEmpty(saveDTO.getCtznSttemntDetailSn()))) {
ecCtznSttemntMapper.updateVhrnoOfEcCtznSttemntDetail(
CtznStmtDTO.Dtl.builder()
.interfaceSeqN(saveDTO.getInterfaceSeqN())
.ctznSttemntDetailSn(saveDTO.getCtznSttemntDetailSn())
.vhrno(infoDTO.getVhrno())
.mdfr(getUserInfo().getUniqId())
.build()
);
&& Checks.isNotEmpty(saveDTO.getInterfaceSeqN())) {
updateCtznAndAnswer(saveDTO, infoDTO, FimsConst.CtznStmtDtlStsCode.NON_ACCEPTABLE.getCode(),
FimsConst.AnswerSeCode.DISALLOW.getCode(), erppDTO.getErppSeCode());
}
@ -349,13 +336,7 @@ public class FimsCrackdownMgtServiceBean extends AbstractServiceBean implements
//
// 시민신고 상태 - 답변완료 update
ecCtznSttemntMapper.updateStmtProcessStsOfEcCtznSttemnt(
CtznStmtDTO.Ans.builder()
.interfaceSeqN(interfaceSeqN)
.ctznSttemntStatusCode(FimsConst.CtznStmtStsCode.ANS_COMPLETE.getCode())
.mdfr(getUserInfo().getUniqId())
.build()
);
//ecCtznSttemntMapper.update();
return tgtPath + "/" + fileName;
}
@ -378,15 +359,14 @@ public class FimsCrackdownMgtServiceBean extends AbstractServiceBean implements
public void updateCtznAndAnswer(FimsCrackdownDTO.SaveRequest saveDTO, FimsCrackdownDTO.Info infoDTO, final String ctznSttemntDetailStatusCode, final String answerSeCode, final String resnCode) {
// 1. 시민신고 상세 상태 변경
CtznStmtDTO.Request ctznRequest = getCtznRequestDTO(saveDTO);
ctznRequest.setCtznSttemntDetailProcessSttus(ctznSttemntDetailStatusCode);
mapper.updateStatusEcCtznSttemntDetail(ctznRequest);
// 2. 시민신고상세의 모든 상태가 수용 또는 미수용인 경우
if(mapper.selectPossiblecheckAns(infoDTO.getInterfaceSeqN()) == 0){
//if(mapper.selectPossiblecheckAns(infoDTO.getInterfaceSeqN()) == 0){
// 2-1. 시민신고 마스터 상태 답변 가능 상태로 변경
ctznRequest.setCtznSttemntStatusCode(FimsConst.CtznStmtStsCode.ANS_AVAILABLE.getCode());
mapper.updateStatusEcCtznSttemnt(ctznRequest);
//mapper.update(ctznRequest);
// 2-2. 시민신고 답변 데이타 생성
// GET 답변 템플릿
@ -406,7 +386,7 @@ public class FimsCrackdownMgtServiceBean extends AbstractServiceBean implements
.rgtr(getUserInfo().getUniqId())
.build();
mapper.saveEcCtznSttemntAnswer(ansDTO);
}
//}
}
public int findCrackdownVhrnoCnt(final String vhrno){
@ -472,7 +452,6 @@ public class FimsCrackdownMgtServiceBean extends AbstractServiceBean implements
.builder()
.mdfr(getUserInfo().getUniqId())
.interfaceSeqN(saveDTO.getInterfaceSeqN())
.ctznSttemntDetailSn(saveDTO.getCtznSttemntDetailSn())
.build();
}

@ -24,6 +24,7 @@ public class CtznStmtDTO { //extends ExtlEsbDataType {
@SuperBuilder
public static class Mst { //extends ExtlEsbDataType {
private String interfaceSeqN;
private String cvlcptLinkId;
/**
* -anc_code_v
*/
@ -93,35 +94,16 @@ public class CtznStmtDTO { //extends ExtlEsbDataType {
*
*/
private String cvlcptRegistDt;
/**
*
*/
private String ctznSttemntProcessSttus;
private String rgtr;
private String mdfcnDt;
private String mdfr;
private List<CtznStmtDTO.Dtl> stmtDtlDTOs = new ArrayList<>();
private CtznStmtDTO.Dtl dtl = new Dtl();
private boolean isSingle = true;
/**
* <pre>
*
* vhrno:( ""), idx: , lastIdx: ( )
* </pre>
*/
private List<DupData> dupDataList = new ArrayList<>();
}
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ToString
public static class DupData implements Serializable {
private CtznStmtDTO.Dtl sttemntDetailDTO;
private Set<Integer> indexs = new HashSet<>();
}
@Getter
@Setter
@NoArgsConstructor
@ -144,8 +126,8 @@ public class CtznStmtDTO { //extends ExtlEsbDataType {
*
* <pre>
*/
private String ctznSttemntDetailSn;
private String interfaceSeqN;
private String cvlcptLinkId;
/**
* <pre>
* ID
@ -199,15 +181,12 @@ public class CtznStmtDTO { //extends ExtlEsbDataType {
*
*/
private String sysSeCd;
/**
*
*/
private String ctznSttemntDetailProcessSttus;
private String regDt;
private String rgtr;
private String mdfcnDt;
private String mdfr;
private String ctznSttemntProcessSttus;
private Set<Integer> indexs = new HashSet<>();
@ -225,6 +204,7 @@ public class CtznStmtDTO { //extends ExtlEsbDataType {
*
*/
private String interfaceSeqN;
private String cvlcptLinkId;
/**
*
*/
@ -290,10 +270,6 @@ public class CtznStmtDTO { //extends ExtlEsbDataType {
*/
private String rgtr;
/**
* :
*/
private String ctznSttemntStatusCode = FimsConst.CtznStmtStsCode.ANS_COMPLETE.getCode();
private String mdfr;
/**
@ -308,7 +284,7 @@ public class CtznStmtDTO { //extends ExtlEsbDataType {
public static CtznStmtAnsSendDTO getCtznStmtAnsDTO(CtznStmtDTO.Ans dto) {
return CtznStmtAnsSendDTO.builder()
.interfaceSeqN(dto.getInterfaceSeqN())
.interfaceSeqN(dto.getCvlcptLinkId())
.sysGubunC(dto.getSysGubunC())
.ancCodeV(dto.getAncCodeV())
.petiGubunC(dto.getCvlcptAplySeCd())
@ -334,7 +310,10 @@ public class CtznStmtDTO { //extends ExtlEsbDataType {
@ToString
public static class Request {
private String interfaceSeqN;
private String ctznSttemntDetailSn;
private String cvlcptLinkId;
private String sggCd;
private String sysSeCd;
// 단속자료 생성을 위한 필드
private String rgtr;
@ -346,9 +325,12 @@ public class CtznStmtDTO { //extends ExtlEsbDataType {
private String crdnSttsCd;
private String ctznSttemntStatusCode;
private String ctznSttemntDetailProcessSttus;
// 단속ID
private String crdnId;
private String gpsX;
private String gpsY;
private String erppId;
private String mdfr;

@ -3,6 +3,8 @@ package kr.xit.fims.biz.ec.dao;
import java.util.List;
import java.util.Map;
import kr.xit.fims.biz.FimsConst;
import kr.xit.fims.biz.cmm.FimsCrackdownDTO;
import org.apache.ibatis.session.RowBounds;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
@ -18,9 +20,7 @@ public interface EcCtznSttemntMapper {
int insertEcCtznSttemnt(final CtznStmtDTO.Mst dto);
int insertEcCtznSttemntDetail(final CtznStmtDTO.Dtl dtl);
<T> int updateVhrnoOfEcCtznSttemntDetail(final T t);
int deleteEcCtznSttemntDetail(final CtznStmtDTO.Dtl dtl);
int deleteEcCtznSttemnt(final CtznStmtDTO.Dtl dtl);
List<CtznStmtDTO.Mst> selectCtznSttemnts(final Map<String, Object> paraMap, final RowBounds rowBounds);
@ -29,7 +29,7 @@ public interface EcCtznSttemntMapper {
//-----------------------------------------------------
// 단속자료 생성 - 단속 처리
//-----------------------------------------------------
void insertRtRegltFromCtznStmt(final CtznStmtDTO.Request dto);
void insertRtRegltFromCtznStmt(final FimsCrackdownDTO.Request dto);
//-----------------------------------------------------
// 단속자료 생성 - 서손 처리
//-----------------------------------------------------
@ -38,8 +38,6 @@ public interface EcCtznSttemntMapper {
CtznStmtDTO.Ans selectCreateEcCtznSttemntAnswer(final CtznStmtDTO.Request dto);
<T> CtznStmtDTO.Ans selectEcCtznSttemntAnswer(final T t);
void updateStatusAndCrdnIdOfEcCtznSttemntDetail(final CtznStmtDTO.Request dto);
<T> void updateStmtProcessStsOfEcCtznSttemnt(T t);
void saveEcCtznSttemntAnswer(final CtznStmtDTO.Ans dto);

@ -15,13 +15,8 @@ public interface EcCtznSttemntService {
List<CtznStmtDTO.Dtl> findCtznStmtDtls(final CtznStmtDTO.Request reqDTO);
CtznStmtDTO.Dtl findCtznStmtDtl(final CtznStmtDTO.Request reqDTO);
void modifyEcCtznSttemntDetail(final CtznStmtDTO.Dtl dto);
void removeEcCtznSttemntDetail(final CtznStmtDTO.Dtl dto);
void removeEcCtznSttemnt(final CtznStmtDTO.Dtl dto);
//-----------------------------------------------------
// 단속자료 생성 - 단속 처리
//-----------------------------------------------------
void saveRtReglt(final CtznStmtDTO.Request dto);
//-----------------------------------------------------
// 단속자료 생성 - 서손 처리

@ -78,50 +78,25 @@ public class EcCtznSttemntServiceBean extends AbstractServiceBean implements EcC
return mapper.selectEcCtznSttemntDetail(dto);
}
@Override
@Transactional
public void modifyEcCtznSttemntDetail(final CtznStmtDTO.Dtl dto) {
dto.setMdfr(getUserInfo().getUniqId());
mapper.updateVhrnoOfEcCtznSttemntDetail(dto);
}
@Override
@Transactional
public void removeEcCtznSttemntDetail(final CtznStmtDTO.Dtl dto) {
mapper.deleteEcCtznSttemntDetail(dto);
public void removeEcCtznSttemnt(final CtznStmtDTO.Dtl dto) {
mapper.deleteEcCtznSttemnt(dto);
// 첨부파일 삭제
if(dto.isRemoveImageData()){
CmmFileDTO.PaintwebReq pwDTO = CmmFileDTO.PaintwebReq.builder()
.infType(FimsConst.FileInfType.NATL_NEWS_PAPER_RCV.getCode())
.infKey(dto.getInterfaceSeqN()+dto.getCtznSttemntDetailSn())
.infKey(dto.getInterfaceSeqN())
.build();
cmmFileService.removeAllFiles(pwDTO);
}
}
//-----------------------------------------------------
// 단속자료 생성 - 단속 처리
//-----------------------------------------------------
@Override
@Transactional
public void saveRtReglt(final CtznStmtDTO.Request dto) {
// 단속테이블
dto.setCrdnSeCd(FimsConst.CrdnSeCd.CITIZEN.getCode());
dto.setCrdnSttsCd(FimsConst.CrdnSttsCd.CRACKDOWN_INIT.getCode());
dto.setRgtr(getUserInfo().getUniqId());
mapper.insertRtRegltFromCtznStmt(dto);
// 시민신고 상세 상태 변경
dto.setMdfr(getUserInfo().getUniqId());
dto.setCtznSttemntDetailProcessSttus(FimsConst.CtznStmtDtlStsCode.ACCEPTANCE.getCode());
mapper.updateStatusAndCrdnIdOfEcCtznSttemntDetail(dto);
// 시민신고 상태 답변가능으로 - 시민신고상세의 모든 상태가 수용 또는 미수용인 경우
dto.setCtznSttemntStatusCode(FimsConst.CtznStmtStsCode.ANS_AVAILABLE.getCode());
mapper.updateStmtProcessStsOfEcCtznSttemnt(dto);
}
//-----------------------------------------------------
// 단속자료 생성 - 서손 처리
@ -133,19 +108,15 @@ public class EcCtznSttemntServiceBean extends AbstractServiceBean implements EcC
dto.setCrdnSeCd(FimsConst.CrdnSeCd.CITIZEN.getCode());
dto.setRgtr(getUserInfo().getUniqId());
dto.setCrdnSttsCd(FimsConst.CrdnSttsCd.DISALLOW.getCode());
mapper.insertRtRegltFromCtznStmt(dto);
//mapper.(dto);
// 서손테이블
mapper.insertRtErppFromCtznStmt(dto);
// 시민신고 상세 상태 변경
dto.setMdfr(getUserInfo().getUniqId());
dto.setCtznSttemntDetailProcessSttus(FimsConst.CtznStmtDtlStsCode.NON_ACCEPTABLE.getCode());
mapper.updateStatusAndCrdnIdOfEcCtznSttemntDetail(dto);
// 시민신고 상태 답변가능으로 - 시민신고상세의 모든 상태가 수용 또는 미수용인 경우
dto.setCtznSttemntStatusCode(FimsConst.CtznStmtStsCode.ANS_AVAILABLE.getCode());
mapper.updateStmtProcessStsOfEcCtznSttemnt(dto);
//mapper.update(dto);
}
//-----------------------------------------------------
@ -196,8 +167,7 @@ public class EcCtznSttemntServiceBean extends AbstractServiceBean implements EcC
// 시민신고 상태 - 답변완료 update
dto.setMdfr(getUserInfo().getUniqId());
dto.setCtznSttemntStatusCode(FimsConst.CtznStmtStsCode.ANS_COMPLETE.getCode());
mapper.updateStmtProcessStsOfEcCtznSttemnt(dto);
//mapper.update(dto);
return tgtPath + "/" + fileName;
}
@ -237,75 +207,7 @@ public class EcCtznSttemntServiceBean extends AbstractServiceBean implements EcC
}
/*
// TODO: zip file create
public String sendCtznSttemntRespons(CtznStmtDTO.CtznStmtDtl dto) {
final String fileName = dto.getInterfaceSeqN()+dto.getCtznSttemntDetailSn();
List<CmmFileDTO.FileDtl> fileDtlList = cmmFileService.findFilesByInfTypeAndInfKey(
CmmFileDTO.FileMst.builder()
.infType(FimsConst.FileInfType.NATL_NEWS_PAPER_RCV.getCode())
.infKey(dto.getInterfaceSeqN()+dto.getCtznSttemntDetailSn())
.build());
List<File> fileList = new ArrayList<>();
String tgtPath = null;
for (CmmFileDTO.FileDtl dtl : fileDtlList) {
if (Checks.isEmpty(tgtPath))
tgtPath = uploadResPath + dtl.getFilePath();
try {
// 대상폴더 미 존재시 생성
File tgtFile = FileUtils.getFile(tgtPath, dtl.getOrginlFileNm());
FileUtils.copyFile(
FileUtils.getFile(uploadRoot + dtl.getFilePath(), dtl.getFileId())
, tgtFile
, true
);
fileList.add(tgtFile);
} catch (IOException e) {
throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "단속 응답 데이타 생성시 오류 발생[첨부파일 생성 실패]");
}
}
NatlNewspaperSendXmlDTO sendDto = NatlNewspaperSendXmlDTO.builder()
.interfaceSeqN(dto.getInterfaceSeqN())
.pcdRstContL("1. 교통질서 확립에 힘써주신 점에 대해 감사드립니다.\n"
+ "\n"
+ "2. 귀하께서 안전신문고를 통해 신청하신 민원에 대한 검토 결과를 다음과 같이 알려드립니다.\n"
+ "\n"
+ "3. 귀하의 민원내용은 불법 주?정차 신고에 관한 것으로 판단됩니다.\n"
+ "\n"
+ "4. 귀하의 신고에 대해 검토한 결과는 다음과 같습니다.\n"
+ " 가. 해당 차량은 ?도로교통법?제32조, 제33조, 제34조, 제35조에 의거한 불법 주?정차 차량으로 판단됩니다.\n"
+ " 나. 따라서, 위반 차량에 대해 주?정차 위반 과태료 부과 처분이 이루어졌음을 알려드립니다.\n"
+ "\n"
+ "5. 안전을 위한 시민 정신에 감사드리며, 답변 내용에 대한 추가 설명이 필요한 경우 군포시청 차량관리과 주차단속팀 박효주 주무관(☏031-390-0291)에게 연락 주시면 친절히 안내해 드리도록 하겠습니다. 감사합니다.")
.addressV("주소")
.applyGubunC("Y")
.build();
String xmlStr = XmlParseUtils.writeObjectToXml(sendDto, NatlNewspaperSendXmlDTO.class);
// xml 응답데이타
byte[] bytes = xmlStr.getBytes();
Path path = Paths.get(tgtPath + fileName + ".xml");
try {
Files.write(path, bytes);
} catch (IOException e) {
e.printStackTrace();
}
fileList.add(path.toFile());
log.debug("{}", fileList);
// TODO: zip file create
String zipFullFileName = CmmFileUtils.compressZip(fileList, tgtPath, fileName+".zip");
fileList.forEach(f -> {
if(f.exists()) f.delete();
});
return zipFullFileName;
}
*/
}

@ -17,6 +17,7 @@ import java.util.regex.Pattern;
import java.util.stream.Collectors;
import cokr.xit.foundation.component.AbstractServiceBean;
import kr.xit.fims.biz.cmm.FimsCrackdownDTO;
import kr.xit.fims.biz.ec.service.EcNatlNewspaperService;
import kr.xit.fims.framework.biz.cmm.service.XitFrameCodeService;
import org.apache.commons.io.FileExistsException;
@ -88,8 +89,7 @@ public class EcNatlNewspaperServiceBean extends AbstractServiceBean implements E
* <pre>
* xml insert
* 1) esb_interface insert
* 2) tb_ec_ctzn_sttemnt insert
* tb_ex_ctzn_sttemnt_detail insert
* 2) tb_crdn_cvlcpt insert
* 3) tb_cmm_file_mastr insert
* tb_cmm_file_detail insert
* 4) backup
@ -131,86 +131,55 @@ public class EcNatlNewspaperServiceBean extends AbstractServiceBean implements E
CtznStmtDTO.Mst ctznStmtDTO = setCtznSttemntDTOFromRcvXml(xmlDto);
ctznSttemntMapper.insertEcCtznSttemnt(ctznStmtDTO);
CtznStmtDTO.Dtl dtl = ctznStmtDTO.getDtl();
//-------------------------------------------------------------
//시민 신고 상세 / 단속 데이타 / 단속사진 데이타 / 단속사진 파일 생성
//-------------------------------------------------------------
index.set(0);
CmmFileDTO.FileMst fstMstDTO = null;
CmmFileDTO.FileDtl pngDtlDTO = null;
for(CtznStmtDTO.Dtl dtl : ctznStmtDTO.getStmtDtlDTOs()){
// 시민 신고 상세 데이타 생성
dtl.setCtznSttemntDetailProcessSttus(FimsConst.CtznStmtDtlStsCode.UNPROCESSED.getCode());
ctznSttemntMapper.insertEcCtznSttemntDetail(dtl);
// 위반내역 코드와 매핑을 위해 '횡단보도 불법 주정차' -> 횡단보도, '소화전 불법 주정차' -> 소화전 으로
//String vltnCn = Checks.isNotEmpty(dtl.getVltnCn()) ? dtl.getVltnCn().split(" ")[0] : "";
String vltnCn = dtl.getVltnCn();
// 단속데이타 생성을 위한 DTO set
CtznStmtDTO.Request reqDTO = CtznStmtDTO.Request
.builder()
.crdnInptSeCd(FimsConst.CrdnInptSeCd.CITIZEN.getCode())
.crdnSeCd(FimsConst.CrdnSeCd.CITIZEN.getCode())
.infType(FimsConst.FileInfType.NATL_NEWS_PAPER_RCV.getCode())
.interfaceSeqN(dtl.getInterfaceSeqN())
.ctznSttemntDetailSn(dtl.getCtznSttemntDetailSn())
.crdnId(dtl.getCrdnId())
.crdnSttsCd(FimsConst.CrdnSttsCd.CRACKDOWN_INIT.getCode())
.vltnCn(vltnCn)
.crdnRegSeCd(FimsConst.CrdnRegSeCd.AUTO_REGIST.getCode())
.rgtr(getUserInfo().getUniqId())
.build();
//-------------------------------------------------------------
// 첨부파일 저장
//-------------------------------------------------------------
// 신고사진 데이타 생성
// 단속건수가 1건인 경우 파일 전체 저장
if(ctznStmtDTO.isSingle()) {
saveAllAppendFiles(xmlDto, appendFileDto, dtl, fileCnt);
// 단속 데이타 생성 - 단속이미지가 처리후(단속이미지 갯수 count)
ctznSttemntMapper.insertRtRegltFromCtznStmt(reqDTO);
// 단속상태 변경이력 생성
rtCrackdownMgtMapper.insertRtProcessSttsChangeHist(
RtDTO.SttusChangeHist.builder()
.crdnId(reqDTO.getCrdnId())
.crdnSttsCd(reqDTO.getCrdnSttsCd())
.rgtr(getUserInfo().getUniqId())
.build()
);
return;
}
CtznStmtDTO.DupData dupDataDTO = ctznStmtDTO.getDupDataList().stream()
.filter(d -> Objects.equals(d.getSttemntDetailDTO().getVhrno(), dtl.getVhrno()))
.findFirst()
.get();
dtl.getIndexs().addAll(dupDataDTO.getIndexs());
// 위반내역 코드와 매핑을 위해 '횡단보도 불법 주정차' -> 횡단보도, '소화전 불법 주정차' -> 소화전 으로
//String vltnCn = Checks.isNotEmpty(dtl.getVltnCn()) ? dtl.getVltnCn().split(" ")[0] : "";
String vltnCn = dtl.getVltnCn();
// 단속데이타 생성을 위한 DTO set
FimsCrackdownDTO.Request reqDTO = FimsCrackdownDTO.Request
.builder()
.interfaceSeqN(xmlDto.getInterfaceSeqN())
.sggCd(xitFrameCodeService.instCdToSggCd(getUserInfo().getPstinstCode()))
.sysSeCd(getUserInfo().getOrgnztId())
.gpsX(dtl.getGpsX())
.gpsY(dtl.getGpsY())
.vhrno(dtl.getVhrno())
.crdnYmdTime(dtl.getCrdnYmdTime())
.crdnInptSeCd(FimsConst.CrdnInptSeCd.CITIZEN.getCode())
.crdnSeCd(FimsConst.CrdnSeCd.CITIZEN.getCode())
.infType(FimsConst.FileInfType.NATL_NEWS_PAPER_RCV.getCode())
.crdnSttsCd(FimsConst.CrdnSttsCd.CRACKDOWN_INIT.getCode())
.vltnCn(vltnCn)
.crdnRegSeCd(FimsConst.CrdnRegSeCd.AUTO_REGIST.getCode())
.rgtr(getUserInfo().getUniqId())
.build();
// 첨부파일이 있고, 단속사진 업로드가 끝나지 않은경우(단속사진중 마지막 1장은 위도/경도 파일(.png 필수)로 제외)
if(index.get() == 0) {
fstMstDTO = saveAppendFiles(appendFileDto, dtl, index.get(), fileCnt);
}else {
if(Checks.isEmpty(pngDtlDTO)) {
if (fstMstDTO == null || fstMstDTO.getCmmFileDtls().size() == 0)
throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "시민신고 첨부 파일 처리중 오류가 발생하였습니다.");
for (CmmFileDTO.FileDtl dtlDto : fstMstDTO.getCmmFileDtls()) {
if (Objects.equals(dtlDto.getFileExtsn(), "png")) {
pngDtlDTO = dtlDto;
break;
}
};
}
saveFstOverAppendFiles(appendFileDto, dtl, pngDtlDTO, index.get());
}
index.addAndGet(1);
//-------------------------------------------------------------
// 첨부파일 저장
//-------------------------------------------------------------
// 신고사진 데이타 생성
// 단속건수가 1건인 경우 파일 전체 저장
saveAllAppendFiles(xmlDto, appendFileDto, dtl, fileCnt);
// 단속 데이타 생성 - 단속이미지가 처리후(단속이미지 갯수 count)
ctznSttemntMapper.insertRtRegltFromCtznStmt(reqDTO);
// 단속상태 변경이력 생성
rtCrackdownMgtMapper.insertRtProcessSttsChangeHist(
RtDTO.SttusChangeHist.builder()
.crdnId(reqDTO.getCrdnId())
.crdnSttsCd(reqDTO.getCrdnSttsCd())
.rgtr(getUserInfo().getUniqId())
.build()
);
// 단속 데이타 생성 - 단속이미지가 처리후(단속이미지 갯수 count)
ctznSttemntMapper.insertRtRegltFromCtznStmt(reqDTO);
};
});
// FIXME: src file backup - rollback이 필요한 경우 BizException throw 필요
@ -241,31 +210,31 @@ public class EcNatlNewspaperServiceBean extends AbstractServiceBean implements E
*/
//-------------------------------------------------------------------------------------------------------------
private CtznStmtDTO.Mst setCtznSttemntDTOFromRcvXml(NatlNewspaperRcvXmlDTO xmlDto){
CtznStmtDTO.Mst dto = new CtznStmtDTO.Mst();
List<CtznStmtDTO.Dtl> dtlList = new ArrayList<>();
CtznStmtDTO.Mst mst = new CtznStmtDTO.Mst();
CtznStmtDTO.Dtl dtl = new CtznStmtDTO.Dtl();
String reasonStr = xmlDto.getPetiReasonL();
dto.setInterfaceSeqN(xmlDto.getInterfaceSeqN());
dto.setSggCd(xitFrameCodeService.instCdToSggCd(getUserInfo().getPstinstCode()));
dto.setSysSeCd(getUserInfo().getOrgnztId());
dto.setCvlcptAplySeCd(xmlDto.getPetiGubunC());
dto.setCvlcptAplyNo(xmlDto.getPetiNoC());
dto.setCvlcptRcptNo(xmlDto.getCivilNoC());
dto.setCvlcptRcptYmd(xmlDto.getAncRegD().substring(1,8));
dto.setCvlcptAplcntNm(xmlDto.getPeterNameV());
dto.setCvlcptAplcntAdres(xmlDto.getAddressV());
dto.setCvlcptAplcntZip(xmlDto.getZipCodeC());
dto.setCvlcptAplcntAdres(xmlDto.getAddressV());
dto.setCvlcptAplcntEmailAdres(xmlDto.getEmailV());
dto.setCvlcptAplcntMoblphonNo(xmlDto.getCelNoV());
dto.setCvlcptAplcntTlphonNo(xmlDto.getTelNoV());
dto.setCvlcptAplyTtlNm(xmlDto.getPetiTitleV());
dto.setCvlcptAplyCn(reasonStr);
dto.setCvlcptAplyDt(xmlDto.getPetiRegD());
dto.setCvlcptPrcsPrnmntDt(xmlDto.getPetiEndD());
dto.setCvlcptRegistDt(xmlDto.getRegD());
dto.setCtznSttemntProcessSttus(FimsConst.CtznStmtDtlStsCode.UNPROCESSED.getCode());
dto.setRgtr(getUserInfo().getUniqId());
mst.setInterfaceSeqN(xmlDto.getInterfaceSeqN());
mst.setSggCd(xitFrameCodeService.instCdToSggCd(getUserInfo().getPstinstCode()));
mst.setSysSeCd(getUserInfo().getOrgnztId());
mst.setCvlcptAplySeCd(xmlDto.getPetiGubunC());
mst.setCvlcptAplyNo(xmlDto.getPetiNoC());
mst.setCvlcptRcptNo(xmlDto.getCivilNoC());
mst.setCvlcptRcptYmd(xmlDto.getAncRegD().substring(1,8));
mst.setCvlcptAplcntNm(xmlDto.getPeterNameV());
mst.setCvlcptAplcntAdres(xmlDto.getAddressV());
mst.setCvlcptAplcntZip(xmlDto.getZipCodeC());
mst.setCvlcptAplcntAdres(xmlDto.getAddressV());
mst.setCvlcptAplcntEmailAdres(xmlDto.getEmailV());
mst.setCvlcptAplcntMoblphonNo(xmlDto.getCelNoV());
mst.setCvlcptAplcntTlphonNo(xmlDto.getTelNoV());
mst.setCvlcptAplyTtlNm(xmlDto.getPetiTitleV());
mst.setCvlcptAplyCn(reasonStr);
mst.setCvlcptAplyDt(xmlDto.getPetiRegD());
mst.setCvlcptPrcsPrnmntDt(xmlDto.getPetiEndD());
mst.setCvlcptRegistDt(xmlDto.getRegD());
mst.setRgtr(getUserInfo().getUniqId());
//---------------------------------
// 단속일시 / 차량번호
@ -277,8 +246,7 @@ public class EcNatlNewspaperServiceBean extends AbstractServiceBean implements E
Pattern pattern = Pattern.compile(regx);
Matcher matcher = pattern.matcher(reasonStr);
boolean isFirst = true;
String carNo = null;
while(matcher.find()) {
String[] arrSrc =
matcher.group()
@ -287,63 +255,19 @@ public class EcNatlNewspaperServiceBean extends AbstractServiceBean implements E
.replaceAll("[: /]", "")
.split(",");
CtznStmtDTO.Dtl dtlDto = new CtznStmtDTO.Dtl();
//단속일시
dtlDto.setCrdnYmdTime(arrSrc[0]);
dtl.setCrdnYmdTime(arrSrc[0]);
//차량번호
if(isFirst) carNo = (arrSrc.length > 1)? arrSrc[1]: "";
dtlDto.setVhrno((arrSrc.length > 1)? arrSrc[1]: "");
if(!isFirst && !Objects.equals(carNo, dtlDto.getVhrno())) dto.setSingle(false);
dtl.setVhrno(arrSrc[1]);
//공통 추가 항목
dtlDto.setInterfaceSeqN(xmlDto.getInterfaceSeqN());
dtlDto.setCtznSttemntDetailProcessSttus(FimsConst.CtznStmtDtlStsCode.UNPROCESSED.getCode());
dtlDto.setSysSeCd(getUserInfo().getOrgnztId());
dtlDto.setSggCd(xitFrameCodeService.instCdToSggCd(getUserInfo().getPstinstCode()));
dtlDto.setRgtr(getUserInfo().getUniqId());
dtlList.add(dtlDto);
isFirst = false;
dtl.setInterfaceSeqN(xmlDto.getInterfaceSeqN());
dtl.setSysSeCd(getUserInfo().getOrgnztId());
dtl.setSggCd(xitFrameCodeService.instCdToSggCd(getUserInfo().getPstinstCode()));
dtl.setRgtr(getUserInfo().getUniqId());
}
if(!dto.isSingle()) {
CtznStmtDTO.DupData dupDto = new CtznStmtDTO.DupData();
dupDto.setSttemntDetailDTO(dtlList.get(0));
dupDto.getIndexs().add(0);
dto.getDupDataList().add(dupDto);
for (int idx = 1; idx < dtlList.size(); idx++) {
CtznStmtDTO.Dtl tgt = dtlList.get(idx);
int finalIdx = idx;
AtomicBoolean isDup = new AtomicBoolean(false);
dto.getDupDataList().forEach(dupData -> {
if(Objects.equals(dupData.getSttemntDetailDTO().getVhrno(), tgt.getVhrno())){
dupData.getIndexs().add(finalIdx);
isDup.set(true);
}
});
if(!isDup.get()) {
CtznStmtDTO.DupData ddto = new CtznStmtDTO.DupData();
ddto.setSttemntDetailDTO(tgt);
ddto.getIndexs().add(idx);
dto.getDupDataList().add(ddto);
}
}
}
// 단속일시 desc로 정렬 - 동일 차량인 경우 단속일시가 늦은것 남기기위해)
dtlList = dtlList.stream()
.sorted(Comparator.comparing(CtznStmtDTO.Dtl::getCrdnYmdTime).reversed()).collect(
Collectors.toList());
// 중복제거(동일 차량 번호중 단속일시가 가장 늦은것 pick)
// 차량번호가 없는 경우가 존재하여 체크로직 추가
dtlList = FunctionUtils.removeDuplication(dtlList, dtl -> {
if(Checks.isNotEmpty(dtl.getVhrno())) return dtl.getVhrno();
return dtl;
});
//---------------------------------
// GPS 위도
@ -354,14 +278,10 @@ public class EcNatlNewspaperServiceBean extends AbstractServiceBean implements E
pattern = Pattern.compile(regx);
matcher = pattern.matcher(reasonStr);
while(matcher.find()){
String[] arrGps = matcher.group()
.replaceAll(regx, "$2,$4")
.split(",");
dtlList.forEach(dtlDto -> {
dtlDto.setGpsX(arrGps[0]);
dtlDto.setGpsY(arrGps[1]);
});
String[] arrGps = matcher.group().replaceAll(regx, "$2,$4").split(",");
dtl.setGpsX(arrGps[0]);
dtl.setGpsY(arrGps[1]);
}
//---------------------------------
@ -373,12 +293,9 @@ public class EcNatlNewspaperServiceBean extends AbstractServiceBean implements E
pattern = Pattern.compile(regx);
matcher = pattern.matcher(reasonStr);
while(matcher.find()){
String str = matcher.group()
.replaceAll(regx, "$2");
String str = matcher.group().replaceAll(regx, "$2");
dtlList.forEach(dtlDto -> {
dtlDto.setCrdnPlc(str);
});
dtl.setCrdnPlc(str);
}
//---------------------------------
@ -391,16 +308,13 @@ public class EcNatlNewspaperServiceBean extends AbstractServiceBean implements E
pattern = Pattern.compile(regx);
matcher = pattern.matcher(petiTitleStr);
while(matcher.find()){
String str = matcher.group()
.replaceAll(regx, "$2");
String str = matcher.group().replaceAll(regx, "$2");
dtlList.forEach(dtlDto -> {
dtlDto.setVltnCn(str);
});
dtl.setVltnCn(str);
}
dto.setStmtDtlDTOs(dtlList);
return dto;
mst.setDtl(dtl);
return mst;
}
/**
@ -526,7 +440,7 @@ public class EcNatlNewspaperServiceBean extends AbstractServiceBean implements E
private CmmFileDTO.FileMst getFileMst(CtznStmtDTO.Dtl sttemntDetailDTO) {
CmmFileDTO.FileMst fileMstDTO = new CmmFileDTO.FileMst();
fileMstDTO.setInfType(FimsConst.FileInfType.NATL_NEWS_PAPER_RCV.getCode());
fileMstDTO.setInfKey(sttemntDetailDTO.getInterfaceSeqN()+ sttemntDetailDTO.getCtznSttemntDetailSn());
fileMstDTO.setInfKey(sttemntDetailDTO.getInterfaceSeqN());
fileMstDTO.setUploadeJobPath(uploadNewsPaperPath);
fileMstDTO.setFileDirPath(FimsConst.FileDirDepth.DAY.getCode());
return fileMstDTO;

@ -86,7 +86,7 @@ public class EcCtznSttemntController extends AbstractController {
mav.addObject("attchFiles", fileService.findFilesByEsbInterfaces(
CmmFileDTO.FileMst.builder()
.infType(FimsConst.FileInfType.NATL_NEWS_PAPER_RCV.getCode())
.infKey(dto.getInterfaceSeqN()+dto.getCtznSttemntDetailSn())
.infKey(dto.getInterfaceSeqN())
.build()).stream()
.filter(dtl -> !Objects.equals("png", dtl.getFileExtsn()))
.collect(Collectors.toList()));
@ -99,44 +99,25 @@ public class EcCtznSttemntController extends AbstractController {
fileService.findFilesByEsbInterfaces(
CmmFileDTO.FileMst.builder()
.infType(FimsConst.FileInfType.NATL_NEWS_PAPER_RCV.getCode())
.infKey(dto.getInterfaceSeqN()+dto.getCtznSttemntDetailSn())
.infKey(dto.getInterfaceSeqN())
.build()).stream()
.filter(dtl -> !Objects.equals("png", dtl.getFileExtsn()))
.collect(Collectors.toList())
);
}
@PostMapping(name = "", value = "/modifyCtznStmtDtl")
public ModelAndView modifyCtznStmtDtl(final CtznStmtDTO.Dtl dto) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.modifyEcCtznSttemntDetail(dto);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS);
return mav;
}
@PostMapping(name = "", value = "/removeCtznStmtDtl")
public ModelAndView removeCtznStmtDtl(final CtznStmtDTO.Dtl dto) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.removeEcCtznSttemntDetail(dto);
service.removeEcCtznSttemnt(dto);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS);
return mav;
}
/**
*
* @param dto CtznStmtDTO.Request
* @return
*/
@PostMapping(name = "", value = "/saveRtReglt")
public ModelAndView saveRtReglt(final CtznStmtDTO.Request dto) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.saveRtReglt(dto);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS);
return mav;
}
/**
*

@ -153,7 +153,7 @@ public class CmmFileDTO {
private static final long SerialVersionUID = 1L;
private String interfaceSeqN;
private String ctznSttemntDetailSn;
private String fileMastrId;
private String infType;

@ -44,8 +44,7 @@
, CONCAT(trr.crdn_ymd, trr.crdn_bgng_tm) AS crdnYmdTime
, trr.reg_dt
, teerc.file_link_id -- CCTV data ID : 접수번호로 보여줄 것
, tecsd.interface_seq_n
, tecsd.ctzn_sttemnt_detail_sn
, tecs.cvlcpt_link_id
, tecs.cvlcpt_rcpt_no -- 접수번호
, tecs.cvlcpt_rcpt_ymd -- 접수일자
, tecs.cvlcpt_aplcnt_nm -- 신고자
@ -61,13 +60,13 @@
, trp.addr
, trp.dtl_addr
, trp.stdg_cd -- 법정동 코드
, IF(trr.crdn_se_cd = '09', tecsd.vltn_cn, teerc.vltn_cn) AS vltnCn -- 위반내용
, IF(trr.crdn_se_cd = '09', '', teerc.vltn_cn) AS vltnCn -- 위반내용
, (SELECT COUNT(crdn_id)
FROM tb_crdn tgt
WHERE tgt.vhrno = trr.vhrno
AND NOT NULLIF(trr.vhrno, '') IS NULL) AS vhrnoCnt
, (SELECT COUNT(cmplt_id)
FROM tb_ec_ctzn_sttemnt_cmplt tgt
, (SELECT COUNT(cvlcpt_dscsn_id)
FROM tb_cvlcpt_dscsn_cn tgt
WHERE EXISTS(SELECT 1
FROM tb_crdn
WHERE tgt.crdn_id = crdn_id
@ -84,12 +83,10 @@
FROM tb_crdn trr
LEFT JOIN tb_crdn_file_link teerc
ON trr.link_id = teerc.file_link_id
LEFT JOIN tb_ec_ctzn_sttemnt_detail tecsd
ON trr.crdn_id = tecsd.crdn_id
LEFT JOIN tb_ec_ctzn_sttemnt tecs
ON tecsd.interface_seq_n = tecs.interface_seq_n
LEFT JOIN tb_crdn_cvlcpt tecs
ON trr.link_id = tecs.cvlcpt_link_id
LEFT JOIN tb_esb_interface tei
ON tecs.interface_seq_n = tei.interface_seq_n
ON trr.link_id = tei.interface_seq_n
LEFT JOIN tb_rt_erpp tre
ON trr.crdn_id = tre.crdn_id
LEFT JOIN tb_payer trp
@ -104,11 +101,11 @@
<if test='crdnSttsCd != null and crdnSttsCd != ""'>
<if test='crdnSttsCd eq "NON-INIT"'>
<if test='ctznAnsYn eq "Y"'>
AND tecs.ctzn_sttemnt_process_sttus != '01'
AND trr.crdn_stts_cd != '01'
</if>
<if test='ctznAnsYn eq "N"'>
AND tecs.ctzn_sttemnt_process_sttus = '01'
</if>
</if>
<if test='crdnSttsCd != "NON-INIT"'>
@ -136,7 +133,7 @@
</where>
ORDER BY trr.sys_se_cd, trr.crdn_se_cd
, teerc.file_link_id
, tecsd.interface_seq_n, tecsd.ctzn_sttemnt_detail_sn
, trr.link_id,
, trr.crdn_ymd, trr.vhrno, trr.crdn_bgng_tm
</select>
@ -149,36 +146,34 @@
<select id="selectCtznStmtInfo" resultType="kr.xit.fims.biz.cmm.FimsCrackdownDTO$Ctzn">
/* cmm-fims-crackdown-mysql-mapper|selectCtznStmtInfo-시민신고 정보 조회|julim */
SELECT tecs.interface_seq_n
, tecs.sgg_cd
, tecs.sys_se_cd
, tecs.cvlcpt_aply_se_cd
, tecs.cvlcpt_aply_no
, tecs.cvlcpt_rcpt_no
, tecs.cvlcpt_aplcnt_nm
SELECT tcc.cvlcpt_link_id
, tc.sgg_cd
, tc.sys_se_cd
, tcc.cvlcpt_aply_se_cd
, tcc.cvlcpt_aply_no
, tcc.cvlcpt_rcpt_no
, tcc.cvlcpt_aplcnt_nm
, '' AS cvlcpt_aplcnt_zip
, '' AS cvlcpt_aplcnt_adres
, '' AS cvlcpt_aplcnt_email_adres
, '' AS cvlcpt_aplcnt_moblphon_no
, '' AS cvlcpt_aplcnt_tlphon_no
, tecs.cvlcpt_aply_ttl_nm
, tecs.cvlcpt_aply_cn
, tecs.cvlcpt_aply_dt
, tecs.cvlcpt_rcpt_ymd
, tecs.cvlcpt_prcs_prnmnt_dt
, tcc.cvlcpt_aply_ttl_nm
, tcc.cvlcpt_aply_cn
, tcc.cvlcpt_aply_dt
, tcc.cvlcpt_rcpt_ymd
, tcc.cvlcpt_prcs_prnmnt_dt
, SUBSTR(cvlcpt_prcs_prnmnt_dt,1,8) AS cvlcpt_prcs_prnmnt_ymd
, '' AS cvlcpt_regist_dt
, tecs.ctzn_sttemnt_process_sttus
, tecsd.ctzn_sttemnt_detail_sn
, tecsd.crdn_plc
, tecsd.vltn_cn
, tecs.rgtr
, tecs.mdfcn_dt
, tecs.mdfr
FROM tb_ec_ctzn_sttemnt_detail tecsd
LEFT JOIN tb_ec_ctzn_sttemnt tecs
ON tecsd.interface_seq_n = tecs.interface_seq_n
WHERE tecsd.crdn_id = #{crdnId}
, tc.crdn_plc
, '' AS vltn_cn
, tcc.rgtr
, tcc.mdfcn_dt
, tcc.mdfr
FROM tb_crdn tc
LEFT JOIN tb_crdn_cvlcpt tcc
ON tc.LINK_ID = tcc.cvlcpt_link_id
WHERE tc.crdn_id = #{crdnId}
</select>
<select id="selectRegltSts" resultType="string">
@ -242,67 +237,27 @@
AND tcatd.resn_code = #{resnCode} -- 사유코드 : 계도의 경우 등록된 템플릿이 없으면 '00' 기본값, 부과의 경우 '01' 기본값
</select>
<update id="updateStatusEcCtznSttemntDetail">
/* cmm-fims-crackdown-mysql-mapper|updateStatusEcCtznSttemntDetail-시민신고 상세 상태 업데이트|julim */
UPDATE tb_ec_ctzn_sttemnt_detail
SET ctzn_sttemnt_detail_process_sttus = #{ctznSttemntDetailProcessSttus}
, mdfcn_dt = DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
, mdfr = #{mdfr}
WHERE interface_seq_n = #{interfaceSeqN}
AND ctzn_sttemnt_detail_sn = #{ctznSttemntDetailSn}
</update>
<update id="updateStatusEcCtznSttemnt">
/* cmm-fims-crackdown-mysql-mapper|updateStatusEcCtznSttemnt-시민신고 진행상태 update : 답변완료 or 답변가능|julim */
UPDATE tb_ec_ctzn_sttemnt
SET ctzn_sttemnt_process_sttus = #{ctznSttemntStatusCode}
, mdfcn_dt = DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
, mdfr = #{mdfr}
WHERE interface_seq_n = #{interfaceSeqN}
</update>
<select id="selectPossiblecheckAns" resultType="int">
/* cmm-fims-crackdown-mysql-mapper|selectPossiblecheckAns-답변가능여부 조회 : 답변완료 or 답변가능|julim */
SELECT COUNT(interface_seq_n)
FROM tb_ec_ctzn_sttemnt_detail
WHERE interface_seq_n = #{interfaceSeqN}
AND ctzn_sttemnt_detail_process_sttus &lt;= '01'
</select>
<insert id="saveEcCtznSttemntAnswer">
/* cmm-fims-crackdown-mysql-mapper|saveEcCtznSttemntAnswer-시민신고답변 생성 및 변경|julim */
INSERT
INTO tb_ec_ctzn_sttemnt_answer (
interface_seq_n
, sgg_cd
, sys_se_cd
INTO tb_crdn_cvlcpt (
cvlcpt_link_id
, cvlcpt_aply_se_cd
, cvlcpt_aply_no
, cvlcpt_rcpt_no
, cvlcpt_gist
, cvlcpt_prcs_sumry
, '' AS prcs_dept_code
, '' AS cvlcpt_prcs_deptnm
, '' AS charger_nm
, '' AS charger_email
, '' AS charger_tlphon_no
, cvlcpt_prcs_rslt_cn
, cvlcpt_prcs_cmptn_dt
, reg_dt
, rgtr
) SELECT tei.interface_seq_n
, #{sggCd}
, #{sysSeCd}
, tei.peti_gubun_c -- 민원구분
, tei.peti_no_c -- 민원신청번호
, tei.civil_no_c -- 민원접수번호
, tei.civil_gist_v -- 민원요지
, tei.civil_abstract_l -- 민원처리요약
, tei.pcd_dept_v -- 처리부서코드
, tei.pcd_dept_nm_v -- 민원처리부서명
, tei.duty_id_v -- 담당자명
, tei.pcd_email_v -- 담당자이메일
, tei.pcd_tel_v -- 담당자전화번호
, REPLACE(#{cvlcptPrcsRsltCn}, '[전화번호]', tei.pcd_tel_v) -- 민원처리결과
, DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
, DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
@ -317,26 +272,26 @@
<insert id="insertCtznSttemntCmplt">
/* cmm-fims-crackdown-mysql-mapper|insertCtznSttemntCmplt-민원등록|julim */
<selectKey resultType="string" keyProperty="cmpltId" order="BEFORE">
SELECT LPAD(IFNULL(MAX(CAST(cmplt_id AS UNSIGNED))+1, 1), 12, '0') AS cmpltId
FROM tb_ec_ctzn_sttemnt_cmplt
<selectKey resultType="string" keyProperty="cvlcptDscsnId" order="BEFORE">
SELECT LPAD(IFNULL(MAX(CAST(cvlcpt_dscsn_id AS UNSIGNED))+1, 1), 12, '0') AS cvlcptDscsnId
FROM tb_cvlcpt_dscsn_cn
</selectKey>
INSERT
INTO tb_ec_ctzn_sttemnt_cmplt (
cmplt_id
INTO tb_cvlcpt_dscsn_cn (
cvlcpt_dscsn_id
, crdn_id
, sgg_cd
, content
, gubun
, dscsn_cn
, cvlcpt_se_cd
, vhrno
, reg_dt
, rgtr
) VALUES (
#{cmpltId}
#{cvlcptDscsnId}
, #{crdnId}
, #{sggCd}
, #{content}
, #{gubun}
, #{dscsnCn}
, #{cvlcptSeCd}
, #{vhrno}
, DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
, #{rgtr}
@ -345,27 +300,30 @@
<select id="selectEcCtznSttemntAnswer" resultType="kr.xit.fims.biz.ec.CtznStmtDTO$Ans">
/* cmm-fims-crackdown-mysql-mapper|selectEcCtznSttemntAnswer-시민신고답변 데이타 조회|julim */
SELECT tecsa.interface_seq_n
, tecsa.sys_se_cd -- sysGubunC
, tecsa.sgg_cd -- ancCodeV
, tecsa.cvlcpt_aply_se_cd -- 민원구분
, tecsa.cvlcpt_aply_no -- 민원신청번호
, tecsa.cvlcpt_rcpt_no -- 민원접수번호
, tecsa.cvlcpt_gist -- 민원요지
, tecsa.cvlcpt_prcs_sumry -- 민원처리요약
SELECT tcc.cvlcpt_link_id
, tc.sys_se_cd -- sysGubunC
, tc.sgg_cd -- ancCodeV
, tcc.cvlcpt_aply_se_cd -- 민원구분
, tcc.cvlcpt_aply_no -- 민원신청번호
, tcc.cvlcpt_rcpt_no -- 민원접수번호
, tcc.cvlcpt_gist -- 민원요지
, tcc.cvlcpt_prcs_sumry -- 민원처리요약
, '' AS prcs_dept_code -- 처리부서코드
, '' AS cvlcpt_prcs_deptnm -- 민원처리부서명
, '' AS charger_nm -- 담당자명
, '' AS charger_email -- 담당자이메일
, '' AS charger_tlphon_no -- 담당자전화번호
, tecsa.cvlcpt_prcs_rslt_cn -- 민원처리결과
, tecsa.cvlcpt_prcs_cmptn_dt -- 처리완료일시
, tcc.cvlcpt_prcs_rslt_cn -- 민원처리결과
, tcc.cvlcpt_prcs_cmptn_dt -- 처리완료일시
, tei.sys_gubun_c
, tei.anc_code_v
FROM tb_ec_ctzn_sttemnt_answer tecsa
FROM tb_crdn_cvlcpt tcc
JOIN tb_esb_interface tei
ON tecsa.interface_seq_n = tei.interface_seq_n
WHERE tecsa.interface_seq_n = #{interfaceSeqN}
ON tcc.cvlcpt_link_id = tei.interface_seq_n
JOIN tb_crdn tc
ON tcc.cvlcpt_link_id = tc.LINK_ID
WHERE tcc.cvlcpt_link_id = #{cvlcptLinkId}
</select>
<select id="selectProcessSttusChangeHist" resultType="kr.xit.fims.biz.rt.RtDTO$SttusChangeHist">
@ -422,29 +380,29 @@
<select id="selectCtznSttemntCmplt" resultType="kr.xit.fims.biz.cmm.FimsCrackdownDTO$CtznSttemntCmplt">
/* cmm-fims-crackdown-mysql-mapper|selectCtznSttemntCmplt-민원등록 이력 조회|julim */
SELECT tecsc.cmplt_id
, tecsc.crdn_id
, tecsc.sgg_cd
, tecsc.content
, tecsc.gubun
, tecsc.vhrno
, tecsc.reg_dt
, tecsc.rgtr
, tecsc.mdfcn_dt
, tecsc.mdfr
FROM tb_ec_ctzn_sttemnt_cmplt tecsc
WHERE gubun = #{gubun}
<if test='gubun eq "0"'>
SELECT tcdc.cvlcpt_dscsn_id
, tcdc.crdn_id
, tcdc.sgg_cd
, tcdc.DSCSN_CN
, tcdc.CVLCPT_SE_CD
, tcdc.vhrno
, tcdc.reg_dt
, tcdc.rgtr
, tcdc.mdfcn_dt
, tcdc.mdfr
FROM tb_cvlcpt_dscsn_cn tcdc
WHERE CVLCPT_SE_CD = #{cvlcptSeCd}
<if test='cvlcptSeCd eq "0"'>
AND EXISTS (SELECT 1
FROM tb_crdn
WHERE tecsc.crdn_id = crdn_id
WHERE tcdc.crdn_id = crdn_id
AND rtpyr_id = #{rtpyrId}
)
</if>
<if test='gubun eq "1"'>
AND tecsc.vhrno = #{vhrno}
<if test='cvlcptSeCd eq "1"'>
AND tcdc.vhrno = #{vhrno}
</if>
ORDER BY tecsc.reg_dt DESC
ORDER BY tcdc.reg_dt DESC
</select>
<select id="selectCrackdownVhrnoCnt" resultType="int">

@ -4,33 +4,33 @@
<mapper namespace="kr.xit.fims.biz.ec.dao.EcCtznSttemntMapper">
<!-- *************************************************************************************************************
* tb_ec_ctzn_sttemnt : 시민신고 마스터
* tb_crdn_cvlcpt : 시민신고 마스터
************************************************************************************************************** -->
<sql id="sqlEcCtznStmt">
SELECT interface_seq_n
, sgg_cd
, sys_se_cd
, cvlcpt_aply_se_cd
, cvlcpt_aply_no
, cvlcpt_rcpt_no
, cvlcpt_aplcnt_nm
SELECT tcc.cvlcpt_link_id
, tc.sgg_cd
, tc.sys_se_cd
, tcc.cvlcpt_aply_se_cd
, tcc.cvlcpt_aply_no
, tcc.cvlcpt_rcpt_no
, tcc.cvlcpt_aplcnt_nm
, '' AS cvlcpt_aplcnt_zip
, '' AS cvlcpt_aplcnt_adres
, '' AS cvlcpt_aplcnt_email_adres
, '' AS cvlcpt_aplcnt_moblphon_no
, '' AS cvlcpt_aplcnt_tlphon_no
, cvlcpt_aply_ttl_nm
, cvlcpt_aply_cn
, cvlcpt_aply_dt
, cvlcpt_rcpt_ymd
, cvlcpt_prcs_prnmnt_dt
, SUBSTR(cvlcpt_prcs_prnmnt_dt,1,8) AS cvlcpt_prcs_prnmnt_ymd
, tcc.cvlcpt_aply_ttl_nm
, tcc.cvlcpt_aply_cn
, tcc.cvlcpt_aply_dt
, tcc.cvlcpt_rcpt_ymd
, tcc.cvlcpt_prcs_prnmnt_dt
, SUBSTR(tcc.cvlcpt_prcs_prnmnt_dt,1,8) AS cvlcpt_prcs_prnmnt_ymd
, '' AS cvlcpt_regist_dt
, ctzn_sttemnt_process_sttus
, rgtr
, mdfcn_dt
, mdfr
FROM tb_ec_ctzn_sttemnt
, tcc.rgtr
, tcc.mdfcn_dt
, tcc.mdfr
FROM tb_crdn_cvlcpt tcc
INNER JOIN tb_crdn tc on tcc.CVLCPT_LINK_ID=tc.LINK_ID
</sql>
<select id="selectEcCtznSttemnts" resultType="kr.xit.fims.biz.ec.CtznStmtDTO$Mst">
@ -41,14 +41,14 @@
<select id="selectEcCtznSttemnt" resultType="kr.xit.fims.biz.ec.CtznStmtDTO$Mst">
/* ec-ctzn-sttemnt-mysql-mapper|selectEcCtznSttemnt-민원연계(국민신문고) 조회|julim */
<include refid="sqlEcCtznStmt"/>
WHERE interface_seq_n = #{interfaceSeqN}
WHERE cvlcpt_link_id = #{cvlcptLinkId}
</select>
<insert id="insertEcCtznSttemnt">
/* ec-ctzn-sttemnt-mysql-mapper|insertEcCtznSttemnt-시민신고 마스터 등록|julim */
INSERT
INTO tb_ec_ctzn_sttemnt (
interface_seq_n
INTO tb_crdn_cvlcpt (
cvlcpt_link_id
, cvlcpt_aply_se_cd
, cvlcpt_aply_no
, cvlcpt_rcpt_no
@ -58,11 +58,10 @@
, cvlcpt_aply_dt
, cvlcpt_rcpt_ymd
, cvlcpt_prcs_prnmnt_dt
, ctzn_sttemnt_process_sttus
, reg_dt
, rgtr
) VALUES (
#{interfaceSeqN}
#{cvlcptLinkId}
, #{cvlcptAplySeCd}
, #{cvlcptAplyNo}
, #{cvlcptRcptNo}
@ -72,7 +71,6 @@
, #{cvlcptAplyDt}
, #{cvlcptRcptYmd}
, #{cvlcptPrcsPrnmntDt}
, #{ctznSttemntProcessSttus}
, DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
, #{rgtr}
)
@ -80,29 +78,25 @@
<!-- *************************************************************************************************************
* tb_ec_ctzn_sttemnt_detail : 시민신고 상세
* tb_crdn_cvlcpt : 시민신고 상세
************************************************************************************************************** -->
<sql id="sqlEcCtznStmtDtl">
SELECT tecsd.interface_seq_n
, tecsd.ctzn_sttemnt_detail_sn
, tecsd.vhrno
, tecsd.crdn_id
, tecsd.sgg_cd
, tecsd.sys_se_cd
, tecsd.crdn_ymd_time
, tecsd.crdn_plc
, tecsd.vltn_cn
, tecsd.gps_x
, tecsd.gps_y
, tecsd.ctzn_sttemnt_detail_process_sttus
, tecsd.reg_dt
, tecsd.rgtr
, tecsd.mdfcn_dt
, tecsd.mdfr
, tecs.ctzn_sttemnt_process_sttus
FROM tb_ec_ctzn_sttemnt_detail tecsd
JOIN tb_ec_ctzn_sttemnt tecs
ON tecsd.interface_seq_n = tecs.interface_seq_n
SELECT tcc.cvlcpt_link_id
, tc.vhrno
, tc.crdn_id
, tc.sgg_cd
, tc.sys_se_cd
, (tc.crdn_ymd || tc.CRDN_TM) AS crdn_ymd_time
, tc.crdn_plc
, '' AS vltn_cn
, tc.gps_x
, tc.gps_y
, tcc.reg_dt
, tcc.rgtr
, tcc.mdfcn_dt
, tcc.mdfr
FROM tb_crdn_cvlcpt tcc
JOIN tb_crdn tc ON tcc.cvlcpt_link_id=tc.LINK_ID
</sql>
<select id="selectEcCtznSttemntDetails" resultType="kr.xit.fims.biz.ec.CtznStmtDTO$Dtl">
@ -110,10 +104,10 @@
<include refid="sqlEcCtznStmtDtl"/>
<where>
<if test='interfaceSeqN != null and interfaceSeqN != ""'>
AND tecsd.interface_seq_n = #{interfaceSeqN}
AND tecs.cvlcpt_link_id = #{cvlcptLinkId}
</if>
<if test='ctznSttemntDetailSn != null and ctznSttemntDetailSn != ""'>
AND tecsd.ctzn_sttemnt_detail_sn = #{ctznSttemntDetailSn}
<if test='crdnId != null and crdnId != ""'>
AND tc.crdn_id = #{crdnId}
</if>
</where>
</select>
@ -121,129 +115,80 @@
<select id="selectEcCtznSttemntDetail" resultType="kr.xit.fims.biz.ec.CtznStmtDTO$Dtl">
/* ec-ctzn-sttemnt-mysql-mapper|selectEcCtznSttemntDetail-민원연계(국민신문고) 상세 조회|julim */
<include refid="sqlEcCtznStmtDtl"/>
WHERE tecsd.interface_seq_n = #{interfaceSeqN}
AND tecsd.ctzn_sttemnt_detail_sn = #{ctznSttemntDetailSn}
WHERE tc.link_id = #{interfaceSeqN}
AND tc.crdn_id = #{crdnId}
</select>
<insert id="insertEcCtznSttemntDetail">
/* ec-ctzn-sttemnt-mysql-mapper|insertEcCtznSttemntDetail-시민신고 상세 등록|julim */
<selectKey keyColumn="ctznSttemntDetailSn,crdnId" keyProperty="ctznSttemntDetailSn,crdnId"
resultType="kr.xit.fims.biz.ec.CtznStmtDTO$Dtl" order="BEFORE">
SELECT LPAD(IFNULL(MAX(CAST(csd.ctzn_sttemnt_detail_sn AS UNSIGNED)) + 1, 1), 2, '0') AS ctznSttemntDetailSn
, LPAD(IFNULL(MAX(CAST(csd.crdn_id AS UNSIGNED))+1, 1), 20, '0') AS crdnId
FROM tb_ec_ctzn_sttemnt_detail csd
WHERE interface_seq_n = #{interfaceSeqN}
</selectKey>
INSERT
INTO tb_ec_ctzn_sttemnt_detail (
interface_seq_n
, ctzn_sttemnt_detail_sn
, vhrno
, crdn_id
, crdn_ymd_time
, crdn_plc
, vltn_cn
, gps_x
, gps_y
, ctzn_sttemnt_detail_process_sttus
, reg_dt
, rgtr
) VALUES (
#{interfaceSeqN}
, #{ctznSttemntDetailSn}
, #{vhrno}
, #{crdnId}
, #{crdnYmdTime}
, #{crdnPlc}
, #{vltnCn}
, #{gpsX}
, #{gpsY}
, #{ctznSttemntDetailProcessSttus}
, DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
, #{rgtr}
)
</insert>
<update id="updateVhrnoOfEcCtznSttemntDetail">
/* ec-ctzn-sttemnt-mysql-mapper|updateVhrnoOfEcCtznSttemntDetail-시민신고 상세 차량번호 변경|julim */
UPDATE tb_ec_ctzn_sttemnt_detail
SET vhrno = IF(vhrno = #{vhrno}, vhrno, #{vhrno})
, mdfcn_dt = IF(vhrno = #{vhrno}, mdfcn_dt, DATE_FORMAT(NOW(), '%Y%m%d%H%i%s'))
, mdfr = IF(vhrno = #{vhrno}, mdfr, #{mdfr})
WHERE interface_seq_n = #{interfaceSeqN}
AND ctzn_sttemnt_detail_sn = #{ctznSttemntDetailSn}
</update>
<delete id="deleteEcCtznSttemntDetail">
/* ec-ctzn-sttemnt-mysql-mapper|deleteEcCtznSttemntDetail-시민신고 상세 삭제|julim */
<delete id="deleteEcCtznSttemnt">
/* ec-ctzn-sttemnt-mysql-mapper|deleteEcCtznSttemnt-시민신고 상세 삭제|julim */
DELETE
FROM tb_ec_ctzn_sttemnt_detail
WHERE interface_seq_n = #{interfaceSeqN}
AND ctzn_sttemnt_detail_sn = #{ctznSttemntDetailSn}
FROM tb_crdn_cvlcpt
WHERE cvlcpt_link_id = #{cvlcptLinkId}
</delete>
<insert id="insertRtRegltFromCtznStmt">
/* ec-ctzn-sttemnt-mysql-mapper|insertRtRegltFromCtznStmt-시민신고 단속 생성|julim */
<selectKey keyColumn="crdnId" keyProperty="crdnId" resultType="string" order="BEFORE">
SELECT LPAD(IFNULL(MAX(CAST(crdn_id AS UNSIGNED))+1, 1), 20, '0') AS crdnId from tb_crdn
</selectKey>
INSERT INTO tb_crdn (
crdn_id
, sgg_cd
, sys_se_cd
, crdn_se_cd
, crdn_inpt_se_cd
, crdn_ymd
, crdn_bgng_tm
, crdn_end_hr
, crdn_plc
, vltn_nmtm
, crdn_stdg_nm
, crdn_sparea_cd
, gps_x
, gps_y
, towng_yn
, atch_file_cnt
, vhrno
, crdn_stts_cd
, crdn_reg_se_cd
, reg_dt
, rgtr
) SELECT ecsd.crdn_id
, ecsd.sgg_cd
, ecsd.sys_se_cd
, #{crdnSeCd}
, #{crdnInptSeCd} -- 입력 구분 코드
, SUBSTR(ecsd.crdn_ymd_time, 1, 8)
, SUBSTR(ecsd.crdn_ymd_time, 9) -- 단속 시작 시간
, SUBSTR(ecsd.crdn_ymd_time, 9) -- 단속 종료 시간
, ecsd.crdn_plc
, '1' -- 위반 횟수
, (SELECT tgt.EMD_NM
FROM tb_stdg_info tgt
WHERE tgt.EMD_NM = null
limit 1
)
, '' -- 특변단속구역 코드
, ecsd.gps_x
, ecsd.gps_y
, 'N' -- 견인 여부 코드
, (SELECT COUNT(tcfd.file_id) - 1
FROM tb_cmm_file_mastr tcfm
JOIN tb_cmm_file_detail tcfd
ON tcfm.inf_type = #{infType}
AND tcfm.inf_key = CONCAT(#{interfaceSeqN}, #{ctznSttemntDetailSn})
AND tcfm.file_mastr_id = tcfd.file_mastr_id) -- 이미지 매수
, ecsd.vhrno
, #{crdnSttsCd} -- 단속:10, 서손:11
, #{crdnRegSeCd}
, DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
, #{rgtr}
FROM tb_ec_ctzn_sttemnt_detail ecsd
JOIN tb_ec_ctzn_sttemnt ecs
ON ecsd.interface_seq_n = #{interfaceSeqN}
AND ecsd.ctzn_sttemnt_detail_sn = #{ctznSttemntDetailSn}
AND ecsd.interface_seq_n = ecs.interface_seq_n
crdn_id
, sgg_cd
, sys_se_cd
, crdn_se_cd
, crdn_inpt_se_cd
, crdn_ymd
, crdn_bgng_tm
, crdn_end_hr
, crdn_plc
, vltn_nmtm
, crdn_stdg_nm
, crdn_sparea_cd
, gps_x
, gps_y
, towng_yn
, atch_file_cnt
, vhrno
, crdn_stts_cd
, crdn_reg_se_cd
, reg_dt
, rgtr
) VALUES (
#{crdnId}
, #{sggCd}
, #{sysSeCd}
, #{crdnSeCd}
, #{crdnInptSeCd} -- 입력 구분 코드
, SUBSTR(#{crdnYmdTime}, 1, 8)
, SUBSTR(#{crdnYmdTime}, 9) -- 단속 시작 시간
, SUBSTR(#{crdnYmdTime}, 9) -- 단속 종료 시간
, #{crdnYmdTime}
, '1' -- 위반 횟수
, (SELECT tgt.EMD_NM
FROM tb_stdg_info tgt
WHERE tgt.EMD_NM = null
limit 1
)
, '' -- 특변단속구역 코드
, #{gpsX}
, #{gpsY}
, 'N' -- 견인 여부 코드
, (SELECT COUNT(tcfd.file_id) - 1
FROM tb_cmm_file_mastr tcfm
JOIN tb_cmm_file_detail tcfd
ON tcfm.inf_type = #{infType}
AND tcfm.inf_key = #{interfaceSeqN}
AND tcfm.file_mastr_id = tcfd.file_mastr_id) -- 이미지 매수
, #{vhrno}
, #{crdnSttsCd} -- 단속:10, 서손:11
, #{crdnRegSeCd}
, DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
, #{rgtr}
)
</insert>
@ -265,45 +210,18 @@
, rgtr
) SELECT #{erppId}
, #{crdnId}
, ecsd.sgg_cd
, ecsd.sys_se_cd
, tc.sgg_cd
, tc.sys_se_cd
, DATE_FORMAT(NOW(), '%Y%m%d')
, ''
, ''
, DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
, #{rgtr}
FROM tb_ec_ctzn_sttemnt_detail ecsd
JOIN tb_ec_ctzn_sttemnt ecs
ON ecsd.interface_seq_n = #{interfaceSeqN}
AND ecsd.ctzn_sttemnt_detail_sn = #{ctznSttemntDetailSn}
AND ecsd.interface_seq_n = ecs.interface_seq_n
FROM tb_crdn_cvlcpt ecs
INNER JOIN tb_crdn tc
WHERE ecs.cvlcpt_link_id = #{cvlcptLinkId}
</insert>
<update id="updateStatusAndCrdnIdOfEcCtznSttemntDetail">
/* ec-ctzn-sttemnt-mysql-mapper|updateStatusAndCrdnIdOfEcCtznSttemntDetail-시민신고 상세 단속ID set|julim */
UPDATE tb_ec_ctzn_sttemnt_detail
SET crdn_id = #{crdnId}
, ctzn_sttemnt_detail_process_sttus = #{ctznSttemntDetailProcessSttus}
, mdfcn_dt = DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
, mdfr = #{mdfr}
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})
)
, mdfcn_dt = DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
, mdfr = #{mdfr}
WHERE interface_seq_n = #{interfaceSeqN}
</update>
<select id="selectCreateEcCtznSttemntAnswer" resultType="kr.xit.fims.biz.ec.CtznStmtDTO$Ans">
/* ec-ctzn-sttemnt-mysql-mapper|selectCreateEcCtznSttemntAnswer-시민신고답변 생성 데이타 조회|cjm */
@ -340,30 +258,31 @@
<select id="selectEcCtznSttemntAnswer" resultType="kr.xit.fims.biz.ec.CtznStmtDTO$Ans">
/* ec-ctzn-sttemnt-mysql-mapper|selectEcCtznSttemntAnswer-시민신고답변 데이타 조회|cjm */
SELECT interface_seq_n
, sys_se_cd -- sysGubunC
, sgg_cd -- ancCodeV
, cvlcpt_aply_se_cd -- 민원구분
, cvlcpt_aply_no -- 민원신청번호
, cvlcpt_rcpt_no -- 민원접수번호
, cvlcpt_gist -- 민원요지
, cvlcpt_prcs_sumry -- 민원처리요약
SELECT tcc.CVLCPT_LINK_ID
, tc.sys_se_cd -- sysGubunC
, tc.sgg_cd -- ancCodeV
, tcc.cvlcpt_aply_se_cd -- 민원구분
, tcc.cvlcpt_aply_no -- 민원신청번호
, tcc.cvlcpt_rcpt_no -- 민원접수번호
, tcc.cvlcpt_gist -- 민원요지
, tcc.cvlcpt_prcs_sumry -- 민원처리요약
, '' AS prcs_dept_code -- 처리부서코드
, '' AS cvlcpt_prcs_deptnm -- 민원처리부서명
, '' AS charger_nm -- 담당자명
, '' AS charger_email -- 담당자이메일
, '' AS charger_tlphon_no -- 담당자전화번호
, cvlcpt_prcs_rslt_cn -- 민원처리결과
, cvlcpt_prcs_cmptn_dt -- 처리완료일시
FROM tb_ec_ctzn_sttemnt_answer
WHERE interface_seq_n = #{interfaceSeqN}
, tcc.cvlcpt_prcs_rslt_cn -- 민원처리결과
, tcc.cvlcpt_prcs_cmptn_dt -- 처리완료일시
FROM tb_crdn_cvlcpt tcc
INNER JOIN tb_crdn tc ON tcc.CVLCPT_LINK_ID = tc.LINK_ID
WHERE tcc.cvlcpt_link_id = #{cvlcptLinkId}
</select>
<insert id="saveEcCtznSttemntAnswer">
/* ec-ctzn-sttemnt-mysql-mapper|saveEcCtznSttemntAnswer-시민신고답변 생성 및 변경|cjm */
INSERT
INTO tb_ec_ctzn_sttemnt_answer (
interface_seq_n
INTO tb_crdn_cvlcpt (
cvlcpt_link_id
, cvlcpt_aply_se_cd
, cvlcpt_aply_no
, cvlcpt_rcpt_no
@ -374,7 +293,7 @@
, reg_dt
, rgtr
) VALUES (
#{interfaceSeqN}
#{cvlcptLinkId}
, #{cvlcptAplySeCd}
, #{cvlcptAplyNo}
, #{cvlcptRcptNo}
@ -394,9 +313,9 @@
<update id="updatecvlcptPrcsRsltCnOfEcCtznSttemntAnswer">
/* ec-ctzn-sttemnt-mysql-mapper|updatecvlcptPrcsRsltCnOfEcCtznSttemntAnswer-시민신고 답변내용 변경|cjm */
UPDATE tb_ec_ctzn_sttemnt_answer
UPDATE tb_crdn_cvlcpt
SET cvlcpt_prcs_rslt_cn = #{cvlcptPrcsRsltCn}
WHERE interface_seq_n = #{interfaceSeqN}
WHERE cvlcpt_link_id = #{cvlcptLinkId}
</update>
@ -435,7 +354,7 @@
<resultMap id="resultMapCtznStmt" type="kr.xit.fims.biz.ec.CtznStmtDTO$Mst">
<result column="interface_seq_n" property="interfaceSeqN"/>
<result column="cvlcpt_link_id" property="cvlcptLinkId"/>
<result column="sgg_cd" property="sggCd"/>
<result column="sys_se_cd" property="sysSeCd"/>
<result column="cvlcpt_aply_se_cd" property="cvlcptAplySeCd"/>
@ -454,11 +373,9 @@
<result column="cvlcpt_prcs_prnmnt_dt" property="cvlcptPrcsPrnmntDt"/>
<result column="cvlcpt_prcs_prnmnt_ymd" property="cvlcptPrcsPrnmntYmd"/>
<result column="cvlcpt_regist_dt" property="cvlcptRegistDt"/>
<result column="ctzn_sttemnt_process_sttus" property="ctznSttemntProcessSttus"/>
<result column="rgtr" property="rgtr"/>
<result column="mdfcn_dt" property="mdfcnDt"/>
<result column="mdfr" property="mdfr"/>
<collection column="{interfaceSeqN=interface_seq_n}" property="stmtDtlDTOs" select="selectEcCtznSttemntDetails" javaType="List" />
</resultMap>
<select id="selectCtznSttemnts" resultMap="resultMapCtznStmt">

@ -473,26 +473,19 @@
WHERE tcfm.inf_type = #{infType}
<if test='infType eq "CFL"'>
-- 외부연계 : CCTV-고정형, CCTV-이동형, CCTV-버스장착형
AND tcfm.inf_key = (SELECT file_link_id
FROM tb_crdn_file_link
AND tcfm.inf_key = (SELECT link_id
FROM tb_crdn
WHERE crdn_id = #{crdnId})
</if>
<if test='infType eq "EIF"'>
-- 시민신고(국민신문고) : 초기자료 편집인 경우 시민신고 이미지 전체, 그외는 해당 차량 단속이미지만 선택
AND tcfm.inf_key LIKE (SELECT CONCAT(interface_seq_n, IF(#{crdnSttsCd} = '01', '%', ctzn_sttemnt_detail_sn))
FROM tb_ec_ctzn_sttemnt_detail
AND tcfm.inf_key = (SELECT link_id
FROM tb_crdn
WHERE crdn_id = #{crdnId})
</if>
ORDER BY tcfm.inf_key, tcfd.orginl_file_nm
</select>
<!--
<if test='crdnSeCd eq "09"'>
시민신고(국민신문고)
AND tcfm.inf_key = (SELECT CONCAT(interface_seq_n, ctzn_sttemnt_detail_sn)
FROM tb_ec_ctzn_sttemnt_detail
WHERE crdn_id = #{crdnId})
-->
</mapper>

@ -48,7 +48,6 @@ Date Author Description
<input type="hidden" name="crdnId" />
<input type="hidden" name="fileLinkId" />
<input type="hidden" name="interfaceSeqN" />
<input type="hidden" name="ctznSttemntDetailSn" />
<input type="hidden" name="rtpyrId" />
<table class="table-03 col-12">
<caption>위반정보 상세</caption>
@ -358,7 +357,7 @@ Date Author Description
if(crdnSeCd === '${citizen}'){
isCtzn = true;
imgPk = res.infoDTO.interfaceSeqN;
dataKey = imgPk + ' - ' + res.infoDTO.ctznSttemntDetailSn;
dataKey = imgPk + ' - ' + res.infoDTO.interfaceSeqN;
}else{
isCtzn = false;
imgPk = res.infoDTO.fileLinkId;
@ -553,7 +552,6 @@ Date Author Description
crdnId: $('input[name=crdnId]').val()
,fileLinkId: $('input[name=fileLinkId]').val()
,interfaceSeqN: $('input[name=interfaceSeqN]').val()
,ctznSttemntDetailSn: $('input[name=ctznSttemntDetailSn]').val()
,crdnSeCd: $('select[name=crdnSeCd]').val()
,crdnRegSeCd: $('select[name=crdnRegSeCd]').val()
,crdnYmd: $('input[name=crdnYmd]').val().replaceAll('-','')
@ -581,7 +579,6 @@ Date Author Description
const ctznDTO = {
interfaceSeqN: $('input[name=interfaceSeqN]').val()
,ctznSttemntDetailSn: $('input[name=ctznSttemntDetailSn]').val()
,cvlcptAplcntNm: $('input[name=cvlcptAplcntNm]').val()
,cvlcptAplcntMoblphonNo: $('input[name=cvlcptAplcntMoblphonNo]').val()
,cvlcptAplyCn: $('input[name=cvlcptAplyCn]').val()
@ -604,7 +601,6 @@ Date Author Description
crdnId: $('input[name=crdnId]').val()
,fileLinkId: $('input[name=fileLinkId]').val()
,interfaceSeqN: $('input[name=interfaceSeqN]').val()
,ctznSttemntDetailSn: $('input[name=ctznSttemntDetailSn]').val()
,crdnSeCd: $('select[name=crdnSeCd]').val()
,infoDTO
,ctznDTO

@ -1,449 +0,0 @@
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>
<%@ include file="/WEB-INF/jsp/include/fims/taglib.jsp" %>
<c:set var="bizName" value="주민 신고"/>
<div class="popup" style="min-width: 100px;">
<div class="container-window2" style="max-width: 900px;">
<p class="container-window-header2">
<c:out value="${bizName}"/>(<c:out value="${reqDTO.interfaceSeqN}"/>) 상세
</p>
<div class="container-window-btn3">
<button type="button" id="prev" name="prev" class="btn btn-sm btn-pagination">prev</button>
<div>
<span>
<div id="totCnt" style="padding: 0 10px;"><span></span></div>
</span>
</div>
<button type="button" id="next" name="next" class="btn btn-sm btn-pagination">next</button>
</div>
<form name="frmStmt">
<table class="table-03">
<caption><c:out value="${bizName}"/> 상세</caption>
<colgroup>
<col style="width: 13%;"/>
<col style="width: 20%;"/>
<col style="width: 13%;"/>
<col style="width: 20%;"/>
<col style="width: 13%;"/>
<col style="width: 20%;"/>
</colgroup>
<tbody>
<tr>
<th>기관코드</th>
<td>
<input type="text" name="sggCd" value='<c:out value="${ctznDTO.sggCd}"/>' readonly>
</td>
<th>시스템코드</th>
<td>
<input type="text" name="sysSeCd" value='<c:out value="${ctznDTO.sysSeCd}"/>' readonly>
</td>
<th>민원구분</th>
<td>
<input type="text" name="cvlcptAplySeCd" value='<c:out value="${ctznDTO.cvlcptAplySeCd}"/>' readonly>
</td>
</tr>
<tr>
<th>민원신청번호</th>
<td>
<input type="text" name="petiAncCodeV" value='<c:out value="${ctznDTO.cvlcptAplyNo}"/>' readonly>
</td>
<th>민원접수번호</th>
<td>
<input type="text" name="petiNoC" value='<c:out value="${ctznDTO.cvlcptRcptNo}"/>' readonly>
</td>
<th>민원신청인명</th>
<td>
<input type="text" name="civilNoC" value='<c:out value="${ctznDTO.cvlcptAplcntNm}"/>' readonly>
</td>
</tr>
<tr>
<th>신청인이메일</th>
<td>
<input type="text" name="peterNameV" value='<c:out value="${ctznDTO.cvlcptAplcntEmailAdres}"/>' readonly>
</td>
<th>신청인우편번호</th>
<td>
<input type="text" name="zipCodeC" value='<c:out value="${ctznDTO.cvlcptAplcntZip}"/>' readonly>
</td>
<th>신청인주소</th>
<td>
<input type="text" name="addressV" value='<c:out value="${ctznDTO.cvlcptAplcntAdres}"/>' readonly>
</td>
</tr>
<tr>
<th>신청인핸드폰</th>
<td>
<input type="text" name="celNoV" value='<c:out value="${ctznDTO.cvlcptAplcntMoblphonNo}"/>' readonly>
</td>
<th>신청인전화</th>
<td>
<input type="text" name="telNoV" value='<c:out value="${ctznDTO.cvlcptAplcntTlphonNo}"/>' readonly>
</td>
<th>처리상태</th>
<td>
<input type="text" name="telNoV" value='<c:out value="${ctznDTO.ctznSttemntProcessSttus}"/>' readonly>
</td>
</tr>
<tr>
<th>민원신청제목</th>
<td colspan="5">
<input type="text" name="petiTitleV" value='<c:out value="${ctznDTO.cvlcptAplyTtlNm}"/>' readonly>
</td>
</tr>
<tr>
<th>민원신청내용</th>
<td colspan="5">
<textarea name="petiReasonL" rows="10" readonly><c:out value="${ctznDTO.cvlcptAplyCn}" /></textarea>
</td>
</tr>
<tr>
<th>민원접수일자</th>
<td>
<fmt:parseDate value="${ctznDTO.cvlcptRcptYmd}" var="cvlcptRcptYmd" pattern="yyyyMMdd"/>
<input type="text" name="cvlcptRcptYmd" value='<fmt:formatDate value="${cvlcptRcptYmd}" pattern="yyyy-MM-dd"/>' readonly>
</td>
<th>민원처리기간</th>
<td>
<fmt:parseDate value="${ctznDTO.cvlcptPrcsPrnmntDt}" var="cvlcptPrcsPrnmntDt" pattern="yyyyMMddHHmmss"/>
<input type="text" name="cvlcptPrcsPrnmntDt" value='<fmt:formatDate value="${cvlcptPrcsPrnmntDt}" pattern="yyyy-MM-dd HH:mm:ss"/>' readonly>
</td>
<th>민원등록일시</th>
<td>
<fmt:parseDate value="${ctznDTO.cvlcptRegistDt}" var="cvlcptRegistDt" pattern="yyyyMMddHHmmss"/>
<input type="text" name="cvlcptRegistDt" value='<fmt:formatDate value="${cvlcptRegistDt}" pattern="yyyy-MM-dd HH:mm:ss"/>' readonly>
</td>
</tr>
<%-- <tr>--%>
<%-- <th>등록일시</th>--%>
<%-- <td>--%>
<%-- <fmt:parseDate value="${ctznDTO.regDt}" var="regDt" pattern="yyyyMMddHHmmss"/>--%>
<%-- <input type="text" name="regDt" value="<fmt:formatDate value="${regDt}" pattern="yyyy-MM-dd HH:mm:ss"/>' readonly>--%>
<%-- </td>--%>
<%-- <th>등록인</th>--%>
<%-- <td>--%>
<%-- <input type="text" name="sendYnC" value='<c:out value="${ctznDTO.rgtr}"/>' readonly>--%>
<%-- </td>--%>
<%-- </tr>--%>
</tbody>
</table>
</form>
<c:forEach var="dtlDTO" items="${ctznDtlDTOs}" varStatus="status">
<form name="frmStmtDtl${dtlDTO.ctznSttemntDetailSn}">
<div class="container-window-btn1">
<span id="${dtlDTO.ctznSttemntDetailSn}" >
<c:out value="${bizName}"/>(<c:out value="${reqDTO.interfaceSeqN}"/> - ${dtlDTO.ctznSttemntDetailSn}) 상세
</span>
<c:set var="isProcess" value="${empty dtlDTO.crdnId}"/>
<span id="${dtlDTO.ctznSttemntDetailSn}" >
<c:if test="${isProcess}">
<a href="#" class="btn btn-blue" onclick="fnBiz.save('${dtlDTO.ctznSttemntDetailSn}')">저장</a>
<a href="#" class="btn btn-red" onclick="fnBiz.remove('${dtlDTO.ctznSttemntDetailSn}')">삭제</a>
<c:if test="${!empty dtlDTO.vhrno}">
<a href="#" class="btn btn-darkgray" onclick="fnBiz.reglt('${dtlDTO.ctznSttemntDetailSn}')">단속처리</a>
<a href="#" class="btn btn-darkgray" onclick="fnBiz.erpp('${dtlDTO.ctznSttemntDetailSn}')">서손처리</a>
</c:if>
</c:if>
</span>
</div>
<table class="table-03">
<caption><c:out value="${bizName}"/> 상세</caption>
<colgroup>
<col style="width: 13%;"/>
<col style="width: 20%;"/>
<col style="width: 13%;"/>
<col style="width: 20%;"/>
<col style="width: 13%;"/>
<col style="width: 20%;"/>
</colgroup>
<tbody>
<tr>
<th>순번</th>
<td>
<input type="text" name="ctznSttemntDetailSn" value='<c:out value="${dtlDTO.ctznSttemntDetailSn}"/>' readonly>
</td>
<th>차량번호</th>
<td>
<input type="text" name="vhrno" value='<c:out value="${dtlDTO.vhrno}"/>' <c:if test="${!isProcess}">readonly</c:if>>
</td>
<th>단속ID</th>
<td>
<input type="text" name="crdnId" value='<c:out value="${dtlDTO.crdnId}"/>' readonly>
</td>
</tr>
<tr>
<th>단속일시</th>
<td>
<fmt:parseDate value="${dtlDTO.crdnYmdTime}" var="crdnYmdTime" pattern="yyyyMMddHHmmss"/>
<input type="text" name="crdnYmdTime" value='<fmt:formatDate value="${crdnYmdTime}" pattern="yyyy-MM-dd HH:mm:ss"/>' readonly>
</td>
<th>단속장소</th>
<td>
<input type="text" name="crdnPlc" value='<c:out value="${dtlDTO.crdnPlc}"/>' readonly>
</td>
<th>위반내역</th>
<td>
<input type="text" name="vltnCn" value='<c:out value="${dtlDTO.vltnCn}"/>' readonly>
</td>
</tr>
<tr>
<th>GPS위도</th>
<td>
<input type="text" name="gpsX" value='<c:out value="${dtlDTO.gpsX}"/>' readonly>
</td>
<th>GPS경도</th>
<td>
<input type="text" name="gpsY" value='<c:out value="${dtlDTO.gpsY}"/>' readonly>
</td>
<th>기관코드</th>
<td>
<code:select id="sggCd" name="sggCd" grpId="XIT025" defaultSelect="${dtlDTO.sggCd}" title="기관코드" cls="form-select" alt="기관코드" disabled="true"/>
</td>
</tr>
<tr>
<th>과태료코드</th>
<td>
<code:select id="sysSeCd" name="sysSeCd" grpId="FIM001" defaultSelect="${dtlDTO.sysSeCd}" title="과태료코드" cls="form-select" alt="과태료코드" disabled="true"/>
</td>
<th>처리상태</th>
<td>
<code:select id="ctznSttemntDetailProcessSttus" grpId="FIM010" defaultSelect="${dtlDTO.ctznSttemntDetailProcessSttus}" title="처리상태" cls="form-select" alt="처리상태" disabled="true"/>
</td>
<th>등록일시</th>
<td>
<fmt:parseDate value="${dtlDTO.regDt}" var="regDt" pattern="yyyyMMddHHmmss"/>
<input type="text" name="regDt" value='<fmt:formatDate value="${regDt}" pattern="yyyy-MM-dd HH:mm:ss"/>' readonly>
</td>
</tr>
</tbody>
</table>
</form>
</c:forEach>
</form>
<div class="container-window-btn2">
<span>
<a href="#" class="btn btn-blue" onclick="fnBiz.savePhoto()">save</a>
</span>
</div>
<div id="imgList"></div>
<div>
<img id="uploadImage"/>
</div>
<div class="container-window-btn2">
<span>
<a href="#" id="btnClose" class="btn btn-lightgray">닫기</a>
</span>
</div>
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/fims/framework/cmm/cmmDownloadImg.js" defer></script>
<script type="text/javascript">
/**************************************************************************
* Global Variable
**************************************************************************/
let orgDtlDatas = [];
let downloadImgParam;
var imageEditorPopup = (flag, params) => fnBiz.pagePopup(flag, params);
var callbackReloadImage = () => fnBiz.downloadImg();
let $$Control = new FimsDatasetControl({
prefix:"aaa",
prefixName:"ㅁㅁㅁ",
infoSize:"xl",
urls : {
imageEditor : frwkApiUrl.POPUP_PAINTWEB_IMG_EDITOR,
imageView : frwkApiUrl.POPUP_IMG_VIEW
},
keymapper:info => info ? info.SOME_KEY : "",
dataGetter:obj => obj.data.contents
});
/* *******************************
* Biz function
******************************* */
const fnBiz = {
search: (params) => {
cmmAjax({
showSuccessMsg: false
,url: fimsApiUrl.FIND_EC_CTZN_STMT_DTL_AND_ATTCH_FILES
,data: params
,success: (res) => {
cmmImgDownload('#imgList', res.attchFiles, fnBiz.pagePopup, true);
window.opener.pageNav.reloadNav($('#prev'), $('#next'), $('#totCnt span'));
let formFields = new FimsFormFields("form[name='frmStmt']");
formFields.set(res.ctznDTO);
for(let idx; idx<res.ctznDtlDTOs.length; idx++){
let formFields = new FimsFormFields("form[name='frmStmtDtl"+idx+"']");
formFields.set(res.ctznDtlDTOs[idx]);
}
}
})
}
,downloadImg: () => {
cmmAjax({
showSuccessMsg: false
<%--,url: '<c:url value="/fims/biz/ec/findNatlNewspaperAttchFiles.do"/>' --%>
,url: fimsApiUrl.FIND_EC_NATL_NEWS_PAPER_ATTCH_FILES
//,data: {interfaceSeqN: '${reqDTO.interfaceSeqN}'}
,data: downloadImgParam
,success: (res) => {
cmmImgDownload('#imgList', res.data?.contents, fnBiz.pagePopup, true);
}
})
}
,pagePopup: function(flag, params) {
let popTitle;
let popOption;
switch (flag) {
//FIXME: 이미지에디터 팝업 width, height는 952, 800으로 fix
// paintweb config의 imageWidth, imageHeight, viewportWidth, viewPortHeight 와 같이 연관
case "imageEditor":
popOption = {width: 952, height: 800, resizable:false,scrollbars:'no'};
popTitle = "이미지 에디터";
break;
case "imageView":
popOption = {width: 950, height: 750, resizable:false,scrollbars:'no'};
popTitle = "이미지 보기";
break;
default:
break;
}
window.opener.popup = CmmPopup.open($$Control.urls[flag], params, popOption, popTitle);
//var w = window.open("/imageEditor.do", "", "width=800,height=650,top=0px,left=200px,status=,resizable=false,scrollbars=no");
}
,save: (ctznSttemntDetailSn) => {
let idx = Number(ctznSttemntDetailSn);
if(orgDtlDatas[idx-1] == $('form[name=frmStmtDtl'+ctznSttemntDetailSn+']').serialize()){
alert('변경된 내용이 없습니다.');
return false;
}
const frm = $('form[name=frmStmtDtl'+ctznSttemntDetailSn+']');
const data = {
interfaceSeqN: '${reqDTO.interfaceSeqN}'
,ctznSttemntDetailSn
,vhrno: frm.find('input[name=vhrno]').val().trim()
}
cmmBizAjax('modify', {
<%--url: '<c:url value="/fims/biz/ec/modifyCtznStmtDtl.do"/>'--%>
url: fimsApiUrl.MODIFY_EC_CTZN_STMT_DTL
,data: $.param(data)
})
}
,remove: (ctznSttemntDetailSn) => {
const data = {
interfaceSeqN: '${reqDTO.interfaceSeqN}'
,ctznSttemntDetailSn: ctznSttemntDetailSn
}
if(confirm('첨부파일도 함께 삭제 하시겠습까?')) data.removeImageData = true;
cmmBizAjax('remove', {
<%--url: '<c:url value="/fims/biz/ec/removeCtznStmtDtl.do"/>'--%>
url: fimsApiUrl.REMOVE_EC_CTZN_STMT_DTL
,data: $.param(data)
})
}
,reglt: (ctznSttemntDetailSn) => {
// //FIXME:화면필드값 말고, 서버데이타 기준으로 변경해야 함 - 서버에 저장한 차량번호 기준
// const frm = $('form[name=frmStmtDtl'+ctznSttemntDetailSn+']');
// const vhrno = frm.find('input[name=vhrno]').val().trim();
// if(!vhrno){
// alert('차량번호는 필수 입니다.\n확인 처리후 진행해주세요.');
// return false;
// }
const data = {
interfaceSeqN: '${reqDTO.interfaceSeqN}'
,ctznSttemntDetailSn
}
if(!confirm('단속자료를 생성 하시겠습니까?')) return false;
cmmAjax({
<%--url: '<c:url value="/fims/biz/ec/saveRtReglt.do"/>' --%>
url: fimsApiUrl.SAVE_EC_CTZN_STMT_RT_REGLT
,data: $.param(data)
})
}
,erpp: (ctznSttemntDetailSn) => {
const data = {
interfaceSeqN: '${reqDTO.interfaceSeqN}'
,ctznSttemntDetailSn
}
if(!confirm('서손 처리 하시겠습니까?')) return false;
cmmAjax({
<%--url: '<c:url value="/fims/biz/ec/saveRtErpp.do"/>'--%>
url: fimsApiUrl.SAVE_EC_CTZN_STMT_RT_ERPP
,data: $.param(data)
})
}
,savePhoto: () => {
dragableSave();
}
};
/**************************************************************************
* event
**************************************************************************/
$(() => {
$('img').on('click', () => {
fnBiz.viewImg()
});
$(window).on("unload", function (e) {
window.opener?.unblockUI();
window.opener?.callbackSearch();
return null;
});
$("#btnClose").on('click', () => {
window.close()
});
$('#prev').on('click', () => {
window.opener.pageNav.onClickNavBtn('prev', (gridInfo) => {
fnBiz.search(gridInfo.curRowData)
});
})
$('#next').on('click', () => {
window.opener.pageNav.onClickNavBtn('next', (gridInfo) => {
fnBiz.search(gridInfo.curRowData);
});
});
});
/**************************************************************************
* initialize
**************************************************************************/
$(document).ready(function () {
<c:forEach var="dtlDTO" items="${ctznDtlDTOs}" varStatus="status">
orgDtlDatas.push($('form[name=frmStmtDtl${dtlDTO.ctznSttemntDetailSn}]').serialize())
</c:forEach>
downloadImgParam = {interfaceSeqN: '${reqDTO.interfaceSeqN}'};
fnBiz.downloadImg();
window.opener.pageNav.reloadNav($('#prev'), $('#next'), $('#totCnt span'))
});
</script>

@ -433,7 +433,7 @@
return false;
}
IMPOSE_DATA = arrChecks.map((row) => {
const extnlInterfaceId = row.crdnSeCd === '09' ? row.interfaceSeqN + row.ctznSttemntDetailSn : row.fileLinkId
const extnlInterfaceId = row.crdnSeCd === '09' ? row.interfaceSeqN : row.fileLinkId
return {
crdnId: row.crdnId
,crdnSeCd: row.crdnSeCd

@ -429,7 +429,7 @@
return false;
}
IMPOSE_DATA = arrChecks.map((row) => {
const extnlInterfaceId = row.crdnSeCd === '09' ? row.interfaceSeqN + row.ctznSttemntDetailSn : row.fileLinkId
const extnlInterfaceId = row.crdnSeCd === '09' ? row.interfaceSeqN : row.fileLinkId
return {
crdnId: row.crdnId
,crdnSeCd: row.crdnSeCd

@ -431,7 +431,7 @@
return false;
}
IMPOSE_DATA = arrChecks.map((row) => {
const extnlInterfaceId = row.crdnSeCd === '09' ? row.interfaceSeqN + row.ctznSttemntDetailSn : row.fileLinkId
const extnlInterfaceId = row.crdnSeCd === '09' ? row.interfaceSeqN : row.fileLinkId
return {
crdnId: row.crdnId
,crdnSeCd: row.crdnSeCd

Loading…
Cancel
Save