2022-11-25 11:34 이름에 , 들어가서 경우 오류 처리

This commit is contained in:
myname 2022-11-25 11:35:18 +09:00
parent 2777f47d31
commit 803246c0e3

View File

@ -3,7 +3,6 @@ package kcc.kccadr.adjPgrMgr.apm.web;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
@ -27,7 +26,6 @@ import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest; import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.support.RedirectAttributes; import org.springframework.web.servlet.mvc.support.RedirectAttributes;
@ -353,169 +351,183 @@ public class ApmController {
@RequestMapping(value = "apmTab0.do") @RequestMapping(value = "apmTab0.do")
public String apmTab0(@ModelAttribute("info") PgrCmmVO cmmVO, ModelMap model) throws Exception { public String apmTab0(@ModelAttribute("info") PgrCmmVO cmmVO, ModelMap model) throws Exception {
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated() ? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser() : null; try {
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getUniqId()); LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated() ? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser() : null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getUniqId());
// 조정사건일반
PgrCmmVO info = cmmService.selectPgrCmm(cmmVO);
model.addAttribute("info", info);
String adrAdmMemoYn = "N";
//조정조사관 의견 버튼 노출 여부
if(userId.equals(info.getAdrAdmId())) {
adrAdmMemoYn = "Y";
}
model.addAttribute("adrAdmMemoYn", adrAdmMemoYn);
//피신청인 이름 리스트로 구분처리
String[] resPonDentNm = info.getResPonDentNm().split(", ");
//피신청인 ID 리스트로 구분처리
String[] resPonDentId = info.getResPonDentId().split(", ");
//피신청인 대리인정보 처리
String[] resPonDentDNm = {""}; //피신청 대리인 이름
String[] resPonDentDId = {""}; //피신청 대리인 ID
String[] rpplResPonddSeq = {""}; //대리인의 피신청인 ID
if(StringUtil.isNotEmpty(info.getResPonDentDNm())) {
resPonDentDNm = info.getResPonDentDNm().split(", "); // 조정사건일반
resPonDentDId = info.getResPonDentDId().split(", "); PgrCmmVO info = cmmService.selectPgrCmm(cmmVO);
rpplResPonddSeq = info.getRpplRespddSeq().split(", "); model.addAttribute("info", info);
}
String adrAdmMemoYn = "N";
//조정조사관 의견 버튼 노출 여부
//피신청인 이름, ID, 피신청인 대리인 이름, ID 리스트로 합치기 2022.01.17 if(userId.equals(info.getAdrAdmId())) {
List<PgrCmmVO> rpplRepondList = new ArrayList<PgrCmmVO>(); adrAdmMemoYn = "Y";
for(int i=0; i<resPonDentNm.length; i++ ) { }
String respNm = resPonDentNm[i]; //피신청인 이름 model.addAttribute("adrAdmMemoYn", adrAdmMemoYn);
String respId = resPonDentId[i]; //피신청인 ID
//피신청인 이름 리스트로 구분처리
PgrCmmVO temp = new PgrCmmVO(); String[] resPonDentNm = info.getResPonDentNm().split(", ");
temp.setResPonDentNm(respNm);
temp.setResPonDentId(respId); //피신청인 ID 리스트로 구분처리
String[] resPonDentId = info.getResPonDentId().split(", ");
//등록된 대리인 정보가 있으면 처리
if(StringUtil.isNotEmpty(info.getResPonDentDNm())) { //피신청인 대리인정보 처리
String[] resPonDentDNm = {""}; //피신청 대리인 이름
for(int j=0; j < rpplResPonddSeq.length; j++) { String[] resPonDentDId = {""}; //피신청 대리인 ID
String[] rpplResPonddSeq = {""}; //대리인의 피신청인 ID
String rpplResSeq = rpplResPonddSeq[j]; //대리인의 피신청인 ID if(StringUtil.isNotEmpty(info.getResPonDentDNm())) {
String respdNm = resPonDentDNm[j]; //피신청 대리인 이름
String respdId = resPonDentDId[j]; //피신청 대리인 ID resPonDentDNm = info.getResPonDentDNm().split(", ");
resPonDentDId = info.getResPonDentDId().split(", ");
if(respId.equals(rpplResSeq)) { rpplResPonddSeq = info.getRpplRespddSeq().split(", ");
temp.setResPonDentDNm(respdNm); }
temp.setResPonDentDId(respdId);
temp.setRpplRespddSeq(rpplResSeq); //대리인의 피신청인 ID (어떤 피신청인의 대리인인지 구분하기 위해)
//피신청인 이름, ID, 피신청인 대리인 이름, ID 리스트로 합치기 2022.01.17
} List<PgrCmmVO> rpplRepondList = new ArrayList<PgrCmmVO>();
for(int i=0; i<resPonDentNm.length; i++ ) {
}
String respNm = ""; //피신청인 이름
} String respId = ""; //피신청인 ID
rpplRepondList.add(temp);
}
model.addAttribute("rpplRepondList", rpplRepondList);
// 조정기일 - 등록된 조정기일 조정위원 승인이 완료된 정보를 모두 불러옴(기일 승인이 완료된 건만 불러옴)
//List<PgrCmmVO> apmChgDateList = apmService.selectApmChgDateConfirmInfo(cmmVO);
List<PgrCmmVO> apmChgDateList = apmService.selectApmChgDateConfirmInfoList202211(cmmVO);
model.addAttribute("apmChgDateList", apmChgDateList);
// 사용자 조정기일 변경신청 건이 있는지 확인
List<PgrCmmVO> apmChgDateCnt = apmService.selectApmChgDateInfoCnt(cmmVO);
model.addAttribute("apmChgDateCnt", apmChgDateCnt);
// 사용자 조정기일 변경신청 건이 있는지 확인 with 차수(해당 차수의 변경신청 건이 있는지 확인) //이름에 , 넣는경우 발생하는 오류를 막기위한 예외처리 추가
List<PgrCmmVO> apmChgDateCntWithSn = apmService.selectApmChgDateInfoCntWithSn(cmmVO); try {
model.addAttribute("apmChgDateCntWithSn", apmChgDateCntWithSn); respNm = resPonDentNm[i]; //피신청인 이름
respId = resPonDentId[i]; //피신청인 ID
//최종 차수 정보 }catch(Exception ex) {
//String adrMaxSn = apmChgDateList.get(0).getAdrSn(); ex.printStackTrace();
//model.addAttribute("adrMaxSn", adrMaxSn); }
//기일조서값 PgrCmmVO temp = new PgrCmmVO();
DrtVO drtVO = new DrtVO(); temp.setResPonDentNm(respNm);
drtVO.setAdrSeq(cmmVO.getAdrSeq()); temp.setResPonDentId(respId);
drtVO.setAdrSn(cmmVO.getAdrSn());
drtVO = drtService.selectAdrPrtclMgr(drtVO); //등록된 대리인 정보가 있으면 처리
model.addAttribute("drtInfo", drtVO); if(StringUtil.isNotEmpty(info.getResPonDentDNm())) {
//이의신청 for(int j=0; j < rpplResPonddSeq.length; j++) {
OjctVO ojctVO = new OjctVO();
ojctVO.setAdrSeq(cmmVO.getAdrSeq()); String rpplResSeq = rpplResPonddSeq[j]; //대리인의 피신청인 ID
int ojctCnt = ojctService.selectOjctListCount(ojctVO); String respdNm = resPonDentDNm[j]; //피신청 대리인 이름
model.addAttribute("ojctCnt", ojctCnt); String respdId = resPonDentDId[j]; //피신청 대리인 ID
//경정조서 if(respId.equals(rpplResSeq)) {
ApmCorrectVO apmCorrectVO = new ApmCorrectVO();
apmCorrectVO.setAdrSeq(cmmVO.getAdrSeq()); temp.setResPonDentDNm(respdNm);
model.addAttribute("rpplChgList", apmService.selectRpplChgList(apmCorrectVO)); temp.setResPonDentDId(respdId);
temp.setRpplRespddSeq(rpplResSeq); //대리인의 피신청인 ID (어떤 피신청인의 대리인인지 구분하기 위해)
//취하신청 정보
EntVO entVO = new EntVO(); }
entVO.setAdrSeq(cmmVO.getAdrSeq());
entVO.setApprYn(KccadrConstants.ADR_CNCL_DROP_REQ); }
EntVO resultEntInfo = entService.selectEntInfo(entVO);
}
model.addAttribute("resultEntInfo", resultEntInfo);
rpplRepondList.add(temp);
//취하신청 등록 여부
EntVO entVO_2 = new EntVO(); }
entVO_2.setAdrSeq(cmmVO.getAdrSeq());
entVO_2.setApprYn(KccadrConstants.ADR_CNCL_DROP_REQ); model.addAttribute("rpplRepondList", rpplRepondList);
EntVO resultEntInfo_2 = entService.selectEntInfo_2(entVO_2);
// 조정기일 - 등록된 조정기일 조정위원 승인이 완료된 정보를 모두 불러옴(기일 승인이 완료된 건만 불러옴)
model.addAttribute("resultEntInfo_2", resultEntInfo_2); //List<PgrCmmVO> apmChgDateList = apmService.selectApmChgDateConfirmInfo(cmmVO);
List<PgrCmmVO> apmChgDateList = apmService.selectApmChgDateConfirmInfoList202211(cmmVO);
model.addAttribute("apmChgDateList", apmChgDateList);
//확정증명원 유무
CloseVO closeVO = new CloseVO(); // 사용자 조정기일 변경신청 건이 있는지 확인
closeVO.setAdrSeq(cmmVO.getAdrSeq()); List<PgrCmmVO> apmChgDateCnt = apmService.selectApmChgDateInfoCnt(cmmVO);
closeVO.setAdrSn(cmmVO.getAdrSn()); model.addAttribute("apmChgDateCnt", apmChgDateCnt);
closeVO.setCloseDocTy(KccadrConstants.ADR_CLOSE_DOC_TY_80);
model.addAttribute("resultCloseDoc", cmmService.selectCloseDoc(closeVO)); // 사용자 조정기일 변경신청 건이 있는지 확인 with 차수(해당 차수의 변경신청 건이 있는지 확인)
List<PgrCmmVO> apmChgDateCntWithSn = apmService.selectApmChgDateInfoCntWithSn(cmmVO);
//진행상태가 결재요청상태 일때 결재결재선 결재 진행중인 사람 불러오기 model.addAttribute("apmChgDateCntWithSn", apmChgDateCntWithSn);
model.addAttribute("sbmtStatus",apmService.selectSbmtIngStatus(cmmVO.getAdrSeq()));
//최종 차수 정보
/*//adr_mgr_detail 첨부파일 불러오기 //String adrMaxSn = apmChgDateList.get(0).getAdrSn();
FileVO fileVO = new FileVO(); //model.addAttribute("adrMaxSn", adrMaxSn);
//조정신청 첨부파일 리스트 불러오기.
String rpplMgrAtchFileId = resultAdjReqMgrOffLine.getAtchFileId(); //기일조서값
fileVO.setAtchFileId(rpplMgrAtchFileId); DrtVO drtVO = new DrtVO();
resultAdjReqMgrOffLine.setRpplMgrAtchFileId(rpplMgrAtchFileId); drtVO.setAdrSeq(cmmVO.getAdrSeq());
List<FileVO> rpplMgrAtchFileList = fileService.selectFileInfs(fileVO); drtVO.setAdrSn(cmmVO.getAdrSn());
model.addAttribute("rpplMgrAtchFileList", rpplMgrAtchFileList);*/ drtVO = drtService.selectAdrPrtclMgr(drtVO);
model.addAttribute("drtInfo", drtVO);
//이력값 - 시작 //이의신청
AdrHstryMgrVO adrHstryMgrVO = new AdrHstryMgrVO(); OjctVO ojctVO = new OjctVO();
adrHstryMgrVO.setAdrSeq(cmmVO.getAdrSeq()); ojctVO.setAdrSeq(cmmVO.getAdrSeq());
int ojctCnt = ojctService.selectOjctListCount(ojctVO);
model.addAttribute("list_mgr" , adrHstryMgrService.selectList(adrHstryMgrVO)); model.addAttribute("ojctCnt", ojctCnt);
//이력값 -
//경정조서
AdjReqMgrVO adjReqMgrVO = new AdjReqMgrVO(); ApmCorrectVO apmCorrectVO = new ApmCorrectVO();
apmCorrectVO.setAdrSeq(cmmVO.getAdrSeq());
adjReqMgrVO.setAdrSeq(cmmVO.getAdrSeq()); model.addAttribute("rpplChgList", apmService.selectRpplChgList(apmCorrectVO));
List<AdjReqMgrVO> person = adjReqMgrService.selectAdjstReqMgrPersonList(adjReqMgrVO); //취하신청 정보
decryptInfomation(person ,null); EntVO entVO = new EntVO();
model.addAttribute("person", person); entVO.setAdrSeq(cmmVO.getAdrSeq());
entVO.setApprYn(KccadrConstants.ADR_CNCL_DROP_REQ);
EntVO resultEntInfo = entService.selectEntInfo(entVO);
model.addAttribute("resultEntInfo", resultEntInfo);
//취하신청 등록 여부
EntVO entVO_2 = new EntVO();
entVO_2.setAdrSeq(cmmVO.getAdrSeq());
entVO_2.setApprYn(KccadrConstants.ADR_CNCL_DROP_REQ);
EntVO resultEntInfo_2 = entService.selectEntInfo_2(entVO_2);
model.addAttribute("resultEntInfo_2", resultEntInfo_2);
//확정증명원 유무
CloseVO closeVO = new CloseVO();
closeVO.setAdrSeq(cmmVO.getAdrSeq());
closeVO.setAdrSn(cmmVO.getAdrSn());
closeVO.setCloseDocTy(KccadrConstants.ADR_CLOSE_DOC_TY_80);
model.addAttribute("resultCloseDoc", cmmService.selectCloseDoc(closeVO));
//진행상태가 결재요청상태 일때 결재결재선 결재 진행중인 사람 불러오기
model.addAttribute("sbmtStatus",apmService.selectSbmtIngStatus(cmmVO.getAdrSeq()));
/*//adr_mgr_detail 첨부파일 불러오기
FileVO fileVO = new FileVO();
//조정신청 첨부파일 리스트 불러오기.
String rpplMgrAtchFileId = resultAdjReqMgrOffLine.getAtchFileId();
fileVO.setAtchFileId(rpplMgrAtchFileId);
resultAdjReqMgrOffLine.setRpplMgrAtchFileId(rpplMgrAtchFileId);
List<FileVO> rpplMgrAtchFileList = fileService.selectFileInfs(fileVO);
model.addAttribute("rpplMgrAtchFileList", rpplMgrAtchFileList);*/
//이력값 - 시작
AdrHstryMgrVO adrHstryMgrVO = new AdrHstryMgrVO();
adrHstryMgrVO.setAdrSeq(cmmVO.getAdrSeq());
model.addAttribute("list_mgr" , adrHstryMgrService.selectList(adrHstryMgrVO));
//이력값 -
AdjReqMgrVO adjReqMgrVO = new AdjReqMgrVO();
adjReqMgrVO.setAdrSeq(cmmVO.getAdrSeq());
List<AdjReqMgrVO> person = adjReqMgrService.selectAdjstReqMgrPersonList(adjReqMgrVO);
decryptInfomation(person ,null);
model.addAttribute("person", person);
}catch(Exception ex) {
ex.printStackTrace();
}
return "/kccadr/adjPgrMgr/apm/apmTab0"; return "/kccadr/adjPgrMgr/apm/apmTab0";
} }