Browse Source

交回车辆二次销售相关接口

master
dimengzhe 1 year ago
parent
commit
d0a2f1decc
  1. 2
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesapply/flowable/CompleteLoanSecondarySalesApplyDto.java
  2. 2
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalescost/LoanSecondarySalesCost.java
  3. 2
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyRest.java
  4. 22
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyService.java
  5. 1
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalescost/LoanSecondarySalesCostMapper.java
  6. 6
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalescost/LoanSecondarySalesCostMapper.xml
  7. 1
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalescost/LoanSecondarySalesCostService.java
  8. 2
      doc/databases/risk_center.sql

2
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesapply/flowable/CompleteLoanSecondarySalesApplyDto.java

@ -32,4 +32,6 @@ public class CompleteLoanSecondarySalesApplyDto {
@ApiModelProperty(value = "业务sid")
@NotBlank(message = "参数错误:businessSid")
private String businessSid;
@ApiModelProperty("车辆评估价格")
private String vehicleEvaluation;
}

2
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalescost/LoanSecondarySalesCost.java

@ -69,7 +69,7 @@ public class LoanSecondarySalesCost extends BaseEntity {
@ApiModelProperty("附件")
private String files;
@ApiModelProperty("车辆评估")
private String vehicleEvaluation;
private BigDecimal vehicleEvaluation;
}

2
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyRest.java

@ -60,7 +60,7 @@ public class LoanSecondarySalesApplyRest implements LoanSecondarySalesApplyFeign
BusinessVariables bv = new BusinessVariables();
BeanUtil.copyProperties(query, bv);
bv.setModelId("");
return loanSecondarySalesApplyService.complete(bv);
return loanSecondarySalesApplyService.complete(bv,query.getVehicleEvaluation());
}
@Override

22
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyService.java

@ -35,6 +35,7 @@ import com.yxt.anrui.riskcenter.api.loanreturninboundtrailer.LoanReturnInboundTr
import com.yxt.anrui.riskcenter.api.loanreturnvehledger.LoanReturnVehLedger;
import com.yxt.anrui.riskcenter.api.loansecondarysalesapply.*;
import com.yxt.anrui.riskcenter.api.loansecondarysalesapply.flowable.*;
import com.yxt.anrui.riskcenter.api.loansecondarysalescost.LoanSecondarySalesCost;
import com.yxt.anrui.riskcenter.api.loansecondarysalescost.LoanSecondarySalesCostVo;
import com.yxt.anrui.riskcenter.api.loansecondarysalesveh.LoanSecondarySalesVeh;
import com.yxt.anrui.riskcenter.api.loansecondarysalesveh.LoanSecondarySalesVehVo;
@ -43,6 +44,7 @@ import com.yxt.anrui.riskcenter.api.loansolutionsdetail.LoanSolutionsDetail;
import com.yxt.anrui.riskcenter.biz.loanrestorereportapply.LoanRestoreReportApplyService;
import com.yxt.anrui.riskcenter.biz.loanreturninboundapply.LoanReturnInboundApplyService;
import com.yxt.anrui.riskcenter.biz.loanreturnvehledger.LoanReturnVehLedgerService;
import com.yxt.anrui.riskcenter.biz.loansecondarysalescost.LoanSecondarySalesCostMapper;
import com.yxt.anrui.riskcenter.biz.loansecondarysalescost.LoanSecondarySalesCostService;
import com.yxt.anrui.riskcenter.biz.loansecondarysalesveh.LoanSecondarySalesVehService;
import com.yxt.anrui.riskcenter.biz.loansolutions.LoanSolutionsMapper;
@ -105,6 +107,8 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon
private LoanSolutionsMapper loanSolutionsMapper;
@Autowired
private LoanSolutionsDetailService loanSolutionsDetailService;
@Autowired
private LoanSecondarySalesCostMapper loanSecondarySalesCostMapper;
public PagerVo<LoanSecondarySalesApplyVo> listPageVo(PagerQuery<LoanSecondarySalesApplyQuery> pq) {
LoanSecondarySalesApplyQuery query = pq.getParams();
@ -377,12 +381,26 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon
return rb.success();
}
public ResultBean complete(BusinessVariables bv) {
public ResultBean complete(BusinessVariables bv, String price) {
ResultBean rb = ResultBean.fireFail();
String businessSid = bv.getBusinessSid();
LoanSecondarySalesApply loanSecondarySalesApply = fetchBySid(businessSid);
Map<String, Object> variables = new HashMap<>();
Map<String, Object> appMap = new HashMap<>();
if ("Activity_0rm74ey".equals(bv.getTaskDefKey())) {//风控处置岗审批
if (StringUtils.isBlank(price)) {
return rb.setMsg("请填写评估价格");
}
//保存评估价格
LoanSecondarySalesCost loanSecondarySalesCost = loanSecondarySalesCostMapper.selectMainSid(businessSid);
loanSecondarySalesCost.setVehicleEvaluation(new BigDecimal(price));
loanSecondarySalesCostService.updateById(loanSecondarySalesCost);
if (loanSecondarySalesCost.getVehicleEvaluation().compareTo(loanSecondarySalesCost.getVehPrice()) > 0) {
variables.put("isTrue", true);
} else {
variables.put("isTrue", false);
}
}
appMap.put("sid", businessSid);
variables.put("app", appMap);
bv.setFormVariables(variables);
@ -498,7 +516,7 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon
bv.setTaskDefKey(loanSecondarySalesApply.getTaskDefKey());
bv.setComment("重新提交");
bv.setInstanceId(dto.getInstanceId());
return complete(bv);
return complete(bv, "");
}
return rb;
}

1
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalescost/LoanSecondarySalesCostMapper.java

@ -15,4 +15,5 @@ public interface LoanSecondarySalesCostMapper extends BaseMapper<LoanSecondarySa
int deleteByMainSid(String s);
LoanSecondarySalesCostVo selectByMainSid(String sid);
LoanSecondarySalesCost selectMainSid(String sid);
}

6
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalescost/LoanSecondarySalesCostMapper.xml

@ -13,4 +13,10 @@
FROM loan_secondary_sales_cost
where mainSid = #{sid}
</select>
<select id="selectMainSid" resultType="com.yxt.anrui.riskcenter.api.loansecondarysalescost.LoanSecondarySalesCost">
select *
from loan_secondary_sales_cost
where mainSid = #{sid}
</select>
</mapper>

1
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalescost/LoanSecondarySalesCostService.java

@ -31,6 +31,7 @@ public class LoanSecondarySalesCostService extends MybatisBaseService<LoanSecond
return baseMapper.selectByMainSid(sid);
}
public void saveCost(LoanSecondarySalesCostVo loanSecondarySalesCost, String sid) {
baseMapper.deleteByMainSid(sid);
LoanSecondarySalesCost loanSecondarySalesCost1 = new LoanSecondarySalesCost();

2
doc/databases/risk_center.sql

@ -1659,7 +1659,7 @@ CREATE TABLE `loan_secondary_sales_cost`
`lossPrice` decimal(10, 2) DEFAULT NULL COMMENT '预计亏损金额',
`debtDisposal` text DEFAULT NULL COMMENT '后续欠款处置方向',
`files` text DEFAULT NULL COMMENT '附件',
`vehicleEvaluation` text DEFAULT NULL COMMENT '车辆评估',
`vehicleEvaluation` decimal(10, 2) DEFAULT NULL COMMENT '车辆评估价格',
PRIMARY KEY (`id`),
KEY `id` (`id`)
) ENGINE = INNODB

Loading…
Cancel
Save