统一个人测算入参与重启脚本进程识别

This commit is contained in:
wkc
2026-04-10 15:04:56 +08:00
parent f001047d0c
commit fa0b446699
46 changed files with 903 additions and 87 deletions

View File

@@ -16,7 +16,7 @@ public class ModelInvokeDTO {
/**
* 机构编码(必填)
* 固定值:931000
* 固定值:892000
*/
private String orgCode;
@@ -73,6 +73,12 @@ public class ModelInvokeDTO {
*/
private String applyAmt;
/**
* 贷款期限(必填)
* 单位:年
*/
private String loanTerm;
/**
* 净身企业(非必填)
* 可选值true/false
@@ -119,19 +125,25 @@ public class ModelInvokeDTO {
/**
* 是否有经营佐证(非必填)
* 可选值:true/false
* 可选值:0/1
*/
private String bizProof;
/**
* 循环功能(非必填)
* 可选值0/1
*/
private String loanLoop;
/**
* 抵质押类型(非必填)
* 可选值:抵押/质押
* 可选值:一类/二类/三类
*/
private String collType;
/**
* 抵质押物是否三方所有(非必填)
* 可选值:true/false
* 可选值:0/1
*/
private String collThirdParty;

View File

@@ -41,15 +41,24 @@ public class PersonalLoanPricingCreateDTO implements Serializable {
@NotBlank(message = "申请金额不能为空")
private String applyAmt;
@Schema(description = "是否有经营佐证", example = "true")
@Schema(description = "贷款用途", requiredMode = Schema.RequiredMode.REQUIRED, example = "business", allowableValues = {"consumer", "business"})
@NotBlank(message = "贷款用途不能为空")
@Pattern(regexp = "^(consumer|business)$", message = "贷款用途必须是consumer、business之一")
private String loanPurpose;
@Schema(description = "借款期限(年)", requiredMode = Schema.RequiredMode.REQUIRED, example = "3")
@NotBlank(message = "借款期限不能为空")
private String loanTerm;
@Schema(description = "是否有经营佐证", example = "1")
private String bizProof;
@Schema(description = "循环功能", example = "false")
@Schema(description = "循环功能", example = "0")
private String loanLoop;
@Schema(description = "抵质押类型", example = "一类")
private String collType;
@Schema(description = "抵质押物是否三方所有", example = "false")
@Schema(description = "抵质押物是否三方所有", example = "0")
private String collThirdParty;
}

View File

@@ -60,6 +60,10 @@ public class LoanPricingModelService {
}
ModelInvokeDTO modelInvokeDTO = new ModelInvokeDTO();
BeanUtils.copyProperties(loanPricingWorkflow, modelInvokeDTO);
if ("个人".equals(loanPricingWorkflow.getCustType()))
{
normalizePersonalModelInvokeDTO(modelInvokeDTO);
}
JSONObject response = modelService.invokeModel(modelInvokeDTO);
if (loanPricingWorkflow.getCustType().equals("个人")){
// 个人模型
@@ -83,4 +87,24 @@ public class LoanPricingModelService {
log.info("更新流程信息成功");
}
}
private void normalizePersonalModelInvokeDTO(ModelInvokeDTO modelInvokeDTO)
{
modelInvokeDTO.setBizProof(toZeroOne(modelInvokeDTO.getBizProof()));
modelInvokeDTO.setLoanLoop(toZeroOne(modelInvokeDTO.getLoanLoop()));
modelInvokeDTO.setCollThirdParty(toZeroOne(modelInvokeDTO.getCollThirdParty()));
}
private String toZeroOne(String value)
{
if ("true".equals(value) || "1".equals(value))
{
return "1";
}
if ("false".equals(value) || "0".equals(value))
{
return "0";
}
return value;
}
}

View File

@@ -28,6 +28,8 @@ public class LoanPricingConverter {
entity.setIdNum(dto.getIdNum());
entity.setGuarType(dto.getGuarType());
entity.setApplyAmt(dto.getApplyAmt());
entity.setLoanPurpose(dto.getLoanPurpose());
entity.setLoanTerm(dto.getLoanTerm());
entity.setCollType(dto.getCollType());
entity.setCollThirdParty(dto.getCollThirdParty());
// 映射个人特有字段