diff --git a/src/main/java/kr/xit/fims/biz/ec/mapper/IEcCtznSttemntMapper.java b/src/main/java/kr/xit/fims/biz/ec/mapper/IEcCtznSttemntMapper.java index 5244a977..458f021f 100644 --- a/src/main/java/kr/xit/fims/biz/ec/mapper/IEcCtznSttemntMapper.java +++ b/src/main/java/kr/xit/fims/biz/ec/mapper/IEcCtznSttemntMapper.java @@ -10,12 +10,12 @@ import kr.xit.fims.biz.ec.model.CtznStmtDTO; @Mapper public interface IEcCtznSttemntMapper { - - int insertEcCtznSttemnt(final CtznStmtDTO dto); - List selectEcCtznSttemnts(Map paraMap, RowBounds rowBounds); + CtznStmtDTO selectEcCtznSttemnt(final CtznStmtDTO.Request dto); + List selectEcCtznSttemntDetails(final CtznStmtDTO.Request dto); + CtznStmtDTO.CtznStmtDtl selectEcCtznSttemntDetail(final CtznStmtDTO.Request dto); - + int insertEcCtznSttemnt(final CtznStmtDTO dto); int insertEcCtznSttemntDetail(final CtznStmtDTO.CtznStmtDtl dtl); } diff --git a/src/main/java/kr/xit/fims/biz/ec/model/CtznStmtDTO.java b/src/main/java/kr/xit/fims/biz/ec/model/CtznStmtDTO.java index 06ce8b40..47e0470a 100644 --- a/src/main/java/kr/xit/fims/biz/ec/model/CtznStmtDTO.java +++ b/src/main/java/kr/xit/fims/biz/ec/model/CtznStmtDTO.java @@ -208,4 +208,15 @@ public class CtznStmtDTO implements Serializable { //extends ExtlEsbDataType { private Set indexs = new HashSet<>(); } + + @Getter + @Setter + @NoArgsConstructor + @AllArgsConstructor + @Builder + @ToString + public static class Request { + private String ctznSttemntDetailSn; + private String interfaceSeqN; + } } diff --git a/src/main/java/kr/xit/fims/biz/ec/service/EcCtznSttemntService.java b/src/main/java/kr/xit/fims/biz/ec/service/EcCtznSttemntService.java new file mode 100644 index 00000000..a5b670f1 --- /dev/null +++ b/src/main/java/kr/xit/fims/biz/ec/service/EcCtznSttemntService.java @@ -0,0 +1,56 @@ +package kr.xit.fims.biz.ec.service; + +import java.util.List; +import java.util.Map; + +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 kr.xit.fims.biz.ec.mapper.IEcCtznSttemntMapper; +import kr.xit.fims.biz.ec.model.CtznStmtDTO; +import kr.xit.framework.biz.cmm.service.ICmmFileService; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@RequiredArgsConstructor +@Service +public class EcCtznSttemntService implements IEcCtznSttemntService { + + @Value("#{prop['file.upload.root']}") + private String uploadRoot; + + @Value("#{prop['file.upload.natl-newspaper.path']}") + private String uploadNewsPaperPath; + + private final IEcCtznSttemntMapper mapper; + + private final ICmmFileService cmmFileService; + + @Override + @Transactional(readOnly = true) + public List findCtznStmts(final Map paraMap, final RowBounds rowBounds) { + return mapper.selectEcCtznSttemnts(paraMap, rowBounds); + } + + @Override + @Transactional(readOnly = true) + public CtznStmtDTO findCtznStmt(final CtznStmtDTO.Request dto) { + return mapper.selectEcCtznSttemnt(dto); + } + + @Override + @Transactional(readOnly = true) + public List findCtznStmtDtls(final CtznStmtDTO.Request dto) { + return mapper.selectEcCtznSttemntDetails(dto); + } + + @Override + @Transactional(readOnly = true) + public CtznStmtDTO.CtznStmtDtl findCtznStmtDtl(final CtznStmtDTO.Request dto) { + return mapper.selectEcCtznSttemntDetail(dto); + } + +} diff --git a/src/main/java/kr/xit/fims/biz/ec/service/IEcCtznSttemntService.java b/src/main/java/kr/xit/fims/biz/ec/service/IEcCtznSttemntService.java new file mode 100644 index 00000000..14ec9618 --- /dev/null +++ b/src/main/java/kr/xit/fims/biz/ec/service/IEcCtznSttemntService.java @@ -0,0 +1,25 @@ +package kr.xit.fims.biz.ec.service; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; +import org.apache.poi.ss.formula.functions.T; + +import kr.xit.fims.biz.ec.model.CtznStmtDTO; +import kr.xit.framework.core.utils.XitCmmnUtil; + +public interface IEcCtznSttemntService { + List findCtznStmts(final Map paraMap, final RowBounds rowBounds); + CtznStmtDTO findCtznStmt(final CtznStmtDTO.Request reqDTO); + List findCtznStmtDtls(final CtznStmtDTO.Request reqDTO); + CtznStmtDTO.CtznStmtDtl findCtznStmtDtl(final CtznStmtDTO.Request reqDTO); + + + + default String getUserUniqId(){ + return XitCmmnUtil.getUserUniqId(); + } + + +} diff --git a/src/main/java/kr/xit/fims/biz/ec/service/IEcNatlNewspaperService.java b/src/main/java/kr/xit/fims/biz/ec/service/IEcNatlNewspaperService.java index f0e9b812..ea5d6193 100644 --- a/src/main/java/kr/xit/fims/biz/ec/service/IEcNatlNewspaperService.java +++ b/src/main/java/kr/xit/fims/biz/ec/service/IEcNatlNewspaperService.java @@ -11,7 +11,7 @@ import kr.xit.framework.core.utils.XitCmmnUtil; public interface IEcNatlNewspaperService { - List findEsbInterfaces(final Map paraMap, final RowBounds rowBounds); + List findEsbInterfaces(final Map paraMap, final RowBounds rowBounds); NatlNewspaperRcvDTO findEsbInterface(final String interfaceSeqN); void saveEsbRvcParse(final NatlNewspaperRcvReqDTO dto); diff --git a/src/main/java/kr/xit/fims/biz/ec/web/EcCtznSttemntController.java b/src/main/java/kr/xit/fims/biz/ec/web/EcCtznSttemntController.java new file mode 100644 index 00000000..8d0c9e82 --- /dev/null +++ b/src/main/java/kr/xit/fims/biz/ec/web/EcCtznSttemntController.java @@ -0,0 +1,86 @@ +package kr.xit.fims.biz.ec.web; + +import java.util.Map; +import java.util.Objects; +import java.util.stream.Collectors; + +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.Mapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.ModelAndView; + +import kr.xit.fims.biz.FimsConst; +import kr.xit.fims.biz.ec.model.CtznStmtDTO; +import kr.xit.fims.biz.ec.service.IEcCtznSttemntService; +import kr.xit.framework.biz.cmm.model.CmmFileDTO; +import kr.xit.framework.biz.cmm.service.ICmmFileService; +import kr.xit.framework.core.model.ResultResponse; +import kr.xit.framework.support.mybatis.MybatisUtils; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@RequiredArgsConstructor +@Controller +@RequestMapping(value = "/fims/biz/ec") +public class EcCtznSttemntController { + @Value("#{prop['file.rcv.root']}") + private String fileRcvRoot; + + @Value("#{prop['file.rcv.natl-newspaper.path']}") + private String rcvNatlNewspaperPath; + + private final IEcCtznSttemntService service; + private final ICmmFileService fileService; + + + @RequestMapping(value = "/ecCtznSttemntMgtForm") + public void ecCtznSttemntMgtForm(){ + } + + @RequestMapping(value = "/ecCtznSttemntMgtPopup") + @ResponseBody + public ModelAndView ecCtznSttemntMgtPopup(final String interfaceSeqN){ + ModelAndView mav = new ModelAndView(FimsConst.FIMS_JSP_BASE_PATH +"ec/ecCtznSttemntMgtPopup.popup"); + + CtznStmtDTO.Request reqDTO = CtznStmtDTO.Request.builder() + .interfaceSeqN(interfaceSeqN) + .ctznSttemntDetailSn("01").build(); + mav.addObject("interfaceSeqN", interfaceSeqN); + mav.addObject("ctznStmtDTO", service.findCtznStmt(reqDTO)); + mav.addObject("ctznStmtDtlDTOs", service.findCtznStmtDtls(reqDTO)); + return mav; + } + + @GetMapping(value = "/findCtznStmts") + public ModelAndView findCtznStmts(@RequestParam final Map paraMap) { + return ResultResponse.of(service.findCtznStmts(paraMap, MybatisUtils.getPagingInfo(paraMap))); + } + + @RequestMapping (value = "/findCtznStmtDtls") + public ModelAndView findCtznStmtDtls(final CtznStmtDTO.Request dto) { + return ResultResponse.of(service.findCtznStmtDtls(dto)); + } + + @GetMapping(value = "/findCtznStmtDtl") + public ModelAndView findCtznStmtDtl(final CtznStmtDTO.Request dto) { + return ResultResponse.of(service.findCtznStmtDtl(dto)); + } + + @RequestMapping("/findCtznStmtAttchFiles") + public ModelAndView findCtznStmtAttchFiles(final CtznStmtDTO.Request dto) { + return ResultResponse.of( + fileService.findFilesByEsbInterfaces( + CmmFileDTO.FileMst.builder() + .jobSeCode(FimsConst.FileJobSeCode.NATL_NEWS_PAPER_RCV.getCode()) + .fileJobId(dto.getInterfaceSeqN()+dto.getCtznSttemntDetailSn()) + .build()).stream() + .filter(dtl -> !Objects.equals("png", dtl.getFileExtsn())) + .collect(Collectors.toList()) + ); + } +} diff --git a/src/main/java/kr/xit/fims/biz/ec/web/EcNatlNewspaperController.java b/src/main/java/kr/xit/fims/biz/ec/web/EcNatlNewspaperController.java index a88e0dca..ec6ae026 100644 --- a/src/main/java/kr/xit/fims/biz/ec/web/EcNatlNewspaperController.java +++ b/src/main/java/kr/xit/fims/biz/ec/web/EcNatlNewspaperController.java @@ -1,8 +1,11 @@ package kr.xit.fims.biz.ec.web; import java.util.Map; +import java.util.Objects; import java.util.stream.Collectors; +import javax.servlet.http.HttpServletResponse; + import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; @@ -53,10 +56,11 @@ public class EcNatlNewspaperController { return mav; } - @RequestMapping(value = "/ecNatlNewspaperMgtPopup") + @RequestMapping(value = "/ecNatlNewspaperPopup") public ModelAndView ecNatlNewspaperMgtPopup(final String interfaceSeqN){ - ModelAndView mav = new ModelAndView(FimsConst.FIMS_JSP_BASE_PATH +"ec/ecNatlNewspaperMgtPopup.popup"); + 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() .jobSeCode(FimsConst.FileJobSeCode.NATL_NEWS_PAPER_RCV.getCode()) @@ -89,4 +93,17 @@ public class EcNatlNewspaperController { public ModelAndView findNatlNewspaers(@RequestParam final Map paraMap) { return ResultResponse.of(service.findEsbInterfaces(paraMap, MybatisUtils.getPagingInfo(paraMap))); } + + @RequestMapping("/findNatlNewspaperAttchFiles") + public ModelAndView findNatlNewspaperAttchFiles(final String interfaceSeqN) { + return ResultResponse.of( + fileService.findFilesByEsbInterfaces( + CmmFileDTO.FileMst.builder() + .jobSeCode(FimsConst.FileJobSeCode.NATL_NEWS_PAPER_RCV.getCode()) + .fileJobId(interfaceSeqN) + .build()).stream() + .filter(dtl -> !Objects.equals("png", dtl.getFileExtsn())) + .collect(Collectors.toList()) + ); + } } diff --git a/src/main/java/kr/xit/framework/biz/cmm/web/CmmFileMgtController.java b/src/main/java/kr/xit/framework/biz/cmm/web/CmmFileMgtController.java index 20ebec8c..62bdb65d 100644 --- a/src/main/java/kr/xit/framework/biz/cmm/web/CmmFileMgtController.java +++ b/src/main/java/kr/xit/framework/biz/cmm/web/CmmFileMgtController.java @@ -17,6 +17,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpHeaders; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.Mapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -91,16 +92,19 @@ public class CmmFileMgtController { download(absFile, "", response); } - @GetMapping("/download") - public void download(final String scDatagb, final Long scCode, String methodName, HttpServletResponse response) { + @RequestMapping("/download") + public void download(final CmmFileDTO.FileDtl fileDtlDTO, HttpServletResponse response) { - - String absFile = ""; + StringBuilder sb = new StringBuilder(); + sb.append(uploadRoot) + .append(fileDtlDTO.getFileCours()) + .append("/") + .append(fileDtlDTO.getFileId()); - download(absFile, "", response); + download(sb.toString(), fileDtlDTO.getOrginlFileNm(), response); } private void download(String absFile, String fileName, HttpServletResponse response) { diff --git a/src/main/java/kr/xit/framework/core/model/ResultResponse.java b/src/main/java/kr/xit/framework/core/model/ResultResponse.java index cde8a980..b760222f 100644 --- a/src/main/java/kr/xit/framework/core/model/ResultResponse.java +++ b/src/main/java/kr/xit/framework/core/model/ResultResponse.java @@ -160,12 +160,6 @@ public class ResultResponse implements IResponse, Serializable { return mav; } - // public static ResponseEntity of(HttpStatus httpStatus){ - // ResultResponse result = new ResultResponse(); - // result.message = new ResultMessage(SUCCESS, SUCCESS_MESSAGE); - // return new ResponseEntity<>(result, httpStatus); - // } - @Override public String toString() { GsonBuilder builder = new GsonBuilder().serializeNulls(); // value가 null값인 경우도 생성 diff --git a/src/main/resources/sqlmapper/biz/ec/ec-ctzn-sttemnt-mysql-mapper.xml b/src/main/resources/sqlmapper/biz/ec/ec-ctzn-sttemnt-mysql-mapper.xml index 465635da..c28ca36e 100644 --- a/src/main/resources/sqlmapper/biz/ec/ec-ctzn-sttemnt-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/biz/ec/ec-ctzn-sttemnt-mysql-mapper.xml @@ -6,7 +6,7 @@ - + SELECT interface_seq_n , instt_code , sys_code @@ -34,7 +34,13 @@ + + @@ -91,8 +97,41 @@ + + SELECT interface_seq_n + , ctzn_sttemnt_detail_sn + , vhcle_no + , reglt_id + , instt_code + , sys_code + , reglt_de_time + , reglt_place + , violt_dtls_nm + , gps_x + , gps_y + , ctzn_sttemnt_detail_process_sttus + , regist_dt + , register + , updt_dt + , updusr + FROM tb_ec_ctzn_sttemnt_detail + + + /* ec-ctzn-sttemnt-mysql-mapper|insertEcCtznSttemntDetail-시민신고 상세 등록|julim */ diff --git a/src/main/resources/xitProps/globals.properties b/src/main/resources/xitProps/globals.properties index f83966f9..ae9c5869 100644 --- a/src/main/resources/xitProps/globals.properties +++ b/src/main/resources/xitProps/globals.properties @@ -124,15 +124,15 @@ exception.log.trace=true # k byte file.upload.allow.max-size: 2048 file.upload.allow.ext= -#file.upload.root=/Users/minuk/data/fims/upload -file.upload.root=D:/data/fims/upload +file.upload.root=/Users/minuk/data/fims/upload +#file.upload.root=D:/data/fims/upload #file.upload.root=http://211.119.124.107:280/fimsdata/upload file.upload.natl-newspaper.path=/natl-newspaper #file.rcv.root=/Users/minuk/data/fims/rcv #file.rcv.natl-newspaper.path=/natl-newspaper/rcv -#file.rcv.root=/Users/minuk/project_data/fims/01. \uC5F0\uACC4/01. \uAD6D\uBBFC\uC2E0\uBB38\uACE0 -file.rcv.root=D:/project_data/fims/01. \uC5F0\uACC4/01. \uAD6D\uBBFC\uC2E0\uBB38\uACE0 +file.rcv.root=/Users/minuk/project_data/fims/01. \uC5F0\uACC4/01. \uAD6D\uBBFC\uC2E0\uBB38\uACE0 +#file.rcv.root=D:/project_data/fims/01. \uC5F0\uACC4/01. \uAD6D\uBBFC\uC2E0\uBB38\uACE0 #file.rcv.root=http://211.119.124.107:280/fimsdata/rcv #file.rcv.natl-newspaper.path=/natl-newspaper file.rcv.natl-newspaper.path=/rcv diff --git a/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecCtznSttemntMgtForm.jsp b/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecCtznSttemntMgtForm.jsp new file mode 100644 index 00000000..a40adc0a --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecCtznSttemntMgtForm.jsp @@ -0,0 +1,222 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> +<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp" %> + +
+ +
+ + +
+ +
전체 ㅣ
+
+ + 등록 + +
+ + + +
+ + diff --git a/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecCtznSttemntMgtPopup.jsp b/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecCtznSttemntMgtPopup.jsp new file mode 100644 index 00000000..0d8623b5 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecCtznSttemntMgtPopup.jsp @@ -0,0 +1,313 @@ +<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp" %> + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecNatlNewspaperMgtForm.jsp b/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecNatlNewspaperMgtForm.jsp index d924a9e8..17bcac76 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecNatlNewspaperMgtForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecNatlNewspaperMgtForm.jsp @@ -64,8 +64,8 @@ let popOption; switch (flag) { case "detail": - url = ''; - popOption = {width: 1000, height:850}; + url = ''; + popOption = {width: 1000, height:900}; popTitle = "주민 신고 데이타 상세"; break; case "file": @@ -124,7 +124,7 @@ minWidth: 200, sortable: true, sortingType: 'desc', - //align: 'center', + align: 'center', renderer: { type: CustomButtonRenderer, options: { @@ -176,12 +176,7 @@ api: { readData: { url: '' - ,serializer: (params) => { - const schKey = $('#searchCondition').val(); - let schValue = $('input[name=searchKeyword]').val(); - if(schKey === 'tmplatSeCode') schValue = $('select[name=searchKeyword]').val(); - return getPageParam({[schKey]: schValue}, params); - } + ,serializer: (params) => fnAddPageInfo(document.frmSearch, params) } } }; diff --git a/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecNatlNewspaperMgtPopup.jsp b/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecNatlNewspaperPopup.jsp similarity index 86% rename from src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecNatlNewspaperMgtPopup.jsp rename to src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecNatlNewspaperPopup.jsp index d1e51356..5734fbf1 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecNatlNewspaperMgtPopup.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecNatlNewspaperPopup.jsp @@ -2,7 +2,7 @@ <%@ include file="/WEB-INF/jsp/framework/taglibs.jsp" %> <%--rcvXmlDTO--%> -<%----%> +