|
@@ -112,6 +112,8 @@ public class OptController {
|
|
|
String resultData = resultMap.get("data").toString();
|
|
|
if (!"0".equals(resultMap.get("code"))){
|
|
|
ProcessInfoReq processInfoReq = JSON.parseObject(resultData, ProcessInfoReq.class);
|
|
|
+ String premiumAmtNum = getPremiumAmtNum(processInfoReq.getLoanAmt());
|
|
|
+ processInfoReq.setPremium(premiumAmtNum);
|
|
|
if (StringUtils.isNotEmpty(processInfoReq.getProcessId())){
|
|
|
//入本地企业信息库
|
|
|
companyInfoService.insertCompanyInfoByWww(processInfoReq);
|
|
@@ -131,6 +133,26 @@ public class OptController {
|
|
|
return Rwww.okwww();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @desc : 计算保费
|
|
|
+ * @author : wangming
|
|
|
+ * @createTime : 2022/9/9 15:27
|
|
|
+ * @param : [loanAmt]
|
|
|
+ * @return : java.lang.String
|
|
|
+ */
|
|
|
+ public String getPremiumAmtNum(String loanAmt){
|
|
|
+ if (StringUtils.isNotEmpty(loanAmt)){
|
|
|
+ long amt = Long.parseLong(loanAmt);
|
|
|
+ double v = amt * 0.005;
|
|
|
+ if (v > 500){
|
|
|
+ return String.valueOf(v);
|
|
|
+ } else {
|
|
|
+ return "500";
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* @desc : 承保回调接口
|