|
@ -731,6 +731,12 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper |
|
|
nodeState = ProcessStateEnum.FINISHED.getStateName(); |
|
|
nodeState = ProcessStateEnum.FINISHED.getStateName(); |
|
|
taskDefKey = "Event_end"; |
|
|
taskDefKey = "Event_end"; |
|
|
map.put("flowState", SysFormLinkFlowStateEnum.FINISH.getCode()); |
|
|
map.put("flowState", SysFormLinkFlowStateEnum.FINISH.getCode()); |
|
|
|
|
|
//更新销售订单的状态为已通过的状态:审批通过1
|
|
|
|
|
|
//ToDo:
|
|
|
|
|
|
updateStateByBusinessSid(1,variables.get("businessSid").toString()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
map.put("nodeState", nodeState); |
|
|
map.put("nodeState", nodeState); |
|
@ -739,6 +745,15 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper |
|
|
return rb.success(); |
|
|
return rb.success(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 更新销售订单的状态 |
|
|
|
|
|
* @param state 状态,审批通过1,不通过2 |
|
|
|
|
|
* @param businessSid |
|
|
|
|
|
*/ |
|
|
|
|
|
private void updateStateByBusinessSid(int state, String businessSid) { |
|
|
|
|
|
baseMapper.updateStateByBusinessSid(state,businessSid); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public ResultBean reject(BusSalesOrderFlowDto dto) { |
|
|
public ResultBean reject(BusSalesOrderFlowDto dto) { |
|
|
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
|
|
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
|
|
BeanUtil.copyProperties(dto, flowTaskVo); |
|
|
BeanUtil.copyProperties(dto, flowTaskVo); |
|
@ -763,6 +778,12 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper |
|
|
public ResultBean breakProcess(BusSalesOrderFlowDto dto) { |
|
|
public ResultBean breakProcess(BusSalesOrderFlowDto dto) { |
|
|
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
|
|
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
|
|
BeanUtil.copyProperties(dto, flowTaskVo); |
|
|
BeanUtil.copyProperties(dto, flowTaskVo); |
|
|
|
|
|
//查询是否是最后一步
|
|
|
|
|
|
ResultBean<List<LatestTaskVo>> listResultBean = flowTaskFeign.getLatestTasks(dto.getInstanceId()); |
|
|
|
|
|
if (listResultBean.getData().size() == 0) { |
|
|
|
|
|
//更新销售订单的状态为不通过
|
|
|
|
|
|
updateStateByBusinessSid(2,dto.getBusinessSid()); |
|
|
|
|
|
} |
|
|
ResultBean resultBean = flowTaskFeign.breakProcess(flowTaskVo); |
|
|
ResultBean resultBean = flowTaskFeign.breakProcess(flowTaskVo); |
|
|
if (!resultBean.getSuccess()) { |
|
|
if (!resultBean.getSuccess()) { |
|
|
return resultBean; |
|
|
return resultBean; |
|
|