2022-11-25 11:34 이름에 , 들어가서 경우 오류 처리
This commit is contained in:
parent
2777f47d31
commit
803246c0e3
@ -3,7 +3,6 @@ package kcc.kccadr.adjPgrMgr.apm.web;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
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.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
@ -353,169 +351,183 @@ public class ApmController {
|
||||
@RequestMapping(value = "apmTab0.do")
|
||||
public String apmTab0(@ModelAttribute("info") PgrCmmVO cmmVO, ModelMap model) throws Exception {
|
||||
|
||||
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())) {
|
||||
try {
|
||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated() ? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser() : null;
|
||||
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getUniqId());
|
||||
|
||||
resPonDentDNm = info.getResPonDentDNm().split(", ");
|
||||
resPonDentDId = info.getResPonDentDId().split(", ");
|
||||
rpplResPonddSeq = info.getRpplRespddSeq().split(", ");
|
||||
|
||||
}
|
||||
|
||||
|
||||
//피신청인 이름, ID, 피신청인 대리인 이름, ID 값 리스트로 합치기 2022.01.17
|
||||
List<PgrCmmVO> rpplRepondList = new ArrayList<PgrCmmVO>();
|
||||
for(int i=0; i<resPonDentNm.length; i++ ) {
|
||||
|
||||
String respNm = resPonDentNm[i]; //피신청인 이름
|
||||
String respId = resPonDentId[i]; //피신청인 ID
|
||||
|
||||
PgrCmmVO temp = new PgrCmmVO();
|
||||
temp.setResPonDentNm(respNm);
|
||||
temp.setResPonDentId(respId);
|
||||
|
||||
//등록된 대리인 정보가 있으면 처리
|
||||
if(StringUtil.isNotEmpty(info.getResPonDentDNm())) {
|
||||
|
||||
for(int j=0; j < rpplResPonddSeq.length; j++) {
|
||||
|
||||
String rpplResSeq = rpplResPonddSeq[j]; //대리인의 피신청인 ID
|
||||
String respdNm = resPonDentDNm[j]; //피신청 대리인 이름
|
||||
String respdId = resPonDentDId[j]; //피신청 대리인 ID
|
||||
|
||||
if(respId.equals(rpplResSeq)) {
|
||||
|
||||
temp.setResPonDentDNm(respdNm);
|
||||
temp.setResPonDentDId(respdId);
|
||||
temp.setRpplRespddSeq(rpplResSeq); //대리인의 피신청인 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);
|
||||
// 조정사건일반
|
||||
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(", ");
|
||||
rpplResPonddSeq = info.getRpplRespddSeq().split(", ");
|
||||
|
||||
}
|
||||
|
||||
|
||||
//피신청인 이름, ID, 피신청인 대리인 이름, ID 값 리스트로 합치기 2022.01.17
|
||||
List<PgrCmmVO> rpplRepondList = new ArrayList<PgrCmmVO>();
|
||||
for(int i=0; i<resPonDentNm.length; i++ ) {
|
||||
|
||||
String respNm = ""; //피신청인 이름
|
||||
String respId = ""; //피신청인 ID
|
||||
|
||||
// 사용자 조정기일 변경신청 건이 있는지 확인 with 차수(해당 차수의 변경신청 건이 있는지 확인)
|
||||
List<PgrCmmVO> apmChgDateCntWithSn = apmService.selectApmChgDateInfoCntWithSn(cmmVO);
|
||||
model.addAttribute("apmChgDateCntWithSn", apmChgDateCntWithSn);
|
||||
|
||||
//최종 차수 정보
|
||||
//String adrMaxSn = apmChgDateList.get(0).getAdrSn();
|
||||
//model.addAttribute("adrMaxSn", adrMaxSn);
|
||||
|
||||
|
||||
//기일조서값
|
||||
DrtVO drtVO = new DrtVO();
|
||||
drtVO.setAdrSeq(cmmVO.getAdrSeq());
|
||||
drtVO.setAdrSn(cmmVO.getAdrSn());
|
||||
drtVO = drtService.selectAdrPrtclMgr(drtVO);
|
||||
model.addAttribute("drtInfo", drtVO);
|
||||
|
||||
//이의신청
|
||||
OjctVO ojctVO = new OjctVO();
|
||||
ojctVO.setAdrSeq(cmmVO.getAdrSeq());
|
||||
int ojctCnt = ojctService.selectOjctListCount(ojctVO);
|
||||
model.addAttribute("ojctCnt", ojctCnt);
|
||||
|
||||
//경정조서
|
||||
ApmCorrectVO apmCorrectVO = new ApmCorrectVO();
|
||||
apmCorrectVO.setAdrSeq(cmmVO.getAdrSeq());
|
||||
model.addAttribute("rpplChgList", apmService.selectRpplChgList(apmCorrectVO));
|
||||
|
||||
//취하신청 정보
|
||||
EntVO entVO = new EntVO();
|
||||
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);
|
||||
//이름에 ,를 넣는경우 발생하는 오류를 막기위한 예외처리 추가
|
||||
try {
|
||||
respNm = resPonDentNm[i]; //피신청인 이름
|
||||
respId = resPonDentId[i]; //피신청인 ID
|
||||
}catch(Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
PgrCmmVO temp = new PgrCmmVO();
|
||||
temp.setResPonDentNm(respNm);
|
||||
temp.setResPonDentId(respId);
|
||||
|
||||
//등록된 대리인 정보가 있으면 처리
|
||||
if(StringUtil.isNotEmpty(info.getResPonDentDNm())) {
|
||||
|
||||
for(int j=0; j < rpplResPonddSeq.length; j++) {
|
||||
|
||||
String rpplResSeq = rpplResPonddSeq[j]; //대리인의 피신청인 ID
|
||||
String respdNm = resPonDentDNm[j]; //피신청 대리인 이름
|
||||
String respdId = resPonDentDId[j]; //피신청 대리인 ID
|
||||
|
||||
if(respId.equals(rpplResSeq)) {
|
||||
|
||||
temp.setResPonDentDNm(respdNm);
|
||||
temp.setResPonDentDId(respdId);
|
||||
temp.setRpplRespddSeq(rpplResSeq); //대리인의 피신청인 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);
|
||||
model.addAttribute("apmChgDateCntWithSn", apmChgDateCntWithSn);
|
||||
|
||||
//최종 차수 정보
|
||||
//String adrMaxSn = apmChgDateList.get(0).getAdrSn();
|
||||
//model.addAttribute("adrMaxSn", adrMaxSn);
|
||||
|
||||
|
||||
//기일조서값
|
||||
DrtVO drtVO = new DrtVO();
|
||||
drtVO.setAdrSeq(cmmVO.getAdrSeq());
|
||||
drtVO.setAdrSn(cmmVO.getAdrSn());
|
||||
drtVO = drtService.selectAdrPrtclMgr(drtVO);
|
||||
model.addAttribute("drtInfo", drtVO);
|
||||
|
||||
//이의신청
|
||||
OjctVO ojctVO = new OjctVO();
|
||||
ojctVO.setAdrSeq(cmmVO.getAdrSeq());
|
||||
int ojctCnt = ojctService.selectOjctListCount(ojctVO);
|
||||
model.addAttribute("ojctCnt", ojctCnt);
|
||||
|
||||
//경정조서
|
||||
ApmCorrectVO apmCorrectVO = new ApmCorrectVO();
|
||||
apmCorrectVO.setAdrSeq(cmmVO.getAdrSeq());
|
||||
model.addAttribute("rpplChgList", apmService.selectRpplChgList(apmCorrectVO));
|
||||
|
||||
//취하신청 정보
|
||||
EntVO entVO = new EntVO();
|
||||
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";
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user