|
|
|
@ -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();
|
|
|
|
|
|
|
|
|
|
RentQuery lsctQuery = new RentQuery();
|
|
|
|
|
lsctQuery.setEntIds(entIds);
|
|
|
|
|
lsctQuery.setSchVhrno(resultRow.string("D"));
|
|
|
|
|
lsctQuery.setSchCtrtYmd(resultRow.string("G"));
|
|
|
|
|
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.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";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
searchResult = lsctMapper.selectLsctList(lsctQuery);
|
|
|
|
|
|
|
|
|
|
if(searchResult != null && !searchResult.isEmpty()) {
|
|
|
|
|
DataObject searchResult1 = searchResult.get(0);
|
|
|
|
|
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";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(foundType.equals("HIRER")) {
|
|
|
|
|
|
|
|
|
|
resultRow.set("K", searchResult1.string("HIRER_NM"));
|
|
|
|
|
if(searchResult1.string("HIRER_SE_CD").equals("99")) {
|
|
|
|
@ -190,36 +259,24 @@ 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);
|
|
|
|
|
|
|
|
|
|
//납부자정보가 사용자기업정보가 아니면
|
|
|
|
|
if(!entNms.contains(searchResult1.string("RTPYR_NM"))
|
|
|
|
|
&& !entRegNos.contains(searchResult1.string("RTPYR_NO"))
|
|
|
|
|
) {
|
|
|
|
|
resultRow.set("K", searchResult1.string("RTPYR_NM"));
|
|
|
|
|
if(searchResult1.string("RTPYR_SE_CD").equals("99")) {
|
|
|
|
|
resultRow.set("L", searchResult1.string("RTPYR_NO"));
|
|
|
|
|
} else {
|
|
|
|
|
resultRow.set("M", searchResult1.string("RTPYR_NO"));
|
|
|
|
|
}
|
|
|
|
|
resultRow.set("N", searchResult1.string("RTPYR_ADDR"));
|
|
|
|
|
resultRow.set("O", searchResult1.string("RTPYR_DTL_ADDR"));
|
|
|
|
|
resultRow.set("P", searchResult1.string("RTPYR_ZIP"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} else if(foundType.equals("RTPYR")) {
|
|
|
|
|
|
|
|
|
|
//납부자정보가 사용자기업정보가 아니면
|
|
|
|
|
if(!entNms.contains(searchResult1.string("RTPYR_NM"))
|
|
|
|
|
&& !entRegNos.contains(searchResult1.string("RTPYR_NO"))
|
|
|
|
|
) {
|
|
|
|
|
resultRow.set("K", searchResult1.string("RTPYR_NM"));
|
|
|
|
|
if(searchResult1.string("RTPYR_SE_CD").equals("99")) {
|
|
|
|
|
resultRow.set("L", searchResult1.string("RTPYR_NO"));
|
|
|
|
|
} else {
|
|
|
|
|
resultRow.set("M", searchResult1.string("RTPYR_NO"));
|
|
|
|
|
}
|
|
|
|
|
resultRow.set("N", searchResult1.string("RTPYR_ADDR"));
|
|
|
|
|
resultRow.set("O", searchResult1.string("RTPYR_DTL_ADDR"));
|
|
|
|
|
resultRow.set("P", searchResult1.string("RTPYR_ZIP"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result.add(resultRow);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|