1269 lines
46 KiB
Java
1269 lines
46 KiB
Java
package kcc.kccadr.accdnt.ars.web;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.Date;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Optional;
|
|
import java.util.stream.Collectors;
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.json.simple.JSONObject;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
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 org.springframework.web.servlet.ModelAndView;
|
|
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
|
import org.springframework.web.servlet.support.RequestContextUtils;
|
|
|
|
import com.fasterxml.jackson.core.io.JsonStringEncoder;
|
|
import com.inicis.std.util.SignatureUtil;
|
|
|
|
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
|
|
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
|
|
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
|
import kcc.com.cmm.EgovMessageSource;
|
|
import kcc.com.cmm.LoginVO;
|
|
import kcc.com.cmm.service.EgovFileMngService;
|
|
import kcc.com.cmm.service.FileVO;
|
|
import kcc.com.cmm.util.DateUtil;
|
|
import kcc.com.cmm.util.IpUtil;
|
|
import kcc.com.cmm.util.StringUtil;
|
|
import kcc.com.utl.fcc.service.EgovStringUtil;
|
|
import kcc.kccadr.accdnt.ai.service.AdjstIncidentService;
|
|
import kcc.kccadr.accdnt.ai.service.AdjstIncidentVO;
|
|
import kcc.kccadr.accdnt.ars.service.AdjstReqStatusService;
|
|
import kcc.kccadr.accdnt.ars.service.AdjstReqStatusVO;
|
|
import kcc.kccadr.adjPgrMgr.cmm.service.PgrCmmService;
|
|
import kcc.kccadr.adjPgrMgr.cmm.service.PgrCmmVO;
|
|
import kcc.kccadr.adjPgrMgr.dlvinfo.service.DlvinfoService;
|
|
import kcc.kccadr.adjPgrMgr.dlvinfo.service.DlvinfoVO;
|
|
import kcc.kccadr.adjPgrMgr.exmp.app.service.ExmpAppManageService;
|
|
import kcc.kccadr.adjPgrMgr.exmp.cmm.ExmpManageVO;
|
|
import kcc.kccadr.adjRppl.service.AdjRpplService;
|
|
import kcc.kccadr.adjRppl.service.AdjRpplVO;
|
|
import kcc.kccadr.adjclsmgr.service.AdjClsMgrService;
|
|
import kcc.kccadr.adjclsmgr.service.AdjClsMgrVO;
|
|
import kcc.kccadr.adjst.service.PayService;
|
|
import kcc.kccadr.adjst.service.PayVO;
|
|
import kcc.kccadr.advc.service.AdrHstryMgrService;
|
|
import kcc.kccadr.advc.service.AdrHstryMgrVO;
|
|
import kcc.kccadr.advcRecord.service.AdrRecordReadingService;
|
|
import kcc.kccadr.advcRecord.service.AdrRecordReadingVO;
|
|
import kcc.kccadr.cmm.KccadrConstants;
|
|
import kcc.kccadr.kccadrCom.service.KccadrCommonSearchVO;
|
|
import kcc.kccadr.kccadrCom.service.KccadrCommonService;
|
|
import kcc.kccadr.kccadrCom.service.KccadrCommonVO;
|
|
import kcc.let.uat.uia.service.SsoLoginVO;
|
|
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 AdjstReqStatusController {
|
|
|
|
private static final Logger LOGGER = LoggerFactory.getLogger(AdjstReqStatusController.class);
|
|
|
|
@Value("#{globalSettings['Globals.prod.islocal']}")
|
|
private String prodIsLocal;
|
|
|
|
@Resource(name = "EgovFileMngService")
|
|
private EgovFileMngService fileService;
|
|
|
|
@Resource(name="adjstReqStatusService")
|
|
private AdjstReqStatusService adjstReqStatusService;
|
|
|
|
@Resource(name="adjstIncidentService")
|
|
private AdjstIncidentService adjstIncidentService;
|
|
|
|
//이력관리테이블
|
|
@Resource(name="adrHstryMgrService")
|
|
private AdrHstryMgrService adrHstryMgrService;
|
|
|
|
//암복호화 유틸
|
|
@Resource(name = "egovCryptoUtil")
|
|
EgovCryptoUtil egovCryptoUtil;
|
|
|
|
@Resource(name="kccadrCommonService")
|
|
private KccadrCommonService kccadrCommonService;
|
|
|
|
@Resource(name = "adjClsMgrService")
|
|
private AdjClsMgrService adjClsMgrService;
|
|
|
|
@Resource(name = "ExmpAppManageService")
|
|
private ExmpAppManageService exmpAppManageService;
|
|
|
|
@Resource(name = "pgrCmmService")
|
|
private PgrCmmService cmmService;
|
|
|
|
@Resource(name = "adrRecordReadingService")
|
|
private AdrRecordReadingService adrRecordReadingService;
|
|
|
|
// eGov 공통 메세지
|
|
@Resource(name = "egovMessageSource")
|
|
EgovMessageSource egovMessageSource;
|
|
|
|
@Resource(name = "dlvinfoService")
|
|
private DlvinfoService dlvinfoService;
|
|
|
|
@Resource(name = "adjRpplService")
|
|
private AdjRpplService adjRpplService;
|
|
|
|
@Resource(name="PayService")
|
|
private PayService payService;
|
|
|
|
@Value("#{globalSettings['Globals.pay.mid']}")
|
|
private String global_mid;
|
|
|
|
@Value("#{globalSettings['Globals.pay.signKey']}")
|
|
private String global_signKey;
|
|
|
|
@Value("#{globalSettings['Globals.pay.siteDomain']}")
|
|
private String global_siteDomain;
|
|
|
|
@Resource(name="recordReadingHstryGnrService")
|
|
private EgovIdGnrService recordReadingHstryGnrService;
|
|
|
|
|
|
/**
|
|
* 조정진행 상태 및 관리 목록 화면
|
|
*/
|
|
@RequestMapping("/web/kccadr/accdnt/ars/adjstReqStatusList.do")
|
|
public String adjstReqStatusList(@ModelAttribute("adjstReqStatusVO") AdjstReqStatusVO adjstReqStatusVO, ModelMap model, HttpServletRequest request) throws Exception {
|
|
|
|
String auth = EgovUserDetailsHelper.isAuthenticated() ? null : EgovUserDetailsHelper.getAuthenticatedUser().toString();
|
|
LoginVO loginVO = "anonymousUser".equals(auth) ? null : (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
|
|
|
|
if (loginVO == null) {
|
|
|
|
model.addAttribute("msg", "로그인 해주세요.");
|
|
return "redirect:/web/user/login/ssoLogin.do";
|
|
}
|
|
|
|
adjstReqStatusVO.setFrstRegisterId(loginVO.getUniqId());
|
|
|
|
if(adjstReqStatusVO.getPageUnit() != 10) {
|
|
adjstReqStatusVO.setPageUnit(adjstReqStatusVO.getPageUnit());
|
|
}
|
|
|
|
if("".equals(adjstReqStatusVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
|
|
adjstReqStatusVO.setSearchSortCnd("RS.ADR_SEQ");
|
|
adjstReqStatusVO.setSearchSortOrd("desc");
|
|
}
|
|
|
|
/** paging */
|
|
PaginationInfo paginationInfo = new PaginationInfo();
|
|
paginationInfo.setCurrentPageNo(adjstReqStatusVO.getPageIndex());
|
|
paginationInfo.setRecordCountPerPage(adjstReqStatusVO.getPageUnit());
|
|
paginationInfo.setPageSize(adjstReqStatusVO.getPageSize());
|
|
|
|
adjstReqStatusVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
|
adjstReqStatusVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
|
adjstReqStatusVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
|
|
|
paginationInfo.setTotalRecordCount(adjstReqStatusService.selectAdjstReqStatusCount(adjstReqStatusVO));
|
|
model.addAttribute("paginationInfo", paginationInfo);
|
|
List<AdjstReqStatusVO> list = adjstReqStatusService.selectAdjstReqStatusList(adjstReqStatusVO);
|
|
decryptInfomation(list, null);
|
|
model.addAttribute("list", list);
|
|
|
|
return "/web/kccadr/accdnt/ars/adjstReqStatusList";
|
|
}
|
|
|
|
/**
|
|
* 조정진행 상세 화면
|
|
*/
|
|
@RequestMapping("/web/kccadr/accdnt/ars/adjstReqStatusDetail.do")
|
|
public String adjstReqStatusDetail(@ModelAttribute("adjstReqStatusVO") AdjstReqStatusVO adjstReqStatusVO, ModelMap model) throws Exception {
|
|
return "/web/kccadr/accdnt/ars/adjstReqStatusDetail";
|
|
}
|
|
|
|
/**
|
|
* 조정종결 상세 화면
|
|
*/
|
|
@RequestMapping("/web/kccadr/accdnt/ars/adjstCloseDetail.do")
|
|
public String adjstCloseDetail(@ModelAttribute("adjstReqStatusVO") AdjstReqStatusVO adjstReqStatusVO, ModelMap model) throws Exception {
|
|
return "/web/kccadr/accdnt/ars/adjstCloseDetail";
|
|
}
|
|
|
|
/**
|
|
* 조정진행 상세 Tab 조정진행 화면
|
|
*/
|
|
@RequestMapping("/web/kccadr/accdnt/ars/tab/adjstReqStatusTabStatus.do")
|
|
public String adjstReqStatusTabStatus(@ModelAttribute("adjstReqStatusVO") AdjstReqStatusVO adjstReqStatusVO, ModelMap model) throws Exception {
|
|
|
|
model.addAttribute("list" , adjstReqStatusService.selectAdjstHistoryList(adjstReqStatusVO));
|
|
return "/web/kccadr/accdnt/ars/tab/adjstReqStatusTabStatus";
|
|
}
|
|
|
|
/**
|
|
* 조정진행 상세 Tab 조정일반 화면
|
|
*/
|
|
@RequestMapping("/web/kccadr/accdnt/ars/tab/adjstReqStatusTabNormal.do")
|
|
public String adjstReqStatusTabNormal(@ModelAttribute("adjstReqStatusVO") AdjstReqStatusVO adjstReqStatusVO, ModelMap model) throws Exception {
|
|
String auth = EgovUserDetailsHelper.isAuthenticated() ? null : EgovUserDetailsHelper.getAuthenticatedUser().toString();
|
|
LoginVO loginVO = "anonymousUser".equals(auth) ? null : (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
|
|
|
|
if (loginVO == null) {
|
|
|
|
model.addAttribute("msg", "로그인 해주세요.");
|
|
return "redirect:/web/user/login/ssoLogin.do";
|
|
}
|
|
|
|
adjstReqStatusVO.setRpplSeq(loginVO.getUniqId());
|
|
|
|
//조정기록
|
|
//model.addAttribute("list" , adjstReqStatusService.selectAdjstDocsList(adjstReqStatusVO));
|
|
|
|
//조정기록 1차오픈대비
|
|
model.addAttribute("list" , adjstReqStatusService.selectAdjstDocs20211020List(adjstReqStatusVO));
|
|
|
|
//
|
|
KccadrCommonSearchVO kccadrCommonSearchVO = new KccadrCommonSearchVO();
|
|
kccadrCommonSearchVO.setAdrSeq(adjstReqStatusVO.getAdrSeq());
|
|
KccadrCommonVO masterInfo = kccadrCommonService.selectAdjstBasicInfo(kccadrCommonSearchVO);
|
|
model.addAttribute("masterInfo", masterInfo);
|
|
|
|
return "/web/kccadr/accdnt/ars/tab/adjstReqStatusTabNormal";
|
|
}
|
|
|
|
/**
|
|
* 조정종결 상세 Tab 상세정보 화면
|
|
*/
|
|
@RequestMapping("/web/kccadr/accdnt/ars/tab/adjstCloseDetailTabNormal.do")
|
|
public String adjstCloseDetailTabNormal(@ModelAttribute("adjstReqStatusVO") AdjstReqStatusVO adjstReqStatusVO
|
|
,@ModelAttribute("adjstIncidentVO") AdjstIncidentVO adjstIncidentVO, ModelMap model) throws Exception {
|
|
AdjstIncidentVO master = adjstIncidentService.selectAdjstIncidentMaster(adjstIncidentVO);
|
|
model.addAttribute("master", master);
|
|
|
|
List<AdjstIncidentVO> relatedPerson = adjstIncidentService.selectAdjstIncidentrelatedPersonList(adjstIncidentVO);
|
|
decryptInfomation2(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/ars/tab/adjstCloseDetailTabNormal";
|
|
}
|
|
|
|
/**
|
|
* 조정진행 상세 Tab 조정상세 화면
|
|
*/
|
|
@RequestMapping("/web/kccadr/accdnt/ars/tab/adjstReqStatusTabDetail.do")
|
|
public String adjstReqStatusTabDetail(
|
|
@ModelAttribute("adjstReqStatusVO") AdjstReqStatusVO adjstReqStatusVO
|
|
, @ModelAttribute("adjstIncidentVO") AdjstIncidentVO adjstIncidentVO
|
|
, ModelMap model) throws Exception {
|
|
|
|
// 조정신청 관련인 조회
|
|
List<AdjstReqStatusVO> list = adjstReqStatusService.selectAdjstReqRpplInfo(adjstReqStatusVO);
|
|
|
|
// 신청인 추출
|
|
Optional<AdjstReqStatusVO> reqInfo = list.stream().filter(t -> t.getRpplTy().equals(KccadrConstants.ADR_RPPL_TY_REQ)).findFirst();
|
|
|
|
// 대리인 추출
|
|
Optional<AdjstReqStatusVO> agenInfo = list.stream().filter(t -> t.getRpplTy().equals(KccadrConstants.ADR_RPPL_TY_REQ_DEPUTY)).findFirst();
|
|
|
|
AdjstReqStatusVO reqPeson = reqInfo.isPresent() ? reqInfo.get() : null;
|
|
|
|
AdjstReqStatusVO agenPerson = agenInfo.isPresent() ? agenInfo.get() : null;
|
|
|
|
decryptInfomation(null, reqPeson);
|
|
|
|
decryptInfomation(null, agenPerson);
|
|
|
|
// 피신청인 추출
|
|
List<AdjstReqStatusVO> resInfo = list.stream().filter(t -> t.getRpplTy().equals(KccadrConstants.ADR_RPPL_TY_RES)).collect(Collectors.toList());
|
|
|
|
// 기일 예정일 정보 불러오기 - 업무 담당자가 등록하 최근의 데이터 불러오기
|
|
|
|
|
|
model.addAttribute("apmChgInfo", adjstIncidentService.selectApmChgDateInfo(adjstIncidentVO));
|
|
|
|
decryptInfomation(resInfo, null);
|
|
|
|
model.addAttribute("master" , adjstIncidentService.selectAdjstIncidentMaster(adjstIncidentVO));
|
|
|
|
model.addAttribute("reqInfo" , reqPeson);
|
|
model.addAttribute("agenInfo" , agenPerson);
|
|
model.addAttribute("resInfo" , resInfo);
|
|
ExmpManageVO exmpManageVO = new ExmpManageVO();
|
|
exmpManageVO.setExmpCd("05");
|
|
|
|
/*
|
|
* 20221013 - 이호영
|
|
* 도움말 select
|
|
* */
|
|
List<ExmpManageVO> exmpManageListVO = exmpAppManageService.selectExmpAppManagerList(exmpManageVO);
|
|
|
|
HashMap<String, String> helpMap = (HashMap<String, String>) exmpManageListVO.stream().collect(
|
|
Collectors.toMap(ExmpManageVO::getExmpCcTy, ExmpManageVO::getExmpCn));
|
|
|
|
model.addAttribute("helpMap" , helpMap);
|
|
|
|
// --//도움말 select
|
|
|
|
|
|
//이력값 - 시작
|
|
AdrHstryMgrVO adrHstryMgrVO = new AdrHstryMgrVO();
|
|
adrHstryMgrVO.setAdrSeq(adjstReqStatusVO.getAdrSeq());
|
|
|
|
model.addAttribute("list_mgr" , adrHstryMgrService.selectList(adrHstryMgrVO));
|
|
//이력값 - 끝
|
|
|
|
/*
|
|
* 송달정보조회
|
|
* select
|
|
* */
|
|
DlvinfoVO dlvinfoVO = new DlvinfoVO();
|
|
dlvinfoVO.setAdrSeq(adjstReqStatusVO.getAdrSeq());
|
|
|
|
//로그인한 사용자 이름으로 등록된 송달 리스트 조회
|
|
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated() ? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser() : null;
|
|
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getUniqId());
|
|
String rpplNm = "";
|
|
if(!"".equals(userId)) {
|
|
AdjRpplVO adjRpplVO = new AdjRpplVO();
|
|
adjRpplVO.setAdrSeq(adjstReqStatusVO.getAdrSeq());
|
|
adjRpplVO.setRpplId(userId);
|
|
adjRpplVO = adjRpplService.selectAdjRpplInfo(adjRpplVO);
|
|
rpplNm = egovCryptoUtil.decrypt(adjRpplVO.getRpplNm());
|
|
dlvinfoVO.setRpplNm(rpplNm);
|
|
}
|
|
|
|
List<DlvinfoVO> dlvinfoList = dlvinfoService.selectAdjustDlvryList(dlvinfoVO);
|
|
|
|
model.addAttribute("dlvinfoList", dlvinfoList);
|
|
|
|
return "/web/kccadr/accdnt/ars/tab/adjstReqStatusTabDetail";
|
|
}
|
|
|
|
/**
|
|
* 조정진행 상세 Tab 조정상세 화면
|
|
*/
|
|
@RequestMapping("/web/kccadr/accdnt/ars/tab/adjstReqStatusTabDetail_in_workflow.do")
|
|
public String adjstReqStatusTabDetail_in_workflow(
|
|
@ModelAttribute("adjstReqStatusVO") AdjstReqStatusVO adjstReqStatusVO
|
|
, @ModelAttribute("adjstIncidentVO") AdjstIncidentVO adjstIncidentVO
|
|
, ModelMap model) throws Exception {
|
|
|
|
|
|
System.out.println("========start");
|
|
//model.addAttribute("master" , adjstIncidentService.selectAdjstIncidentMaster(adjstIncidentVO));
|
|
model.addAttribute("info" , adjstIncidentService.selectAdjstIncidentMaster(adjstIncidentVO));
|
|
|
|
|
|
//이력값 - 시작
|
|
AdrHstryMgrVO adrHstryMgrVO = new AdrHstryMgrVO();
|
|
adrHstryMgrVO.setAdrSeq(adjstReqStatusVO.getAdrSeq());
|
|
|
|
model.addAttribute("list_mgr" , adrHstryMgrService.selectList(adrHstryMgrVO));
|
|
//이력값 - 끝
|
|
|
|
System.out.println("========start=end");
|
|
|
|
return "/web/kccadr/accdnt/ars/tab/adjstReqStatusTabDetail_in_workflow";
|
|
}
|
|
|
|
/**
|
|
* 조정종결 상세 Tab 조정일반 화면
|
|
*/
|
|
@RequestMapping("/web/kccadr/accdnt/ars/tab/adjstCloseTabDetail.do")
|
|
public String adjstCloseTabDetail(
|
|
@ModelAttribute("adjstReqStatusVO") AdjstReqStatusVO adjstReqStatusVO
|
|
, @ModelAttribute("adjstIncidentVO") AdjstIncidentVO adjstIncidentVO
|
|
, ModelMap model) throws Exception {
|
|
|
|
// 조정신청 관련인 조회
|
|
List<AdjstReqStatusVO> list = adjstReqStatusService.selectAdjstReqRpplInfo(adjstReqStatusVO);
|
|
|
|
// 신청인 추출
|
|
Optional<AdjstReqStatusVO> reqInfo = list.stream().filter(t -> t.getRpplTy().equals(KccadrConstants.ADR_RPPL_TY_REQ)).findFirst();
|
|
|
|
// 대리인 추출
|
|
// List<AdjstReqStatusVO> agenInfo = list.stream().filter(t -> t.getRpplTy().equals(KccadrConstants.ADR_RPPL_TY_REQ_DEPUTY)).collect(Collectors.toList());
|
|
|
|
AdjstReqStatusVO reqPeson = reqInfo.isPresent() ? reqInfo.get() : null;
|
|
|
|
// AdjstReqStatusVO agenPerson = agenInfo.isPresent() ? agenInfo.get() : null;
|
|
|
|
decryptInfomation(null, reqPeson);
|
|
|
|
// decryptInfomation(agenInfo, null);
|
|
|
|
// 피신청인 추출
|
|
List<AdjstReqStatusVO> resInfo = list.stream().filter(t -> t.getRpplTy().equals(KccadrConstants.ADR_RPPL_TY_RES)).collect(Collectors.toList());
|
|
List<AdjstReqStatusVO> resAgenInfo = list.stream().filter(t -> t.getRpplTy().equals(KccadrConstants.ADR_RPPL_TY_RES_DEPUTY)).collect(Collectors.toList());
|
|
|
|
decryptInfomation(resInfo, null);
|
|
decryptInfomation(resAgenInfo, null);
|
|
|
|
model.addAttribute("master" , adjstIncidentService.selectAdjstIncidentMaster(adjstIncidentVO));
|
|
model.addAttribute("reqInfo" , reqPeson);
|
|
// model.addAttribute("agenInfo" , agenInfo);
|
|
model.addAttribute("resInfo" , resInfo);
|
|
model.addAttribute("resAgenInfo" , resAgenInfo);
|
|
return "/web/kccadr/accdnt/ars/tab/adjstCloseTabDetail";
|
|
}
|
|
|
|
/**
|
|
* 조정진행 상세 Tab 조정일반 화면
|
|
*/
|
|
@RequestMapping("/web/kccadr/accdnt/ars/tab/adjstReqStatusTabStatusDesc.do")
|
|
public String adjstReqStatusTabStatusDesc(@ModelAttribute("adjstReqStatusVO") AdjstReqStatusVO adjstReqStatusVO, ModelMap model) throws Exception {
|
|
return "/web/kccadr/accdnt/ars/tab/adjstReqStatusTabStatusDesc";
|
|
}
|
|
|
|
public void decryptInfomation(List<AdjstReqStatusVO> list, AdjstReqStatusVO info){
|
|
if(CollectionUtils.isNotEmpty(list)){
|
|
for(AdjstReqStatusVO 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()));
|
|
}
|
|
}
|
|
|
|
// 기록열람, 조정조서 발급 요청 팝업
|
|
@RequestMapping(value = "/web/kccadr/accdnt/ars/tab/docIssReqViewPop.do")
|
|
public String docIssReqViewPop(@ModelAttribute("adjClsMgrVO") AdjClsMgrVO adjClsMgrVO, ModelMap model) throws Exception {
|
|
// model.addAttribute("security", adjReqMgrService.selectAdjstReqSecurityInfo(param));
|
|
return "/web/kccadr/accdnt/ars/tab/docIssReqViewPop";
|
|
}
|
|
|
|
|
|
// 대국민 조정사건 기록열람 신청 ajax
|
|
@RequestMapping(value = "/web/kccadr/accdnt/ars/tab/docIssReqInsertAjax.do")
|
|
public ModelAndView docIssReqInsertAjax(AdjClsMgrVO adjClsMgrVO, ModelMap model) throws Exception {
|
|
|
|
ModelAndView modelAndView = new ModelAndView();
|
|
modelAndView.setViewName("jsonView");
|
|
|
|
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated() ? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser() : null;
|
|
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getUniqId());
|
|
|
|
if (loginVO == null) {
|
|
|
|
modelAndView.addObject("result", "fail");
|
|
modelAndView.addObject("message", "로그인 해주세요.");
|
|
return modelAndView;
|
|
}
|
|
|
|
// 작성단계 셋팅
|
|
adjClsMgrVO.setFrstRegisterId(userId); // 최초등록자
|
|
adjClsMgrVO.setDocuReqConfirmCd(KccadrConstants.ADR_DOCU_REQ); // 신청상태
|
|
|
|
adjClsMgrService.insertDocIssReq(adjClsMgrVO);
|
|
|
|
|
|
modelAndView.addObject("result", "success");
|
|
|
|
return modelAndView;
|
|
|
|
}
|
|
|
|
// 대국민 조정사건 기록열람 신청 등록
|
|
@RequestMapping(value = "/web/kccadr/accdnt/ai/docAdjReqInsertAjax.do")
|
|
public ModelAndView docAdjReqInsertAjax(AdrRecordReadingVO adrRecordReadingVO, ModelMap model) throws Exception {
|
|
|
|
ModelAndView modelAndView = new ModelAndView();
|
|
modelAndView.setViewName("jsonView");
|
|
|
|
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated() ? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser() : null;
|
|
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getUniqId());
|
|
|
|
if (loginVO == null) {
|
|
|
|
modelAndView.addObject("result", "fail");
|
|
modelAndView.addObject("message", "로그인 해주세요.");
|
|
return modelAndView;
|
|
}
|
|
|
|
// 작성단계 셋팅
|
|
adrRecordReadingVO.setFrstRegisterId(userId); // 최초수정자
|
|
adrRecordReadingVO.setLastUpdusrId(userId); // 최초등록자
|
|
adrRecordReadingVO.setPrcsnStatCd(KccadrConstants.ADR_RCD_RDNG_PRCSN_STAT_CD_10); //신청 상태
|
|
|
|
try {
|
|
adrRecordReadingService.insertRecordReading(adrRecordReadingVO);
|
|
|
|
// history 영역
|
|
adrRecordReadingVO.setFrstRegisterId(userId);
|
|
adrRecordReadingVO.setRecordReadingHstrySeq(recordReadingHstryGnrService.getNextStringId());
|
|
adrRecordReadingService.insertRecordReadingHist(adrRecordReadingVO);
|
|
|
|
modelAndView.addObject("result", "success");
|
|
} catch(Exception e) {
|
|
modelAndView.addObject("result", "fail");
|
|
}
|
|
|
|
return modelAndView;
|
|
|
|
}
|
|
|
|
// 대국민 조정사건 기록열람 신청 상세
|
|
@RequestMapping(value = "/web/kccadr/payment/accdnt/ai/docIssDetail.do")
|
|
public String docIssDetail(@ModelAttribute("adrRecordReadingVO") AdrRecordReadingVO adrRecordReadingVO,
|
|
ModelMap model,
|
|
HttpServletRequest request,
|
|
HttpServletResponse response) throws Exception {
|
|
|
|
String auth = EgovUserDetailsHelper.isAuthenticated() ? null : EgovUserDetailsHelper.getAuthenticatedUser().toString();
|
|
LoginVO loginVO = "anonymousUser".equals(auth) ? new LoginVO() : (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
|
|
|
|
SsoLoginVO ssoLoginVO = (SsoLoginVO) request.getSession().getAttribute("SSOLoginVO");
|
|
|
|
if (loginVO == null) {
|
|
|
|
model.addAttribute("msg", "로그인 해주세요.");
|
|
return "redirect:/web/user/login/ssoLogin.do";
|
|
}
|
|
AdrRecordReadingVO detailVO = adrRecordReadingService.selectDetail(adrRecordReadingVO);
|
|
|
|
// 결제 마감일 계산
|
|
// DateUtil.AddDate 더하고싶은 날짜, 년, 월, 일
|
|
detailVO.setPayEndDay(DateUtil.AddDate(detailVO.getFrstRegistPnttm(), 0, 0, 7));
|
|
model.addAttribute("info", detailVO);
|
|
|
|
return "/web/kccadr/accdnt/ars/tab/docIssDetail";
|
|
}
|
|
|
|
|
|
|
|
// 대국민 조정사건 기록열람 신청 ajax
|
|
@RequestMapping(value = "/web/kccadr/payment/accdnt/ai/docIssPrcsnStatCdModifyAjax.do")
|
|
public ModelAndView docIssPrcsnStatCdModifyAjax(AdrRecordReadingVO adrRecordReadingVO, ModelMap model) throws Exception {
|
|
|
|
ModelAndView modelAndView = new ModelAndView();
|
|
modelAndView.setViewName("jsonView");
|
|
|
|
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated() ? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser() : null;
|
|
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getUniqId());
|
|
|
|
if (loginVO == null) {
|
|
|
|
modelAndView.addObject("result", "fail");
|
|
modelAndView.addObject("message", "로그인 해주세요.");
|
|
return modelAndView;
|
|
}
|
|
|
|
// 작성단계 셋팅
|
|
adrRecordReadingVO.setLastUpdusrId(userId); // 최초등록자
|
|
|
|
// 기존 mapper 사용하기 위한 생성자
|
|
PayVO payVO = new PayVO();
|
|
payVO.setLastUpdusrId(userId); // 수정자
|
|
payVO.setPrcsnStatCd("90");
|
|
payVO.setAsctnTablePk1(adrRecordReadingVO.getRecordReadingSeq());
|
|
adrRecordReadingService.updatePrcsnStatCd(payVO);
|
|
adrRecordReadingVO.setFrstRegisterId(userId);
|
|
|
|
|
|
// history 영역
|
|
adrRecordReadingVO.setRecordReadingHstrySeq(recordReadingHstryGnrService.getNextStringId());
|
|
adrRecordReadingVO.setPrcsnStatCd("90");
|
|
adrRecordReadingService.insertRecordReadingHist(adrRecordReadingVO);
|
|
|
|
|
|
|
|
modelAndView.addObject("result", "success");
|
|
|
|
return modelAndView;
|
|
|
|
}
|
|
|
|
|
|
// 대국민 조정사건 기록열람 신청 목록
|
|
@RequestMapping(value = "/web/kccadr/payment/accdnt/ai/docIssReqList.do")
|
|
public String docIssReqList(@ModelAttribute("adrRecordReadingVO") AdrRecordReadingVO adrRecordReadingVO,
|
|
ModelMap model,
|
|
HttpServletRequest request,
|
|
HttpServletResponse response) throws Exception {
|
|
|
|
String auth = EgovUserDetailsHelper.isAuthenticated() ? null : EgovUserDetailsHelper.getAuthenticatedUser().toString();
|
|
LoginVO loginVO = "anonymousUser".equals(auth) ? new LoginVO() : (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
|
|
|
|
SsoLoginVO ssoLoginVO = (SsoLoginVO) request.getSession().getAttribute("SSOLoginVO");
|
|
|
|
if (loginVO == null) {
|
|
|
|
model.addAttribute("msg", "로그인 해주세요.");
|
|
return "redirect:/web/user/login/ssoLogin.do";
|
|
}
|
|
|
|
adrRecordReadingVO.setSearchFrstRegisterId(loginVO.getUniqId());
|
|
|
|
if(adrRecordReadingVO.getPageUnit() != 10) {
|
|
adrRecordReadingVO.setPageUnit(adrRecordReadingVO.getPageUnit());
|
|
}
|
|
|
|
if("".equals(adrRecordReadingVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
|
|
adrRecordReadingVO.setSearchSortCnd("a.record_reading_seq");
|
|
adrRecordReadingVO.setSearchSortOrd("desc");
|
|
}
|
|
|
|
/** paging */
|
|
PaginationInfo paginationInfo = new PaginationInfo();
|
|
paginationInfo.setCurrentPageNo(adrRecordReadingVO.getPageIndex());
|
|
paginationInfo.setRecordCountPerPage(adrRecordReadingVO.getPageUnit());
|
|
paginationInfo.setPageSize(adrRecordReadingVO.getPageSize());
|
|
|
|
adrRecordReadingVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
|
adrRecordReadingVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
|
adrRecordReadingVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
|
|
|
List<AdrRecordReadingVO> list = adrRecordReadingService.selectDocReqList(adrRecordReadingVO);
|
|
|
|
list.stream().forEach(t->{
|
|
AdrRecordReadingVO aVO = adrRecordReadingService.selectStatCdAndStatTxt(t);
|
|
t.setStatCd(aVO.getStatCd());
|
|
t.setStatTxt(aVO.getStatTxt());
|
|
t.setResPonDentNm(egovCryptoUtil.decrypt(t.getResPonDentNm()));
|
|
t.setAppliCantNm(egovCryptoUtil.decrypt(t.getAppliCantNm()));
|
|
});
|
|
|
|
paginationInfo.setTotalRecordCount(list.size() > 0 ? list.get(0).getTotCnt() : 0);
|
|
model.addAttribute("paginationInfo", paginationInfo);
|
|
|
|
/*int listSize = list.size();
|
|
for(int i=0; i<listSize; i++) {
|
|
list.get(i).setResPonDentNm(egovCryptoUtil.decrypt(list.get(i).getResPonDentNm()));dmat
|
|
list.get(i).setAppliCantNm(egovCryptoUtil.decrypt(list.get(i).getAppliCantNm()));
|
|
}*/
|
|
|
|
model.addAttribute("list", list);
|
|
model.addAttribute("ssoLoginVO", ssoLoginVO);
|
|
/*
|
|
|
|
// ======================결제 시작===================
|
|
String mid = global_mid; // 상점아이디
|
|
String signKey = global_signKey; // 웹 결제 signkey
|
|
|
|
String mKey = SignatureUtil.hash(signKey, "SHA-256");
|
|
|
|
String timestamp = SignatureUtil.getTimestamp(); // util에 의해서 자동생성
|
|
String orderNumber = mid+"_"+SignatureUtil.getTimestamp(); // 가맹점 주문번호(가맹점에서 직접 설정)
|
|
//열람 비용
|
|
String price_view = "500"; // 상품가격(특수기호 제외, 가맹점에서 직접 설정)
|
|
//발급 비용
|
|
String price_print = "800"; // 상품가격(특수기호 제외, 가맹점에서 직접 설정)
|
|
|
|
Map<String, String> signParam_view = new HashMap<String, String>();
|
|
Map<String, String> signParam_print = new HashMap<String, String>();
|
|
|
|
signParam_view.put("oid", orderNumber);
|
|
signParam_view.put("price", price_view);
|
|
signParam_view.put("timestamp", timestamp);
|
|
|
|
signParam_print.put("oid", orderNumber);
|
|
signParam_print.put("price", price_print);
|
|
signParam_print.put("timestamp", timestamp);
|
|
|
|
String signature_view = SignatureUtil.makeSignature(signParam_view);
|
|
String signature_print = SignatureUtil.makeSignature(signParam_print);
|
|
|
|
기타
|
|
String siteDomain = global_siteDomain; //가맹점 도메인 입력
|
|
|
|
//서버정보 받아오기
|
|
String scheme = request.getScheme();
|
|
String serverName = request.getServerName();
|
|
String serverPort = String.valueOf(request.getServerPort());
|
|
if(!"".equals(serverPort)) serverPort = ":" + serverPort;
|
|
|
|
String requestUrl = scheme + "://" + serverName + serverPort;
|
|
|
|
String merchantData = requestUrl + "/web/kccadr/accdnt/ai/doclssReqProcess.do" + "§";
|
|
|
|
//고객사 임의데이터 ("요청URL" + "§" + "pk")
|
|
if("local".equals(prodIsLocal)) {
|
|
merchantData = requestUrl + "/web/kccadr/accdnt/ai/doclssReqProcess.do" + "§";
|
|
}else {
|
|
merchantData = "https://adr.copyright.or.kr" + "/web/kccadr/accdnt/ai/doclssReqProcess.do" + "§";
|
|
}
|
|
|
|
model.addAttribute("mid", mid);
|
|
model.addAttribute("signKey", signKey);
|
|
model.addAttribute("mKey", mKey);
|
|
model.addAttribute("timestamp", timestamp);
|
|
model.addAttribute("orderNumber", orderNumber);
|
|
model.addAttribute("price_view", price_view);
|
|
model.addAttribute("price_print", price_print);
|
|
model.addAttribute("signature_view", signature_view);
|
|
model.addAttribute("signature_print", signature_print);
|
|
model.addAttribute("siteDomain", siteDomain);
|
|
model.addAttribute("merchantData", merchantData);
|
|
|
|
// ======================결제 끝===================
|
|
|
|
model.addAttribute("IsLocal", prodIsLocal);
|
|
*/
|
|
return "/web/kccadr/accdnt/ars/tab/docIssReqList";
|
|
}
|
|
|
|
// 대국민 서류 발급 요청 등록
|
|
@RequestMapping(value = "/web/kccadr/accdnt/ai/docIssReqRegist.do")
|
|
public String docIssReqRegist(@ModelAttribute("adjstIncidentVO") AdjstIncidentVO adjstIncidentVO, ModelMap model) throws Exception {
|
|
String auth = EgovUserDetailsHelper.isAuthenticated() ? null : EgovUserDetailsHelper.getAuthenticatedUser().toString();
|
|
LoginVO loginVO = "anonymousUser".equals(auth) ? null : (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
|
|
|
|
if (loginVO == null) {
|
|
|
|
model.addAttribute("msg", "로그인 해주세요.");
|
|
return "redirect:/web/user/login/ssoLogin.do";
|
|
}
|
|
|
|
|
|
return "/web/kccadr/accdnt/ars/tab/docIssReqRegist";
|
|
}
|
|
|
|
// 대국민 서류 발급 요청 등록 조정번호 조회팝업
|
|
@RequestMapping(value = "/web/kccadr/accdnt/ai/docIssReqRegistPop.do")
|
|
public String docIssReqRegistPop(@ModelAttribute("adjstIncidentVO") AdjstIncidentVO adjstIncidentVO, ModelMap model) throws Exception {
|
|
|
|
String auth = EgovUserDetailsHelper.isAuthenticated() ? null : EgovUserDetailsHelper.getAuthenticatedUser().toString();
|
|
LoginVO loginVO = "anonymousUser".equals(auth) ? null : (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
|
|
|
|
if (loginVO == null) {
|
|
|
|
model.addAttribute("msg", "로그인 해주세요.");
|
|
return "redirect:/web/user/login/ssoLogin.do";
|
|
}
|
|
|
|
adjstIncidentVO.setFrstRegisterId(loginVO.getUniqId());
|
|
adjstIncidentVO.setSearchStatus("400000");
|
|
|
|
if(adjstIncidentVO.getPageUnit() != 5) {
|
|
adjstIncidentVO.setPageUnit(adjstIncidentVO.getPageUnit());
|
|
}
|
|
|
|
if("".equals(adjstIncidentVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
|
|
adjstIncidentVO.setSearchSortCnd("M.ADR_SEQ");
|
|
adjstIncidentVO.setSearchSortOrd("desc");
|
|
}
|
|
|
|
// 키워드가 있다면 일단 암호화 하여 암호화 컬럼에 셋
|
|
if(StringUtils.isNotBlank(adjstIncidentVO.getSearchKeyword())){
|
|
adjstIncidentVO.setSearchEncKeyword(egovCryptoUtil.encrypt(adjstIncidentVO.getSearchKeyword()));
|
|
}
|
|
|
|
/** paging */
|
|
PaginationInfo paginationInfo = new PaginationInfo();
|
|
paginationInfo.setCurrentPageNo(adjstIncidentVO.getPageIndex());
|
|
paginationInfo.setRecordCountPerPage(adjstIncidentVO.getPageUnit());
|
|
paginationInfo.setPageSize(adjstIncidentVO.getPageSize());
|
|
|
|
adjstIncidentVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
|
adjstIncidentVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
|
adjstIncidentVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
|
|
|
paginationInfo.setTotalRecordCount(adjstIncidentService.selectAdjstIncidentPopCount(adjstIncidentVO));
|
|
model.addAttribute("paginationInfo", paginationInfo);
|
|
List<AdjstIncidentVO> list = adjstIncidentService.selectAdjstIncidentPopList(adjstIncidentVO);
|
|
decryptInfomation2(list, null);
|
|
model.addAttribute("list", list);
|
|
model.addAttribute("adjstIncidentVO", adjstIncidentVO);
|
|
|
|
return "/web/kccadr/accdnt/ars/tab/docIssReqRegistPop";
|
|
}
|
|
|
|
/**
|
|
* 대국민 서류 발급 요청 삭제 처리
|
|
*/
|
|
@RequestMapping("/web/kccadr/accdnt/ai/deletedocIssReq.do")
|
|
public String deletedocIssReq(@ModelAttribute("adrRecordReadingVO") AdrRecordReadingVO adrRecordReadingVO, ModelMap model, RedirectAttributes redirectAttributes) throws Exception {
|
|
|
|
adrRecordReadingService.deletedocIssReq(adrRecordReadingVO); // 삭제
|
|
redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("success.common.delete")); // 공통메세지
|
|
|
|
return "redirect:/web/kccadr/payment/accdnt/ai/docIssReqList.do";
|
|
}
|
|
|
|
/**
|
|
*
|
|
*/
|
|
@RequestMapping("/web/kccadr/accdnt/ai/doclssReqProcess.do")
|
|
public String doclssReqProcess(HttpServletRequest request, RedirectAttributes rttr) throws Exception {
|
|
|
|
Map<String, ?> flashMap =RequestContextUtils.getInputFlashMap(request);
|
|
|
|
String pk = "";
|
|
|
|
/*
|
|
* netCancleTorF
|
|
* true = 정상결제
|
|
* false = 정상결제 후 망취소
|
|
*
|
|
* */
|
|
|
|
String netCancleTorF = "true";
|
|
|
|
if(flashMap != null) {
|
|
|
|
pk = (String)flashMap.get("pk");
|
|
netCancleTorF = (String)flashMap.get("netCancleTorF");
|
|
|
|
}
|
|
|
|
|
|
/*
|
|
* 1. netCancleTorF를 통해 망취소여부를 체크한다.
|
|
* 2. 전닯받은 pk로 adr_pay select 후 resultcode가 0000인지 여부체크
|
|
* 3. 0000이라면 'asctn_table' 컬럼의 테이블의 asctn_table_pk1 또는 pk2를 통해 해당 테이블에 후 처리
|
|
*
|
|
* */
|
|
//1.
|
|
if(Boolean.valueOf(netCancleTorF)) {
|
|
//2.
|
|
PayVO payVO = payService.selectPayForPk(pk);
|
|
if("0000".equals(payVO.getResultcode())) {
|
|
//3.
|
|
payVO.setPrcsnStatCd("20");
|
|
adrRecordReadingService.updatePrcsnStatCd(payVO);
|
|
}else {
|
|
//fail
|
|
rttr.addFlashAttribute("result", "fail");
|
|
}
|
|
|
|
}
|
|
|
|
|
|
return "redirect:/web/kccadr/payment/accdnt/ai/docIssReqList.do";
|
|
}
|
|
|
|
/**
|
|
* 기일통지서 상세 TODO daenge 기일통지서 오즈리포팅 처리
|
|
*
|
|
* @param PgrCmmVO
|
|
* @param model
|
|
* @return
|
|
* @throws Exception
|
|
*/
|
|
@SuppressWarnings("unchecked")
|
|
@RequestMapping(value = "/web/kccadr/accdnt/ai/docReqReportAjax.do")
|
|
public String dntReportAjax(PgrCmmVO cmmVO, AdrRecordReadingVO adrRecordReadingVO, HttpServletRequest req, ModelMap model) throws Exception {
|
|
|
|
String auth = EgovUserDetailsHelper.isAuthenticated() ? null : EgovUserDetailsHelper.getAuthenticatedUser().toString();
|
|
LoginVO loginVO = "anonymousUser".equals(auth) ? null : (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
|
|
|
|
if (loginVO == null) {
|
|
model.addAttribute("msg", "로그인 해주세요.");
|
|
return "redirect:/web/user/login/ssoLogin.do";
|
|
}
|
|
|
|
adrRecordReadingVO.setLastUpdusrId(loginVO.getUniqId());
|
|
|
|
JSONObject jsDntInfo = new JSONObject(); //조정권고안 정보
|
|
PgrCmmVO result = cmmService.selectPgrCmm(cmmVO);
|
|
|
|
jsDntInfo = parseJsonData(result);
|
|
JSONObject jsObjData = new JSONObject();
|
|
jsObjData.put("jsDntInfo", jsDntInfo);
|
|
|
|
String repStr = jsObjData.toString();
|
|
repStr = StringUtil.getUrlString(jsObjData.toString());
|
|
|
|
//json 데이터 특수문자 치환_220215_이준호
|
|
JsonStringEncoder encoder = JsonStringEncoder.getInstance();
|
|
char[] escapedJson = encoder.quoteAsString(repStr);
|
|
System.out.println(escapedJson); // {\"type\":\"BIG\"}
|
|
String p_json;
|
|
p_json = new String(escapedJson);
|
|
p_json = p_json.replace("\\\\\\\\r\\\\\\\\n", "\\\\r\\\\n").replace("\'", "\\'");
|
|
|
|
model.addAttribute("jsObjData", repStr);
|
|
|
|
//오즈리포트 서버별 주소 셋팅해주기
|
|
String serverName = req.getServerName();
|
|
String ozServerNm = IpUtil.getOzServerName(serverName);
|
|
model.addAttribute("ozServerNm", ozServerNm);
|
|
|
|
//이력관리를 위한 adr_hstry_mgr 데이터 관리 추가 - 2022-08-09
|
|
//adr_hstry_mgr에 값 넣기 - 시작
|
|
/*
|
|
adrHstryMgrService.insert4Func(result.getAdrSeq()
|
|
, "조정진행관리>>조정진행목록>조정진행상세>기일지정상세>출력" //String p_code_desc - CC199
|
|
, "V140" //String p_stat_cd
|
|
, result.getFrstRegisterId()
|
|
, result.getLastUpdusrId()
|
|
|
|
, ""
|
|
, "V"
|
|
, "ADR_MGR_MASTER"
|
|
, ""
|
|
|
|
);
|
|
*/
|
|
//adr_hstry_mgr에 값 넣기 - 끝
|
|
|
|
adrRecordReadingVO.setPrcsnStatCd(KccadrConstants.ADR_RCD_RDNG_PRCSN_STAT_CD_30); //출력완료
|
|
adrRecordReadingService.updateRecordReadingStatus(adrRecordReadingVO);
|
|
|
|
return "/web/kccadr/accdnt/ars/tab/report/adrDocReqReport";
|
|
}
|
|
|
|
// 종결VO
|
|
public void decryptInfomation2(List<AdjClsMgrVO> list, AdjClsMgrVO info){
|
|
if(CollectionUtils.isNotEmpty(list)){
|
|
for(AdjClsMgrVO model : list){
|
|
model.setRpplNm(egovCryptoUtil.decrypt(model.getRpplNm()));
|
|
model.setDocReqNm(egovCryptoUtil.decrypt(model.getDocReqNm()));
|
|
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()));
|
|
model.setAdrAdmNm(egovCryptoUtil.decrypt(model.getAdrAdmNm()));
|
|
}
|
|
}
|
|
|
|
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.setAdrAdmNm(egovCryptoUtil.decrypt(info.getAdrAdmNm()));
|
|
info.setRpplRealPost(egovCryptoUtil.decrypt(info.getRpplRealPost()));
|
|
info.setRpplRealAddr(egovCryptoUtil.decrypt(info.getRpplRealAddr()));
|
|
info.setRpplRealAddrDtl(egovCryptoUtil.decrypt(info.getRpplRealAddrDtl()));
|
|
}
|
|
}
|
|
|
|
|
|
public void decryptInfomation2(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()));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 오즈 리포트 데이터 Json 생성하기
|
|
*
|
|
* @param closeVO
|
|
*/
|
|
@SuppressWarnings("unchecked")
|
|
public JSONObject parseJsonData(PgrCmmVO cmmVO) throws Exception{
|
|
|
|
JSONObject oj = new JSONObject();
|
|
|
|
//String adrSeq = cmmVO.getAdrSeq(); //조정일련번호
|
|
String adrNo = cmmVO.getAdrNo(); //조정번호
|
|
String adrSn = cmmVO.getAdrSn(); //조정회차
|
|
String cctyTx = cmmVO.getCcTyTx(); //저작물유형 명
|
|
String memDeptNm = cmmVO.getMemDeptNm(); //조정부명
|
|
String memName = cmmVO.getMemName(); //조정부장명
|
|
String adrAdmNm = cmmVO.getAdrAdmNm(); //조정조사관명
|
|
String adrAdmOffmTel = cmmVO.getAdrAdmOffmTel();//조정조사관 내선번호
|
|
|
|
|
|
String applicantNm = cmmVO.getAppliCantNm(); //신청인 이름
|
|
String resPonDentNm = cmmVO.getResPonDentNm(); //피신청인
|
|
String resPonDentNmEtc = ""; //피신청인 외 x명 처리 변수
|
|
String[] arrResPon = resPonDentNm.split(",");
|
|
int resPonCnt = arrResPon.length;
|
|
|
|
//피신청인이 2명 이상인경우 "피신청인 외 x명" 표기 처리
|
|
if(resPonCnt > 1) {
|
|
|
|
resPonDentNmEtc = arrResPon[0] + " 외 " + (resPonCnt - 1) + "명";
|
|
|
|
}else {
|
|
|
|
resPonDentNmEtc = resPonDentNm;
|
|
|
|
}
|
|
|
|
String appDeDay = cmmVO.getAppDeDay(); //조정기일 일시
|
|
String appDeTime = cmmVO.getAppDeTime(); //조정기일 시간
|
|
String appDeDate = "";
|
|
//날짜 표시형식 변환
|
|
if(cmmVO.getAppDeDay() != null && cmmVO.getAppDeTime() != null) {
|
|
|
|
appDeDate = appDeDay + " " + appDeTime;
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm");
|
|
Date deDay = simpleDateFormat.parse(appDeDate);
|
|
|
|
SimpleDateFormat simpleStrFormat = new SimpleDateFormat("yyyy년 MM월 dd일 HH시 mm분");
|
|
|
|
appDeDate = simpleStrFormat.format(deDay);
|
|
|
|
}
|
|
|
|
String appPlace = cmmVO.getAppPlaceInfo(); //기일 장소명
|
|
String appPlaceAddr = cmmVO.getAppPlaceAddrInfo(); //기일 장소 주소
|
|
|
|
//조정부장의 직인 이미지 불러오기
|
|
cmmVO.setMemGrade("01");
|
|
List<PgrCmmVO> resultStampInfo = cmmService.selectAtchFileIdInfo(cmmVO);
|
|
|
|
String atchFileId = "";
|
|
if(resultStampInfo.size() > 0) {
|
|
if(StringUtil.isNotEmpty(resultStampInfo.get(0).getAtchFileId())) {
|
|
|
|
atchFileId = resultStampInfo.get(0).getAtchFileId();
|
|
|
|
}
|
|
}
|
|
|
|
/*if(!adrSeq.equals("")) {
|
|
|
|
oj.put("adrSeq", adrSeq);
|
|
|
|
}*/
|
|
|
|
if(StringUtil.isNotEmpty(adrNo)) {
|
|
|
|
oj.put("adrNo", adrNo);
|
|
|
|
}
|
|
|
|
if(StringUtil.isNotEmpty(adrSn)) {
|
|
|
|
oj.put("adrSn", adrSn);
|
|
|
|
}
|
|
|
|
if(StringUtil.isNotEmpty(cctyTx)) {
|
|
|
|
oj.put("cctyTx", cctyTx);
|
|
|
|
}
|
|
|
|
if(StringUtil.isNotEmpty(memDeptNm)) {
|
|
|
|
oj.put("memDeptNm", memDeptNm);
|
|
|
|
}
|
|
|
|
if(StringUtil.isNotEmpty(memName)) {
|
|
|
|
oj.put("memName", memName);
|
|
|
|
}
|
|
|
|
if(StringUtil.isNotEmpty(adrAdmNm)) {
|
|
|
|
oj.put("adrAdmNm", adrAdmNm);
|
|
|
|
}
|
|
|
|
if(StringUtil.isNotEmpty(adrAdmOffmTel)) {
|
|
|
|
oj.put("adrAdmOffmTel", adrAdmOffmTel);
|
|
|
|
}
|
|
|
|
if(StringUtil.isNotEmpty(applicantNm)) {
|
|
|
|
oj.put("applicantNm", applicantNm);
|
|
|
|
}
|
|
|
|
if(StringUtil.isNotEmpty(resPonDentNm)) {
|
|
|
|
oj.put("resPonDentNm", resPonDentNm);
|
|
|
|
}
|
|
|
|
if(StringUtil.isNotEmpty(resPonDentNmEtc)) {
|
|
|
|
oj.put("resPonDentNmEtc", resPonDentNmEtc);
|
|
|
|
}
|
|
|
|
/*if(StringUtil.isNotEmpty(appDeDay)) {
|
|
|
|
oj.put("appDeDay", appDeDay);
|
|
|
|
}*/
|
|
|
|
if(StringUtil.isNotEmpty(appDeDate)) {
|
|
|
|
oj.put("appDeDate", appDeDate);
|
|
|
|
}
|
|
|
|
if(StringUtil.isNotEmpty(appPlace)) {
|
|
|
|
oj.put("appPlace", appPlace);
|
|
|
|
}
|
|
|
|
if(StringUtil.isNotEmpty(appPlaceAddr)) {
|
|
|
|
oj.put("appPlaceAddr", appPlaceAddr);
|
|
|
|
}
|
|
|
|
if(StringUtil.isNotEmpty(atchFileId)) {
|
|
|
|
String domain = "";
|
|
|
|
if ("real".equals(prodIsLocal)) {
|
|
|
|
domain = "hosts_real";
|
|
|
|
}else {
|
|
|
|
domain = "host_dev";
|
|
|
|
}
|
|
|
|
String stampPath = domain + "&url&" + atchFileId;
|
|
oj.put("stampPath", stampPath);
|
|
|
|
}
|
|
|
|
return oj;
|
|
}
|
|
}
|