feat: 客商档案列表风险明细后台统一组装(风险等级字典翻译与金蝶黑名单失信类别列入事由)
This commit is contained in:
+20
@@ -41,6 +41,10 @@ import org.springblade.core.tenant.annotation.TenantIgnore;
|
||||
import org.springblade.core.tool.jackson.JsonUtil;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.cache.SysCache;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.transport.constant.HcsSyncConstant;
|
||||
import org.springblade.transport.excel.CustomerArchiveExcel;
|
||||
import org.springblade.thirdparty.bfi.constant.BfiConstant;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiCustomerQueryDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiBillSaveResultErrorVO;
|
||||
@@ -92,6 +96,7 @@ import org.springblade.transport.pojo.vo.CustomerCreditScoreVO;
|
||||
import org.springblade.transport.pojo.vo.CustomerInvoiceContactVO;
|
||||
import org.springblade.transport.pojo.vo.CustomerInvoiceInfoVO;
|
||||
import org.springblade.transport.pojo.vo.CustomerReceiptAccountVO;
|
||||
import org.springblade.transport.support.hcs.HcsCreditCheckSupport;
|
||||
import org.springblade.transport.service.ICustomerArchiveService;
|
||||
import org.springblade.transport.support.KingdeeSyncLockSupport;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -232,6 +237,7 @@ public class CustomerArchiveServiceImpl extends BaseServiceImpl<CustomerArchiveM
|
||||
List<CustomerArchiveVO> records = baseMapper.selectCustomerArchivePage(page, customer, currentScopeUserId());
|
||||
records.forEach(record -> record.setCreateUserName(UserCache.getUserRealName(record.getCreateUser())));
|
||||
fillFundUseRisk(records);
|
||||
this.fillRiskDetail(records);
|
||||
return page.setRecords(records);
|
||||
}
|
||||
|
||||
@@ -2144,6 +2150,19 @@ public class CustomerArchiveServiceImpl extends BaseServiceImpl<CustomerArchiveM
|
||||
return snapshot;
|
||||
}
|
||||
|
||||
/**
|
||||
* 组装客商风险明细(列表悬浮展示用):等级名称(黑名单优先 + risk_level 字典翻译)与金蝶黑名单原始字段
|
||||
* 交由 {@link HcsCreditCheckSupport#buildRiskDetail} 统一组装,与表单实时提示(riskTip)同口径
|
||||
*/
|
||||
private void fillRiskDetail(List<CustomerArchiveVO> records) {
|
||||
for (CustomerArchiveVO record : records) {
|
||||
String customerName = Func.isEmpty(record.getFullName()) ? record.getCustomerCode() : record.getFullName();
|
||||
record.setHcsRiskDetail(HcsCreditCheckSupport.buildRiskDetail(customerName,
|
||||
"yes".equalsIgnoreCase(record.getHcsBlackStatus()), record.getHcsRiskLevel(),
|
||||
record.getKingdeeBlackCategory(), record.getKingdeeBlackReason()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 资金使用情况 = 付款申请中「付款方=当前客商」且审核通过的已付金额合计;
|
||||
* 资金使用额度风险 = 合计已付金额 / 客商最大资金使用额度。
|
||||
@@ -2152,6 +2171,7 @@ public class CustomerArchiveServiceImpl extends BaseServiceImpl<CustomerArchiveM
|
||||
if (records == null || records.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Set<String> payerNames = new HashSet<>();
|
||||
records.forEach(customer -> {
|
||||
if (Func.isNotEmpty(customer.getFullName())) {
|
||||
|
||||
Reference in New Issue
Block a user