|
|
@ -27,6 +27,7 @@ package com.yxt.anrui.buscenter.biz.busdeliveredapply; |
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.yxt.anrui.buscenter.api.busdeliveredapply.*; |
|
|
@ -37,7 +38,18 @@ import com.yxt.anrui.buscenter.api.busdeliveredusemessage.BusDeliveredUseMessage |
|
|
|
import com.yxt.anrui.buscenter.biz.busdelivered.BusDeliveredService; |
|
|
|
import com.yxt.anrui.buscenter.biz.busdeliveredapplydetails.BusDeliveredApplyDetailsService; |
|
|
|
import com.yxt.anrui.buscenter.biz.busdeliveredusemessage.BusDeliveredUseMessageService; |
|
|
|
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempFeign; |
|
|
|
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempVo; |
|
|
|
import com.yxt.anrui.flowable.api.flow.FlowableFeign; |
|
|
|
import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo; |
|
|
|
import com.yxt.anrui.flowable.api.flowtask.FlowTaskFeign; |
|
|
|
import com.yxt.anrui.flowable.api.flowtask.FlowTaskVo; |
|
|
|
import com.yxt.anrui.flowable.api.utils.ProcDefEnum; |
|
|
|
import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables; |
|
|
|
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg; |
|
|
|
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; |
|
|
|
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; |
|
|
|
import com.yxt.anrui.portal.api.sysuser.SysUserVo; |
|
|
|
import com.yxt.common.base.service.MybatisBaseService; |
|
|
|
import com.yxt.common.base.utils.PagerUtil; |
|
|
|
import com.yxt.common.core.query.PagerQuery; |
|
|
@ -48,8 +60,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.List; |
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
/** |
|
|
@ -76,6 +87,14 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
private SysStaffOrgFeign sysStaffOrgFeign; |
|
|
|
@Autowired |
|
|
|
private BusDeliveredService busDeliveredService; |
|
|
|
@Autowired |
|
|
|
private CrmCustomerTempFeign crmCustomerTempFeign; |
|
|
|
@Autowired |
|
|
|
private FlowableFeign flowableFeign; |
|
|
|
@Autowired |
|
|
|
private FlowTaskFeign flowTaskFeign; |
|
|
|
@Autowired |
|
|
|
SysUserFeign sysUserFeign; |
|
|
|
|
|
|
|
/** |
|
|
|
* 构造出库申请的查询条件 |
|
|
@ -126,6 +145,8 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
if (StringUtils.isBlank(dtoSid)) { |
|
|
|
//新增
|
|
|
|
BusDeliveredApply busDeliveredApply = new BusDeliveredApply(); |
|
|
|
String mobile = dto.getDetailsList().get(0).getUseMessage().getMobile(); |
|
|
|
busDeliveredApply.setMobile(mobile); |
|
|
|
BeanUtil.copyProperties(dto, busDeliveredApply, "sid"); |
|
|
|
List<BusDeliveredApplyDetailsDto> dtoList = dto.getDetailsList(); |
|
|
|
if (dtoList.size() > 0) { |
|
|
@ -155,7 +176,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
List<String> stringList = busDeliveredApplyDetailsService.selectVinByApplySid(dtoSid); |
|
|
|
for (int i = 0; i < stringList.size(); i++) { |
|
|
|
String vinNo = stringList.get(i); |
|
|
|
busDeliveredService.updateState(vinNo, 1); |
|
|
|
busDeliveredService.updateState(vinNo, 0); |
|
|
|
} |
|
|
|
return rb.success().setData(dtoSid); |
|
|
|
} |
|
|
@ -178,15 +199,36 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
BeanUtil.copyProperties(entity, vo); |
|
|
|
String format = DateUtil.format(entity.getApplyDate(), "yyyy-MM-dd"); |
|
|
|
vo.setApplyDate(format); |
|
|
|
//根据出库申请单的sid查询需要出库的车辆信息
|
|
|
|
List<BusDeliveredApplyDetailsVo> voList = busDeliveredApplyDetailsService.detailsList(sid); |
|
|
|
for (int i = 0; i < voList.size(); i++) { |
|
|
|
BusDeliveredUseMessage busDeliveredUseMessage = busDeliveredUseMessageService.fetchBySid(voList.get(i).getUseMessageSid()); |
|
|
|
BusDeliveredUseMessageVo busDeliveredUseMessageVo = new BusDeliveredUseMessageVo(); |
|
|
|
BeanUtil.copyProperties(busDeliveredUseMessage, busDeliveredUseMessageVo); |
|
|
|
voList.get(i).setUseMessage(busDeliveredUseMessageVo); |
|
|
|
} |
|
|
|
vo.setListVo(voList); |
|
|
|
if (vo.getIsTerminal().equals(1)) { |
|
|
|
List<BusDeliveredApplyDetailsVo> voList = busDeliveredApplyDetailsService.detailsList(sid); |
|
|
|
voList.removeAll(Collections.singleton(null)); |
|
|
|
if (!voList.isEmpty()) { |
|
|
|
for (BusDeliveredApplyDetailsVo v : voList) { |
|
|
|
CrmCustomerTempVo data = crmCustomerTempFeign.selByMobile(vo.getMobile()).getData(); |
|
|
|
BusDeliveredUseMessageVo busDeliveredUseMessageVo = new BusDeliveredUseMessageVo(); |
|
|
|
busDeliveredUseMessageVo.setMobile(data.getMobile()); |
|
|
|
busDeliveredUseMessageVo.setName(data.getName()); |
|
|
|
busDeliveredUseMessageVo.setAddress(data.getAddress()); |
|
|
|
busDeliveredUseMessageVo.setIdNo(data.getIDNumber()); |
|
|
|
busDeliveredUseMessageVo.setVinNo(voList.get(0).getVinNo()); |
|
|
|
busDeliveredUseMessageVo.setContractNo(vo.getContractNo()); |
|
|
|
v.setUseMessage(busDeliveredUseMessageVo); |
|
|
|
} |
|
|
|
} |
|
|
|
vo.setListVo(voList); |
|
|
|
|
|
|
|
} else if (vo.getIsTerminal().equals(0)) { |
|
|
|
//根据出库申请单的sid查询需要出库的车辆信息
|
|
|
|
List<BusDeliveredApplyDetailsVo> voList = busDeliveredApplyDetailsService.detailsList(sid); |
|
|
|
for (int i = 0; i < voList.size(); i++) { |
|
|
|
BusDeliveredUseMessage busDeliveredUseMessage = busDeliveredUseMessageService.fetchBySid(voList.get(i).getUseMessageSid()); |
|
|
|
BusDeliveredUseMessageVo busDeliveredUseMessageVo = new BusDeliveredUseMessageVo(); |
|
|
|
BeanUtil.copyProperties(busDeliveredUseMessage, busDeliveredUseMessageVo); |
|
|
|
voList.get(i).setUseMessage(busDeliveredUseMessageVo); |
|
|
|
} |
|
|
|
vo.setListVo(voList); |
|
|
|
} |
|
|
|
|
|
|
|
return rb.success().setData(vo); |
|
|
|
} |
|
|
|
|
|
|
@ -226,6 +268,26 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
return rb.success().setMsg("提交成功"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 出库申请管理列表的撤回 |
|
|
|
* |
|
|
|
* @param sid 出库申请sid |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public ResultBean revokeBySid(String sid) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
BusDeliveredApply busDeliveredApply = fetchBySid(sid); |
|
|
|
if (busDeliveredApply == null) { |
|
|
|
return rb.setMsg("该出库申请不存在"); |
|
|
|
} |
|
|
|
//状态:1待提交,2待审核,3已通过,4未通过
|
|
|
|
if (!busDeliveredApply.getState().equals(2)) { |
|
|
|
return rb.setMsg("撤回失败,该申请已在审核中"); |
|
|
|
} |
|
|
|
baseMapper.updateStateBySid(1, sid, DateUtil.date()); |
|
|
|
return rb.success().setMsg("撤回成功"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 删除 |
|
|
|
* |
|
|
@ -240,6 +302,13 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
if (stateList.contains(false)) { |
|
|
|
return rb.setMsg("已提交的申请不允许删除"); |
|
|
|
} |
|
|
|
for (String s : sidsList) { |
|
|
|
List<String> stringList = busDeliveredApplyDetailsService.selectVinByApplySid(s); |
|
|
|
for (int j = 0; j < stringList.size(); j++) { |
|
|
|
String vinNo = stringList.get(j); |
|
|
|
busDeliveredService.updateState(vinNo, 1); |
|
|
|
} |
|
|
|
} |
|
|
|
if (sidsList.size() > 0) { |
|
|
|
for (int i = 0; i < sidsList.size(); i++) { |
|
|
|
busDeliveredApplyDetailsService.deleteByApplySid(sidsList.get(i)); |
|
|
@ -317,6 +386,12 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
} |
|
|
|
//台账的设置出库
|
|
|
|
|
|
|
|
} else if (state == 5) { |
|
|
|
if (StringUtils.isBlank(busDeExamineQuery.getReason())) { |
|
|
|
return rb.setMsg("请输入驳回的原因"); |
|
|
|
} |
|
|
|
baseMapper.updateStateAndReason(busDeExamineQuery.getSid(), 1, busDeExamineQuery.getReason()); |
|
|
|
|
|
|
|
} else { |
|
|
|
baseMapper.updateState(busDeExamineQuery.getSid(), state); |
|
|
|
} |
|
|
@ -340,4 +415,261 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
} |
|
|
|
return rb.success(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 提交审批流程 |
|
|
|
* |
|
|
|
* @param dto |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public ResultBean submitDeliveredApply(SubmitDeliveredApplyDto dto) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
//根据用户sid获取staffSid
|
|
|
|
ResultBean<SysUserVo> userVoResultBean = sysUserFeign.fetchBySid(dto.getUserSid()); |
|
|
|
if (!userVoResultBean.getSuccess()) { |
|
|
|
return rb.setMsg(userVoResultBean.getMsg()); |
|
|
|
} |
|
|
|
//根据staffSid获取用户的组织全路径
|
|
|
|
ResultBean<SysStaffOrg> staffOrgResultBean = sysStaffOrgFeign.getOrgByStaffSid(userVoResultBean.getData().getStaffSid()); |
|
|
|
if (!staffOrgResultBean.getSuccess()) { |
|
|
|
return rb.setMsg(staffOrgResultBean.getMsg()); |
|
|
|
} |
|
|
|
//用户的组织全路径
|
|
|
|
String orgSidPath = staffOrgResultBean.getData().getOrgSidPath(); |
|
|
|
BusDeliveredApply busDeliveredApply = fetchBySid(dto.getSid()); |
|
|
|
int r = submitBusinessData(dto, busDeliveredApply); |
|
|
|
if (r == 3) { |
|
|
|
return rb.setMsg("该申请不存在"); |
|
|
|
} |
|
|
|
if (r == 0) { |
|
|
|
return rb.setMsg("操作失败!提交的数据不一致"); |
|
|
|
} |
|
|
|
//新增修改保存
|
|
|
|
ResultBean<String> resultBean = saveOrUpdateDto(dto); |
|
|
|
if (!resultBean.getSuccess()) { |
|
|
|
return rb.setMsg(resultBean.getMsg()); |
|
|
|
} |
|
|
|
String businessSid = resultBean.getData(); |
|
|
|
//创建BusinessVariables实体对象
|
|
|
|
BusinessVariables bv = new BusinessVariables(); |
|
|
|
//流程中的参数赋值
|
|
|
|
Map<String, Object> variables = BeanUtil.beanToMap(dto); |
|
|
|
//若有网关,则赋值网关中判断的字段。
|
|
|
|
variables.put("businessSid", businessSid); |
|
|
|
//用户的部门全路径sid
|
|
|
|
bv.setOrgSidPath(orgSidPath); |
|
|
|
//业务sid
|
|
|
|
bv.setBusinessSid(businessSid); |
|
|
|
//用户sid
|
|
|
|
bv.setUserSid(dto.getUserSid()); |
|
|
|
bv.setFormVariables(variables); |
|
|
|
//流程定义id
|
|
|
|
bv.setModelId(ProcDefEnum.BUSDELIVEREDAPPLY.getProDefId()); |
|
|
|
if (r == 1) { |
|
|
|
ResultBean<UpdateFlowFieldVo> voResultBean = flowableFeign.startProcess(bv); |
|
|
|
UpdateFlowFieldVo ufVo = voResultBean.getData(); |
|
|
|
updateFlowFiled(BeanUtil.beanToMap(ufVo)); |
|
|
|
return voResultBean; |
|
|
|
} |
|
|
|
if (r == 2) { |
|
|
|
// ToDo:驳回到发起人后再次提交
|
|
|
|
if (StringUtils.isBlank(dto.getInstanceId())) { |
|
|
|
return rb.setMsg("参数错误:instanceId"); |
|
|
|
} |
|
|
|
bv.setTaskId(busDeliveredApply.getTaskId()); |
|
|
|
bv.setTaskDefKey(busDeliveredApply.getNodeId()); |
|
|
|
bv.setComment(StringUtils.isNotBlank(dto.getComment()) ? dto.getComment() : "重新提交"); |
|
|
|
bv.setInstanceId(dto.getInstanceId()); |
|
|
|
return complete(bv); |
|
|
|
} |
|
|
|
return rb; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 更新流程相关的状态 |
|
|
|
* |
|
|
|
* @param map |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
private int updateFlowFiled(Map<String, Object> map) { |
|
|
|
return baseMapper.updateFlowFiled(map); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 判断提交的流程是否被允许 |
|
|
|
* |
|
|
|
* @param dto |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
private synchronized int submitBusinessData(SubmitDeliveredApplyDto dto, BusDeliveredApply busDeliveredApply) { |
|
|
|
int r = 0; |
|
|
|
if (StringUtils.isBlank(dto.getSid())) { |
|
|
|
r = 1; |
|
|
|
} else { |
|
|
|
if (busDeliveredApply != null) { |
|
|
|
String businessTaskId = busDeliveredApply.getTaskId(); |
|
|
|
if (StringUtils.isBlank(businessTaskId) && StringUtils.isBlank(dto.getTaskId())) { |
|
|
|
//新提交
|
|
|
|
r = 1; |
|
|
|
} else if (StringUtils.isNotBlank(businessTaskId) && businessTaskId.equals(dto.getTaskId())) { |
|
|
|
//二次提交//只有数据一致的时候才能进行下一步
|
|
|
|
r = 2; |
|
|
|
} |
|
|
|
} else { |
|
|
|
r = 3; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
return r; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 办理 |
|
|
|
* |
|
|
|
* @param bv |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public ResultBean complete(BusinessVariables bv) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
BusDeliveredApply busDeliveredApply = fetchBySid(bv.getBusinessSid()); |
|
|
|
if (bv.getTaskId().equals(busDeliveredApply.getTaskId())) { |
|
|
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.handleProsess(bv); |
|
|
|
if (!resultBean.getSuccess()) { |
|
|
|
return rb.setMsg(resultBean.getMsg()); |
|
|
|
} |
|
|
|
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
|
|
|
return rb.success().setData(resultBean.getData()); |
|
|
|
} else { |
|
|
|
return rb.setMsg("操作失败!提交的数据不一致"); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取上一环节 |
|
|
|
* |
|
|
|
* @param query |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public ResultBean<List<GetNodeVo>> getPreviousNodesForReject(GetNodeQuery query) { |
|
|
|
ResultBean<List<GetNodeVo>> rb = new ResultBean<>(); |
|
|
|
BusinessVariables bv = new BusinessVariables(); |
|
|
|
BeanUtil.copyProperties(query, bv); |
|
|
|
bv.setModelId(ProcDefEnum.BUSDELIVEREDAPPLY.getProDefId()); |
|
|
|
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv); |
|
|
|
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
|
|
|
|
List<GetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList()); |
|
|
|
return rb.success().setData(voList); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取下一环节 |
|
|
|
* |
|
|
|
* @param query |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public ResultBean<List<GetNodeVo>> getNextNodesForSubmit(GetNodeQuery query) { |
|
|
|
ResultBean<List<GetNodeVo>> rb = ResultBean.fireFail(); |
|
|
|
BusinessVariables bv = new BusinessVariables(); |
|
|
|
BeanUtil.copyProperties(query, bv); |
|
|
|
bv.setModelId(ProcDefEnum.BUSDELIVEREDAPPLY.getProDefId()); |
|
|
|
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv); |
|
|
|
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
|
|
|
|
List<GetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList()); |
|
|
|
return rb.success().setData(voList); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 驳回任务 |
|
|
|
* |
|
|
|
* @param query |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public ResultBean taskReject(BusDeliveredApplyTaskQuery query) { |
|
|
|
|
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
BusDeliveredApply busDeliveredApply = fetchBySid(query.getBusinessSid()); |
|
|
|
if (busDeliveredApply == null) { |
|
|
|
return rb.setMsg("该申请不存在"); |
|
|
|
} |
|
|
|
String businessTaskId = busDeliveredApply.getTaskId(); |
|
|
|
if (StringUtils.isNotBlank(businessTaskId)) { |
|
|
|
if (businessTaskId.equals(query.getTaskId())) { |
|
|
|
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
|
|
|
BeanUtil.copyProperties(query, flowTaskVo); |
|
|
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.taskReject(flowTaskVo); |
|
|
|
if (!resultBean.getSuccess()) { |
|
|
|
return rb.setMsg(resultBean.getMsg()); |
|
|
|
} |
|
|
|
Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData()); |
|
|
|
//更新业务中的流程相关的参数
|
|
|
|
updateFlowFiled(map); |
|
|
|
return rb.success(); |
|
|
|
} |
|
|
|
} |
|
|
|
return rb.setMsg("操作失败!提交的数据不一致!"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 撤回 |
|
|
|
* |
|
|
|
* @param query |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public ResultBean revokeProcess(BusDeliveredApplyTaskQuery query) { |
|
|
|
|
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
if (StringUtils.isBlank(query.getUserSid())) { |
|
|
|
return rb.setMsg("参数错误:userSid"); |
|
|
|
} |
|
|
|
//根据业务sid查询移库申请
|
|
|
|
BusDeliveredApply busDeliveredApply = fetchBySid(query.getBusinessSid()); |
|
|
|
String businessTaskId = busDeliveredApply.getTaskId(); |
|
|
|
if (StringUtils.isNotBlank(businessTaskId)) { |
|
|
|
if (businessTaskId.equals(query.getTaskId())) { |
|
|
|
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
|
|
|
BeanUtil.copyProperties(query, flowTaskVo); |
|
|
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.revokeProcess(flowTaskVo); |
|
|
|
if (!resultBean.getSuccess()) { |
|
|
|
return rb.setMsg("操作失败!"); |
|
|
|
} |
|
|
|
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
|
|
|
return rb.success().setData(resultBean.getData()); |
|
|
|
} |
|
|
|
} |
|
|
|
return rb.setMsg("操作失败,提交的数据不一致!"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 终止流程 |
|
|
|
* |
|
|
|
* @param query |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public ResultBean breakProcess(BusDeliveredApplyTaskQuery query) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
if (StringUtils.isBlank(query.getInstanceId())) { |
|
|
|
return rb.setMsg("参数错误:instanceId"); |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(query.getUserSid())) { |
|
|
|
return rb.setMsg("参数错误:userSid"); |
|
|
|
} |
|
|
|
BusDeliveredApply busDeliveredApply = fetchBySid(query.getBusinessSid()); |
|
|
|
String businessTaskId = busDeliveredApply.getTaskId(); |
|
|
|
if (StringUtils.isNotBlank(businessTaskId)) { |
|
|
|
if (businessTaskId.equals(query.getTaskId())) { |
|
|
|
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
|
|
|
BeanUtil.copyProperties(query, flowTaskVo); |
|
|
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.breakProcess(flowTaskVo); |
|
|
|
if (!resultBean.getSuccess()) { |
|
|
|
return rb.setMsg(resultBean.getMsg()); |
|
|
|
} |
|
|
|
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
|
|
|
return rb.success().setData(resultBean.getData()); |
|
|
|
} |
|
|
|
} |
|
|
|
return rb.setMsg("操作失败!提交的数据不一致!"); |
|
|
|
} |
|
|
|
} |