no message

main
이범준 1 year ago
parent eb350ef38e
commit 92e9d63750

@ -1,39 +0,0 @@
package cokr.xit.fims.biz.cmm.dao;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.fims.biz.cmm.FimsCrackdownDTO;
import cokr.xit.fims.biz.cmm.NtriDTO;
import cokr.xit.fims.biz.ec.CtznStmtDTO;
import cokr.xit.fims.biz.rt.RtDTO;
import cokr.xit.fims.framework.biz.cmm.CmmAnsTmplDTO;
@Mapper
public interface FimsCrackdownMgtMapper {
List<FimsCrackdownDTO.Info> selectCrackdowns(final Map<String,Object> paraMap, final RowBounds rowBounds);
<T> FimsCrackdownDTO.Info selectCrackdown(final T t);
//<T> RtDTO.Reglt selectRtReglt(final T t);
FimsCrackdownDTO.Ctzn selectCtznStmtInfo(final FimsCrackdownDTO.Request reqDTO);
String selectRegltSts(final String crdnId);
void updateRtReglt(final FimsCrackdownDTO.Info dto);
void updateProcessStsAndProcessDtRtReglt(final FimsCrackdownDTO.Info dto);
void saveEcCtznSttemntAnswer(final CtznStmtDTO.Ans dto);
CtznStmtDTO.Ans selectEcCtznSttemntAnswer(final String interfaceSeqN);
CmmAnsTmplDTO.Dtl selectCtznAnswerTmplInfo(final FimsCrackdownDTO.AnsRequest dto);
List<RtDTO.SttusChangeHist> selectProcessSttusChangeHist(final FimsCrackdownDTO.AnsRequest dto);
List<RtDTO.RtpyrHist> selectRtpyrAdresHist(final FimsCrackdownDTO.AnsRequest dto);
List<CmmAnsTmplDTO.Dtl> selectElctrnNticSndng(final FimsCrackdownDTO.AnsRequest dto);
List<FimsCrackdownDTO.CtznSttemntCmplt> selectCtznSttemntCmplt(final FimsCrackdownDTO.CtznSttemntCmplt dto);
void insertCtznSttemntCmplt(FimsCrackdownDTO.CtznSttemntCmplt dto);
int selectCrackdownVhrnoCnt(final String vhrno);
<T> NtriDTO.CrackdownPhotoLayout selectCrackdownPhotoLayout(T t);
}

@ -1,46 +0,0 @@
package cokr.xit.fims.biz.cmm.service;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import cokr.xit.fims.biz.cmm.FimsCrackdownDTO;
import cokr.xit.fims.biz.cmm.NtriDTO;
import cokr.xit.fims.biz.ec.CtznStmtDTO;
import cokr.xit.fims.biz.rt.RtDTO;
import cokr.xit.fims.framework.biz.cmm.CmmAnsTmplDTO;
import cokr.xit.fims.framework.biz.cmm.XitLoginVO;
import cokr.xit.fims.framework.core.utils.XitCmmnUtil;
public interface FimsCrackdownMgtService {
List<FimsCrackdownDTO.Info> findCrackdownInfos(final Map<String, Object> paraMap, final RowBounds pagingInfo);
Map<String,Object> findCrackdownInfo(final FimsCrackdownDTO.Request dto);
void saveImposeTgt(final FimsCrackdownDTO.SaveRequest saveDTO);
void saveEnlight(final FimsCrackdownDTO.SaveRequest saveDTO);
void saveDisallow(final FimsCrackdownDTO.SaveRequest saveDTO);
CmmAnsTmplDTO.Dtl findCtznAnswerTmplInfo(final FimsCrackdownDTO.AnsRequest dto);
CtznStmtDTO.Ans findCtznStmtAnswer(final FimsCrackdownDTO.AnsRequest dto);
List<RtDTO.SttusChangeHist> findProcessSttusChangeHist(final FimsCrackdownDTO.AnsRequest dto);
List<RtDTO.RtpyrHist> findRtpyrAdresHist(final FimsCrackdownDTO.AnsRequest dto);
List<CmmAnsTmplDTO.Dtl> findElctrnNticSndng(final FimsCrackdownDTO.AnsRequest dto);
List<FimsCrackdownDTO.CtznSttemntCmplt> findCtznSttemntCmplt(final FimsCrackdownDTO.CtznSttemntCmplt dto);
void addCtznSttemntCmplt(final FimsCrackdownDTO.CtznSttemntCmplt dto);
void modifyCtznStmtAnswer(final CtznStmtDTO.Ans dto);
String addCtznStmtAnswer(final String interfaceSeqN);
void addCtznStmtAnswers(final List<String> interfaceSeqList);
int findCrackdownVhrnoCnt(final String vhrno);
Map<String,Object> sendCrackdownPhotoToNtri(final List<NtriDTO.PhotoSendRequest> dtoList);
default XitLoginVO getUserInfo(){
return XitCmmnUtil.getUserInfo();
}
}

@ -1,466 +0,0 @@
package cokr.xit.fims.biz.cmm.service.bean;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.concurrent.atomic.AtomicInteger;
import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.fims.biz.cmm.service.FimsCrackdownMgtService;
import cokr.xit.fims.biz.ec.util.NextGenInterfaceUtils;
import cokr.xit.fims.framework.biz.cmm.service.XitFrameCodeService;
import org.apache.commons.io.FileUtils;
import org.apache.ibatis.session.RowBounds;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import cokr.xit.fims.biz.FimsConst;
import cokr.xit.fims.biz.cmm.NtriDTO;
import cokr.xit.fims.biz.cmm.dao.FimsCrackdownMgtMapper;
import cokr.xit.fims.biz.cmm.FimsCrackdownDTO;
import cokr.xit.fims.biz.ec.dao.EcCtznSttemntMapper;
import cokr.xit.fims.biz.ec.CtznStmtAnsSendDTO;
import cokr.xit.fims.biz.ec.CtznStmtDTO;
import cokr.xit.fims.biz.rt.dao.RtCrackdownMgtMapper;
import cokr.xit.fims.biz.rt.RtDTO;
import cokr.xit.fims.biz.utils.FimsBizUtils;
import cokr.xit.fims.framework.biz.cmm.CmmAnsTmplDTO;
import cokr.xit.fims.framework.biz.cmm.CmmFileDTO;
import cokr.xit.fims.framework.biz.cmm.service.CmmFileService;
import cokr.xit.fims.framework.biz.util.ExtnlInterfaceUtils;
import cokr.xit.fims.framework.support.exception.BizRuntimeException;
import cokr.xit.fims.framework.support.util.Checks;
import cokr.xit.fims.framework.support.util.constants.MessageKey;
import cokr.xit.fims.framework.support.util.xml.XmlParseUtils;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import javax.annotation.Resource;
@Slf4j
@RequiredArgsConstructor
@Service
public class FimsCrackdownMgtServiceBean extends AbstractServiceBean implements FimsCrackdownMgtService {
private String uploadResPath = "/data/fims/extnl/rcv";
private String uploadRootPath ="/data/fims/upload";
private String sendFilePath = "/data/fims/SND";
private String uploadTempPath = "/temp";
@Resource(name = "xitFrameCodeService")
private XitFrameCodeService xitFrameCodeService;
private final FimsCrackdownMgtMapper mapper;
private final RtCrackdownMgtMapper rtCrackdownMgtMapper;
private final EcCtznSttemntMapper ecCtznSttemntMapper;
private final CmmFileService cmmFileService;
@Override
@Transactional(readOnly = true)
public List<FimsCrackdownDTO.Info> findCrackdownInfos(final Map<String, Object> paraMap, final RowBounds rowBounds){
return mapper.selectCrackdowns(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public Map<String,Object> findCrackdownInfo(FimsCrackdownDTO.Request reqDTO) {
Map<String,Object> rtnMap = new HashMap<>();
// 단속구분코드 : 01-고정형CCTV, 02-주행형CCTV, 07-버스장착형CCTV, 09-시민신고(국민신문고)
FimsCrackdownDTO.Info infoDTO = new FimsCrackdownDTO.Info();
RtDTO.Rtpyr rtpyrDTO = new RtDTO.Rtpyr();
FimsCrackdownDTO.Ctzn ctznDTO = new FimsCrackdownDTO.Ctzn();
if(Checks.isNotEmpty(reqDTO.getCrdnId())){
infoDTO = mapper.selectCrackdown(reqDTO);
if(Checks.isNotEmpty(infoDTO.getRtpyrId())){
rtpyrDTO = rtCrackdownMgtMapper.selectRtRtpyr(infoDTO.getRtpyrId());
}
if(Objects.equals(reqDTO.getCrdnSeCd(), FimsConst.CrdnSeCd.CITIZEN.getCode())){
ctznDTO = mapper.selectCtznStmtInfo(reqDTO);
}
}
rtnMap.put("infoDTO", infoDTO);
rtnMap.put("rtpyrDTO", rtpyrDTO);
rtnMap.put("ctznDTO", ctznDTO);
return rtnMap;
}
@Override
@Transactional
public void saveImposeTgt(final FimsCrackdownDTO.SaveRequest saveDTO) {
FimsCrackdownDTO.Info infoDTO = saveDTO.getInfoDTO();
FimsCrackdownDTO.Ctzn ctznDTO = saveDTO.getCtznDTO();
RtDTO.Rtpyr rtpyrDTO = saveDTO.getRtpyrDTO();
// 1. 납부자 정보 등록 및 변경
if (Checks.isEmpty(rtpyrDTO.getRtpyrId())) {
rtpyrDTO.setRgtr(getUserInfo().getUniqId());
rtCrackdownMgtMapper.insertRtRtpyr(rtpyrDTO);
} else {
rtpyrDTO.setMdfr(getUserInfo().getUniqId());
rtCrackdownMgtMapper.updateRtRtpyr(rtpyrDTO);
}
// 2. 단속 테이블 정보 반영 - 처리상태, 시구군, 법정동, 특기사항, 특기사항코드, 위반코드, 차량명, 차대번호
// 진행상태 - 부과대상
//시군구 추가
//면제차량 여부 추가 : $('input:checkbox[name=sysSeCd]:checked').val()
infoDTO.setRtpyrId(rtpyrDTO.getRtpyrId());
infoDTO.setCrdnSttsCd(FimsConst.CrdnSttsCd.CRACKDOWN.getCode());
infoDTO.setMdfr(getUserInfo().getUniqId());
// 단속 상태 변경 여부 - 이력테이블
boolean isStsChange = !Objects.equals(infoDTO.getCrdnSttsCd(), mapper.selectRegltSts(infoDTO.getCrdnId()));
mapper.updateRtReglt(infoDTO);
// 이력테이블
if(isStsChange){
rtCrackdownMgtMapper.insertRtProcessSttsChangeHist(
RtDTO.SttusChangeHist.builder()
.crdnId(infoDTO.getCrdnId())
.crdnSttsCd(infoDTO.getCrdnSttsCd())
.rgtr(getUserInfo().getUniqId())
.build()
);
}
// 2. 외부연계정보 반영 :
if(!FimsConst.CrdnSeCd.CITIZEN.getCode().equals(saveDTO.getCrdnSeCd())
&& Checks.isNotEmpty(saveDTO.getFileLinkId())){
return;
}
// 시민신고인 경우
if(FimsConst.CrdnSeCd.CITIZEN.getCode().equals(saveDTO.getCrdnSeCd())
&& Checks.isNotEmpty(saveDTO.getInterfaceSeqN()) ) {
updateCtznAndAnswer(saveDTO, infoDTO, FimsConst.CtznStmtDtlStsCode.ACCEPTANCE.getCode(),
FimsConst.AnswerSeCode.IMPOSE.getCode(), "01");
}
}
@Override
@Transactional
public void saveEnlight(final FimsCrackdownDTO.SaveRequest saveDTO) {
FimsCrackdownDTO.Info infoDTO = saveDTO.getInfoDTO();
FimsCrackdownDTO.Ctzn ctznDTO = saveDTO.getCtznDTO();
RtDTO.Rtpyr rtpyrDTO = saveDTO.getRtpyrDTO();
// 1. 납부자 정보 등록 및 변경
if (Checks.isEmpty(rtpyrDTO.getRtpyrId())) {
rtpyrDTO.setRgtr(getUserInfo().getUniqId());
rtCrackdownMgtMapper.insertRtRtpyr(rtpyrDTO);
} else {
rtpyrDTO.setMdfr(getUserInfo().getUniqId());
rtCrackdownMgtMapper.updateRtRtpyr(rtpyrDTO);
}
// 2. 단속 테이블 정보 반영 - 처리상태, 시구군, 법정동, 특기사항, 특기사항코드, 위반코드, 차량명, 차대번호
// 진행상태 - 부과대상
//시군구 추가
//면제차량 여부 추가 : $('input:checkbox[name=sysSeCd]:checked').val()
infoDTO.setRtpyrId(rtpyrDTO.getRtpyrId());
infoDTO.setCrdnSttsCd(FimsConst.CrdnSttsCd.ENLIGHT.getCode());;
infoDTO.setMdfr(getUserInfo().getUniqId());
// 단속 상태 변경 여부 - 이력테이블
boolean isStsChange = !Objects.equals(infoDTO.getCrdnSttsCd(), mapper.selectRegltSts(infoDTO.getCrdnId()));
mapper.updateRtReglt(infoDTO);
// 이력테이블
if(isStsChange){
rtCrackdownMgtMapper.insertRtProcessSttsChangeHist(
RtDTO.SttusChangeHist.builder()
.crdnId(infoDTO.getCrdnId())
.crdnSttsCd(infoDTO.getCrdnSttsCd())
.rgtr(getUserInfo().getUniqId())
.build()
);
}
// 2. 외부연계정보 반영 :
if(!FimsConst.CrdnSeCd.CITIZEN.getCode().equals(saveDTO.getCrdnSeCd())
&& Checks.isNotEmpty(saveDTO.getFileLinkId())){
return;
}
// 시민신고인 경우
if(FimsConst.CrdnSeCd.CITIZEN.getCode().equals(saveDTO.getCrdnSeCd())
&& Checks.isNotEmpty(saveDTO.getInterfaceSeqN()) ) {
updateCtznAndAnswer(saveDTO, infoDTO, FimsConst.CtznStmtDtlStsCode.ACCEPTANCE.getCode(),
FimsConst.AnswerSeCode.ENLIGHT.getCode(), infoDTO.getEnlightResnCode());
}
}
@Override
@Transactional
public void saveDisallow(final FimsCrackdownDTO.SaveRequest saveDTO) {
FimsCrackdownDTO.Info infoDTO = saveDTO.getInfoDTO();
RtDTO.Erpp erppDTO = saveDTO.getErppDTO();
infoDTO.setCrdnSttsCd(FimsConst.CrdnSttsCd.DISALLOW.getCode());
infoDTO.setMdfr(getUserInfo().getUniqId());
// 단속 상태 변경 여부 - 이력테이블
boolean isStsChange = !Objects.equals(infoDTO.getCrdnSttsCd(), mapper.selectRegltSts(infoDTO.getCrdnId()));
mapper.updateProcessStsAndProcessDtRtReglt(infoDTO);
// 이력테이블
if(isStsChange){
rtCrackdownMgtMapper.insertRtProcessSttsChangeHist(
RtDTO.SttusChangeHist.builder()
.crdnId(infoDTO.getCrdnId())
.crdnSttsCd(infoDTO.getCrdnSttsCd())
.rgtr(getUserInfo().getUniqId())
.build()
);
}
erppDTO.setRgtr(getUserInfo().getUniqId());
erppDTO.setSysSeCd(getUserInfo().getOrgId());
erppDTO.setSggCd(xitFrameCodeService.instCdToSggCd(getUserInfo().getNsttCd()));
rtCrackdownMgtMapper.insertRtErpp(erppDTO);
// 시민신고인 경우
if(FimsConst.CrdnSeCd.CITIZEN.getCode().equals(saveDTO.getCrdnSeCd())
&& Checks.isNotEmpty(saveDTO.getInterfaceSeqN())) {
updateCtznAndAnswer(saveDTO, infoDTO, FimsConst.CtznStmtDtlStsCode.NON_ACCEPTABLE.getCode(),
FimsConst.AnswerSeCode.DISALLOW.getCode(), erppDTO.getLevyExclRsnCd());
}
}
@Override
public CmmAnsTmplDTO.Dtl findCtznAnswerTmplInfo(final FimsCrackdownDTO.AnsRequest dto) {
// 부과인 경우 사유코드 기본값
if(Objects.equals(dto.getAnswerSeCode(), FimsConst.AnswerSeCode.IMPOSE.getCode()))
dto.setResnCode("01");
return mapper.selectCtznAnswerTmplInfo(dto);
}
@Override
public CtznStmtDTO.Ans findCtznStmtAnswer(final FimsCrackdownDTO.AnsRequest dto) {
return ecCtznSttemntMapper.selectEcCtznSttemntAnswer(dto);
}
@Override
public List<RtDTO.SttusChangeHist> findProcessSttusChangeHist(final FimsCrackdownDTO.AnsRequest dto){
return mapper.selectProcessSttusChangeHist(dto);
}
@Override
public List<RtDTO.RtpyrHist> findRtpyrAdresHist(final FimsCrackdownDTO.AnsRequest dto){
return mapper.selectRtpyrAdresHist(dto);
}
@Override
public List<CmmAnsTmplDTO.Dtl> findElctrnNticSndng(final FimsCrackdownDTO.AnsRequest dto){
return mapper.selectElctrnNticSndng(dto);
}
@Override
public List<FimsCrackdownDTO.CtznSttemntCmplt> findCtznSttemntCmplt(final FimsCrackdownDTO.CtznSttemntCmplt dto) {
return mapper.selectCtznSttemntCmplt(dto);
}
@Override
public void addCtznSttemntCmplt(final FimsCrackdownDTO.CtznSttemntCmplt dto) {
dto.setSggCd(xitFrameCodeService.instCdToSggCd(getUserInfo().getNsttCd()));
dto.setRgtr(getUserInfo().getUniqId());
mapper.insertCtznSttemntCmplt(dto);
}
@Override
public void modifyCtznStmtAnswer(final CtznStmtDTO.Ans dto) {
ecCtznSttemntMapper.updatecvlcptPrcsRsltCnOfEcCtznSttemntAnswer(dto);
}
@Override
public void addCtznStmtAnswers(List<String> interfaceSeqList) {
interfaceSeqList.forEach(this::addCtznStmtAnswer);
}
@Override
@Transactional
public String addCtznStmtAnswer(final String interfaceSeqN) {
// 답변 xml 파일 생성
List<CmmFileDTO.FileDtl> fileDtlList = cmmFileService.findFilesByInfTypeAndInfKey(
CmmFileDTO.FileMst.builder()
.infType(FimsConst.FileInfType.NATL_NEWS_PAPER_RCV.getCode())
.infKey(interfaceSeqN+"01")
.build());
String tgtPath = uploadResPath + fileDtlList.get(0).getFilePath();
final String fileName = interfaceSeqN + ".xml";
CtznStmtDTO.Ans ansDTO = mapper.selectEcCtznSttemntAnswer(interfaceSeqN);
CtznStmtAnsSendDTO sendDto = CtznStmtDTO.Ans.getCtznStmtAnsDTO(ansDTO);
String xmlStr = XmlParseUtils.writeObjectToXml(sendDto, CtznStmtAnsSendDTO.class);
byte[] bytes = xmlStr.getBytes();
Path path = Paths.get(tgtPath + "/" + fileName);
try {
// 대상폴더 미 존재시 생성
File f = FileUtils.getFile(tgtPath);
if(!f.exists()) f.mkdirs();
Files.write(path, bytes);
} catch (IOException e) {
String msg = "시민 신고 답변 파일 생성 오류";
e.printStackTrace();
log.error("{}", msg);
throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, msg);
}
// 답변 테이블 update : cvlcpt_prcs_cmptn_dt
//
// 시민신고 상태 - 답변완료 update
//ecCtznSttemntMapper.update();
return tgtPath + "/" + fileName;
}
/**
* <pre>
*
* 1.
* 2.
* 2-1.
* 2-2.
* @param saveDTO
* @param infoDTO
* @param ctznSttemntDetailStatusCode
* @param answerSeCode
* @param resnCode
* </pre>
*/
@Transactional
public void updateCtznAndAnswer(FimsCrackdownDTO.SaveRequest saveDTO, FimsCrackdownDTO.Info infoDTO, final String ctznSttemntDetailStatusCode, final String answerSeCode, final String resnCode) {
// 1. 시민신고 상세 상태 변경
CtznStmtDTO.Request ctznRequest = getCtznRequestDTO(saveDTO);
// 2. 시민신고상세의 모든 상태가 수용 또는 미수용인 경우
//if(mapper.selectPossiblecheckAns(infoDTO.getInterfaceSeqN()) == 0){
// 2-1. 시민신고 마스터 상태 답변 가능 상태로 변경
//mapper.update(ctznRequest);
// 2-2. 시민신고 답변 데이타 생성
// GET 답변 템플릿
FimsCrackdownDTO.AnsRequest ansReqDTO = new FimsCrackdownDTO.AnsRequest();
ansReqDTO.setTmplatId(FimsConst.TmplatId.CTZN.getCode());
ansReqDTO.setAnswerSeCode(answerSeCode);
ansReqDTO.setResnCode(resnCode);
ansReqDTO.setVhrno(infoDTO.getVhrno());
String ansTxt = getAnswerText(mapper.selectCtznAnswerTmplInfo(ansReqDTO));
CtznStmtDTO.Ans ansDTO = CtznStmtDTO.Ans.builder()
.sggCd(xitFrameCodeService.instCdToSggCd(getUserInfo().getNsttCd()))
.sysSeCd(getUserInfo().getOrgId())
.interfaceSeqN(saveDTO.getInterfaceSeqN())
.cvlcptPrcsRsltCn(ansTxt)
.rgtr(getUserInfo().getUniqId())
.build();
mapper.saveEcCtznSttemntAnswer(ansDTO);
//}
}
public int findCrackdownVhrnoCnt(final String vhrno){
return mapper.selectCrackdownVhrnoCnt(vhrno);
}
/**
* <pre>
* /
* FIMS -> (file to file)
* zip
* @param dtoList List<NtriDTO.PhotoSendRequest>
* @return Map successCnt - , errorList -
* </pre>
*/
@Override
public Map<String,Object> sendCrackdownPhotoToNtri(List<NtriDTO.PhotoSendRequest> dtoList) {
AtomicInteger sucessCnt = new AtomicInteger(0);
List<NtriDTO.PhotoFileError> errorList = new ArrayList<>();
dtoList.forEach(param -> {
NtriDTO.CrackdownPhotoLayout layoutDto = mapper.selectCrackdownPhotoLayout(param);
List<CmmFileDTO.FileDtl> fileDtlList = cmmFileService.findFilesByInfTypeAndInfKey(
CmmFileDTO.FileMst.builder()
.infType(FimsBizUtils.getFileInfType(param.getCrdnSeCd()))
.infKey(param.getExtnlInterfaceId())
.build());
NtriDTO.PhotoFileError errDTO = NextGenInterfaceUtils.makeNtriInterfacePhotoZip(
param,
layoutDto,
fileDtlList,
FimsBizUtils.getSendNtriPhotoInterfaceFileName(param.getCrdnSeCd()),
uploadRootPath,
sendFilePath,
uploadTempPath
);
// TODO :: 성공시 상태 변경 필요 - 시점은?? ESB 연계 성공시 해야 하는지 결정 필요
// TODO :: ESB 연계 성공시 해야 한다면 체크 포인트 필요 -> 배치로 처리 해야 될 듯
if(errDTO == null){
sucessCnt.getAndIncrement();
}else{
errorList.add(errDTO);
}
});
Map<String, Object> rsltMap = new HashMap<>();
rsltMap.put("successCnt", sucessCnt.get());
rsltMap.put("errorList", errorList);
return rsltMap;
}
private CtznStmtDTO.Request getCtznRequestDTO(final FimsCrackdownDTO.SaveRequest saveDTO){
return CtznStmtDTO.Request
.builder()
.mdfr(getUserInfo().getUniqId())
.interfaceSeqN(saveDTO.getInterfaceSeqN())
.build();
}
private String getAnswerText(CmmAnsTmplDTO.Dtl dto){
return Optional.of(dto)
.map(o -> (Checks.isNotEmpty(o.getPrface())? o.getPrface() : "")
+ (Checks.isNotEmpty(o.getAnswerCn())? o.getAnswerCn() : "")
+ (Checks.isNotEmpty(o.getTlface())? o.getTlface(): ""))
.orElseGet(() -> "");
}
}

@ -1,293 +0,0 @@
package cokr.xit.fims.biz.cmm.web;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import cokr.xit.foundation.web.AbstractController;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.fims.biz.FimsConst;
import cokr.xit.fims.biz.cmm.FimsCrackdownDTO;
import cokr.xit.fims.biz.cmm.NtriDTO;
import cokr.xit.fims.biz.cmm.service.FimsCrackdownMgtService;
import cokr.xit.fims.biz.ec.CtznStmtDTO;
import cokr.xit.fims.biz.rt.RtDTO;
import cokr.xit.fims.biz.rt.service.RtCrackdownMgtService;
import cokr.xit.fims.biz.utils.FimsBizUtils;
import cokr.xit.fims.framework.biz.cmm.service.CmmFileService;
import cokr.xit.fims.framework.core.constants.FrameworkConstants;
import cokr.xit.fims.framework.support.mybatis.MybatisUtils;
import cokr.xit.fims.framework.support.util.AjaxMessageMapRenderer;
import cokr.xit.fims.framework.support.util.constants.MessageKey;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
/**
*
*/
@Slf4j
@RequiredArgsConstructor
@Controller
@RequestMapping(name = "", value = "/fims/{biz}/cmm")
public class FimsCrackDownMgtController extends AbstractController {
private String fileRcvRoot = "/data/fims/extnl/rcv";
private String rcvBusinstallCctvPath = "/businstall";
private String rcvNatlNewspaperPath ="/natl-newspaper";
private String extnlCarUrl = "http://211.119.124.9:18090";
private final FimsCrackdownMgtService service;
private final RtCrackdownMgtService rtService;
private final CmmFileService cmmFileService;
@RequestMapping(name = "", value = "/cmmFimsCrackdownEditPopup")
public ModelAndView cmmFimsCrackdownEditPopup(final FimsCrackdownDTO.Request dto){
ModelAndView mav = new ModelAndView();
mav.addObject("extnlCarUrl", extnlCarUrl);
mav.addObject("param", dto);
if(Objects.equals(FimsConst.CrdnSttsCd.CRACKDOWN_INIT.getCode(), dto.getCrdnSttsCd())) {
mav.addObject("pageTitle", "초기자료 편집");
}else if(Objects.equals(FimsConst.CrdnSttsCd.CRACKDOWN.getCode(), dto.getCrdnSttsCd())) {
mav.addObject("pageTitle", "과태료 시스템 등록");
}
FimsConst.CrdnSeCd crdnSeCdEnum = null;
if(dto.getCrdnSeCd() != null && !dto.getCrdnSeCd().equals("")){
for (FimsConst.CrdnSeCd e : FimsConst.CrdnSeCd.values()) {
if (e.getCode().equals(dto.getCrdnSeCd())) {
crdnSeCdEnum = e;
break;
}
}
} else {
crdnSeCdEnum = FimsConst.CrdnSeCd.UNKNOWN;
}
mav.addObject("txtTitle", Objects.requireNonNull(crdnSeCdEnum, "초기자료 편집").getDesc());
mav.setViewName(FimsConst.FIMS_JSP_BASE_PATH + "cmm/cmmFimsCrackdownEditPopup.popup");
return mav;
}
@RequestMapping(name = "", value = "/cmmFimsCrackdownTotMgtPopup")
public ModelAndView cmmFimsCrackdownTotMgtPopup(final FimsCrackdownDTO.Request dto){
ModelAndView mav = new ModelAndView();
mav.addObject("param", dto);
mav.addObject("pageTitle", "개별총정보 ");
mav.setViewName(FimsConst.FIMS_JSP_BASE_PATH + "cmm/cmmFimsCrackdownTotMgtPopup.popup");
return mav;
}
@RequestMapping(name = "", value = "/cmmCrackdownRcvFilePopup")
public ModelAndView cmmCrackdownRcvFilePopup(){
ModelAndView mav = new ModelAndView(FimsConst.FIMS_JSP_BASE_PATH +"cmm/cmmCrackdownRcvFilePopup.popup");
mav.addObject("busInstallDirPath", fileRcvRoot + rcvBusinstallCctvPath);
mav.addObject("ctznDirPath", fileRcvRoot + rcvNatlNewspaperPath);
return mav;
}
@RequestMapping(name = "", value = "/cmmEnlightDisallowPopup")
public ModelAndView cmmEnlightDisallowPopup(final String bizDiv){
ModelAndView mav = new ModelAndView(FimsConst.FIMS_JSP_BASE_PATH +"cmm/cmmEnlightDisallowPopup.popup");
mav.addObject("pageTitle", "서손 / 계도 처리");
mav.addObject("bizDiv", bizDiv);
if(bizDiv.equals(FimsConst.PopupWorkDiv.ENLIGHT.getCode())) {
mav.addObject("txtTitle", FimsConst.PopupWorkDiv.ENLIGHT.getDesc());
}else {
mav.addObject("txtTitle", FimsConst.PopupWorkDiv.DISALLOW.getDesc());
}
return mav;
}
@RequestMapping(name = "", value = "/cmmImposePopup")
public ModelAndView cmmImposePopup(final String bizDiv){
ModelAndView mav = new ModelAndView(FimsConst.FIMS_JSP_BASE_PATH +"cmm/cmmImposePopup.popup");
mav.addObject("pageTitle", "과태료 시스템 등록");
mav.addObject("txtTitle", "과태료 시스템 등록");
return mav;
}
@RequestMapping(name = "", value = "/cmmCtznAnswerPreviewPopup")
public ModelAndView cmmCtznAnswerPreviewPopup(final FimsCrackdownDTO.AnsRequest dto){
ModelAndView mav = new ModelAndView(FimsConst.FIMS_JSP_BASE_PATH +"cmm/cmmCtznAnswerPreviewPopup.popup");
mav.addObject("pageTitle", "답변내용미리보기");
mav.addObject("param", dto);
mav.addObject("txtTitle", "답변 내용");
return mav;
}
@RequestMapping(name = "", value = "/cmmCtznComplaintHistPopup")
public ModelAndView cmmCtznComplaintHistPopup(final FimsCrackdownDTO.CtznCmpltRequest dto){
ModelAndView mav = new ModelAndView();
mav.addObject("param", dto);
mav.addObject("pageTitle", "민원 이력 ");
mav.setViewName(FimsConst.FIMS_JSP_BASE_PATH + "cmm/cmmCtznComplaintHistPopup.popup");
return mav;
}
@RequestMapping(name = "", value = "/cmmCarCrackdownCntPopup")
public ModelAndView cmmCarCrackdownCntPopup(final RtDTO.Request dto){
ModelAndView mav = new ModelAndView();
mav.addObject("param", dto);
mav.addObject("pageTitle", "차량 단속건 조회");
mav.setViewName(FimsConst.FIMS_JSP_BASE_PATH + "cmm/cmmCarCrackdownCntPopup.popup");
return mav;
}
@RequestMapping(name = "", value = "/findCrackdownInfos")
public ModelAndView findCrackdownInfos(@RequestParam final Map<String,Object> paraMap) {
return new ModelAndView("jsonView").addObject("result",service.findCrackdownInfos(paraMap, MybatisUtils.getPagingInfo(paraMap)));
}
@RequestMapping(name = "", value = "/findCrackdownInfoAndAttchFiles")
public ModelAndView findCrackdownInfoAndAttchFiles(final FimsCrackdownDTO.Request dto) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
Map<String,Object> dtlData = service.findCrackdownInfo(dto);
mav.addAllObjects(dtlData);
mav.addObject("attchFiles", null);
//mav.addObject("attchFiles", rtService.findRtRegltAttchFiles(dto));
return mav;
}
@RequestMapping(name = "", value = "/findRcvPathFiles")
public ModelAndView findRcvPathFiles(final String dirPath){
return new ModelAndView("jsonView").addObject("result",FimsBizUtils.getRcvPathFiles(dirPath));
}
/**
*
* @param saveDTO
* @return
*/
@PostMapping(name = "", value="/saveImposeTgt")
public ModelAndView saveImposeTgt(@RequestBody FimsCrackdownDTO.SaveRequest saveDTO){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.saveImposeTgt(saveDTO);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS);
return mav;
}
@PostMapping(name = "", value="/saveEnlight")
public ModelAndView saveEnlight(@RequestBody FimsCrackdownDTO.SaveRequest saveDTO){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.saveEnlight(saveDTO);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS);
return mav;
}
@PostMapping(name = "", value="/saveDisallow")
public ModelAndView saveDisallow(@RequestBody FimsCrackdownDTO.SaveRequest saveDTO){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.saveDisallow(saveDTO);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS);
return mav;
}
@RequestMapping(name = "", value = "/findCtznStmtAnswer")
public ModelAndView findCtznStmtAnswer(final FimsCrackdownDTO.AnsRequest dto){
return new ModelAndView("jsonView").addObject("result",service.findCtznStmtAnswer(dto));
}
@PostMapping(name = "", value = "/modifyCtznStmtAnswer")
public ModelAndView modifyCtznStmtAnswer(final CtznStmtDTO.Ans dto){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.modifyCtznStmtAnswer(dto);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS);
return mav;
}
@RequestMapping(name = "", value = "/addCtznStmtAnswer")
public ModelAndView addCtznStmtAnswer(final String interfaceSeqN) {
return new ModelAndView("jsonView").addObject("result",service.addCtznStmtAnswer(interfaceSeqN));
}
@RequestMapping(name = "", value = "/addCtznStmtAnswers")
public ModelAndView addCtznStmtAnswers(@RequestBody final List<String> interfaceSeqList) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.addCtznStmtAnswers(interfaceSeqList);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_SUCCESS);
return mav;
}
@RequestMapping(name = "", value = "/findCtznAnswerTmplInfo")
public ModelAndView findCtznAnswerTmplInfo(final FimsCrackdownDTO.AnsRequest dto){
return new ModelAndView("jsonView").addObject("result",service.findCtznAnswerTmplInfo(dto));
}
@RequestMapping(name = "", value = "/findProcessSttusChangeHist")
public ModelAndView findProcessSttusChangeHist(final FimsCrackdownDTO.AnsRequest dto){
return new ModelAndView("jsonView").addObject("result",service.findProcessSttusChangeHist(dto));
}
@RequestMapping(name = "", value = "/findRtpyrAdresHist")
public ModelAndView findRtpyrAdresHist(final FimsCrackdownDTO.AnsRequest dto){
return new ModelAndView("jsonView").addObject("result",service.findRtpyrAdresHist(dto));
}
@RequestMapping(name = "", value = "/findElctrnNticSndng")
public ModelAndView findElctrnNticSndng(final FimsCrackdownDTO.AnsRequest dto){
return new ModelAndView("jsonView").addObject("result",service.findElctrnNticSndng(dto));
}
@RequestMapping(name = "", value = "/findCtznSttemntCmplt")
public ModelAndView findCtznSttemntCmplt(final FimsCrackdownDTO.CtznSttemntCmplt dto){
return new ModelAndView("jsonView").addObject("result",service.findCtznSttemntCmplt(dto));
}
@RequestMapping(name = "", value = "/addCtznSttemntCmplt")
public ModelAndView addCtznSttemntCmplt(final FimsCrackdownDTO.CtznSttemntCmplt dto) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.addCtznSttemntCmplt(dto);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_SUCCESS);
return mav;
}
@RequestMapping(name = "", value = "/findCrackdownVhrnoCnt")
public ModelAndView findCrackdownVhrnoCnt(final String vhrno){
return new ModelAndView("jsonView").addObject("result",service.findCrackdownVhrnoCnt(vhrno));
}
/**
* <pre>
* /
* FIMS -> (file to file)
* zip
* @param dtoList List<NtriDTO.PhotoSendRequest>
* @return
* </pre>
*/
@RequestMapping(name = "", value = "/sendCrackdownPhotoToNtri")
public ModelAndView sendCrackdownPhotoToNtri(@RequestBody final List<NtriDTO.PhotoSendRequest> dtoList){
return new ModelAndView("jsonView").addObject("result",service.sendCrackdownPhotoToNtri(dtoList));
}
}

@ -1,29 +0,0 @@
package cokr.xit.fims.biz.ec.dao;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.fims.biz.ec.CctvCrackdownDTO;
@Mapper
public interface EcCctvCrackdownMapper {
List<CctvCrackdownDTO.ExtrlRegltCntc> selectEcExtrlRegltCntcs(final Map<String, Object> paraMap, final RowBounds rowBounds);
<T> CctvCrackdownDTO.ExtrlRegltCntc selectEcExtrlRegltCntc(final T t);
int insertEcExtrlRegltCntc(final CctvCrackdownDTO.ExtrlRegltCntc dto);
void updateEcExtrlRegltCntc(final CctvCrackdownDTO.ExtrlRegltCntc dto);
//-----------------------------------------------------
// 단속자료 생성 - 단속 처리
//-----------------------------------------------------
<T> void insertRtRegltFromEcExtrRegltCntc(final T t);
//-----------------------------------------------------
// 단속자료 생성 - 서손 처리
//-----------------------------------------------------
void insertRtErppFromEcExtrRegltCntc(final CctvCrackdownDTO.Request dto);
void updateStatusAndCrdnIdOfEcExtrRegltCntc(final CctvCrackdownDTO.Request dto);
}

@ -1,55 +0,0 @@
package cokr.xit.fims.biz.ec.dao;
import java.util.List;
import java.util.Map;
import cokr.xit.fims.biz.FimsConst;
import cokr.xit.fims.biz.cmm.FimsCrackdownDTO;
import org.apache.ibatis.session.RowBounds;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.fims.biz.ec.CtznStmtDTO;
import cokr.xit.fims.framework.biz.cmm.CmmFileDTO;
@Mapper
public interface EcCtznSttemntMapper {
List<CtznStmtDTO.Mst> selectEcCtznSttemnts(final Map<String, Object> paraMap, final RowBounds rowBounds);
CtznStmtDTO.Mst selectEcCtznSttemnt(final CtznStmtDTO.Request dto);
List<CtznStmtDTO.Dtl> selectEcCtznSttemntDetails(final CtznStmtDTO.Request dto);
CtznStmtDTO.Dtl selectEcCtznSttemntDetail(final CtznStmtDTO.Request dto);
int insertEcCtznSttemnt(final CtznStmtDTO.Mst dto);
int deleteEcCtznSttemnt(final CtznStmtDTO.Dtl dtl);
List<CtznStmtDTO.Mst> selectCtznSttemnts(final Map<String, Object> paraMap, final RowBounds rowBounds);
//-----------------------------------------------------
// 단속자료 생성 - 단속 처리
//-----------------------------------------------------
void insertRtRegltFromCtznStmt(final FimsCrackdownDTO.Request dto);
//-----------------------------------------------------
// 단속자료 생성 - 서손 처리
//-----------------------------------------------------
void insertRtErppFromCtznStmt(final CtznStmtDTO.Request dto);
CtznStmtDTO.Ans selectCreateEcCtznSttemntAnswer(final CtznStmtDTO.Request dto);
<T> CtznStmtDTO.Ans selectEcCtznSttemntAnswer(final T t);
void saveEcCtznSttemntAnswer(final CtznStmtDTO.Ans dto);
void updatecvlcptPrcsRsltCnOfEcCtznSttemntAnswer(final CtznStmtDTO.Ans dto);
int dragAndDropSaveImg(final CmmFileDTO.FileDtl vo);
int dragAndDropDeleteImg(final CmmFileDTO.FileDtl vo);
List<CmmFileDTO> dragAndDropIsExists(final CmmFileDTO.FileDtl vo);
}

@ -1,22 +0,0 @@
package cokr.xit.fims.biz.ec.dao;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.fims.biz.ec.NatlNewspaperRcvDTO;
import cokr.xit.fims.biz.ec.NatlNewspaperRcvXmlDTO;
@Mapper
public interface EcNatlNewspaperMapper {
List<NatlNewspaperRcvDTO> selectEsbInterfaces(Map<String, Object> paraMap, RowBounds rowBounds);
NatlNewspaperRcvDTO selectEsbInterface(final String interfaceSeqN);
int insertEsbInterface(final NatlNewspaperRcvXmlDTO dto);
int insertEsbInterfaceFile(final NatlNewspaperRcvXmlDTO dto);
}

@ -1,160 +0,0 @@
package cokr.xit.fims.biz.ec.web;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
import cokr.xit.foundation.web.AbstractController;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.fims.biz.FimsConst;
import cokr.xit.fims.biz.ec.CctvCrackdownDTO;
import cokr.xit.fims.biz.ec.FolderReqDTO;
import cokr.xit.fims.biz.ec.service.EcCctvCrackdownService;
import cokr.xit.fims.biz.utils.FimsBizUtils;
import cokr.xit.fims.framework.biz.cmm.CmmFileDTO;
import cokr.xit.fims.framework.biz.cmm.service.CmmFileService;
import cokr.xit.fims.framework.core.constants.FrameworkConstants;
import cokr.xit.fims.framework.support.mybatis.MybatisUtils;
import cokr.xit.fims.framework.support.util.AjaxMessageMapRenderer;
import cokr.xit.fims.framework.support.util.constants.MessageKey;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@RequiredArgsConstructor
@Controller
@RequestMapping(name = "", value = "/fims/{biz}/ec")
public class EcCctvCrackdownController extends AbstractController {
private final EcCctvCrackdownService service;
private final CmmFileService fileService;
@GetMapping(name = "", value = "/findExtrlRegltCntcs")
public ModelAndView findExtrlRegltCntcs(@RequestParam final Map<String,Object> paraMap) {
return new ModelAndView("jsonView").addObject("result",service.findExtrlRegltCntcs(paraMap, MybatisUtils.getPagingInfo(paraMap)));
}
@RequestMapping(name = "", value = "/findExtrlRegltCntcAndAttchFiles")
public ModelAndView findExtrlRegltCntcAndAttchFiles(final CctvCrackdownDTO.Request dto) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
mav.addObject("extrDTO", service.findExtrlRegltCntc(dto));
mav.addObject("attchFiles", fileService.findFilesByInfTypeAndInfKey(
CmmFileDTO.FileMst.builder()
.infType(FimsBizUtils.getFileInfType(dto.getCrdnSeCd()))
.infKey(dto.getFileLinkId())
.build()));
return mav;
}
@RequestMapping(name = "", value = "/findExtrlRegltCntc")
public ModelAndView findExtrlRegltCntc(final CctvCrackdownDTO.Request dto) {
return new ModelAndView("jsonView").addObject("result", service.findExtrlRegltCntc(dto));
}
@PostMapping(name = "", value = "/saveCctvCrackdownDatas")
public ModelAndView saveCctvCrackdownDatas(final CctvCrackdownDTO.Request dto) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.saveCctvCrackdownDatas(dto);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_SUCCESS);
return mav;
}
@PostMapping(name = "", value = "/saveBusCctvCrackdownDatas")
public ModelAndView saveBusCctvCrackdownDatas(@RequestBody final FolderReqDTO dto) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.saveBusCctvCrackdownDatas(dto);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_SUCCESS);
return mav;
}
@PostMapping(name = "", value = "/modifyExtrlRegltCntc")
public ModelAndView modifyExtrlRegltCntc(final CctvCrackdownDTO.ExtrlRegltCntc dto) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.modifyExtrlRegltCntc(dto);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS);
return mav;
}
/**
*
* @param dto CctvCrackdownDTO.Request
* @return
*/
@PostMapping(name = "", value = "/saveExtrRtReglt")
public ModelAndView saveExtrRtReglt(final CctvCrackdownDTO.Request dto) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.saveRtReglt(dto);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS);
return mav;
}
/**
*
* @param dto CctvCrackdownDTO.Request
* @return
*/
@PostMapping(name = "", value = "/saveExtrRtErpp")
public ModelAndView saveExtrRtErpp(final CctvCrackdownDTO.Request dto) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.saveRtErpp(dto);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS);
return mav;
}
/**
* @see cokr.xit.fims.biz.cmm.web.FimsCrackDownMgtController#findRcvPathFiles(String)
* @param dirPath
* @return
*/
@Deprecated
@RequestMapping(name = "", value = "/findBusCctvCrackdownFiles")
public ModelAndView findBusCctvCrackdownFiles(final String dirPath){
return new ModelAndView("jsonView").addObject("result",FimsBizUtils.getRcvPathFiles(dirPath));
}
@RequestMapping(name = "", value = "/findExtrlRegltCntcAttchFiles")
public ModelAndView findExtrlRegltCntcAttchFiles(final String fileLinkId, final String crdnSeCd) {
return new ModelAndView("jsonView").addObject("result",
fileService.findFilesByInfTypeAndInfKey(
CmmFileDTO.FileMst.builder()
.infType(FimsBizUtils.getFileInfType(crdnSeCd))
.infKey(fileLinkId)
.build()).stream()
.filter(dtl -> !Objects.equals("png", dtl.getFileExtsn()))
.collect(Collectors.toList())
);
}
@RequestMapping(name = "", value = "/sendEcExtrlCrackdownRespons")
public ModelAndView sendEcExtrlCrackdownRespons(final String fileLinkId, final String crdnSeCd) {
return new ModelAndView("jsonView").addObject("result",
fileService.findFilesByInfTypeAndInfKey(
CmmFileDTO.FileMst.builder()
.infType(FimsBizUtils.getFileInfType(crdnSeCd))
.infKey(fileLinkId)
.build()).stream()
.filter(dtl -> !Objects.equals("png", dtl.getFileExtsn()))
.collect(Collectors.toList())
);
}
}

@ -1,148 +0,0 @@
package cokr.xit.fims.biz.ec.web;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
import cokr.xit.foundation.web.AbstractController;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.fims.biz.FimsConst;
import cokr.xit.fims.biz.ec.CtznStmtDTO;
import cokr.xit.fims.biz.ec.service.EcCtznSttemntService;
import cokr.xit.fims.framework.biz.cmm.CmmFileDTO;
import cokr.xit.fims.framework.biz.cmm.service.CmmFileService;
import cokr.xit.fims.framework.core.constants.FrameworkConstants;
import cokr.xit.fims.framework.support.mybatis.MybatisUtils;
import cokr.xit.fims.framework.support.util.AjaxMessageMapRenderer;
import cokr.xit.fims.framework.support.util.constants.MessageKey;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@RequiredArgsConstructor
@Controller
@RequestMapping(name = "", value = "/fims/{biz}/ec")
public class EcCtznSttemntController extends AbstractController {
private final EcCtznSttemntService service;
private final CmmFileService fileService;
@RequestMapping(name = "", value = "/ecCtznSttemntMgtPopup")
public ModelAndView ecCtznSttemntMgtPopup(final CtznStmtDTO.Request reqDTO){
ModelAndView mav = new ModelAndView(FimsConst.FIMS_JSP_BASE_PATH +"ec/ecCtznSttemntMgtPopup.popup");
CtznStmtDTO.Request newReqDTO = CtznStmtDTO.Request.builder()
.interfaceSeqN(reqDTO.getInterfaceSeqN())
.build();
mav.addObject("reqDTO", reqDTO);
mav.addObject("ctznDTO", service.findCtznStmt(newReqDTO));
mav.addObject("ctznDtlDTOs", service.findCtznStmtDtls(newReqDTO));
return mav;
}
@RequestMapping(name = "", value = "/ecCtznSttemntAnsMgtPopup")
public ModelAndView ecCtznSttemntAnsMgtPopup(final CtznStmtDTO.Request reqDTO){
ModelAndView mav = new ModelAndView(FimsConst.FIMS_JSP_BASE_PATH +"ec/ecCtznSttemntAnsMgtPopup.popup");
mav.addObject("ansDTO", service.findCtznStmtAnswer(reqDTO));
return mav;
}
@GetMapping(name = "", value = "/findCtznStmts")
public ModelAndView findCtznStmts(@RequestParam final Map<String,Object> paraMap) {
return new ModelAndView("jsonView").addObject("result",service.findCtznStmts(paraMap, MybatisUtils.getPagingInfo(paraMap)));
}
@RequestMapping (value = "/findCtznStmtDtls")
public ModelAndView findCtznStmtDtls(final CtznStmtDTO.Request dto) {
return new ModelAndView("jsonView").addObject("result",service.findCtznStmtDtls(dto));
}
@GetMapping(name = "", value = "/findCtznStmtDtl")
public ModelAndView findCtznStmtDtl(final CtznStmtDTO.Request dto) {
return new ModelAndView("jsonView").addObject("result",service.findCtznStmtDtl(dto));
}
@RequestMapping(name = "", value = "/findCtznStmtDtlAndAttchFiles")
public ModelAndView findCtznStmtDtlAndAttchFiles(final CtznStmtDTO.Request dto) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
mav.addObject("ctznDTO", service.findCtznStmt(dto));
mav.addObject("ctznDtlDTOs", service.findCtznStmtDtls(dto));
mav.addObject("attchFiles", fileService.findFilesByEsbInterfaces(
CmmFileDTO.FileMst.builder()
.infType(FimsConst.FileInfType.NATL_NEWS_PAPER_RCV.getCode())
.infKey(dto.getInterfaceSeqN())
.build()).stream()
.filter(dtl -> !Objects.equals("png", dtl.getFileExtsn()))
.collect(Collectors.toList()));
return mav;
}
@RequestMapping(name = "", value = "/findCtznStmtAttchFiles")
public ModelAndView findCtznStmtAttchFiles(final CtznStmtDTO.Request dto) {
return new ModelAndView("jsonView").addObject("result",
fileService.findFilesByEsbInterfaces(
CmmFileDTO.FileMst.builder()
.infType(FimsConst.FileInfType.NATL_NEWS_PAPER_RCV.getCode())
.infKey(dto.getInterfaceSeqN())
.build()).stream()
.filter(dtl -> !Objects.equals("png", dtl.getFileExtsn()))
.collect(Collectors.toList())
);
}
@PostMapping(name = "", value = "/removeCtznStmtDtl")
public ModelAndView removeCtznStmtDtl(final CtznStmtDTO.Dtl dto) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.removeEcCtznSttemnt(dto);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS);
return mav;
}
/**
*
* @param dto CtznStmtDTO.Request
* @return
*/
@PostMapping(name = "", value = "/saveRtErpp")
public ModelAndView saveRtErpp(final CtznStmtDTO.Request dto) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.saveRtErpp(dto);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS);
return mav;
}
@RequestMapping(name = "", value = "/saveImg")
public ModelAndView saveImg (@RequestBody final Map<String, Object> paraMap) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.dragAndDropSaveImg(paraMap);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_SUCCESS);
return mav;
}
@RequestMapping(name = "", value = "/saveCtznStmtAns")
public ModelAndView saveCtznStmtAns(final CtznStmtDTO.Ans dto) {
return new ModelAndView("jsonView").addObject("result",service.saveCtznStmtAns(dto));
}
}

@ -1,94 +0,0 @@
package cokr.xit.fims.biz.ec.web;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
import cokr.xit.foundation.web.AbstractController;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.fims.biz.FimsConst;
import cokr.xit.fims.biz.ec.FolderReqDTO;
import cokr.xit.fims.biz.ec.service.EcNatlNewspaperService;
import cokr.xit.fims.biz.utils.FimsBizUtils;
import cokr.xit.fims.framework.biz.cmm.CmmFileDTO;
import cokr.xit.fims.framework.biz.cmm.service.CmmFileService;
import cokr.xit.fims.framework.core.constants.FrameworkConstants;
import cokr.xit.fims.framework.support.mybatis.MybatisUtils;
import cokr.xit.fims.framework.support.util.AjaxMessageMapRenderer;
import cokr.xit.fims.framework.support.util.constants.MessageKey;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@RequiredArgsConstructor
@Controller
@RequestMapping(name = "", value = "/fims/{biz}/ec")
public class EcNatlNewspaperController extends AbstractController {
private final EcNatlNewspaperService service;
private final CmmFileService fileService;
@RequestMapping(name = "", value = "/ecNatlNewspaperPopup")
public ModelAndView ecNatlNewspaperMgtPopup(final String interfaceSeqN){
ModelAndView mav = new ModelAndView(FimsConst.FIMS_JSP_BASE_PATH +"ec/ecNatlNewspaperPopup.popup");
mav.addObject("rcvXmlDTO", service.findEsbInterface(interfaceSeqN));
mav.addObject("interfaceSeqN", interfaceSeqN);
mav.addObject("attchFiles", fileService.findFilesByEsbInterfaces(
CmmFileDTO.FileMst.builder()
.infType(FimsConst.FileInfType.NATL_NEWS_PAPER_RCV.getCode())
.infKey(interfaceSeqN)
.build()));
return mav;
}
/**
* @see cokr.xit.fims.biz.cmm.web.FimsCrackDownMgtController#findRcvPathFiles(String)
* @param dirPath
* @return
*/
@Deprecated
@RequestMapping(name = "", value = "/findNatlNewspaperFiles")
public ModelAndView findDirFiles(final String dirPath){
return new ModelAndView("jsonView").addObject("result",FimsBizUtils.getRcvPathFiles(dirPath));
}
@PostMapping(name = "", value = "/saveNatlNewspaers")
public ModelAndView saveNatlNewspaer(@RequestBody final FolderReqDTO dto) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.saveEsbRvcParse(dto);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_SUCCESS);
return mav;
}
@GetMapping(name = "", value = "/findNatlNewspaers")
public ModelAndView findNatlNewspaers(@RequestParam final Map<String,Object> paraMap) {
return new ModelAndView("jsonView").addObject("result",service.findEsbInterfaces(paraMap, MybatisUtils.getPagingInfo(paraMap)));
}
@RequestMapping(name = "", value = "/findNatlNewspaperAttchFiles")
public ModelAndView findNatlNewspaperAttchFiles(final String interfaceSeqN) {
return new ModelAndView("jsonView").addObject("result",
fileService.findFilesByEsbInterfaces(
CmmFileDTO.FileMst.builder()
.infType(FimsConst.FileInfType.NATL_NEWS_PAPER_RCV.getCode())
.infKey(interfaceSeqN)
.build()).stream()
.filter(dtl -> !Objects.equals("png", dtl.getFileExtsn()))
.collect(Collectors.toList())
);
}
}

@ -1,52 +0,0 @@
package cokr.xit.fims.biz.rt.dao;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.fims.biz.rt.RtDTO;
import cokr.xit.fims.framework.biz.cmm.CmmFileDTO;
@Mapper
public interface RtCrackdownMgtMapper {
//-----------------------------------------------------
// 단속 : tb_crdn
//-----------------------------------------------------
List<RtDTO.Reglt> selectRtReglts(final Map<String,Object> paraMap, final RowBounds rowBounds);
<T> RtDTO.Reglt selectRtReglt(final T t);
<T> List<RtDTO.Reglt> selectRtRegltByVhrno(final T t);
<T> RtDTO.Rtpyr selectRtRtpyr(final T t);
void insertRtReglt(final RtDTO.Reglt dto);
void updateRtReglt(final RtDTO.Reglt dto);
<T> void deleteRtReglt(final T t);
void insertRtErpp(final RtDTO.Erpp dto);
//-----------------------------------------------------
// 납부자 : tb_payer
//-----------------------------------------------------
void insertRtRtpyr(final RtDTO.Rtpyr dto);
void updateRtRtpyr(final RtDTO.Rtpyr dto);
@Deprecated
void saveRtRtpyr(final RtDTO.Rtpyr dto);
//-----------------------------------------------------
// 상태변경이력 : tb_crdn_stts_hstry
//-----------------------------------------------------
void insertRtProcessSttsChangeHist(final RtDTO.SttusChangeHist dto);
List<CmmFileDTO.FileDtl> selectRtRegltAttchFiles(final RtDTO.Request dto);
}

@ -1,42 +0,0 @@
package cokr.xit.fims.biz.rt.service;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import cokr.xit.fims.biz.rt.RtDTO;
import cokr.xit.fims.framework.biz.cmm.CmmFileDTO;
import cokr.xit.fims.framework.biz.cmm.XitLoginVO;
import cokr.xit.fims.framework.core.utils.XitCmmnUtil;
public interface RtCrackdownMgtService {
//-----------------------------------------------------
// 단속 : tb_crdn
//-----------------------------------------------------
List<RtDTO.Reglt> findRtReglts(final Map<String,Object> paraMap, final RowBounds rowBounds);
<T> RtDTO.Reglt findRtReglt(final T t);
<T> List<RtDTO.Reglt> findRtRegltByVhrno(final T t);
void addRtReglt(final RtDTO.Reglt dto);
void modifyRtReglt(final RtDTO.Reglt dto);
void removeRtReglt(final RtDTO.Reglt dto);
//-----------------------------------------------------
// 납부자 : tb_payer
//-----------------------------------------------------
List<CmmFileDTO.FileDtl> findRtRegltAttchFiles(RtDTO.Request dto);
default XitLoginVO getUserInfo(){
return XitCmmnUtil.getUserInfo();
}
}

@ -1,83 +0,0 @@
package cokr.xit.fims.biz.rt.service.bean;
import java.util.List;
import java.util.Map;
import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.fims.biz.rt.service.RtCrackdownMgtService;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import cokr.xit.fims.biz.rt.dao.RtCrackdownMgtMapper;
import cokr.xit.fims.biz.rt.RtDTO;
import cokr.xit.fims.biz.utils.FimsBizUtils;
import cokr.xit.fims.framework.biz.cmm.CmmFileDTO;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@Service
public class RtCrackdownMgtServiceBean extends AbstractServiceBean implements RtCrackdownMgtService {
private final RtCrackdownMgtMapper mapper;
@Override
@Transactional(readOnly = true)
public List<RtDTO.Reglt> findRtReglts(final Map<String,Object> paraMap, final RowBounds rowBounds) {
return mapper.selectRtReglts(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public <T> RtDTO.Reglt findRtReglt(final T t) {
return mapper.selectRtReglt(t);
}
@Override
@Transactional(readOnly = true)
public <T> List<RtDTO.Reglt> findRtRegltByVhrno(final T t) {
return mapper.selectRtRegltByVhrno(t);
}
@Override
@Transactional
public void addRtReglt(final RtDTO.Reglt dto){
mapper.insertRtReglt(dto);
}
@Override
@Transactional
public void modifyRtReglt(final RtDTO.Reglt dto) {
//단속정보 수정
mapper.updateRtReglt(dto);
//소유자 수정
/*1
rtpyr .*/
/*fimsTotalPopupMapper.modifyProcRtpyr(vo);*/
//서손 수정
/*fimsTotalPopupMapper.modifyProcErpp(vo);*/
}
@Override
@Transactional
public void removeRtReglt(final RtDTO.Reglt dto) {
//단속정보 삭제
mapper.deleteRtReglt(dto);
//소유자 수정
/*fimsTotalPopupMapper.modifyProcRtpyr(vo);*/
//서손 수정
/*fimsTotalPopupMapper.modifyProcErpp(vo);*/
}
@Override
public List<CmmFileDTO.FileDtl> findRtRegltAttchFiles(final RtDTO.Request dto) {
dto.setInfType(FimsBizUtils.getFileInfType(dto.getCrdnSeCd()));
return mapper.selectRtRegltAttchFiles(dto);
}
}

@ -1,111 +0,0 @@
package cokr.xit.fims.biz.rt.web;
import java.util.Map;
import cokr.xit.foundation.web.AbstractController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.fims.biz.FimsConst;
import cokr.xit.fims.biz.rt.RtDTO;
import cokr.xit.fims.biz.rt.service.RtCrackdownMgtService;
import cokr.xit.fims.framework.biz.cmm.service.CmmFileService;
import cokr.xit.fims.framework.core.constants.FrameworkConstants;
import cokr.xit.fims.framework.support.mybatis.MybatisUtils;
import cokr.xit.fims.framework.support.util.AjaxMessageMapRenderer;
import cokr.xit.fims.framework.support.util.Checks;
import cokr.xit.fims.framework.support.util.constants.MessageKey;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
/**
*
* <ul>
* <li> : </li>
* <li> : </li>
* <li>: 2022. 09. 14.
* </ul>
*
* @author
*
*/
@Slf4j
@RequiredArgsConstructor
@Controller
@RequestMapping("/fims/{biz}/rt")
public class RtCrackdownMgtController extends AbstractController {
static final String PATH = "/fims/biz/rt";
private final RtCrackdownMgtService service;
private final CmmFileService fileService;
@RequestMapping({"/list"})
public String list() {
return "/list.html";
}
@GetMapping(name = "", value = "/findRtReglts")
public ModelAndView findRtReglts(@RequestParam final Map<String,Object> paraMap) {
return new ModelAndView("jsonView").addObject("result",service.findRtReglts(paraMap, MybatisUtils.getPagingInfo(paraMap)));
}
@GetMapping(name = "", value = "/findRtReglt")
public ModelAndView findRtReglt(final RtDTO.Request dto) {
return new ModelAndView("jsonView").addObject("result",service.findRtReglt(dto));
}
@GetMapping(name = "", value = "/findRtRegltByVhrno")
public ModelAndView findRtRegltByVhrno(final RtDTO.Request dto) {
return new ModelAndView("jsonView").addObject("result",service.findRtRegltByVhrno(dto));
}
@RequestMapping(name = "", value = "/findRtRegltAndAttchFiles")
public ModelAndView findRtRegltAndAttchFiles(final RtDTO.Request dto) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
mav.addObject("dto", service.findRtReglt(dto));
mav.addObject("attchFiles", service.findRtRegltAttchFiles(dto));
return mav;
}
@PostMapping(name = "", value="/addRtReglt")
public ModelAndView addRtReglt(RtDTO.Reglt dto){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.addRtReglt(dto);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS);
return mav;
}
@PostMapping(name = "", value="/modifyRtReglt")
public ModelAndView modifyRtReglt(RtDTO.Reglt dto){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.modifyRtReglt(dto);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS);
return mav;
}
@PostMapping(name = "", value = "/removeRtReglt")
public ModelAndView removeRtReglt(RtDTO.Reglt dto){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.removeRtReglt(dto);
return mav;
}
@RequestMapping(name = "", value = "/findRtRegltAttchFiles")
public ModelAndView findRtRegltAttchFiles(final RtDTO.Request dto) {
return new ModelAndView("jsonView").addObject("result",service.findRtRegltAttchFiles(dto));
}
}

@ -18,13 +18,13 @@ import java.util.Map;
public class CodeRadioBoxTag extends TagSupport {
private static final long serialVersionUID = 519803737380451566L;
private String id = "";
private String name = "";
private String id = "";
private String name = "";
private String grpId = "";
private String defaultSelect = "";
private String cls = "";
private String alt = "";
private String alt = "";
private String onclick = "";
private String type = "";
@ -34,15 +34,9 @@ public class CodeRadioBoxTag extends TagSupport {
try {
StringBuilder sb = new StringBuilder();
// Map<String, Object> paraMap = new HashMap<String, Object>();
// paraMap.put("grpId", this.grpId);
// paraMap.put("code", this.code);
// paraMap.put("etc_1", this.etc_1);
// paraMap.put("etc_2", this.etc_2);
// paraMap.put("etc_3", this.etc_3);
List<Map<String, Object>> list = CacheServiceUtils.getComboCodes(grpId, type);
int index = 0;
sb.append("<input id='").append(this.id+"_"+index).append("'");
@ -63,7 +57,7 @@ public class CodeRadioBoxTag extends TagSupport {
index++;
for (Map<String, Object> map : list) {
sb.append("<input id='").append(this.id+"_"+index).append("'");
sb.append(" type='radio'");
sb.append(" name='").append(this.name).append("'");
@ -76,7 +70,7 @@ public class CodeRadioBoxTag extends TagSupport {
sb.append("<label for='").append(this.id+"_"+index).append("'>");
sb.append(map.get("code_val"));
sb.append("</label>").append("\n");
index++;
}
out.print(sb.toString());
@ -85,7 +79,7 @@ public class CodeRadioBoxTag extends TagSupport {
}
return SKIP_BODY;
}
private String isDefaultSelect(String defaultSelectValue) {
if(StringUtils.hasText(this.defaultSelect) && this.defaultSelect.equals(defaultSelectValue))
return " checked='checked'";

@ -22,28 +22,28 @@ import java.util.Map;
public class CodeSelectBoxTag extends TagSupport {
private static final long serialVersionUID = 519803737380451566L;
private String id = "";
private String name = "";
private String id = "";
private String name = "";
private String grpId = "";
private String etc_1 = "";
private String etc_2 = "";
private String etc_3 = "";
private String title = "";
private String defaultSelect = "";
private boolean isEmptySelect = true;
private String defaultSelect = "";
private boolean isEmptySelect = true;
private String emptyMessageKey = MessageKey.EMPTY_MSG_COMBO;
private String sortField = "";
private String cls = "";
private String alt = "";
private String sortField = "";
private String cls = "";
private String alt = "";
private String onchange = "";
private boolean disabled = false;
private boolean display = true;
// 공통코드가 아닌경우 구분 코드
private String type = "";
public int doStartTag() throws JspException {
JspWriter out = pageContext.getOut();
@ -65,15 +65,13 @@ public class CodeSelectBoxTag extends TagSupport {
if(this.isEmptySelect){
sb.append("<option value=''>")
.append( ((MessageSourceAccessor)JBeanRegistry.getMessageSourceAccessor()).getMessage(this.emptyMessageKey, LocaleContextHolder.getLocale()) )
.append("</option>").append("\n");
}
List<Map<String, Object>> list = CacheServiceUtils.getComboCodes(grpId, type);
List<Map<String, Object>> list = someMapper.getComboCodes(grpId, type);
for (Map<String, Object> map : list) {
sb.append("<option value='").append(map.get("code")).append("'")
.append( isDefaultSelect((String) map.get("code"))).append(">")

@ -1,765 +0,0 @@
<%--
* <pre>
* description :
*
* packageName :
* fileName : rtInitialDataForm.jsp
* author : 이범준
* date : 2023-04-14
* ======================================================================
* 변경일 변경자 변경 내용
* ----------------------------------------------------------------------
* 2023-04-14 이범준 최초 생성
*
* </pre>
--%>
<%@ page language="java" 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"%>
<%@ page import="cokr.xit.fims.biz.FimsConst" %>
<c:set var="ctznTmplatId" value="<%= FimsConst.TmplatId.CTZN.getCode() %>"/>
<c:set var="ansSeCodeImpose" value="<%= FimsConst.AnswerSeCode.IMPOSE.getCode() %>"/>
<c:set var="ansSeCodeDisallow" value="<%= FimsConst.AnswerSeCode.DISALLOW.getCode() %>"/>
<c:set var="ansSeCodeEnlight" value="<%= FimsConst.AnswerSeCode.ENLIGHT.getCode() %>"/>
<div>
<div class="container-page-btn">
<button type="button" class="btn btn-outline-dark">초기화</button>
<span class="container-window-btn-right">
<button type="button" class="btn btn-darkgray" id="btnSingoRegist" title="시민신고개별등록">시민신고개별등록</button>
<button type="button" class="btn btn-darkgray" id="btnMenualRegist" title="위반자료수기등록">위반자료수기등록</button>
<button type="button" class="btn btn-darkgray" id="btnExtrRegist" title="외부연계파일처리">외부연계파일처리</button>
</span>
</div>
<!-- tab 공통 -->
<form id="frmSearch" name="frmSearch">
<div class="container-search">
<div class="row">
<div class="col-11">
<div class="row">
<div class="col-12">
<label class="form-label fw-bold form-search-title">시스템구분</label>
<span class="form-search-linebox">
<!--
<code:radio grpId="FIM001"
id="sysSeCd"
name="sysSeCd"
onclick="search$$s()" cls="form-check-input"
alt="시스템구분"/>
-->
</span>
</div>
<div class="col-12">
<select id="schDateOpt" name="schDateOpt" class="form-select">
<option value="crdnYmd">단속일자</option>
<option value="regDt">등록일자</option>
</select>
<span class="form-search-linebox">
<input id="schDateFrom" class="form-control form-date" data-fmt-type="day" name="schDateFrom" type="text" title="시작 날짜 선택">
<button type="button" class="bx bx-calendar bg-white"></button>
~
<input id="schDateTo" class="form-control form-date" data-fmt-type="day" name="schDateTo" type="text" title="종료 날짜 선택">
<button type="button" class="bx bx-calendar bg-white"></button>
</span>
</div>
<div class="col-12">
<label class="form-label fw-bold form-search-title">단속구분</label>
<span class="form-search-linebox">
<code:radio type="CMM_ETC2" id="crdnSeCd" name="crdnSeCd" grpId="FIM002"
onclick="search$$s()" cls="form-check-input" alt="단속구분" />
</span>
</div>
<div class="col-12">
<label class="form-label fw-bold form-search-title">자료상태</label>
<code:select id="crdnSttsCd" name="crdnSttsCd"
grpId="FIM010" defaultSelect="01" title="단속처리상태" cls="form-select" alt="단속처리상태" disabled="false"/>
<select id="schOpt" name="schOpt" class="form-select">
<option value="vhrno">차량번호</option>
</select>
<input type="text" id="schWord" name="schWord" class="form-control" value="" />
<span class="flr">
<button type="button" class="btn btn-open-detail btn-sm" data-bs-toggle="collapse" data-bs-target="#searchDetail">
<i class="bx bx-chevron-down"></i>
상세조회조건
</button>
</span>
</div>
</div>
</div>
<div class="col-1 d-flex align-items-center justify-content-center">
<button type="button" class="btn btn-search btn-square h-px-75" id="btnSearch" title="검색">검색</button>
</div>
</div>
</div>
<div id="searchDetail" class="container-search container-search-detail collapse">
상세조회조건
</div>
</form>
<div>
<span class="container-page-btn">
<div id="totCnt">전체 ㅣ <span></span></div>
<span class="container-window-btn-right">
선택 | n건
<a href="#" class="btn btn-blue" id="" title="업무처리1">업무 처리1</a>
<a href="#" class="btn btn-blue" id="" title="업무처리2">업무 처리2</a>
</span>
</span>
</div>
<div class="container-search">
<div class="row">
<div class="col-12">
<span class="me-5">결과내재검색</span>
<label class="form-label fw-bold form-search-title">클릭한 항목</label>
<input type="text" id="" name="" class="form-control" value="" />
</div>
</div>
</div>
<div id="tabs" class="nav-align-top mt-3">
<ul class="nav nav-tabs">
<li class="nav-item">
<button id="0" type="button" class="nav-link active" data-bs-toggle="tab" data-bs-target="#tabContent0">전체</button>
</li>
<li class="nav-item">
<button id="1" type="button" class="nav-link" data-bs-toggle="tab" data-bs-target="#tabContent0">부분1</button>
</li>
<li class="nav-item">
<button id="2" type="button" class="nav-link" data-bs-toggle="tab" data-bs-target="#tabContent0">부분2</button>
</li>
<li class="nav-item">
<button id="3" type="button" class="nav-link" data-bs-toggle="tab" data-bs-target="#tabContent0">부분3</button>
</li>
</ul>
</div>
<div class="tab-content">
<div id="tabContent0" style="flex-direction: column" class="tab-pane fade show active">
<div id="tabs_t0"></div>
</div>
<div id="tabContent1" class="tab-pane fade">
<div id="tabs_t1"></div>
</div>
<div id="tabContent2" class="tab-pane fade">
<div id="tabs_t2"></div>
</div>
</div>
<div id="grid"></div>
<div class="d-flex flex-row p-3 justify-content-between">
<label id="grid1PagingInfo" class="dataTables_info" role="status" aria-live="polite"></label>
<ul id="grid1Paging" class="pagination pagination-primary"></ul>
</div>
</div>
<script defer type="text/javascript" src="${pageContext.request.contextPath}/resources/js/fims/biz/common/popupPageNavigation.js"></script>
<script type="text/javaScript">
/**************************************************************************
* Global Variable
**************************************************************************/
/**
* tab index : 0 부터 시작
* @type {number}
*/
var CUR_TAB_IDX = 0;
/**
* tui-grid array
* @type {*[]}
*/
var GRID = {};
/**
* PageNavigation
* @type {*[]}
*/
var pageNav = {};
/**
* 부과대상 데이타 배열
* 단속ID, 접수번호
* @type {Array<{crdnId: string, cvlcptRcptNo: string}>}
*/
var IMPOSE_DATA;
/**
* 단속진행 상태
* 01 - 초기등록
* 10 - 부과대상
* @type {string[]}
*/
let ARR_PRC_STS_CODE = ['01', '10']
/**
* 팝업 객체
* @type {null}
*/
popup = null;
/**
*
*/
let popupDiv;
/**
*
*/
var callbackSearch = () => search$$s();
let $$Control = new FimsDatasetControl({
prefix:"initData",
prefixName:"초기자료",
infoSize:"xl",
urls : {
load : fimsApiUrl.FIND_CRACKDOWNS
},
keymapper:info => info ? info.CRACKDOWN_KEY : "",
dataGetter:obj => obj.data.contents
});
$$Control._paginationInfo.pagingType = "scroll";
$$Control._paginationInfo.fetchSize = 50;
$$Control._paginationInfo.scrollFuncName = scroll$$s;
$$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination;
if(obj.data.pagination){
$$Control._paginationInfo.totalSize = pagination.totalSize;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalSize = obj.count;
}
$$Control.totalCountSetting(obj);
render$$List(obj.data);
if($$Control._paginationInfo.paging && $$Control._paginationInfo.pagingType == "nav"){
let start = 0;
if(pagination.pageNum > 1 && pagination.totalPage > 1 && pagination.totalSize > $$Control._paginationInfo.fetchSize){
start = $$Control._paginationInfo.fetchSize * (pagination.pageNum - 1);
}
$("#grid1Paging").setPaging({
list: $$Control.dataset,
prefix: "grid1",
start: start,
totalSize: pagination.totalSize,
fetchSize: $$Control._paginationInfo.fetchSize,
func: "$$$Control.load({index})",
});
}
};
function search$$s(){
$$Control.query = fnBiz.getParams();
GRID.clear();
$$Control.load(1);
}
function scroll$$s(){
$$Control.load($$Control._paginationInfo.pageNum + 1, "more");
}
function render$$List(data) {
if($$Control._paginationInfo.paging && $$Control._paginationInfo.pagingType == "nav"){
GRID.clear();
}
GRID.appendRows(data.contents);
}
/*******************************
* Biz function
*******************************/
// tab 전체
const fnBiz = {
getParams: () => {
return {
schDateOpt: $('#schDateOpt').val()
,schDateFrom: $('#schDateFrom').val()
,schDateTo: $('#schDateTo').val()
,[$('#schOpt').val()]: $('#schWord').val()
,sysSeCd: $('input:radio[name=sysSeCd]:checked').val()
,crdnSeCd: CUR_TAB_IDX === 2 ? '09' : $('input:radio[name=crdnSeCd]:checked').val()
,crdnSttsCd: CUR_TAB_IDX === 2 ? 'NON-INIT' : $('#crdnSttsCd').val()
,ctznAnsYn: $('input:radio[name=ctznAnsYn]:checked').val()
}
}
,pagePopup: function(flag, params){
let url;
let popTitle;
let popOption;
switch (flag) {
case "total":
url = fimsApiUrl.POPUP_CRACKDOWN_TOTAL;
popOption = {width: 1200, height:900};
popTitle = "개별총정보";
break;
case "edit":
url = fimsApiUrl.POPUP_CRACKDOWN_EDIT;
popOption = {width: 1200, height:900};
popTitle = "정보 변경";
break;
case "file":
url = fimsApiUrl.POPUP_EXTR_CRACKDOWN_FILE_SEL;
popOption = {width: 900, height:750};
popTitle = "외부연계 데이타 선택";
break;
case "impose":
url = fimsApiUrl.POPUP_IMPOSE;
popOption = {width: 500, height: 400};
popTitle = "과태료 시스템 등록";
break;
case "answerPreview":
url = fimsApiUrl.POPUP_CTZN_ANS_PREVIEW;
popOption = {width: 600, height: 620};
popTitle = "답변 내용 미리 보기";
break;
default:
break;
}
popup = CmmPopup.openModal(url, params, popOption, popTitle);
}
,onClickGrid: function(props){
const selColumn = props.columnInfo.name;
switch (selColumn){
case 'cvlcptRcptNo':
popupDiv = 'edit';
const rowDatas = GRID.store.data.rawData.map(d => {
return {crdnSeCd: d.crdnSeCd, crdnId: d.crdnId, crdnSttsCd: d.crdnSttsCd}
})
pageNav = new PageNavigation(GRID, rowDatas, props.rowKey);
fnBiz.pagePopup(popupDiv, pageNav.gridInfo.curRowData);
$(".tooltip").remove();
break;
default:
break;
}
}
,resetBtn: function() {
switch(CUR_TAB_IDX){
case 0:
$('#btnExtrRegist').show();
$('#divImpose').hide();
$('#divAnswer').hide();
$('#ansDiv').hide();
$('#crdnSttsCd').show();
$('#fldCrdnSeCd').show();
break;
case 1:
$('#btnExtrRegist').hide();
$('#divImpose').show();
$('#divAnswer').hide();
$('#ansDiv').hide();
$('#crdnSttsCd').show();
$('#fldCrdnSeCd').show();
break;
case 2:
$('#btnExtrRegist').hide();
$('#divImpose').hide();
$('#divAnswer').show();
$('#ansDiv').show();
$('#crdnSttsCd').show();
$('#fldCrdnSeCd').hide();
break;
}
}
,onDblClickGrid: function (props) {
popupDiv = 'total';
const rowDatas = GRID.store.data.rawData.map(d => {
return {crdnSeCd: d.crdnSeCd, crdnId: d.crdnId, crdnSttsCd: d.crdnSttsCd}
});
pageNav = new PageNavigation(GRID, rowDatas, props.rowKey);
fnBiz.pagePopup(popupDiv, pageNav.gridInfo.curRowData);
}
,getAnswerSeCode: (stsCode) => {
/*
,{value: '10', text: '부과대상'}
,{value: '11', text: '서손'}
,{value: '12', text: '계도'}
,{value: '20', text: '부과'}
*/
let answerSeCode;
switch(stsCode){
// 부과
case '10':
case '20':
answerSeCode = '${ansSeCodeImpose}';
break;
// 서손
case '11':
answerSeCode = '${ansSeCodeDisallow}';
break;
// 계도
case '12':
answerSeCode = '${ansSeCodeEnlight}';
break;
}
return answerSeCode;
}
};
/**************************************************************************
* event
**************************************************************************/
$(() => {
$("#tabs").on("click", "li", function () {
CUR_TAB_IDX = parseInt($("#tabs .nav-link.active").attr("id"));
});
$('#btnSearch').on('click', () => search$$s());
$('#btnMenualRegist').on('click', () => {
fnBiz.pagePopup('edit', {});
});
$('#btnExtrRegist').on('click', () => {
fnBiz.pagePopup('file');
});
$('#btnImpose').on('click', () => {
const arrChecks = GRID.getCheckedRows();
if(arrChecks.length === 0){
alert('부과 처리 대상을 먼저 선택해 주세요');
return false;
}
IMPOSE_DATA = arrChecks.map((row) => {
const extnlInterfaceId = row.crdnSeCd === '09' ? row.interfaceSeqN : row.fileLinkId
return {
crdnId: row.crdnId
,crdnSeCd: row.crdnSeCd
,extnlInterfaceId
,vhrno: row.vhrno
,cvlcptRcptNo: row.cvlcptRcptNo
}
})
fnBiz.pagePopup('impose');
});
$('#btnAnswerPreview').on('click', () => {
if(GRID.store.data.rawData.length == 0){
alert('대상 데이타가 존재하지 않습니다.');
return false;
}
const arrChecks = GRID.getCheckedRows();
let rowKey;
if(arrChecks.length > 0){
rowKey = arrChecks[0].rowKey;
} else {
rowKey = GRID.store.data.rawData[0]?.rowKey;
}
const rowDatas = GRID.store.data.rawData.map(d => {
return {tmplatId: '${ctznTmplatId}', answerSeCode: fnBiz.getAnswerSeCode(d.crdnSttsCd), resnCode: d.levyExclRsnCd, interfaceSeqN: d.interfaceSeqN, vhrno: d.vhrno}
})
popupDiv = 'answerPreview';
NAV = new PageNavigation(GRID, rowDatas, rowKey);
fnBiz.pagePopup(popupDiv, pageNav.gridInfo.curRowData);
});
$('#btnAnswer').on('click', () => {
const arrChecks = GRID.getCheckedRows();
if(arrChecks.length === 0){
alert('답변 처리할 대상을 먼저 선택해 주세요');
return false;
}
const arrData = arrChecks.map((row) => {
return {
interfaceSeqN: row.interfaceSeqN
}
})
// 중복제거
const datas = arrData.reduce(function(acc, current) {
if (acc.findIndex(({ interfaceSeqN }) => interfaceSeqN === current.interfaceSeqN) === -1) {
acc.push(current.interfaceSeqN);
}
return acc;
}, []);
cmmAjax({
url: fimsApiUrl.ADD_CTZN_ANS_LIST
,contentType: 'application/json'
,data: JSON.stringify(datas)
,success: (res) => {
}
});
});
});
/* *******************************
* Grid
******************************* */
const gridColumns = [
{
header: '등록구분',
name: 'crdnRegSeCd',
minWidth: 50,
sortable: false,
align: 'center',
formatter({value}) {
return (new CodeFormat(ComboCodeData.crdnRegSeCd)).format(value);
}
},
{
header: '접수번호',
name: 'cvlcptRcptNo',
minWidth: 130,
sortable: false,
align: 'center',
renderer: {
type: CustomButtonRenderer,
options: {
formatter: (props)=>{
const rowData = props.grid.getRow(props.rowKey);
return {
formatter: rowData.crdnSeCd === '09' ? rowData.cvlcptRcptNo : rowData.fileLinkId
,element: "text"
,dataAttrs : {
bsToggle: "tooltip",
bsOffset: "0,4",
bsPlacement: "top",
bsHtml: "true"
}
,attrs : {
title : "<i class='bx bx-window bx-xs'></i> <span>단속현황 정보</span>"
}
}
}
,eventFunction: fnBiz.onClickGrid
,eventType: "click"
}
}
},
{
header: '차량번호',
name: 'vhrno',
minWidth: 80,
sortable: false,
align: 'center'
},
{
header: '신고자',
name: 'cvlcptAplcntNm',
minWidth: 80,
sortable: false,
align: 'center'
},
{
header: '단속구분(신고방법)',
name: 'crdnSeCd',
minWidth: 100,
sortable: false,
align: 'center',
formatter: 'listItemText',
disabled: true,
editor: {
type: "select",
options: {
listItems: [...ComboCodeData.crdnSeCd]
}
}
},
{
header: '위반내용',
name: 'vltnCn',
minWidth: 120,
sortable: false,
align: 'center'
},
{
header: '주민번호(전체)',
name: 'rtpyrNo',
minWidth: 110,
sortable: false,
align: 'center',
className: "privacy"
},
{
header: '주민번호(마스킹)',
name: 'rtpyrNoMask',
minWidth: 110,
sortable: false,
align: 'center',
className: "privacy-mask"
},
{
header: '담당자',
name: 'dutyIdV',
minWidth: 80,
sortable: false,
align: 'center'
},
{
header: '전화번호',
name: 'pcdTelV',
minWidth: 80,
sortable: false,
align: 'center'
},
{
header: '접수일자',
name: 'cvlcptRcptYmd',
minWidth: 80,
sortable: false,
align: 'center',
formatter({value}) {
return StrDateFormat.format(value); //
}
},
{
header: '처리기한',
name: 'cvlcptPrcsPrnmntDt',
minWidth: 80,
sortable: false,
align: 'center',
formatter({value}) {
return StrDateFormat.format(value); //
}
},
{
header: '위반일시',
name: 'crdnYmdTime',
minWidth: 120,
sortable: false,
align: 'center',
formatter({value}) {
return StrDateTimeFormat.format(value); //
}
},
{
header: '사진건수',
name: 'atchFileCnt',
minWidth: 40,
sortable: false,
align: 'center'
},
{
header: '특기사항',
name: 'etcCn',
width: 80,
sortable: false,
align: 'center'
},
{
header: '서손사유',
name: 'etcCn', //levyExclRsnCd
width: 80,
sortable: false,
align: 'center'
},
{
header: '수납금액',
name: 'rcvmtAmt',
minWidth: 100,
sortable: false,
align: 'right'
},
{
header: '위반횟수',
name: 'vltnNmtm',
minWidth: 80,
sortable: false,
align: 'right'
},
{
header: '위반장소',
name: 'crdnPlc',
minWidth: 200,
sortable: false
},
{
header: '처리상태명',
name: 'crdnSttsNm',
hidden: true
},
{
header: '등록일시',
name: 'regDt',
minWidth: 150,
sortable: false,
align: 'center',
formatter({value}) {
return StrDateTimeFormat.format(value); //
}
},
{
header: '최종처리일시',
name: 'mdfcnDt',
minWidth: 150,
sortable: false,
align: 'center',
formatter({value}) {
return StrDateTimeFormat.format(value);
}
},
{
header: '',
name: 'crdnSttsCd',
hidden: true
},
{
header: '서손ID',
name: 'levyExclId',
hidden: true
},
{
header: '소유자ID',
name: 'rtpyrId',
hidden: true
},
{
header: '서손사유코드',
name: 'levyExclRsnCd',
hidden: true
},
{
header: 'interfaceSeqN',
name: 'interfaceSeqN',
hidden: true
}
];
const gridOptions = {
el: 'grid',
rowHeaders: ['rowNum'],
columns: gridColumns,
columnOptions: {
frozenCount: 6
},
paginationInfoRef : $$Control._paginationInfo
};
const initGrid = () => {
GRID = TuiGrid.of(gridOptions);
GRID.on('dblclick', function (props) { fnBiz.onDblClickGrid(props); });
};
/**************************************************************************
* initialize
**************************************************************************/
$(document).ready(function(){
$('#schDateFrom').datepicker('setDate', DateUtil.getDateDay(-5475).date);
$('#schDateTo').datepicker('setDate', new Date());
CUR_TAB_IDX = 0;
fnBiz.resetBtn();
initGrid();
});
</script>

@ -1,26 +0,0 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#none">HOME</a></li>
<c:set var="arrMenuName" value="${fn:split(urlInfoMap.menuPathname, '>') }" />
<c:forEach var="row" items="${arrMenuName}" varStatus="status">
<c:choose>
<c:when test="${status.last }">
<li class="breadcrumb-item active" aria-current="page"><a href="${ctx }${urlInfoMap.menuView}"><c:out value="${row }"/></a></li>
</c:when>
<c:otherwise>
<li class="breadcrumb-item"><a href="#none"><c:out value="${row }"/></a></li>
</c:otherwise>
</c:choose>
</c:forEach>
</ol>
</nav>

@ -259,7 +259,7 @@ const CmmPopup = {
* </pre>
*/
,open: function (url, params, options, target = 'nonamePopup', method = 'post') {
let extendOptions = $.extend({}, this.defaultOpenOptions, options);
var extendOptions = $.extend({}, this.defaultOpenOptions, options);
// 가운데 정렬 계산.
if (extendOptions.useCenterLocation) {
@ -269,12 +269,12 @@ const CmmPopup = {
}
// status 문자열 생성.
let optionsString = "";
for (let i in extendOptions) {
var optionsString = "";
for (var i in extendOptions) {
optionsString += i + "=" + extendOptions[i] + ", ";
}
method = method.toLowerCase();
let popup;
var popup;
switch (method) {
case "post":
@ -294,7 +294,7 @@ const CmmPopup = {
, openModal: function (url, params, options, title = 'nonamePopup', method = 'post') {
if($("#popupShowBtn").length < 1){
let modalTemplate = `<button type="button"
var modalTemplate = `<button type="button"
id="popupShowBtn"
data-bs-toggle="modal"
data-bs-target="#cmmModal"
@ -327,24 +327,24 @@ const CmmPopup = {
if($("#modalIframe").length > 0){
$("#modalIframe").remove();
}
let modalIframe = $("<iframe></iframe>");
modalIframe.attr("id" , "modalIframe")
.attr("name" , "modalIframe")
.attr("src" , "")
.attr("title" , title)
.attr("width" , "100%")
.attr("frameborder" , "0")
.attr("scrolling" , "no")
.css("border" , "0")
.css("overflow" , "auto")
.css("overflow-x" , "no")
var dynamicPopup = document.createElement("pop");
dynamicPopup.setAttribute("id","pop"+1);
// .setAttribute("src" , "")
// .setAttribute("width" , "100%")
// .setAttribute("frameborder" , "0")
// .setAttribute("scrolling" , "no")
// .css("border" , "0")
// .css("overflow" , "auto")
// .css("overflow-x" , "no")
;
$("#modalBody").append(modalIframe);
$("#modalBody").append(dynamicPopup);
popup = CmmPopup.open(url, params, options, "modalIframe", method);
$(popup.frameElement).on("load", function(){
let popupHeight = $(popup.frameElement.contentDocument.getElementById("wrap")).height();
var popupHeight = $(popup.frameElement.contentDocument.getElementById("wrap")).height();
$(popup.frameElement).attr("height", popupHeight);
});

Loading…
Cancel
Save