|
|
@ -656,6 +656,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
appMap.put("contractId", busDeliveredApply.getContractNo()); |
|
|
|
appMap.put("contract_id", busDeliveredApply.getContractNo()); |
|
|
|
variables.put("app", appMap); |
|
|
|
variables.put("isDanBao","2".equals(busDeliveredApply.getPaymentMethodKey())); |
|
|
|
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery(); |
|
|
|
flowProcessMapQuery.setProDefKey(bv.getModelId()); |
|
|
|
flowProcessMapQuery.setVariables(variables); |
|
|
@ -668,10 +669,9 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
if (!resultBean.getSuccess()) { |
|
|
|
return rb.setMsg(resultBean.getMsg()); |
|
|
|
} |
|
|
|
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
|
|
|
if ("Event_end".equals(resultBean.getData().getTaskDefKey())) { |
|
|
|
baseMapper.updateStateBySid(3, bv.getBusinessSid()); |
|
|
|
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
|
|
|
|
|
|
|
try { |
|
|
|
ThreadFactory namedThreadFactory = new ThreadFactoryBuilder() |
|
|
|
.setNameFormat("demo-pool-%d").build(); |
|
|
@ -1080,9 +1080,25 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
if(StringUtils.isNotBlank(query.getBusinessSid())){ |
|
|
|
BusDeliveredApply busDeliveredApply = fetchBySid(query.getBusinessSid()); |
|
|
|
bv.setModelId(busDeliveredApply.getProcDefId()); |
|
|
|
Map<String,Object> variables = new HashMap<>(); |
|
|
|
//若app移动端有此功能,则传递appMap参数
|
|
|
|
Map<String, Object> appMap = new HashMap<>(); |
|
|
|
//需和移动端沟通业务sid保存的属性具体值:appMap中sid不是固定的。移动端提供具体字段。
|
|
|
|
appMap.put("outboundSid", query.getBusinessSid()); |
|
|
|
appMap.put("contractId", busDeliveredApply.getContractNo()); |
|
|
|
appMap.put("contract_id", busDeliveredApply.getContractNo()); |
|
|
|
variables.put("app", appMap); |
|
|
|
variables.put("isDanBao","2".equals(busDeliveredApply.getPaymentMethodKey())); |
|
|
|
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery(); |
|
|
|
flowProcessMapQuery.setProDefKey(bv.getModelId()); |
|
|
|
flowProcessMapQuery.setVariables(variables); |
|
|
|
flowProcessMapQuery.setContractNo(busDeliveredApply.getContractNo()); |
|
|
|
variables = flowableFeign.getMap(flowProcessMapQuery).getData(); |
|
|
|
bv.setFormVariables(variables); |
|
|
|
}else{ |
|
|
|
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()); |
|
|
@ -1102,6 +1118,21 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
if(StringUtils.isNotBlank(query.getBusinessSid())){ |
|
|
|
BusDeliveredApply busDeliveredApply = fetchBySid(query.getBusinessSid()); |
|
|
|
bv.setModelId(busDeliveredApply.getProcDefId()); |
|
|
|
Map<String,Object> variables = new HashMap<>(); |
|
|
|
//若app移动端有此功能,则传递appMap参数
|
|
|
|
Map<String, Object> appMap = new HashMap<>(); |
|
|
|
//需和移动端沟通业务sid保存的属性具体值:appMap中sid不是固定的。移动端提供具体字段。
|
|
|
|
appMap.put("outboundSid", query.getBusinessSid()); |
|
|
|
appMap.put("contractId", busDeliveredApply.getContractNo()); |
|
|
|
appMap.put("contract_id", busDeliveredApply.getContractNo()); |
|
|
|
variables.put("app", appMap); |
|
|
|
variables.put("isDanBao","2".equals(busDeliveredApply.getPaymentMethodKey())); |
|
|
|
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery(); |
|
|
|
flowProcessMapQuery.setProDefKey(bv.getModelId()); |
|
|
|
flowProcessMapQuery.setVariables(variables); |
|
|
|
flowProcessMapQuery.setContractNo(busDeliveredApply.getContractNo()); |
|
|
|
variables = flowableFeign.getMap(flowProcessMapQuery).getData(); |
|
|
|
bv.setFormVariables(variables); |
|
|
|
}else{ |
|
|
|
bv.setModelId(ProcDefEnum.BUSDELIVEREDAPPLY.getProDefId()); |
|
|
|
} |
|
|
@ -1136,6 +1167,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
appMap.put("contractId", busDeliveredApply.getContractNo()); |
|
|
|
appMap.put("contract_id", busDeliveredApply.getContractNo()); |
|
|
|
variables.put("app", appMap); |
|
|
|
variables.put("isDanBao","2".equals(busDeliveredApply.getPaymentMethodKey())); |
|
|
|
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery(); |
|
|
|
flowProcessMapQuery.setProDefKey(busDeliveredApply.getProcDefId()); |
|
|
|
flowProcessMapQuery.setVariables(variables); |
|
|
@ -1146,7 +1178,6 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
if (!resultBean.getSuccess()) { |
|
|
|
return rb.setMsg(resultBean.getMsg()); |
|
|
|
} |
|
|
|
baseMapper.updateStateBySid(1, query.getBusinessSid()); |
|
|
|
Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData()); |
|
|
|
//更新业务中的流程相关的参数
|
|
|
|
updateFlowFiled(map); |
|
|
@ -1159,6 +1190,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
List<String> vinSidList = busDeliveredApplyDetailsService.selectVinSidByApplySid(query.getBusinessSid()); |
|
|
|
//更新该合同的该车架号的状态为1
|
|
|
|
busDeliveredService.updateStateByContractNo(busDeliveredApply.getContractNo(), vinSidList, 1); |
|
|
|
baseMapper.updateStateBySid(1, query.getBusinessSid()); |
|
|
|
} |
|
|
|
//极光推送
|
|
|
|
UpdateFlowFieldVo ufVo = resultBean.getData(); |
|
|
@ -1208,11 +1240,25 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
if (businessTaskId.equals(query.getTaskId())) { |
|
|
|
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
|
|
|
BeanUtil.copyProperties(query, flowTaskVo); |
|
|
|
Map<String, Object> variables = new HashMap<>(); |
|
|
|
//若app移动端有此功能,则传递appMap参数
|
|
|
|
Map<String, Object> appMap = new HashMap<>(); |
|
|
|
//需和移动端沟通业务sid保存的属性具体值:appMap中sid不是固定的。移动端提供具体字段。
|
|
|
|
appMap.put("outboundSid", query.getBusinessSid()); |
|
|
|
appMap.put("contractId", busDeliveredApply.getContractNo()); |
|
|
|
appMap.put("contract_id", busDeliveredApply.getContractNo()); |
|
|
|
variables.put("app", appMap); |
|
|
|
variables.put("isDanBao","2".equals(busDeliveredApply.getPaymentMethodKey())); |
|
|
|
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery(); |
|
|
|
flowProcessMapQuery.setProDefKey(busDeliveredApply.getProcDefId()); |
|
|
|
flowProcessMapQuery.setVariables(variables); |
|
|
|
flowProcessMapQuery.setContractNo(busDeliveredApply.getContractNo()); |
|
|
|
variables = flowableFeign.getMap(flowProcessMapQuery).getData(); |
|
|
|
flowTaskVo.setValues(variables); |
|
|
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.revokeProcess(flowTaskVo); |
|
|
|
if (!resultBean.getSuccess()) { |
|
|
|
return rb.setMsg("操作失败!"); |
|
|
|
} |
|
|
|
baseMapper.updateStateBySid(1, query.getBusinessSid()); |
|
|
|
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
|
|
|
busDeliveredApply = fetchBySid(query.getBusinessSid()); |
|
|
|
ResultBean<List<LatestTaskVo>> listResultBean = flowTaskFeign.getLatestTasks(busDeliveredApply.getProcInstId()); |
|
|
@ -1223,6 +1269,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
List<String> vinSidList = busDeliveredApplyDetailsService.selectVinSidByApplySid(query.getBusinessSid()); |
|
|
|
//更新该合同的该车架号的状态为1
|
|
|
|
busDeliveredService.updateStateByContractNo(busDeliveredApply.getContractNo(), vinSidList, 1); |
|
|
|
baseMapper.updateStateBySid(1, query.getBusinessSid()); |
|
|
|
} |
|
|
|
|
|
|
|
return rb.success().setData(resultBean.getData()); |
|
|
@ -1836,6 +1883,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
appMap.put("contractId", busDeliveredApply.getContractNo()); |
|
|
|
appMap.put("contract_id", busDeliveredApply.getContractNo()); |
|
|
|
variables.put("app", appMap); |
|
|
|
variables.put("isDanBao","2".equals(busDeliveredApply.getPaymentMethodKey())); |
|
|
|
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery(); |
|
|
|
flowProcessMapQuery.setProDefKey(bv.getModelId()); |
|
|
|
flowProcessMapQuery.setVariables(variables); |
|
|
|