fix: 단속자료 생성시 reglt_se_code(단속구분) set 관련 fix

main
minuk926 2 years ago
parent a6aba9ad98
commit ab90b311f1

@ -25,6 +25,7 @@ import kr.xit.fims.biz.ec.mapper.IEcCctvCrackdownMapper;
import kr.xit.fims.biz.ec.mapper.IEcCtznSttemntMapper;
import kr.xit.fims.biz.ec.model.CctvCrackdownDTO;
import kr.xit.fims.biz.ec.model.FolderReqDTO;
import kr.xit.fims.biz.utils.FimsBizUtils;
import kr.xit.framework.biz.cmm.model.CmmFileDTO;
import kr.xit.framework.biz.cmm.service.ICmmFileService;
import kr.xit.framework.biz.util.ExtlFileParseUtils;
@ -227,9 +228,9 @@ public class EcCctvCrackdownService implements IEcCctvCrackdownService {
@Override
@Transactional
public void saveRtReglt(final CctvCrackdownDTO.Request dto) {
setJobSeCode(dto);
dto.setRegister(getUserInfo().getUniqId());
dto.setJobSeCode(FimsBizUtils.getFileJobSeCode(dto.getRegltSeCode()));
dto.setRegltProcessSttusCode(FimsConst.RegltProcessSttusCode.CRACKDOWN.getCode());
dto.setRegister(getUserInfo().getUniqId());
mapper.insertRtRegltFromEcExtrRegltCntc(dto);
dto.setUpdusr(getUserInfo().getUniqId());
@ -244,8 +245,9 @@ public class EcCctvCrackdownService implements IEcCctvCrackdownService {
@Transactional
public void saveRtErpp(final CctvCrackdownDTO.Request dto) {
// 단속테이블
dto.setRegister(getUserInfo().getUniqId());
dto.setJobSeCode(FimsBizUtils.getFileJobSeCode(dto.getRegltSeCode()));
dto.setRegltProcessSttusCode(FimsConst.RegltProcessSttusCode.DESTRUCTION.getCode());
dto.setRegister(getUserInfo().getUniqId());
mapper.insertRtRegltFromEcExtrRegltCntc(dto);
// 서손테이블
@ -304,14 +306,4 @@ public class EcCctvCrackdownService implements IEcCctvCrackdownService {
.cmmFileDtls(new ArrayList<>())
.build();
}
private void setJobSeCode(final CctvCrackdownDTO.Request dto){
if(Objects.equals(dto.getRegltSeCode(), FimsConst.RegltSeCode.CCTV_FIX.getCode()))
dto.setJobSeCode(FimsConst.FileJobSeCode.CCTV_FIX.getCode());
else if(Objects.equals(dto.getRegltSeCode(), FimsConst.RegltSeCode.CCTV_DRV.getCode()))
dto.setJobSeCode(FimsConst.FileJobSeCode.CCTV_DRV.getCode());
else if(Objects.equals(dto.getRegltSeCode(), FimsConst.RegltSeCode.BUS_ONLY.getCode()))
dto.setJobSeCode(FimsConst.FileJobSeCode.BUS_ONLY.getCode());
}
}

@ -100,8 +100,9 @@ public class EcCtznSttemntService implements IEcCtznSttemntService {
@Transactional
public void saveRtReglt(final CtznStmtDTO.Request dto) {
// 단속테이블
dto.setRegister(getUserInfo().getUniqId());
dto.setRegltSeCode(FimsConst.RegltSeCode.CITIZEN.getCode());
dto.setRegltProcessSttusCode(FimsConst.RegltProcessSttusCode.CRACKDOWN.getCode());
dto.setRegister(getUserInfo().getUniqId());
mapper.insertRtRegltFromCtznStmt(dto);
// 시민신고 상세 상태 변경
@ -121,6 +122,7 @@ public class EcCtznSttemntService implements IEcCtznSttemntService {
@Transactional
public void saveRtErpp(final CtznStmtDTO.Request dto) {
// 단속테이블
dto.setRegltSeCode(FimsConst.RegltSeCode.CITIZEN.getCode());
dto.setRegister(getUserInfo().getUniqId());
dto.setRegltProcessSttusCode(FimsConst.RegltProcessSttusCode.DESTRUCTION.getCode());
mapper.insertRtRegltFromCtznStmt(dto);

@ -17,13 +17,13 @@ import kr.xit.fims.biz.FimsConst;
import kr.xit.fims.biz.ec.model.CctvCrackdownDTO;
import kr.xit.fims.biz.ec.model.FolderReqDTO;
import kr.xit.fims.biz.ec.service.IEcCctvCrackdownService;
import kr.xit.fims.biz.utils.FimsBizUtils;
import kr.xit.framework.biz.cmm.model.CmmFileDTO;
import kr.xit.framework.biz.cmm.service.ICmmFileService;
import kr.xit.framework.core.constants.FrameworkConstants;
import kr.xit.framework.core.model.ResultResponse;
import kr.xit.framework.core.utils.fileExplorer.XitFileExplorerUtil;
import kr.xit.framework.core.utils.fileExplorer.function.DirectorySearch;
import kr.xit.framework.support.exception.BizRuntimeException;
import kr.xit.framework.support.mybatis.MybatisUtils;
import kr.xit.framework.support.util.AjaxMessageMapRenderer;
import kr.xit.framework.support.util.constants.MessageKey;
@ -60,7 +60,7 @@ public class EcCctvCrackdownController {
public ModelAndView ecCctvCrackdownPopup(final String extrlRegltCntcId, final String regltSeCode){
ModelAndView mav = new ModelAndView(FimsConst.FIMS_JSP_BASE_PATH +"ec/ecCctvCrackdownPopup.popup");
String fileJobSeCode = getFileJobSeCode(regltSeCode);
String fileJobSeCode = FimsBizUtils.getFileJobSeCode(regltSeCode);
mav.addObject("extrlRegltCntcDTO", service
.findExtrlRegltCntc(extrlRegltCntcId));
mav.addObject("attchFiles", fileService.findFilesByJobSeCodeAndJobId(
@ -146,7 +146,7 @@ public class EcCctvCrackdownController {
return ResultResponse.of(
fileService.findFilesByJobSeCodeAndJobId(
CmmFileDTO.FileMst.builder()
.jobSeCode(getFileJobSeCode(regltSeCode))
.jobSeCode(FimsBizUtils.getFileJobSeCode(regltSeCode))
.fileJobId(extrlRegltCntcId)
.build()).stream()
.filter(dtl -> !Objects.equals("png", dtl.getFileExtsn()))
@ -159,25 +159,11 @@ public class EcCctvCrackdownController {
return ResultResponse.of(
fileService.findFilesByJobSeCodeAndJobId(
CmmFileDTO.FileMst.builder()
.jobSeCode(getFileJobSeCode(regltSeCode))
.jobSeCode(FimsBizUtils.getFileJobSeCode(regltSeCode))
.fileJobId(extrlRegltCntcId)
.build()).stream()
.filter(dtl -> !Objects.equals("png", dtl.getFileExtsn()))
.collect(Collectors.toList())
);
}
private static String getFileJobSeCode(String regltSeCode) {
// 01 - 고정형CCTV
if(Objects.equals(regltSeCode, "01"))//FimsConst.FileJobSeCode.CCTV_FIX))
return FimsConst.FileJobSeCode.CCTV_FIX.getCode();
// 02 - 주행형CCTV
if(Objects.equals(regltSeCode, "02"))//FimsConst.FileJobSeCode.CCTV_DRV))
return FimsConst.FileJobSeCode.CCTV_DRV.getCode();
// 03 - 버스장착형CCTV
if(Objects.equals(regltSeCode, "07"))//FimsConst.FileJobSeCode.BUS_ONLY))
return FimsConst.FileJobSeCode.BUS_ONLY.getCode();
throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "데이타 오류[파일정보를 확인해 주세요");
}
}

@ -0,0 +1,27 @@
package kr.xit.fims.biz.utils;
import java.util.Objects;
import kr.xit.fims.biz.FimsConst;
import kr.xit.framework.support.exception.BizRuntimeException;
import kr.xit.framework.support.util.constants.MessageKey;
public class FimsBizUtils {
public static String getFileJobSeCode(String regltSeCode) {
// 01 - 고정형CCTV
if(Objects.equals(regltSeCode, "01"))//FimsConst.FileJobSeCode.CCTV_FIX))
return FimsConst.FileJobSeCode.CCTV_FIX.getCode();
// 02 - 주행형CCTV
if(Objects.equals(regltSeCode, "02"))//FimsConst.FileJobSeCode.CCTV_DRV))
return FimsConst.FileJobSeCode.CCTV_DRV.getCode();
// 03 - 버스장착형CCTV
if(Objects.equals(regltSeCode, "07"))//FimsConst.FileJobSeCode.BUS_ONLY))
return FimsConst.FileJobSeCode.BUS_ONLY.getCode();
if(Objects.equals(regltSeCode, "09"))//FimsConst.FileJobSeCode.BUS_ONLY))
return FimsConst.FileJobSeCode.NATL_NEWS_PAPER_RCV.getCode();
throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "데이타 오류[파일정보를 확인해 주세요");
}
}

@ -260,6 +260,7 @@
,erpp: (extrlRegltCntcId) => {
const data = {
extrlRegltCntcId
,regltSeCode: '${extrlRegltCntcDTO.regltSeCode}'
}
if(!confirm('서손 처리 하시겠습니까?')) return false;
cmmAjax({

@ -64,8 +64,8 @@
}
,onClickGrid: (ev) => {
const data = ev.grid.getRow(ev.rowKey);
window.opener?.unblockUI();
window.opener.callbackSearch(data);
//window.opener?.unblockUI();
window.opener?.callbackSearch(data);
window.close();
}
}
@ -75,7 +75,7 @@
**************************************************************************/
$(() => {
$(window).on("unload", function (e) {
window.opener?.unblockUI();
//window.opener?.unblockUI();
window.opener?.callbackSearch();
return null;
});

Loading…
Cancel
Save