187 lines
6.7 KiB
Java
187 lines
6.7 KiB
Java
package kcc.kccadr.accdnt.ai.web;
|
|
|
|
import java.util.List;
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.ui.ModelMap;
|
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import kcc.com.cmm.service.EgovFileMngService;
|
|
import kcc.com.cmm.service.FileVO;
|
|
import kcc.com.cmm.util.StringUtil;
|
|
import kcc.com.utl.fcc.service.EgovStringUtil;
|
|
import kcc.com.utl.user.service.CheckAdrProcessUtil;
|
|
import kcc.kccadr.accdnt.ai.service.AdjstIncidentService;
|
|
import kcc.kccadr.accdnt.ai.service.AdjstIncidentVO;
|
|
import kcc.kccadr.kccadrCom.service.KccadrMgrUdtService;
|
|
import kcc.let.utl.fcc.service.EgovCryptoUtil;
|
|
|
|
/**
|
|
* 대국민(사용자)
|
|
* 조정사건 관한 controller 클래스를 정의한다.
|
|
* @author 김봉호
|
|
* @since 2021.08.23
|
|
* @version 1.0
|
|
* @see
|
|
*
|
|
* <pre>
|
|
* << 개정이력(Modification Information) >>
|
|
*
|
|
* 수정일 수정자 수정내용
|
|
* ------- -------- ---------------------------
|
|
* 2021.08.23 김봉호 최초 생성
|
|
*
|
|
* </pre>
|
|
*/
|
|
@Controller
|
|
public class AdjstIncidentPdfController {
|
|
|
|
private static final Logger LOGGER = LoggerFactory.getLogger(AdjstIncidentPdfController.class);
|
|
|
|
@Resource(name="adjstIncidentService")
|
|
private AdjstIncidentService adjstIncidentService;
|
|
|
|
// 조정신청 서비스단
|
|
@Resource(name = "checkAdrProcessUtil")
|
|
private CheckAdrProcessUtil checkAdrProcessUtil;
|
|
|
|
@Resource(name = "EgovFileMngService")
|
|
private EgovFileMngService fileService;
|
|
|
|
@Resource(name="KccadrMgrUdtService")
|
|
private KccadrMgrUdtService kccadrMgrUdtService;
|
|
|
|
//암복호화 유틸
|
|
@Resource(name = "egovCryptoUtil")
|
|
EgovCryptoUtil egovCryptoUtil;
|
|
|
|
|
|
|
|
|
|
/**
|
|
* 조정사건 상세페이지 호출
|
|
* @param adjstIncidentVO AdjstIncidentVO
|
|
* @return String
|
|
* @exception Exception
|
|
*/
|
|
/**
|
|
* 조정사건 상세페이지
|
|
* @param adjstIncidentVO AdjstIncidentVO
|
|
* @return String
|
|
* @exception Exception
|
|
*/
|
|
@RequestMapping(value = "/popup/main/adjstIncidentDetailPdf.do")
|
|
public String adjstIncidentDetail(
|
|
@ModelAttribute("adjstIncidentVO") AdjstIncidentVO adjstIncidentVO
|
|
, ModelMap model
|
|
, HttpServletRequest request
|
|
) throws Exception {
|
|
|
|
|
|
//System.out.println("http://192.168.0.34:7080/popup/main/adjstIncidentDetailPdf.do?adrSeq="+request.getParameter("adrSeq"));
|
|
|
|
adjstIncidentVO.setAdrSeq(request.getParameter("adrSeq"));
|
|
|
|
AdjstIncidentVO master = adjstIncidentService.selectAdjstIncidentMaster(adjstIncidentVO);
|
|
model.addAttribute("master", master);
|
|
|
|
List<AdjstIncidentVO> relatedPerson = adjstIncidentService.selectAdjstIncidentrelatedPersonList(adjstIncidentVO);
|
|
decryptInfomation(relatedPerson, null);
|
|
model.addAttribute("relatedPerson", relatedPerson);
|
|
if(StringUtils.isNotBlank(master.getAtchFileId())){
|
|
FileVO fileVO = new FileVO();
|
|
fileVO.setAtchFileId(master.getAtchFileId());
|
|
List<FileVO> fileList = fileService.selectFileInfs(fileVO);
|
|
model.addAttribute("fileList", fileList);
|
|
}
|
|
return "/web/kccadr/accdnt/ai/adjstIncidentDetailPdf";
|
|
}
|
|
|
|
/**
|
|
* 조정사건 상세페이지
|
|
* @param adjstIncidentVO AdjstIncidentVO
|
|
* @return String
|
|
* @exception Exception
|
|
*/
|
|
/*
|
|
@RequestMapping(value = "/web/kccadr/accdnt/ai/adjstIncidentDetail.do")
|
|
public String adjstIncidentDetail(@ModelAttribute("adjstIncidentVO") AdjstIncidentVO adjstIncidentVO , ModelMap model) throws Exception {
|
|
AdjstIncidentVO master = adjstIncidentService.selectAdjstIncidentMaster(adjstIncidentVO);
|
|
model.addAttribute("master", master);
|
|
|
|
List<AdjstIncidentVO> relatedPerson = adjstIncidentService.selectAdjstIncidentrelatedPersonList(adjstIncidentVO);
|
|
decryptInfomation(relatedPerson, null);
|
|
model.addAttribute("relatedPerson", relatedPerson);
|
|
if(StringUtils.isNotBlank(master.getAtchFileId())){
|
|
FileVO fileVO = new FileVO();
|
|
fileVO.setAtchFileId(master.getAtchFileId());
|
|
List<FileVO> fileList = fileService.selectFileInfs(fileVO);
|
|
model.addAttribute("fileList", fileList);
|
|
}
|
|
return "/web/kccadr/accdnt/ai/adjstIncidentDetail";
|
|
}
|
|
*/
|
|
|
|
public void decryptInfomation(List<AdjstIncidentVO> list, AdjstIncidentVO info){
|
|
if(CollectionUtils.isNotEmpty(list)){
|
|
for(AdjstIncidentVO model : list){
|
|
model.setRpplNm(egovCryptoUtil.decrypt(model.getRpplNm()));
|
|
model.setRpplAddr(egovCryptoUtil.decrypt(model.getRpplAddr()));
|
|
model.setRpplAddrDtl(egovCryptoUtil.decrypt(model.getRpplAddrDtl()));
|
|
model.setRpplPost(egovCryptoUtil.decrypt(model.getRpplPost()));
|
|
model.setRpplEmail(egovCryptoUtil.decrypt(model.getRpplEmail()));
|
|
model.setRpplPhone(egovCryptoUtil.decrypt(model.getRpplPhone()));
|
|
model.setRpplRealPost(egovCryptoUtil.decrypt(model.getRpplRealPost()));
|
|
model.setRpplRealAddr(egovCryptoUtil.decrypt(model.getRpplRealAddr()));
|
|
model.setRpplRealAddrDtl(egovCryptoUtil.decrypt(model.getRpplRealAddrDtl()));
|
|
|
|
|
|
model.setDepuTyNm(egovCryptoUtil.decrypt(model.getDepuTyNm()));
|
|
// model.setResPonDentNm(egovCryptoUtil.decrypt(model.getResPonDentNm()));
|
|
//피신청인 명수 표시 '외 N명' 처리_이준호_220801
|
|
if (!StringUtil.isEmpty(model.getResPonDentNm())) {
|
|
model.setResPonDentNm(
|
|
EgovStringUtil.checkNPerson(
|
|
model.getResPonDentNm()
|
|
, egovCryptoUtil
|
|
)
|
|
);
|
|
/*
|
|
String tmpStr = "";
|
|
if(model.getResPonDentNm().contains("외")) {
|
|
tmpStr = model.getResPonDentNm().substring(model.getResPonDentNm().length()-3);
|
|
}
|
|
model.setResPonDentNm(egovCryptoUtil.decrypt(model.getResPonDentNm()) + " " + tmpStr);
|
|
*/
|
|
}
|
|
model.setAppliCantNm(egovCryptoUtil.decrypt(model.getAppliCantNm()));
|
|
|
|
}
|
|
}
|
|
|
|
if(info != null){
|
|
info.setRpplNm(egovCryptoUtil.decrypt(info.getRpplNm()));
|
|
info.setRpplAddr(egovCryptoUtil.decrypt(info.getRpplAddr()));
|
|
info.setRpplAddrDtl(egovCryptoUtil.decrypt(info.getRpplAddrDtl()));
|
|
info.setRpplPost(egovCryptoUtil.decrypt(info.getRpplPost()));
|
|
info.setRpplEmail(egovCryptoUtil.decrypt(info.getRpplEmail()));
|
|
info.setRpplPhone(egovCryptoUtil.decrypt(info.getRpplPhone()));
|
|
info.setDepuTyNm(egovCryptoUtil.decrypt(info.getDepuTyNm()));
|
|
info.setResPonDentNm(egovCryptoUtil.decrypt(info.getResPonDentNm()));
|
|
info.setAppliCantNm(egovCryptoUtil.decrypt(info.getAppliCantNm()));
|
|
info.setRpplRealPost(egovCryptoUtil.decrypt(info.getRpplRealPost()));
|
|
info.setRpplRealAddr(egovCryptoUtil.decrypt(info.getRpplRealAddr()));
|
|
info.setRpplRealAddrDtl(egovCryptoUtil.decrypt(info.getRpplRealAddrDtl()));
|
|
}
|
|
}
|
|
|
|
}
|