|
|
@ -326,7 +326,8 @@ public class BusVehicleApplyService extends MybatisBaseService<BusVehicleApplyMa |
|
|
|
//创建BusinessVariables实体对象
|
|
|
|
BusinessVariables bv = new BusinessVariables(); |
|
|
|
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
|
|
|
|
Map<String, Object> variables = BeanUtil.beanToMap(dto); |
|
|
|
Map<String, Object> variables = new HashMap<>(); |
|
|
|
variables.put("money", Integer.valueOf(dto.getCurrentAmount()).intValue() > 0); |
|
|
|
//用户的部门全路径sid
|
|
|
|
bv.setOrgSidPath(orgSidPath); |
|
|
|
//业务sid
|
|
|
@ -406,6 +407,10 @@ public class BusVehicleApplyService extends MybatisBaseService<BusVehicleApplyMa |
|
|
|
public ResultBean complete(BusinessVariables bv) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
BusVehicleApply busVehicleApply = fetchBySid(bv.getBusinessSid()); |
|
|
|
Map<String, Object> variables = new HashMap<>(); |
|
|
|
//根据业务sid查询排产信息
|
|
|
|
variables.put("money", busVehicleApply.getCurrentAmount().intValue() > 0); |
|
|
|
bv.setFormVariables(variables); |
|
|
|
if (bv.getTaskId().equals(busVehicleApply.getTaskId())) { |
|
|
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.handleProsess(bv); |
|
|
|
if (!resultBean.getSuccess()) { |
|
|
@ -482,6 +487,12 @@ public class BusVehicleApplyService extends MybatisBaseService<BusVehicleApplyMa |
|
|
|
ResultBean<List<GetNodeVo>> rb = ResultBean.fireFail(); |
|
|
|
BusinessVariables bv = new BusinessVariables(); |
|
|
|
BeanUtil.copyProperties(query, bv); |
|
|
|
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
|
|
|
|
Map<String, Object> variables = new HashMap<>(); |
|
|
|
//根据业务sid查询排产信息
|
|
|
|
BusVehicleApply busVehicleApply = fetchBySid(query.getBusinessSid()); |
|
|
|
variables.put("money", busVehicleApply.getCurrentAmount().intValue() > 0); |
|
|
|
bv.setFormVariables(variables); |
|
|
|
bv.setModelId(ProcDefEnum.VEHICLEAPPLY.getProDefId()); |
|
|
|
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv); |
|
|
|
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
|
|
|
@ -500,6 +511,12 @@ public class BusVehicleApplyService extends MybatisBaseService<BusVehicleApplyMa |
|
|
|
ResultBean<List<GetNodeVo>> rb = ResultBean.fireFail(); |
|
|
|
BusinessVariables bv = new BusinessVariables(); |
|
|
|
BeanUtil.copyProperties(query, bv); |
|
|
|
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
|
|
|
|
Map<String, Object> variables = new HashMap<>(); |
|
|
|
//根据业务sid查询排产信息
|
|
|
|
BusVehicleApply busVehicleApply = fetchBySid(query.getBusinessSid()); |
|
|
|
variables.put("money", busVehicleApply.getCurrentAmount().intValue() > 0); |
|
|
|
bv.setFormVariables(variables); |
|
|
|
bv.setModelId(ProcDefEnum.VEHICLEAPPLY.getProDefId()); |
|
|
|
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv); |
|
|
|
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
|
|
|
@ -520,6 +537,7 @@ public class BusVehicleApplyService extends MybatisBaseService<BusVehicleApplyMa |
|
|
|
if (busVehicleApply == null) { |
|
|
|
return rb.setMsg("该申请不存在"); |
|
|
|
} |
|
|
|
|
|
|
|
String businessTaskId = busVehicleApply.getTaskId(); |
|
|
|
if (StringUtils.isNotBlank(businessTaskId)) { |
|
|
|
if (businessTaskId.equals(query.getTaskId())) { |
|
|
@ -531,6 +549,10 @@ public class BusVehicleApplyService extends MybatisBaseService<BusVehicleApplyMa |
|
|
|
} |
|
|
|
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
|
|
|
BeanUtil.copyProperties(query, flowTaskVo); |
|
|
|
Map<String, Object> variables = new HashMap<>(); |
|
|
|
//根据业务sid查询排产信息
|
|
|
|
variables.put("money", busVehicleApply.getCurrentAmount().intValue() > 0); |
|
|
|
flowTaskVo.setValues(variables); |
|
|
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.taskReject(flowTaskVo); |
|
|
|
if (!resultBean.getSuccess()) { |
|
|
|
return rb.setMsg(resultBean.getMsg()); |
|
|
|