위택스 납부자변경 수정

main
이범준 2 weeks ago
parent a63a387555
commit ad93bd134c

@ -10,7 +10,7 @@ public class MsgQuery extends CmmnQuery {
private String schInputDateTo;
private String msgPrps; //고장신고,사전알림,주차신고민원
private String msgPrps; //고장신고,사전알림,주차신고민원,기타민원
private String msgDtlPrps;
private String callback;

@ -157,9 +157,10 @@ public class Rent04Controller extends ApplicationController {
}
}
if(rowNo != 0 && !resultRow.string("A").equals("")) {
List<DataObject> searchResult = null;
if(rowNo != 0 //제목줄이 아닐것
&& !resultRow.string("A").equals("") //빈셀이 아닐것
// && // TODO : 과태료구분이 시스템에서사용하는 과태료일것
) {
RentQuery entQuery = new RentQuery();
entQuery.setUserId(currentUser().getId());
List<DataObject> entList = userRentEntMpngMapper.selectUserRentEntMpngList(entQuery);
@ -170,15 +171,83 @@ public class Rent04Controller extends ApplicationController {
//사용자 기업명 목록
List<String> entNms = entList.stream().map(i -> i.string("ENT_NM")).toList();
String epaynoColumn = resultRow.string("B");
String crdnDtColumn = resultRow.string("G");
String vhrnoColumn = resultRow.string("D");
boolean crdnDtCheck = CmmnUtil.isDateTimePattern(crdnDtColumn);
String extractVhrno = CmmnUtil.extractCarNumber(vhrnoColumn);
String crdnDt = "";
boolean useable = false; //엑셀의 차량번호,단속일시 셀 사용 가능 여부
if(crdnDtCheck && !extractVhrno.equals("")) {
useable = true;
crdnDt = crdnDtColumn.replaceAll("-", "").replaceAll(" ", "").replaceAll(":", "");
}
List<DataObject> searchResults = null;
DataObject searchResult1 = new DataObject();
String foundType = ""; //HIRER,RTPYR
if(foundType.equals("")) {
RentQuery lsctQuery = new RentQuery();
lsctQuery.setEntIds(entIds);
lsctQuery.setSchVhrno(resultRow.string("D"));
lsctQuery.setSchCtrtYmd(resultRow.string("G"));
lsctQuery.setEntIds("전자납부번호"); //TODO:전자납부번호
searchResults = lsctMapper.selectLsctList(lsctQuery);
if(searchResults != null && !searchResults.isEmpty()) {
searchResult1 = searchResults.get(0);
foundType = "HIRER";
}
}
if(foundType.equals("") && useable) {
RentQuery lsctQuery = new RentQuery();
lsctQuery.setEntIds(entIds);
lsctQuery.setSchVhrno(extractVhrno);
lsctQuery.setSchCtrtYmd(crdnDt.substring(0, 8));
//TODO:단속시간
//TODO:과태료구분
searchResults = lsctMapper.selectLsctList(lsctQuery);
if(searchResults != null && !searchResults.isEmpty()) {
searchResult1 = searchResults.get(0);
foundType = "HIRER";
}
}
if(foundType.equals("")) {
CrdnQuery crdnQuery = new CrdnQuery();
crdnQuery.setEpayno(epaynoColumn);
searchResults = crdnListMapper.selectCrackdownList(crdnQuery);
if(searchResults != null && !searchResults.isEmpty()) {
searchResult1 = searchResults.get(0);
foundType = "RTPYR";
}
}
if(foundType.equals("") && useable) {
CrdnQuery crdnQuery = new CrdnQuery();
crdnQuery.setVhrno(extractVhrno);
crdnQuery.setCrdnYmd(crdnDt.substring(0, 8));
crdnQuery.setCrdnTm(crdnDt.substring(8));
//TODO:과태료구분
searchResults = crdnListMapper.selectCrackdownList(crdnQuery);
if(searchResults != null && !searchResults.isEmpty()) {
searchResult1 = searchResults.get(0);
foundType = "RTPYR";
}
}
searchResult = lsctMapper.selectLsctList(lsctQuery);
if(searchResult != null && !searchResult.isEmpty()) {
DataObject searchResult1 = searchResult.get(0);
if(foundType.equals("HIRER")) {
resultRow.set("K", searchResult1.string("HIRER_NM"));
if(searchResult1.string("HIRER_SE_CD").equals("99")) {
@ -190,16 +259,7 @@ public class Rent04Controller extends ApplicationController {
resultRow.set("O", searchResult1.string("HIRER_DTL_ADDR"));
resultRow.set("P", searchResult1.string("HIRER_ZIP"));
} else {
CrdnQuery crdnQuery = new CrdnQuery();
crdnQuery.setVhrno(resultRow.string("D"));
crdnQuery.setSchCrdnYmdFrom(resultRow.string("G"));
crdnQuery.setSchCrdnYmdTo(resultRow.string("G"));
searchResult = crdnListMapper.selectCrackdownList(crdnQuery);
if(searchResult != null && !searchResult.isEmpty()) {
DataObject searchResult1 = searchResult.get(0);
} else if(foundType.equals("RTPYR")) {
//납부자정보가 사용자기업정보가 아니면
if(!entNms.contains(searchResult1.string("RTPYR_NM"))
@ -215,11 +275,8 @@ public class Rent04Controller extends ApplicationController {
resultRow.set("O", searchResult1.string("RTPYR_DTL_ADDR"));
resultRow.set("P", searchResult1.string("RTPYR_ZIP"));
}
}
}
result.add(resultRow);
}
}

Loading…
Cancel
Save