@ -168,8 +168,16 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
int size = resultList . size ( ) ;
if ( StringUtils . isNotBlank ( importReturn . getCheckInfo2 ( ) ) ) {
return rb . success ( ) . setData ( resultList ) . setMsg ( importReturn . getCheckInfo2 ( ) ) ;
} else if ( StringUtils . isNotBlank ( importReturn . getCheckInfo3 ( ) ) ) {
String checkInfo3 = importReturn . getCheckInfo3 ( ) ;
String [ ] split = checkInfo3 . split ( "-" ) ;
Integer i = Integer . valueOf ( split [ 0 ] ) ;
int i1 = i . intValue ( ) ;
int i2 = size - i1 ;
String sBankNo = split [ 1 ] ;
return rb . success ( ) . setData ( resultList ) . setMsg ( "共" + size + "条记录,成功导入" + i2 + "条,导入未成功的资方合同号为:" + sBankNo + "。导入点击“确定”,不导入点击”取消“。" ) ;
} else {
return rb . success ( ) . setData ( resultList ) . setMsg ( "数据校验成功,请点击“确定”按钮,导入数据。" ) ;
return rb . success ( ) . setData ( resultList ) . setMsg ( "数据校验成功共" + size + "条记录,导入点击“确定”,不导入点击”取消“ 。" ) ;
}
} else {
String checkResult = importReturn . getCheckInfo ( ) ;
@ -185,6 +193,7 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
int [ ] resultIndex = new int [ resultCell . length ] ;
Set < String > checkWord = new HashSet < > ( ) ;
Set < String > checkWord2 = new HashSet < > ( ) ;
Set < String > checkWord3 = new HashSet < > ( ) ;
for ( int r = 1 ; r < = sheet . getLastRowNum ( ) ; r + + ) {
Row row = sheet . getRow ( r ) ;
if ( row = = null ) {
@ -253,7 +262,7 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
importVoList . add ( importVo ) ;
}
StringBuffer sbBankCNo = new StringBuffer ( ) ;
int i = 0 ;
if ( ! importVoList . isEmpty ( ) ) {
for ( RepaymentExcelInfo excelInfo : importVoList ) {
if ( StringUtils . isBlank ( excelInfo . getRealReturnTime ( ) ) | |
@ -286,6 +295,7 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
List < LoanRepaymentPlanDetails > planDetails = loanRepaymentPlanDetailsService . selPlanByNoAndPeriod ( bankContractNo , period ) ;
if ( planDetails . isEmpty ( ) | | planDetails = = null ) {
sbBankCNo . append ( bankContractNo ) . append ( "、" ) ;
i + + ;
}
}
if ( StringUtils . isNotBlank ( excelInfo . getBankContractNo ( ) ) & & StringUtils . isNotBlank ( excelInfo . getRealReturnTime ( ) ) ) {
@ -294,18 +304,18 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
if ( ! realReturnTime . equals ( "error" ) ) {
List < LoanRepaymentHistory > histories = baseMapper . selByBankNoAndActDate ( bankContractNo , realReturnTime ) ;
if ( ! histories . isEmpty ( ) | | histories . size ( ) > 0 ) {
checkWord2 . add ( "实还日期:" + realReturnTime + "、资方合同编号:" + bankContractNo ) ;
}
checkWord2 . add ( bankContractNo + "(" + realReturnTime + ")" ) ;
}
}
}
}
String bankCo = "" ;
if ( sbBankCNo . length ( ) > 0 ) {
sbBankCNo . delete ( sbBankCNo . length ( ) - 1 , sbBankCNo . length ( ) ) ;
bankCo = "资方合同号" + sbBankCNo + "不存在" ;
}
checkWord . add ( bankCo ) ;
// String bankCo = "";
// if (sbBankCNo.length() > 0) {
// sbBankCNo.delete(sbBankCNo.length() - 1, sbBankCNo.length());
// bankCo = "资方合同号" + sbBankCNo + "不存在";
// }
// checkWord.add(bankCo);
StringBuffer sbcheck1 = new StringBuffer ( ) ;
if ( ! checkWord . isEmpty ( ) ) {
for ( String s : checkWord ) {
@ -332,10 +342,20 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
}
}
if ( sbcheck2 . length ( ) > 0 ) {
if ( sbBankCNo . length ( ) > 0 ) {
sbBankCNo . delete ( sbBankCNo . length ( ) - 1 , sbBankCNo . length ( ) ) ;
sbcheck2 . delete ( sbcheck2 . length ( ) - 1 , sbcheck2 . length ( ) ) ;
importReturn . setCheckInfo2 ( "1.平台中不存在的资方编号:" + sbBankCNo + "。2.平台中已存在资方实还日期记录:" + sbcheck2 + "。是否继续导入,导入点击“确定”,不导入点击”取消“。导入时只有系统中存在的资方合同号的记录才导入系统。" ) ;
} else {
sbcheck2 . delete ( sbcheck2 . length ( ) - 1 , sbcheck2 . length ( ) ) ;
importReturn . setCheckInfo2 ( "已存在" + sbcheck2 . toString ( ) + "的记录,是否继续导入,导入点击“确定”,不导入点击”取消“。" ) ;
importReturn . setCheckInfo2 ( "平台中已存在资方实还日期记录:" + sbcheck2 + "。是否继续导入,导入点击“确定”,不导入点击”取消“。" ) ;
}
return importReturn ;
}
if ( sbBankCNo . length ( ) > 0 ) {
sbBankCNo . delete ( sbBankCNo . length ( ) - 1 , sbBankCNo . length ( ) ) ;
importReturn . setCheckInfo3 ( i + "-" + sbBankCNo ) ;
}
return importReturn ;
}
@ -802,8 +822,14 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
}
}
}
} else {
return rb . setMsg ( "暂无可更新的还款记录" ) ;
}
//直还+转付余额为零的设置默认划扣状态已通过
List < String > hisSidsForBuckle = baseMapper . selSidsForBuckle ( pushUseOrgSid ) ;
if ( ! hisSidsForBuckle . isEmpty ( ) ) {
int i = baseMapper . setBuckleState ( hisSidsForBuckle , "003" , "审核通过" ) ;
}
if ( histories . isEmpty ( ) & & hisSidsForBuckle . isEmpty ( ) ) {
return rb . setMsg ( "暂无可更新的数据" ) ;
}
return rb . success ( ) ;
}