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 c1b705a6..535cfae2 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 @@ -18,6 +18,8 @@ public interface IEcCtznSttemntMapper { int insertEcCtznSttemnt(final CtznStmtDTO dto); int insertEcCtznSttemntDetail(final CtznStmtDTO.CtznStmtDtl dtl); + int updateEcCtznSttemntDetail(final CtznStmtDTO.CtznStmtDtl dtl); + int deleteEcCtznSttemntDetail(final CtznStmtDTO.CtznStmtDtl dtl); List selectCtznSttemnts(final Map paraMap, final RowBounds rowBounds); 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 8bd893af..1b1f7522 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 @@ -207,6 +207,8 @@ public class CtznStmtDTO implements Serializable { //extends ExtlEsbDataType { private String updusr; private Set indexs = new HashSet<>(); + + private boolean removeImageData = false; } @Getter 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 index a5b670f1..e540975b 100644 --- a/src/main/java/kr/xit/fims/biz/ec/service/EcCtznSttemntService.java +++ b/src/main/java/kr/xit/fims/biz/ec/service/EcCtznSttemntService.java @@ -8,8 +8,10 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import kr.xit.fims.biz.FimsConst; import kr.xit.fims.biz.ec.mapper.IEcCtznSttemntMapper; import kr.xit.fims.biz.ec.model.CtznStmtDTO; +import kr.xit.framework.biz.cmm.model.CmmFileDTO; import kr.xit.framework.biz.cmm.service.ICmmFileService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -53,4 +55,26 @@ public class EcCtznSttemntService implements IEcCtznSttemntService { return mapper.selectEcCtznSttemntDetail(dto); } + @Override + @Transactional + public void modifyEcCtznSttemntDetail(final CtznStmtDTO.CtznStmtDtl dto) { + dto.setUpdusr(getUserUniqId()); + mapper.updateEcCtznSttemntDetail(dto); + } + + @Override + @Transactional + public void removeEcCtznSttemntDetail(final CtznStmtDTO.CtznStmtDtl dto) { + mapper.deleteEcCtznSttemntDetail(dto); + + // 첨부파일 삭제 + if(dto.isRemoveImageData()){ + + CmmFileDTO.PaintwebReq pwDTO = CmmFileDTO.PaintwebReq.builder() + .jobSeCode(FimsConst.FileJobSeCode.NATL_NEWS_PAPER_RCV.getCode()) + .fileJobId(dto.getInterfaceSeqN()+dto.getCtznSttemntDetailSn()) + .build(); + cmmFileService.removeAllCtznStmtFiles(pwDTO); + } + } } diff --git a/src/main/java/kr/xit/fims/biz/ec/service/EcNatlNewspaperService.java b/src/main/java/kr/xit/fims/biz/ec/service/EcNatlNewspaperService.java index aeede715..9a9fc848 100644 --- a/src/main/java/kr/xit/fims/biz/ec/service/EcNatlNewspaperService.java +++ b/src/main/java/kr/xit/fims/biz/ec/service/EcNatlNewspaperService.java @@ -440,17 +440,17 @@ public class EcNatlNewspaperService implements IEcNatlNewspaperService { method = clz.getMethod("getApndfilcont" + fileIdx, null); String petiFileStr = (String)method.invoke(apndFileDTO, null); - //TODO: 실제 저장할 파일명 생성후 파일 내용 저장 + // TODO: 실제 저장할 파일명 생성후 파일 내용 저장 //String saveFileName = CommUtils.getStringFromUUID(); //CommUtils.saveFileFromBytes(saveFileName, makePath, Base64.decode(petiFileStr.getBytes())); // 실제 저장된 파일명 set - //method = clz.getMethod("setPetiFileName" + (idx + 1), String.class); - //method.invoke(appendFileDto, saveFileName); + //method = clz.getMethod("setPetiFileName" + fileIdx, String.class); + //method.invoke(apndFileDTO, petiFileNm); - //TODO: 원본 파일명으로 파일 생성후 파일 업로드 + // TODO: 원본 파일명으로 파일 생성후 파일 업로드 mfList.add(CommUtils.createMutipartFileFromBytes(petiFileNm, makePath, Base64.decode(petiFileStr.getBytes()))); - //method.invoke(dto, StringUtils.cleanPath(makePath + mf.getOriginalFilename())); + //method.invoke(apndFileDTO, StringUtils.cleanPath(makePath + mf.getOriginalFilename())); } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) { e.getStackTrace(); throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, e.getMessage()); 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 index 14ec9618..391e9c41 100644 --- a/src/main/java/kr/xit/fims/biz/ec/service/IEcCtznSttemntService.java +++ b/src/main/java/kr/xit/fims/biz/ec/service/IEcCtznSttemntService.java @@ -4,7 +4,6 @@ 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; @@ -15,7 +14,8 @@ public interface IEcCtznSttemntService { List findCtznStmtDtls(final CtznStmtDTO.Request reqDTO); CtznStmtDTO.CtznStmtDtl findCtznStmtDtl(final CtznStmtDTO.Request reqDTO); - + void modifyEcCtznSttemntDetail(final CtznStmtDTO.CtznStmtDtl dto); + void removeEcCtznSttemntDetail(final CtznStmtDTO.CtznStmtDtl dto); default String getUserUniqId(){ return XitCmmnUtil.getUserUniqId(); 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 index 0faf1b82..fbcf1378 100644 --- a/src/main/java/kr/xit/fims/biz/ec/web/EcCtznSttemntController.java +++ b/src/main/java/kr/xit/fims/biz/ec/web/EcCtznSttemntController.java @@ -7,6 +7,7 @@ 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.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; @@ -16,8 +17,11 @@ 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.constants.FrameworkConstants; import kr.xit.framework.core.model.ResultResponse; import kr.xit.framework.support.mybatis.MybatisUtils; +import kr.xit.framework.support.util.AjaxMessageMapRenderer; +import kr.xit.framework.support.util.constants.MessageKey; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -81,4 +85,22 @@ public class EcCtznSttemntController { .collect(Collectors.toList()) ); } + + @PostMapping("/modifyCtznStmtDtl") + public ModelAndView modifyCtznStmtDtl(final CtznStmtDTO.CtznStmtDtl dto) { + ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); + + service.modifyEcCtznSttemntDetail(dto); + AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS); + return mav; + } + + @PostMapping("/removeCtznStmtDtl") + public ModelAndView removeCtznStmtDtl(final CtznStmtDTO.CtznStmtDtl dto) { + ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); + + service.removeEcCtznSttemntDetail(dto); + AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_FAIL); + return mav; + } } diff --git a/src/main/java/kr/xit/framework/biz/cmm/mapper/ICmmFileMapper.java b/src/main/java/kr/xit/framework/biz/cmm/mapper/ICmmFileMapper.java index 92334771..55ca5d55 100644 --- a/src/main/java/kr/xit/framework/biz/cmm/mapper/ICmmFileMapper.java +++ b/src/main/java/kr/xit/framework/biz/cmm/mapper/ICmmFileMapper.java @@ -13,32 +13,33 @@ public interface ICmmFileMapper { // CmmFileMaster //------------------------------------------------------------- Optional selectCmmFileMastr(final String fileMstId); + Optional selectFileMastrIdByJobSeCodeAndJobId(final T t); int insertCmmFileMastr(final CmmFileDTO.FileMst cmmFileMst); - + int deleteCmmFileMastr(final String fileMastrId); //------------------------------------------------------------- // CmmFileDtl //------------------------------------------------------------- - + List selectFilesByFileMastrId(final String fileMastrId); List selectCmmFileDetails(final String fileMstId); int insertCmmFileDetail(final CmmFileDTO.FileDtl cmmFileDtl); - Optional selectCmmFileDetail(final CmmFileDTO.FileDtl dto); + CmmFileDTO.FileDtl selectCmmFileDetail(final CmmFileDTO.FileDtl dto); /** *
      * 업무코드(jobSeCode)와 업무아이디(fileJobId)로 등록된 파일 목록 조회
      * ex) jobSeCode - NatlNewspaper-rcv (민원접수:국민신문고)
      *     fileJobId - 2022091609485096255243399 (해당데이타 PK)
-     * @param dto CmmFileMstDTO
+     * @param t jobSeCode 와 fileJobId 필드를 갖는 Map 또는 DTO / VO
      * @return List
      * 
*/ - List selectFilesByJobSeCodeAndJobId(final CmmFileDTO.FileMst dto); + List selectFilesByJobSeCodeAndJobId(final T t); int deleteCmmFileDetail(final CmmFileDTO.FileDtl cmmFileDtl); diff --git a/src/main/java/kr/xit/framework/biz/cmm/service/CmmFileService.java b/src/main/java/kr/xit/framework/biz/cmm/service/CmmFileService.java index cbdbdbd8..03571597 100644 --- a/src/main/java/kr/xit/framework/biz/cmm/service/CmmFileService.java +++ b/src/main/java/kr/xit/framework/biz/cmm/service/CmmFileService.java @@ -77,49 +77,20 @@ public class CmmFileService implements ICmmFileService { return fileMstDTO; } - - @Transactional - public void removeExistsUploadFile(final CmmFileDTO.FileDtl dtlDto){ - mapper.selectCmmFileDetail(dtlDto) - .ifPresent((dto)->{ - mapper.deleteCmmFileDetail(dto); - new File(this.uploadRoot + dto.getFileCours() + "/" + dto.getFileId()).delete(); - }); - } - /** - * 시민신고 단속 이미지 저장 - * 단속사진 + 위경도 이미지 저장시, 위경도 이미지지는 기 업로드된 동일 이미지 정보로 저장 - * @param fileMstDTO - * @param files - * @param pngFileDtlDto - * @return + * + * @param dtlDto */ - @Override @Transactional - public CmmFileDTO.FileMst saveCtznStmtFiles(final CmmFileDTO.FileMst fileMstDTO, final List files, final CmmFileDTO.FileDtl pngFileDtlDto) { - boolean isCheckExists = setCmmFileMst(fileMstDTO); - - mapper.insertCmmFileMastr(fileMstDTO); - String makePath = makeUploadFilePath(fileMstDTO); - - String fileUploadPath = this.uploadRoot + makePath; - File file = new File(fileUploadPath); - if(!file.exists()) file.mkdirs(); - - // 단속 이미지 저장 - List cmmFileDtls = saveFileDtls(fileMstDTO, files, isCheckExists, makePath, fileUploadPath); - - // 위도경도 png 이미지 저장 - pngFileDtlDto.setFileMastrId(fileMstDTO.getFileMastrId()); - //pngFileDtlDto.setFileId(CommUtils.getStringFromUUID()); - mapper.insertCmmFileDetail(pngFileDtlDto); - cmmFileDtls.add(pngFileDtlDto); - fileMstDTO.getCmmFileDtls().addAll(cmmFileDtls); - - return fileMstDTO; + public void removeExistsUploadFile(final CmmFileDTO.FileDtl dtlDto){ + CmmFileDTO.FileDtl selectDTO = mapper.selectCmmFileDetail(dtlDto); + if(Checks.isNotEmpty(selectDTO)){ + mapper.deleteCmmFileDetail(selectDTO); + new File(this.uploadRoot + selectDTO.getFileCours() + "/" + selectDTO.getFileId()).delete(); + }; } + /** * 등록된 첨부파일 목록에 file 추가 * @param dto @@ -128,6 +99,7 @@ public class CmmFileService implements ICmmFileService { * @return */ @Override + @Transactional public List saveAddFileDtl(final CmmFileDTO.FileDtl dto, final List files, boolean isCheckExists) { List cmmFileDtls = new ArrayList<>(); @@ -196,6 +168,7 @@ public class CmmFileService implements ICmmFileService { * @param fileUploadPath * @return */ + @Transactional public List saveFileDtls(CmmFileDTO.FileMst fileMstDTO, List files, boolean isCheckExists, String makePath, String fileUploadPath) { List cmmFileDtls = new ArrayList<>(); @@ -255,14 +228,15 @@ public class CmmFileService implements ICmmFileService { return cmmFileDtls; } + /** + * + * @param dto + * @return + */ @Override - public List findFilesByJobSeCodeAndJobId(final CmmFileDTO.FileMst dto) { - return mapper.selectFilesByJobSeCodeAndJobId(dto); - } - - @Override - public List findFilesByEsbInterfaces(final CmmFileDTO.FileMst dto) { - return mapper.selectFilesByEsbInterfaces(dto); + @Transactional(readOnly = true) + public List findFilesByJobSeCodeAndJobId(final T t) { + return mapper.selectFilesByJobSeCodeAndJobId(t); } private static String makeUploadFilePath(CmmFileDTO.FileMst fileMstDTO) { @@ -295,5 +269,81 @@ public class CmmFileService implements ICmmFileService { return isCheckExists; } + + + + //----------------------------------------------------------------------------------------------- + // 시민신고 - 국민신문고 업무 + //----------------------------------------------------------------------------------------------- + @Override + @Transactional(readOnly = true) + public List findFilesByEsbInterfaces(final CmmFileDTO.FileMst dto) { + return mapper.selectFilesByEsbInterfaces(dto); + } + + /** + * 시민신고 단속 이미지 저장 + * 단속사진 + 위경도 이미지 저장시, 위경도 이미지지는 기 업로드된 동일 이미지 정보로 저장 + * @param fileMstDTO + * @param files + * @param pngFileDtlDto + * @return + */ + @Override + @Transactional + public CmmFileDTO.FileMst saveCtznStmtFiles(final CmmFileDTO.FileMst fileMstDTO, final List files, final CmmFileDTO.FileDtl pngFileDtlDto) { + boolean isCheckExists = setCmmFileMst(fileMstDTO); + + mapper.insertCmmFileMastr(fileMstDTO); + String makePath = makeUploadFilePath(fileMstDTO); + + String fileUploadPath = this.uploadRoot + makePath; + File file = new File(fileUploadPath); + if(!file.exists()) file.mkdirs(); + + // 단속 이미지 저장 + List cmmFileDtls = saveFileDtls(fileMstDTO, files, isCheckExists, makePath, fileUploadPath); + + // 위도경도 png 이미지 저장 + pngFileDtlDto.setFileMastrId(fileMstDTO.getFileMastrId()); + //pngFileDtlDto.setFileId(CommUtils.getStringFromUUID()); + mapper.insertCmmFileDetail(pngFileDtlDto); + cmmFileDtls.add(pngFileDtlDto); + fileMstDTO.getCmmFileDtls().addAll(cmmFileDtls); + + return fileMstDTO; + } + + @Override + @Transactional + public void removeAllCtznStmtFiles(T t) { + // 첨부 파일 목록 조회 : 업무코드 와 업무키로 + List dtlList = mapper.selectFilesByJobSeCodeAndJobId(t); + if(dtlList.size() == 0){ + throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "파일정보오류[유효하지 않은 파일 정보]"); + } + + // 첨부파일 삭제 + dtlList.forEach(this::removeExistsUploadFile); + + // 파일 마스터 정보 삭제 + mapper.deleteCmmFileMastr(dtlList.get(0).getFileMastrId()); + } + + @Override + @Transactional + public void removeCtznStmtFile(final CmmFileDTO.FileDtl dto) { + // 첨부파일 목록 조회 - 파일 마스터 ID로 + List dtlList = mapper.selectFilesByFileMastrId(dto.getFileMastrId()); + if(dtlList.size() == 0){ + throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "파일정보오류[유효하지 않은 파일 정보]"); + } + + // 해당 파일 삭제 + this.removeExistsUploadFile(dto); + + // 첨부파일이 1개 였으면 마스터 정보도 삭제 + if(dtlList.size() == 1) mapper.deleteCmmFileMastr(dtlList.get(0).getFileMastrId()); + } } diff --git a/src/main/java/kr/xit/framework/biz/cmm/service/ICmmFileService.java b/src/main/java/kr/xit/framework/biz/cmm/service/ICmmFileService.java index f462d820..675f6759 100644 --- a/src/main/java/kr/xit/framework/biz/cmm/service/ICmmFileService.java +++ b/src/main/java/kr/xit/framework/biz/cmm/service/ICmmFileService.java @@ -22,11 +22,7 @@ public interface ICmmFileService { List saveAddFileDtl(final CmmFileDTO.FileDtl dto, final List files, final boolean isCheckExists); - @SuppressWarnings("UnusedReturnValue") - CmmFileDTO.FileMst saveCtznStmtFiles(final CmmFileDTO.FileMst fileMstDTO, final List files, final CmmFileDTO.FileDtl pngFileDtlDto); - - - List findFilesByJobSeCodeAndJobId(final CmmFileDTO.FileMst dto); + List findFilesByJobSeCodeAndJobId(final T t); //------------------------------------------------------------- // 시민신고 : NatlNewspaper @@ -34,6 +30,11 @@ public interface ICmmFileService { List findFilesByEsbInterfaces(final CmmFileDTO.FileMst fileMstDTO); + @SuppressWarnings("UnusedReturnValue") + CmmFileDTO.FileMst saveCtznStmtFiles(final CmmFileDTO.FileMst fileMstDTO, final List files, final CmmFileDTO.FileDtl pngFileDtlDto); + + void removeAllCtznStmtFiles(final T t); + void removeCtznStmtFile(final CmmFileDTO.FileDtl dto); 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 096bb885..78241fbd 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 @@ -178,6 +178,26 @@ ) + + + /* ec-ctzn-sttemnt-mysql-mapper|updateEcCtznSttemntDetail-시민신고 상세 변경|julim */ + UPDATE tb_ec_ctzn_sttemnt_detail + SET vhcle_no = #{vhcleNo} + , updt_dt = DATE_FORMAT(NOW(), '%Y%m%d%H%i%s') + , updusr = #{updusr} + WHERE interface_seq_n = #{interfaceSeqN} + AND ctzn_sttemnt_detail_sn = #{ctznSttemntDetailSn} + + + + /* ec-ctzn-sttemnt-mysql-mapper|deleteEcCtznSttemntDetail-시민신고 상세 삭제|julim */ + DELETE + FROM tb_ec_ctzn_sttemnt_detail + WHERE interface_seq_n = #{interfaceSeqN} + AND ctzn_sttemnt_detail_sn = #{ctznSttemntDetailSn} + + + diff --git a/src/main/resources/sqlmapper/framework/cmm/cmm-file-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/cmm/cmm-file-mysql-mapper.xml index 09dc69b3..23b38f3f 100644 --- a/src/main/resources/sqlmapper/framework/cmm/cmm-file-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/framework/cmm/cmm-file-mysql-mapper.xml @@ -17,6 +17,13 @@ WHERE file_mastr_id = #{fileMastrId} + /* cmm-file-mysql-mapper|insertCmmFileMastr- 파일 마스터 정보 등록|julim */ @@ -62,8 +69,8 @@ , tcfd.register - + /* cmm-file-mysql-mapper|selectFilesByFileMastrId- 파일 상세 목록 조회-master id로|julim */ FROM tb_cmm_file_detail tcfd WHERE tcfd.file_mastr_id = #{fileMastrId} @@ -118,7 +125,7 @@ ) - + /* cmm-file-mysql-mapper|deleteCmmFileDetail- 파일 상세 정보 삭제|julim */ DELETE FROM tb_cmm_file_detail @@ -126,7 +133,7 @@ AND file_id = #{fileId} - + 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 index e5cbac2c..48454f12 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecCtznSttemntMgtPopup.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecCtznSttemntMgtPopup.jsp @@ -123,9 +123,14 @@ -
- - + + + @@ -145,7 +150,7 @@ @@ -199,7 +204,8 @@
상세
차량번호 - + 단속ID @@ -155,7 +160,7 @@
단속일시 - + 단속장소
-
+ +
@@ -229,7 +235,7 @@ /************************************************************************** * Global Variable **************************************************************************/ -// let orgData; + let orgDtlDatas = []; var imageEditorPopup = (flag, params) => fnBiz.pagePopup(flag, params); var callbackReloadImage = () => fnBiz.downloadImg(); @@ -279,9 +285,34 @@ window.opener.popup = CmmPopup.open(url, params, popOption, popTitle); //var w = window.open("/imageEditor.do", "", "width=800,height=650,top=0px,left=200px,status=,resizable=false,scrollbars=no"); } - ,viewImg: () => { - + ,save: (ctznSttemntDetailSn) => { + let idx = Number(ctznSttemntDetailSn); + if(orgDtlDatas[idx-1] == $('form[name=frmStmtDtl'+ctznSttemntDetailSn+']').serialize()){ + alert('변경된 내용이 없습니다.'); + return false; + } + const frm = $('form[name=frmStmtDtl'+ctznSttemntDetailSn+']'); + const data = { + interfaceSeqN: '${reqDTO.interfaceSeqN}' + ,ctznSttemntDetailSn: ctznSttemntDetailSn + ,vhcleNo: frm.find('input[name=vhcleNo]').val().trim() + } + cmmBizAjax('modify', { + url: '' + ,data: $.param(data) + }) + } + ,remove: (ctznSttemntDetailSn) => { + const data = { + interfaceSeqN: '${reqDTO.interfaceSeqN}' + ,ctznSttemntDetailSn: ctznSttemntDetailSn + } + if(confirm('첨부파일도 함께 삭제 하시겠습까?')) data.removeImageData = true; + cmmBizAjax('remove', { + url: '' + ,data: $.param(data) + }) } }; @@ -298,10 +329,12 @@ * initialize **************************************************************************/ $(document).ready(function () { -// orgData = $('form').serialize(); - fnBiz.downloadImg(); - dragable(); + + + orgDtlDatas.push($('form[name=frmStmtDtl${dtlDTO.ctznSttemntDetailSn}]').serialize()) + + fnBiz.downloadImg(); }); diff --git a/src/main/webapp/resources/framework/js/cmm/cmmDownloadImg.js b/src/main/webapp/resources/framework/js/cmm/cmmDownloadImg.js index a012c0b7..b8b5b69e 100644 --- a/src/main/webapp/resources/framework/js/cmm/cmmDownloadImg.js +++ b/src/main/webapp/resources/framework/js/cmm/cmmDownloadImg.js @@ -70,7 +70,7 @@ function sttemntImgDownload(cmmFileDtls, appendElementId, reqDTO, isEditor) { imgEl.appendChild(x); document.querySelector('#imgList').appendChild(imgEl); }) - + dragable(); // }