|
|
@ -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; |
|
|
|
} |
|
|
|