|
|
@ -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.CctvCrackdownDTO;
|
|
|
|
import kr.xit.fims.biz.ec.model.FolderReqDTO;
|
|
|
|
import kr.xit.fims.biz.ec.model.FolderReqDTO;
|
|
|
|
import kr.xit.fims.biz.ec.service.IEcCctvCrackdownService;
|
|
|
|
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.model.CmmFileDTO;
|
|
|
|
import kr.xit.framework.biz.cmm.service.ICmmFileService;
|
|
|
|
import kr.xit.framework.biz.cmm.service.ICmmFileService;
|
|
|
|
import kr.xit.framework.core.constants.FrameworkConstants;
|
|
|
|
import kr.xit.framework.core.constants.FrameworkConstants;
|
|
|
|
import kr.xit.framework.core.model.ResultResponse;
|
|
|
|
import kr.xit.framework.core.model.ResultResponse;
|
|
|
|
import kr.xit.framework.core.utils.fileExplorer.XitFileExplorerUtil;
|
|
|
|
import kr.xit.framework.core.utils.fileExplorer.XitFileExplorerUtil;
|
|
|
|
import kr.xit.framework.core.utils.fileExplorer.function.DirectorySearch;
|
|
|
|
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.mybatis.MybatisUtils;
|
|
|
|
import kr.xit.framework.support.util.AjaxMessageMapRenderer;
|
|
|
|
import kr.xit.framework.support.util.AjaxMessageMapRenderer;
|
|
|
|
import kr.xit.framework.support.util.constants.MessageKey;
|
|
|
|
import kr.xit.framework.support.util.constants.MessageKey;
|
|
|
@ -60,7 +60,7 @@ public class EcCctvCrackdownController {
|
|
|
|
public ModelAndView ecCctvCrackdownPopup(final String extrlRegltCntcId, final String regltSeCode){
|
|
|
|
public ModelAndView ecCctvCrackdownPopup(final String extrlRegltCntcId, final String regltSeCode){
|
|
|
|
ModelAndView mav = new ModelAndView(FimsConst.FIMS_JSP_BASE_PATH +"ec/ecCctvCrackdownPopup.popup");
|
|
|
|
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
|
|
|
|
mav.addObject("extrlRegltCntcDTO", service
|
|
|
|
.findExtrlRegltCntc(extrlRegltCntcId));
|
|
|
|
.findExtrlRegltCntc(extrlRegltCntcId));
|
|
|
|
mav.addObject("attchFiles", fileService.findFilesByJobSeCodeAndJobId(
|
|
|
|
mav.addObject("attchFiles", fileService.findFilesByJobSeCodeAndJobId(
|
|
|
@ -146,7 +146,7 @@ public class EcCctvCrackdownController {
|
|
|
|
return ResultResponse.of(
|
|
|
|
return ResultResponse.of(
|
|
|
|
fileService.findFilesByJobSeCodeAndJobId(
|
|
|
|
fileService.findFilesByJobSeCodeAndJobId(
|
|
|
|
CmmFileDTO.FileMst.builder()
|
|
|
|
CmmFileDTO.FileMst.builder()
|
|
|
|
.jobSeCode(getFileJobSeCode(regltSeCode))
|
|
|
|
.jobSeCode(FimsBizUtils.getFileJobSeCode(regltSeCode))
|
|
|
|
.fileJobId(extrlRegltCntcId)
|
|
|
|
.fileJobId(extrlRegltCntcId)
|
|
|
|
.build()).stream()
|
|
|
|
.build()).stream()
|
|
|
|
.filter(dtl -> !Objects.equals("png", dtl.getFileExtsn()))
|
|
|
|
.filter(dtl -> !Objects.equals("png", dtl.getFileExtsn()))
|
|
|
@ -159,25 +159,11 @@ public class EcCctvCrackdownController {
|
|
|
|
return ResultResponse.of(
|
|
|
|
return ResultResponse.of(
|
|
|
|
fileService.findFilesByJobSeCodeAndJobId(
|
|
|
|
fileService.findFilesByJobSeCodeAndJobId(
|
|
|
|
CmmFileDTO.FileMst.builder()
|
|
|
|
CmmFileDTO.FileMst.builder()
|
|
|
|
.jobSeCode(getFileJobSeCode(regltSeCode))
|
|
|
|
.jobSeCode(FimsBizUtils.getFileJobSeCode(regltSeCode))
|
|
|
|
.fileJobId(extrlRegltCntcId)
|
|
|
|
.fileJobId(extrlRegltCntcId)
|
|
|
|
.build()).stream()
|
|
|
|
.build()).stream()
|
|
|
|
.filter(dtl -> !Objects.equals("png", dtl.getFileExtsn()))
|
|
|
|
.filter(dtl -> !Objects.equals("png", dtl.getFileExtsn()))
|
|
|
|
.collect(Collectors.toList())
|
|
|
|
.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, "데이타 오류[파일정보를 확인해 주세요");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|