repairStatus逻辑
diff --git a/payapi/src/main/kotlin/com/supwisdom/dlpay/api/scheduler_sourcetype_chk.kt b/payapi/src/main/kotlin/com/supwisdom/dlpay/api/scheduler_sourcetype_chk.kt
index 4b01a8e..f6416e0 100644
--- a/payapi/src/main/kotlin/com/supwisdom/dlpay/api/scheduler_sourcetype_chk.kt
+++ b/payapi/src/main/kotlin/com/supwisdom/dlpay/api/scheduler_sourcetype_chk.kt
@@ -365,7 +365,7 @@
transactionReconciliationService.doFinishChkfileStatus(chkfile, checkStatus)
//补账, result为equal或unequal时补帐,error跳过
- if (chkfile.result in setOf(ConstantUtil.CHKFILE_RESULT_EQUAL, ConstantUtil.CHKFILE_RESULT_UNEQUAL)) {
+ if (checkStatus.repairStatus) {
transactionReconciliationService.getNeedRepairChkdtls(chkfile).forEach { chkdtl ->
try {
transactionReconciliationService.doRepairTransactionChkdtl(chkdtl) //补账
diff --git a/payapi/src/main/kotlin/com/supwisdom/dlpay/api/service/impl/transaction_reconciliation_service_impl.kt b/payapi/src/main/kotlin/com/supwisdom/dlpay/api/service/impl/transaction_reconciliation_service_impl.kt
index ad35776..3becb42 100644
--- a/payapi/src/main/kotlin/com/supwisdom/dlpay/api/service/impl/transaction_reconciliation_service_impl.kt
+++ b/payapi/src/main/kotlin/com/supwisdom/dlpay/api/service/impl/transaction_reconciliation_service_impl.kt
@@ -243,9 +243,7 @@
chkfile.result = ConstantUtil.CHKFILE_RESULT_ERROR
chkfile.remark = "校对完成,明细存在对比异常"
transactionChkdtlDao.getCountByChkresult(chkfile.id, ConstantUtil.CHKDTL_CHKRESULT_SURPLUS).existed.also {
- if (null != it && it > 0) {
- chkfile.remark = "本地有<${it}>条流水不在对账文件中,请联系管理员检查"
- }
+ if (null != it && it > 0) chkfile.remark = "本地有<$it>条流水不在对账文件中,请联系管理员检查"
}
} else {
//仅存在一致或需补账的记录
@@ -257,6 +255,8 @@
chkfile.result = ConstantUtil.CHKFILE_RESULT_EQUAL //一致
chkfile.remark = "校对完成,双方交易一致"
}
+ checkStatus.repairStatus = true
+ checkStatus.remark = chkfile.remark
}
transactionChkfileDao.save(chkfile)
sourceTypeService.saveOrUpdateSourceTypeCheckStatus(checkStatus)
@@ -282,7 +282,6 @@
chkfile.localcnt = personSumInfo.totalcnt ?: 0
chkfile.localamt = personSumInfo.totalamt ?: 0.00
- checkStatus.repairStatus = false
checkStatus.settleStatus = false
checkStatus.remark = chkfile.remark
if (chkfile.result in setOf(ConstantUtil.CHKFILE_RESULT_EQUAL, ConstantUtil.CHKFILE_RESULT_UNEQUAL)) {
@@ -293,7 +292,6 @@
true -> "对账完成,双方交易一致"
else -> "对账完成,补账后双方交易一致"
}
- checkStatus.repairStatus = true
checkStatus.settleStatus = true
checkStatus.remark = chkfile.remark
}else{