|
|
@ -307,6 +307,36 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon |
|
|
|
return rb.success().setData(voList); |
|
|
|
} |
|
|
|
|
|
|
|
public ResultBean<List<LoanSecondarySalesApplyNodeVo>> getAppNextNodesForSubmit(LoanSecondarySalesApplyNodeQuery query) { |
|
|
|
ResultBean<List<LoanSecondarySalesApplyNodeVo>> rb = ResultBean.fireFail(); |
|
|
|
BusinessVariables bv = new BusinessVariables(); |
|
|
|
BeanUtil.copyProperties(query, bv); |
|
|
|
LoanSecondarySalesApply loanSecondarySalesApply = fetchBySid(query.getBusinessSid()); |
|
|
|
bv.setModelId(loanSecondarySalesApply.getProcDefId()); |
|
|
|
Map<String, Object> variables = new HashMap<>(); |
|
|
|
Map<String, Object> appMap = new HashMap<>(); |
|
|
|
if ("Activity_0rm74ey".equals(bv.getTaskDefKey())) {//风控处置岗审批
|
|
|
|
/* if (StringUtils.isBlank(query.getVehicleEvaluation())) { |
|
|
|
return rb.setMsg("请填写评估价格"); |
|
|
|
}*/ |
|
|
|
LoanSecondarySalesCost loanSecondarySalesCost = loanSecondarySalesCostMapper.selectMainSid(query.getBusinessSid()); |
|
|
|
if (loanSecondarySalesCost != null) { |
|
|
|
if (new BigDecimal(query.getVehicleEvaluation()).compareTo(loanSecondarySalesCost.getVehPrice()) > 0) { |
|
|
|
variables.put("isTrue", true); |
|
|
|
} else { |
|
|
|
variables.put("isTrue", false); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
appMap.put("sid", query.getBusinessSid()); |
|
|
|
variables.put("app", appMap); |
|
|
|
bv.setFormVariables(variables); |
|
|
|
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv); |
|
|
|
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给TemplateApplyNodeVo
|
|
|
|
List<LoanSecondarySalesApplyNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), LoanSecondarySalesApplyNodeVo.class)).collect(Collectors.toList()); |
|
|
|
return rb.success().setData(voList); |
|
|
|
} |
|
|
|
|
|
|
|
public ResultBean taskReject(LoanSecondarySalesApplyTaskQuery query) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
String businessSid = query.getBusinessSid(); |
|
|
|