Commit c18f5247 authored by wrc's avatar wrc

订单功能优化-使用新版工作流程

parent d4f1a4cd
......@@ -418,6 +418,36 @@ public class MQConfig {
/******************************************************采购竞价**********************************************************************/
/******************************************************订单**********************************************************************/
/**
* 延时队列交换机
* 注意这里的交换机类型:CustomExchange
*/
@Bean
public CustomExchange delayOrderExchange(){
Map<String, Object> args = new HashMap<>();
args.put("x-delayed-type", "direct");
//设置手动应答模式,消息持久化、死信消息
return new CustomExchange(MessageConstants.CANCEL_ORDER_EXCHANGE,"x-delayed-message",true, false,args);
}
/**
* 延时队列
*/
@Bean
public Queue delayOrderQueue(){
return new Queue(MessageConstants.CANCEL_ORDER_QUEUE,true);
}
/**
* 给延时队列绑定交换机
*/
@Bean
public Binding cfgDelayOrder(Queue delayOrderQueue,CustomExchange delayOrderExchange){
return BindingBuilder.bind(delayOrderQueue).to(delayOrderExchange).with(MessageConstants.CANCEL_ORDER_ROUTINGKEY).noargs();
}
/******************************************************订单**********************************************************************/
/*********************************** 新增/取消合同订单通知 *****************************************/
@Bean
......
......@@ -155,4 +155,12 @@ public class MessageConstants implements Serializable {
public final static String REPORT_SYS_OPERATE_NOTICE_ROUTINGKEY = "report_sys_operate_notice_routingkey";
/**
* 订单-取消订单
*/
public final static String CANCEL_ORDER_QUEUE = "cancel_order_queue";
public final static String CANCEL_ORDER_EXCHANGE = "cancel_order_exchange";
public final static String CANCEL_ORDER_ROUTINGKEY = "cancel_order_routingkey";
}
......@@ -65,4 +65,10 @@ public class TradingRulesAddTwoRequest {
* 电子合同id
*/
private Long electronicContractId;
/**
*订单取消时间
*/
private Long time;
}
......@@ -36,6 +36,10 @@ public class TradingRulesUpdateTwoRequest {
@ApiModelProperty(value = "是否选用电子合同:true.是 false.否",required = true)
private Integer isElectronicContract;
/**
*订单取消时间
*/
private Long time;
@ApiModelProperty(value = "电子合同ID")
......
package com.ssy.lingxi.order.api.enums;
/**
* 订单外部工作流操作枚举
* * @Author: wrc
* @Date: 2020/12/16
*/
public enum OrderExternalEnum {
CANCEL(-1,"取消订单"),
SUBMIT_ORDER(1,"提交订单"),
CONFIRM_ORDER(2,"确认订单"),
CONFIG_ELECTRONIC_CONTRACT(3,"确认电子合同"),
PAY_ORDER(4,"订单支付"),
CONFIRM_PAY_ORDER(5,"确认订单支付"),
ADD_DELIVER_GOODS_ORDER(6,"新建销售发货单"),
ADD_LOGISTICS_ORDER(7,"新建物流单"),
CONFIG_DELIVER_GOODS_ORDER(8,"确认发货"),
ADD_CONFIG_WAREHOUSING_ORDER(9,"新增入库单"),
CONFIRM_RECEIVING_GOODS_ORDER(10,"确认收货"),
CONFIRM_RECEIPT_ORDER(11,"确认回单"),
PAY_ORDER_BALANCE(23,"订单尾款支付"),
CONFIRM_PAY_ORDER_BALANCE(24,"确认尾款支付"),
PLACE_FILE_ORDER(12,"订单归档"),
PLACE_ORDER(13,"订单归档"),
COMPLETE(14,"完成订单"),
NOT_ORDER(20,"不接受订单"),
COMPLETE_NOT_ACCOUNT(21,"确认未到账"),
COMPLETE_NOT_ACCOUNT_BALANCE(25,"确认未到账尾款"),
;
/**
*操作步骤
*/
private Integer step;
/**
*描述
*/
private String details;
OrderExternalEnum() {
}
OrderExternalEnum(Integer step, String details) {
this.step = step;
this.details = details;
}
public Integer getStep() {
return step;
}
public void setStep(Integer step) {
this.step = step;
}
public String getDetails() {
return details;
}
public void setDetails(String details) {
this.details = details;
}
}
//package com.ssy.lingxi.order.config.rabbitmq;
//import org.springframework.amqp.core.*;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//import java.util.HashMap;
//import java.util.Map;
//
//
//@Configuration
//public class TopicRabbitConfig {
// //立即消费的队列名称
// public static final String IMMEDIATE_QUEUE = "queue.order";
// //立即消费的exchange
// public static final String IMMEDIATE_EXCHANGE = "exchange.order";
// //立即消费的routing-key 名称
// public static final String IMMEDIATE_ROUTING_KEY = "routingkey.order";
// //延时消费的队列名称
// public static final String DELAY_QUEUE= "queue.order.delay";
// //延时消费的exchange
// public static final String DEAD_LETTER_EXCHANGE = "exchange.order.delay";
// //延时消费的routing-key名称
// public static final String DELAY_ROUTING_KEY = "routingkey.order.delay";
//
// // 创建一个立即消费队列
// @Bean
// public Queue immediateQueue() {
// // 第一个参数是创建的queue的名字,第二个参数是是否支持持久化
// return new Queue(IMMEDIATE_QUEUE, true);
// }
//
// // 创建一个延时队列
// @Bean
// public Queue delayQueue() {
// Map<String, Object> params = new HashMap<>();
// // x-dead-letter-exchange 声明了队列里的死信转发到的DLX名称,
// params.put("x-dead-letter-exchange", IMMEDIATE_EXCHANGE);
// // x-dead-letter-routing-key 声明了这些死信在转发时携带的 routing-key 名称。
// params.put("x-dead-letter-routing-key", IMMEDIATE_ROUTING_KEY);
// return new Queue(DELAY_QUEUE, true, false, false, params);
// }
//
// //立即消费的exchange
// @Bean
// public DirectExchange immediateExchange() {
// // 一共有三种构造方法,可以只传exchange的名字, 第二种,可以传exchange名字,是否支持持久化,是否可以自动删除,
// //第三种在第二种参数上可以增加Map,Map中可以存放自定义exchange中的参数
// return new DirectExchange(IMMEDIATE_EXCHANGE, true, false);
// }
// //延迟队列的exchange
// @Bean
// public DirectExchange deadLetterExchange() {
// // 一共有三种构造方法,可以只传exchange的名字, 第二种,可以传exchange名字,是否支持持久化,是否可以自动删除,
// // 第三种在第二种参数上可以增加Map,Map中可以存放自定义exchange中的参数
// return new DirectExchange(DEAD_LETTER_EXCHANGE, true, false);
// }
//
// //把立即消费的队列和立即消费的exchange绑定在一起
// @Bean
// public Binding immediateBinding() {
// return BindingBuilder.bind(immediateQueue()).to(immediateExchange()).with(IMMEDIATE_ROUTING_KEY);
// }
//
// //把延时消费的队列和延时消费的exchange绑定在一起
// @Bean
// public Binding delayBinding() {
// return BindingBuilder.bind(delayQueue()).to(deadLetterExchange()).with(DELAY_ROUTING_KEY);
// }
//}
\ No newline at end of file
//package com.ssy.lingxi.order.config.rabbitmq.provider;
//
//import com.fasterxml.jackson.core.JsonProcessingException;
//import com.fasterxml.jackson.databind.ObjectMapper;
//import com.ssy.lingxi.order.api.dto.request.OrderRbbitMqRequest;
//import com.ssy.lingxi.order.config.rabbitmq.TopicRabbitConfig;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.amqp.core.AmqpTemplate;
//import org.springframework.amqp.core.Message;
//import org.springframework.amqp.core.MessageProperties;
//import org.springframework.amqp.rabbit.core.RabbitTemplate;
//import org.springframework.stereotype.Service;
//
//import javax.annotation.Resource;
//
///**
// * 订单发送mq消息类
// *
// * @Author: wrc
// * @Date: 2020/10/22
// */
//@Slf4j
//@Service
//public class RabbitMQProvider {
//
// @Resource
// private RabbitTemplate rabbitTemplate;
// private static ObjectMapper objectMapper = new ObjectMapper();
//
//
// /**
// * 发送延时消息
// */
// public boolean send(OrderRbbitMqRequest message) {
// if (null == message.getExpirationTime()) {
// message.setExpirationTime(1L);
// }
// String strJson = null;
// try {
// strJson = objectMapper.writeValueAsString(message);
// } catch (JsonProcessingException e) {
// log.error("json转换异常", e);
// }
// MessageProperties props = new MessageProperties();
// //消息的延迟时间
// props.setExpiration(Long.toString(message.getExpirationTime() * 1000));
// Message ttlMessage = new Message(strJson.getBytes(), props);
// rabbitTemplate.convertAndSend(TopicRabbitConfig.DEAD_LETTER_EXCHANGE, TopicRabbitConfig.DELAY_ROUTING_KEY, ttlMessage);
// return true;
// }
//
//
// /**
// * 发送信息
// * exchange 交换机
// * routingKey 路由键
// * obj 消息体
// */
// public void sendMsg(String exchange, String routingKey, Object obj) {
// //发送信息到MQ
// rabbitTemplate.convertAndSend(exchange, routingKey, obj);
// }
//
//
//}
\ No newline at end of file
package com.ssy.lingxi.order.config.rabbitmq.provider;
import com.ssy.lingxi.order.api.dto.request.OrderRbbitMqRequest;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
/**
*延时消息生产者
*/
@Slf4j
@Service
public class RabbitMQProvider {
private RabbitTemplate rabbitTemplate;
public RabbitMQProvider(RabbitTemplate rabbitTemplate) {
this.rabbitTemplate = rabbitTemplate;
}
/**
*发送延时消息
*/
public void sendDelayMessage(OrderRbbitMqRequest request, String exchange, String key) {
log.info("发送时间:{},发送内容:{}", LocalDateTime.now(), request.toString());
this.rabbitTemplate.convertAndSend(
exchange,
key,
request,
message -> {
//注意这里时间可以使long,而且是设置header
message.getMessageProperties().setHeader("x-delay",request.getExpirationTime()-System.currentTimeMillis()-2);
return message;
}
);
}
}
\ No newline at end of file
......@@ -85,4 +85,10 @@ public class TradingRulesTwoDO implements Serializable {
*/
@Column
private Integer type;
/**
*订单取消时间
*/
private Long time;
}
......@@ -23,7 +23,7 @@ public interface OrderWorkStrategy {
/**
* 新增采购单
*/
Wrapper<ProcurementOrderAddResponse> procurementOrderAdd(ProcurementOrderAddRequest request, UserLoginCacheDTO sysUser);
Wrapper<ProcurementOrderAddResponse> procurementOrderAdd(Long time,ProcurementOrderAddRequest request, UserLoginCacheDTO sysUser);
/**
*确认支付结果
*/
......
......@@ -34,6 +34,7 @@ import com.ssy.lingxi.workflow.api.model.contant.ProcessEnum;
import com.ssy.lingxi.workflow.api.model.vo.CompleteTaskVO;
import com.ssy.lingxi.workflow.api.model.vo.ProcessStartVO;
import com.ssy.lingxi.workflow.api.model.vo.TaskResultVO;
import com.ssy.lingxi.workflow.api.model.vo.response.SimpleTaskCompleteVO;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
......@@ -399,7 +400,7 @@ public class SaleOrderServiceImpl extends BaseSaleOrder implements SaleOrderServ
procurementOrder.setInteriorState(OrderConstant.State.STOP);
}
procurementOrder.setSignatureLogId(procurementOrder.getSignatureLogId());
Wrapper<TaskResultVO> taskResult = executeWork(procurementOrder,isDelivery?OrderConstant.Auditing.PASS:OrderConstant.Auditing.TWO);
Wrapper<SimpleTaskCompleteVO> taskResult = executeWork(procurementOrder,isDelivery?OrderConstant.Auditing.PASS:OrderConstant.Auditing.TWO);
if (ResponseCode.SUCCESS.getCode() != taskResult.getCode()) {
throw new RuntimeException(taskResult.getMessage());
}
......@@ -439,7 +440,7 @@ public class SaleOrderServiceImpl extends BaseSaleOrder implements SaleOrderServ
//不通过增加待提交订单列表
reduceCount(procurementOrder.getOrderThe(), procurementOrder.getCreateMemberId(), procurementOrder.getCreateRoleId(), OperateDataSourceEnum.TRADE_PURCHASE_ORDER.getCode(), 1L, PurchaseOrderOperateTypeEnum.TO_BE_VALIFY_COMMIT.getCode(), 0L, 0);
sendSystemMessagePur(procurementOrder, MessageTemplateCode.procurement_order_audit_result);
Wrapper<TaskResultVO> taskResult = executeWork(procurementOrder, request.getState());
Wrapper<SimpleTaskCompleteVO> taskResult = executeWork(procurementOrder, request.getState());
if (ResponseCode.SUCCESS.getCode() != taskResult.getCode()) {
return taskResult;
}
......@@ -518,10 +519,10 @@ public class SaleOrderServiceImpl extends BaseSaleOrder implements SaleOrderServ
procurementOrder.setInteriorState(OrderConstant.ProcurementOrderInteriorState.PAY_ORDER);
procurementOrder.setPurchaseOrderInteriorState(OrderConstant.PurchaseOrderInteriorState.THE_PAYMENT_RESULT_DIDN_ARRIVE);
paymentInformationRepository.saveAndFlush(paymentInformation);
Wrapper<TaskResultVO> wrapper = auditExterior(isOnePay ? OrderExternalStepEnum.CONFIRM_PAY_ORDER.getStep() : OrderExternalStepEnum.CONFIRM_PAY_ORDER_BALANCE.getStep(), sysUser, procurementOrder, OrderConstant.Auditing.NOT_GO, OrderExternalStateEnum.CONFIRMATION_OF_NON_RECEIPT);
Wrapper<SimpleTaskCompleteVO> wrapper = auditExterior(isOnePay ? OrderExternalStepEnum.CONFIRM_PAY_ORDER.getStep() : OrderExternalStepEnum.CONFIRM_PAY_ORDER_BALANCE.getStep(), sysUser, procurementOrder, OrderConstant.Auditing.NOT_GO, OrderExternalStateEnum.CONFIRMATION_OF_NON_RECEIPT);
if (!ProcessEnum.PURCHASE_ORDER_PURCHASE_ADD_ORDER.getCode().equals(procurementOrder.getProcessEnum())) {
//记录未到账内部记录
InteriorPurchaseOrderLog interiorPurchaseOrderLog = initializeTransactionsInterior(wrapper.getData().getNextStep(), sysUser, procurementOrder.getId(), "确认未到账", PurchaseOrderInteriorStateEnum.NOT_ORDER_UPDATE);
InteriorPurchaseOrderLog interiorPurchaseOrderLog = initializeTransactionsInterior(wrapper.getData().getStep(), sysUser, procurementOrder.getId(), "确认未到账", PurchaseOrderInteriorStateEnum.NOT_ORDER_UPDATE);
interiorPurchaseOrderLogRepository.saveAndFlush(interiorPurchaseOrderLog);
}
return wrapper;
......@@ -851,7 +852,7 @@ public class SaleOrderServiceImpl extends BaseSaleOrder implements SaleOrderServ
procurementOrder.setInteriorState(OrderConstant.ProcurementOrderInteriorState.ORDER_WAREHOUSING);
procurementOrder.setPurchaseOrderInteriorState(OrderConstant.PurchaseOrderInteriorState.SHIPMENT_CONFIRMED);
//执行外部工作流
Wrapper<TaskResultVO> wrapper = auditExterior(OrderExternalStepEnum.CONFIG_DELIVER_GOODS_ORDER.getStep(), sysUser, procurementOrder, OrderConstant.Auditing.DEFAULT, OrderExternalStateEnum.ORDER_DELIVERY_CONFIRMATION_NOT);
Wrapper<SimpleTaskCompleteVO> wrapper = auditExterior(OrderExternalStepEnum.CONFIG_DELIVER_GOODS_ORDER.getStep(), sysUser, procurementOrder, OrderConstant.Auditing.DEFAULT, OrderExternalStateEnum.ORDER_DELIVERY_CONFIRMATION_NOT);
if (ResponseCode.SUCCESS.getCode() != wrapper.getCode()) {
return wrapper;
}
......@@ -888,7 +889,7 @@ public class SaleOrderServiceImpl extends BaseSaleOrder implements SaleOrderServ
procurementOrder.setInteriorState(OrderConstant.ProcurementOrderInteriorState.MANUAL_RECEIPT);
procurementOrder.setPurchaseOrderInteriorState(OrderConstant.PurchaseOrderInteriorState.DELIVERED_MANUALLY);
//执行外部工作流
Wrapper<TaskResultVO> wrapper = auditExterior(OrderExternalStepEnum.CONFIG_DELIVER_GOODS_ORDER.getStep(), sysUser, procurementOrder, OrderConstant.Auditing.DEFAULT, OrderExternalStateEnum.MANUAL_CONFIRMATION_SHIPMENT);
Wrapper<SimpleTaskCompleteVO> wrapper = auditExterior(OrderExternalStepEnum.CONFIG_DELIVER_GOODS_ORDER.getStep(), sysUser, procurementOrder, OrderConstant.Auditing.DEFAULT, OrderExternalStateEnum.MANUAL_CONFIRMATION_SHIPMENT);
if (ResponseCode.SUCCESS.getCode() != wrapper.getCode()) {
return wrapper;
}
......@@ -951,7 +952,7 @@ public class SaleOrderServiceImpl extends BaseSaleOrder implements SaleOrderServ
ProcurementOrder procurementOrder = procurementOrderOptional.get();
procurementOrder.setPurchaseOrderInteriorState(OrderConstant.PurchaseOrderInteriorState.ORDER_SALES_INVOICE_CREATION);
//执行工作流回到发货流程
Wrapper<TaskResultVO> wrapper = auditExterior(OrderExternalStepEnum.CONFIRM_RECEIPT_ORDER.getStep(), sysUser, procurementOrder, OrderConstant.Auditing.NOT_GO, OrderExternalStateEnum.CONFIRM_RECEIPT_ADD_SALES_INVOICE);
Wrapper<SimpleTaskCompleteVO> wrapper = auditExterior(OrderExternalStepEnum.CONFIRM_RECEIPT_ORDER.getStep(), sysUser, procurementOrder, OrderConstant.Auditing.NOT_GO, OrderExternalStateEnum.CONFIRM_RECEIPT_ADD_SALES_INVOICE);
if (ResponseCode.SUCCESS.getCode() != wrapper.getCode()) {
return wrapper;
}
......@@ -1039,7 +1040,7 @@ public class SaleOrderServiceImpl extends BaseSaleOrder implements SaleOrderServ
InteriorPurchaseOrderLog interiorPurchaseOrderLog = initializeTransactionsInterior(PurchaseOrderInteriorStateEnum.ORDER_PAY_SUCCESS.getState(), sysUser, procurementOrder.getId(), "", PurchaseOrderInteriorStateEnum.ORDER_PAY_SUCCESS);
interiorPurchaseOrderLogRepository.save(interiorPurchaseOrderLog);
//执行外部工作流
Wrapper<TaskResultVO> wrapper = auditExterior(OrderExternalStepEnum.CONFIRM_RECEIPT_ORDER.getStep(), sysUser, procurementOrder, OrderConstant.Auditing.PASS, equals ? OrderExternalStateEnum.STAY_PAY : OrderExternalStateEnum.CONFIRM_RECEIPT);
Wrapper<SimpleTaskCompleteVO> wrapper = auditExterior(OrderExternalStepEnum.CONFIRM_RECEIPT_ORDER.getStep(), sysUser, procurementOrder, OrderConstant.Auditing.PASS, equals ? OrderExternalStateEnum.STAY_PAY : OrderExternalStateEnum.CONFIRM_RECEIPT);
if (ResponseCode.SUCCESS.getCode() != wrapper.getCode()) {
throw new BusinessException(ResponseCode.ORDER_WORK_ERROR);
}
......@@ -1083,7 +1084,7 @@ public class SaleOrderServiceImpl extends BaseSaleOrder implements SaleOrderServ
procurementOrder.setInteriorState(OrderConstant.ProcurementOrderInteriorState.ORDER_FILING);
procurementOrder.setPurchaseOrderInteriorState(OrderConstant.PurchaseOrderInteriorState.FILED);
//执行外部工作流
Wrapper<TaskResultVO> wrapper = auditExterior(OrderExternalStepEnum.PLACE_FILE_ORDER.getStep(), sysUser, procurementOrder, OrderConstant.Auditing.DEFAULT, OrderExternalStateEnum.STAY_FILE_ORDER);
Wrapper<SimpleTaskCompleteVO> wrapper = auditExterior(OrderExternalStepEnum.PLACE_FILE_ORDER.getStep(), sysUser, procurementOrder, OrderConstant.Auditing.DEFAULT, OrderExternalStateEnum.STAY_FILE_ORDER);
reduceCount(procurementOrder.getOrderThe(), procurementOrder.getSupplyMembersId(), procurementOrder.getSupplyMembersRoleId(), OperateDataSourceEnum.TRADE_SALE_ORDER.getCode(), 0L, 0, 1L, SaleOrderOperateTypeEnum.TO_BE_ARCHIVE.getCode());
reduceCount(procurementOrder.getOrderThe(), procurementOrder.getCreateMemberId(), procurementOrder.getCreateRoleId(), OperateDataSourceEnum.TRADE_PURCHASE_ORDER.getCode(), 1L, PurchaseOrderOperateTypeEnum.TO_BE_ARCHIVE.getCode(), 0L, 0);
sendSystemMessagePur(procurementOrder, MessageTemplateCode.procurement_order_archive);
......@@ -1158,7 +1159,7 @@ public class SaleOrderServiceImpl extends BaseSaleOrder implements SaleOrderServ
procurementOrder.setPurchaseOrderInteriorState(OrderConstant.PurchaseOrderInteriorState.FILED);
procurementOrderRepository.saveAndFlush(procurementOrder);
//执行外部工作流
Wrapper<TaskResultVO> wrapper = auditExterior(OrderExternalStepEnum.PLACE_FILE_ORDER.getStep(), sysUser, procurementOrder, OrderConstant.Auditing.DEFAULT, OrderExternalStateEnum.FILE_ORDER);
Wrapper<SimpleTaskCompleteVO> wrapper = auditExterior(OrderExternalStepEnum.PLACE_FILE_ORDER.getStep(), sysUser, procurementOrder, OrderConstant.Auditing.DEFAULT, OrderExternalStateEnum.FILE_ORDER);
if (ResponseCode.SUCCESS.getCode() != wrapper.getCode()) {
return wrapper;
}
......
......@@ -18,6 +18,7 @@ import com.ssy.lingxi.order.serviceimpl.BasePurchaseOrder;
import com.ssy.lingxi.report.api.enums.OperateDataSourceEnum;
import com.ssy.lingxi.report.api.enums.SaleOrderOperateTypeEnum;
import com.ssy.lingxi.workflow.api.model.vo.TaskResultVO;
import com.ssy.lingxi.workflow.api.model.vo.response.SimpleTaskCompleteVO;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
......@@ -57,7 +58,7 @@ public class OrderLogisticsServiceImpl extends BasePurchaseOrder implements Orde
orderDeliveryDetailsRepository.saveAndFlush(orderDeliveryDetails);
reduceCount(procurementOrder.getOrderThe(),procurementOrder.getSupplyMembersId(),procurementOrder.getSupplyMembersRoleId(),OperateDataSourceEnum.TRADE_SALE_ORDER.getCode(),1L,SaleOrderOperateTypeEnum.TO_BE_ADD_LOGISTICS.getCode(),1L,SaleOrderOperateTypeEnum.TO_BE_ADD_DELIVERY_GOODS.getCode());
sendSystemMessageSale(procurementOrder, MessageTemplateCode.sell_order_logistics);
Wrapper<TaskResultVO> taskResult = executeWork(procurementOrder,OrderConstant.Auditing.PASS);
Wrapper<SimpleTaskCompleteVO> taskResult = executeWork(procurementOrder,OrderConstant.Auditing.PASS);
if (ResponseCode.SUCCESS.getCode() != taskResult.getCode()) {
return taskResult;
}
......
......@@ -18,6 +18,7 @@ import com.ssy.lingxi.order.serviceimpl.BasePurchaseOrder;
import com.ssy.lingxi.report.api.enums.OperateDataSourceEnum;
import com.ssy.lingxi.report.api.enums.SaleOrderOperateTypeEnum;
import com.ssy.lingxi.workflow.api.model.vo.TaskResultVO;
import com.ssy.lingxi.workflow.api.model.vo.response.SimpleTaskCompleteVO;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
......@@ -62,7 +63,7 @@ public class OrderSelfRaisingServiceImpl extends BasePurchaseOrder implements Or
reduceCount(procurementOrder.getOrderThe(),procurementOrder.getSupplyMembersId(), procurementOrder.getSupplyMembersRoleId(), OperateDataSourceEnum.TRADE_SALE_ORDER.getCode(), 1L, SaleOrderOperateTypeEnum.TO_BE_CONFIRM_DELIVERY_GOODS.getCode(), 1L, SaleOrderOperateTypeEnum.TO_BE_ADD_DELIVERY_GOODS.getCode());
sendSystemMessageSale(procurementOrder, MessageTemplateCode.sell_order_shipment_confirm);
orderDeliveryDetailsRepository.saveAndFlush(orderDeliveryDetails);
Wrapper<TaskResultVO> taskResult = executeWork(procurementOrder,OrderConstant.Auditing.NOT_GO);
Wrapper<SimpleTaskCompleteVO> taskResult = executeWork(procurementOrder,OrderConstant.Auditing.NOT_GO);
if (ResponseCode.SUCCESS.getCode() != taskResult.getCode()) {
return taskResult;
}
......
......@@ -28,6 +28,7 @@ import com.ssy.lingxi.pay.api.feign.IAssetAccountFeign;
import com.ssy.lingxi.report.api.enums.OperateDataSourceEnum;
import com.ssy.lingxi.report.api.enums.PurchaseOrderOperateTypeEnum;
import com.ssy.lingxi.workflow.api.model.vo.TaskResultVO;
import com.ssy.lingxi.workflow.api.model.vo.response.SimpleTaskCompleteVO;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
......@@ -129,7 +130,7 @@ public class OrderBalancePayStrategyImpl extends BasePurchaseOrder implements Or
//增加待支付列表
reduceCount(procurementOrder.getOrderThe(), procurementOrder.getCreateMemberId(), procurementOrder.getCreateRoleId(), OperateDataSourceEnum.TRADE_PURCHASE_ORDER.getCode(), 1L, PurchaseOrderOperateTypeEnum.TO_BE_PAY.getCode(), 0l, 0);
sendSystemMessagePur(procurementOrder, MessageTemplateCode.procurement_order_payment);
Wrapper<TaskResultVO> taskResult = executeWork(procurementOrder,OrderConstant.Auditing.TWO);
Wrapper<SimpleTaskCompleteVO> taskResult = executeWork(procurementOrder,OrderConstant.Auditing.TWO);
if (ResponseCode.SUCCESS.getCode() != taskResult.getCode()) {
return taskResult;
}
......@@ -142,7 +143,7 @@ public class OrderBalancePayStrategyImpl extends BasePurchaseOrder implements Or
reduceCount(procurementOrder.getOrderThe(), procurementOrder.getCreateMemberId(), procurementOrder.getCreateRoleId(), OperateDataSourceEnum.TRADE_PURCHASE_ORDER.getCode(), 1L, PurchaseOrderOperateTypeEnum.TO_BE_CONFIRM_CONTRACT.getCode(), 0l, 0);
procurementOrder.setSignatureLogId(request.getSignatureLogId());
sendSystemMessagePur(procurementOrder,MessageTemplateCode.procurement_order_contract);
Wrapper<TaskResultVO> taskResult = executeWork(procurementOrder,request.getState());
Wrapper<SimpleTaskCompleteVO> taskResult = executeWork(procurementOrder,request.getState());
if (ResponseCode.SUCCESS.getCode() != taskResult.getCode()) {
return taskResult;
}
......
......@@ -26,6 +26,7 @@ import com.ssy.lingxi.order.serviceimpl.saleorder.OrderFactoryForStrategy;
import com.ssy.lingxi.report.api.enums.OperateDataSourceEnum;
import com.ssy.lingxi.report.api.enums.SaleOrderOperateTypeEnum;
import com.ssy.lingxi.workflow.api.model.vo.TaskResultVO;
import com.ssy.lingxi.workflow.api.model.vo.response.SimpleTaskCompleteVO;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
......@@ -112,7 +113,7 @@ public class OrderCashOnDeliveryStrategyImpl extends BasePurchaseOrder implement
sendSystemMessageSale(procurementOrder, MessageTemplateCode.sell_order_shipment);
request.setState(OrderConstant.Auditing.THREE);
}
Wrapper<TaskResultVO> taskResult = executeWork(procurementOrder,request.getState());
Wrapper<SimpleTaskCompleteVO> taskResult = executeWork(procurementOrder,request.getState());
if (ResponseCode.SUCCESS.getCode() != taskResult.getCode()) {
return taskResult;
}
......
......@@ -29,6 +29,7 @@ import com.ssy.lingxi.pay.api.model.vo.response.CreditPayResponseVO;
import com.ssy.lingxi.report.api.enums.OperateDataSourceEnum;
import com.ssy.lingxi.report.api.enums.PurchaseOrderOperateTypeEnum;
import com.ssy.lingxi.workflow.api.model.vo.TaskResultVO;
import com.ssy.lingxi.workflow.api.model.vo.response.SimpleTaskCompleteVO;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
......@@ -126,7 +127,7 @@ public class OrderCreditLinePayStrategyImpl extends BasePurchaseOrder implements
//增加待支付列表
sendSystemMessagePur(procurementOrder, MessageTemplateCode.procurement_order_payment);
reduceCount(procurementOrder.getOrderThe(), procurementOrder.getCreateMemberId(), procurementOrder.getCreateRoleId(), OperateDataSourceEnum.TRADE_PURCHASE_ORDER.getCode(), 1L, PurchaseOrderOperateTypeEnum.TO_BE_PAY.getCode(), 0l, 0);
Wrapper<TaskResultVO> taskResult = executeWork(procurementOrder, OrderConstant.Auditing.TWO);
Wrapper<SimpleTaskCompleteVO> taskResult = executeWork(procurementOrder, OrderConstant.Auditing.TWO);
if (ResponseCode.SUCCESS.getCode() != taskResult.getCode()) {
return taskResult;
}
......@@ -139,7 +140,7 @@ public class OrderCreditLinePayStrategyImpl extends BasePurchaseOrder implements
sendSystemMessagePur(procurementOrder, MessageTemplateCode.procurement_order_contract);
reduceCount(procurementOrder.getOrderThe(), procurementOrder.getCreateMemberId(), procurementOrder.getCreateRoleId(), OperateDataSourceEnum.TRADE_PURCHASE_ORDER.getCode(), 1L, PurchaseOrderOperateTypeEnum.TO_BE_CONFIRM_CONTRACT.getCode(), 0l, 0);
procurementOrder.setSignatureLogId(request.getSignatureLogId());
Wrapper<TaskResultVO> taskResult = executeWork(procurementOrder, request.getState());
Wrapper<SimpleTaskCompleteVO> taskResult = executeWork(procurementOrder, request.getState());
if (ResponseCode.SUCCESS.getCode() != taskResult.getCode()) {
return taskResult;
}
......
......@@ -27,6 +27,7 @@ import com.ssy.lingxi.report.api.enums.OperateDataSourceEnum;
import com.ssy.lingxi.report.api.enums.PurchaseOrderOperateTypeEnum;
import com.ssy.lingxi.report.api.enums.SaleOrderOperateTypeEnum;
import com.ssy.lingxi.workflow.api.model.vo.TaskResultVO;
import com.ssy.lingxi.workflow.api.model.vo.response.SimpleTaskCompleteVO;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
......@@ -128,7 +129,7 @@ public class OrderIntegralPayStrategyImpl extends BasePurchaseOrder implements O
//增加待支付列表
reduceCount(procurementOrder.getOrderThe(), procurementOrder.getCreateMemberId(), procurementOrder.getCreateRoleId(), OperateDataSourceEnum.TRADE_PURCHASE_ORDER.getCode(), 1L, PurchaseOrderOperateTypeEnum.TO_BE_PAY.getCode(), 0l, 0);
sendSystemMessagePur(procurementOrder, MessageTemplateCode.procurement_order_payment);
Wrapper<TaskResultVO> taskResult = executeWork(procurementOrder,OrderConstant.Auditing.TWO);
Wrapper<SimpleTaskCompleteVO> taskResult = executeWork(procurementOrder,OrderConstant.Auditing.TWO);
if (ResponseCode.SUCCESS.getCode() != taskResult.getCode()) {
return taskResult;
}
......@@ -142,7 +143,7 @@ public class OrderIntegralPayStrategyImpl extends BasePurchaseOrder implements O
sendSystemMessagePur(procurementOrder, MessageTemplateCode.procurement_order_contract);
reduceCount(procurementOrder.getOrderThe(), procurementOrder.getCreateMemberId(), procurementOrder.getCreateRoleId(), OperateDataSourceEnum.TRADE_PURCHASE_ORDER.getCode(), 1L, PurchaseOrderOperateTypeEnum.TO_BE_CONFIRM_CONTRACT.getCode(), 0l, 0);
procurementOrder.setSignatureLogId(request.getSignatureLogId());
Wrapper<TaskResultVO> taskResult = executeWork(procurementOrder,request.getState());
Wrapper<SimpleTaskCompleteVO> taskResult = executeWork(procurementOrder,request.getState());
if (ResponseCode.SUCCESS.getCode() != taskResult.getCode()) {
return taskResult;
}
......
......@@ -24,6 +24,7 @@ import com.ssy.lingxi.report.api.enums.SaleOrderOperateTypeEnum;
import com.ssy.lingxi.workflow.api.feign.TaskExecuteControllerFeign;
import com.ssy.lingxi.workflow.api.model.vo.CompleteTaskVO;
import com.ssy.lingxi.workflow.api.model.vo.TaskResultVO;
import com.ssy.lingxi.workflow.api.model.vo.response.SimpleTaskCompleteVO;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
......@@ -119,7 +120,7 @@ public class OrderOfflinePayOnlineConfirmationStrategyImpl extends BasePurchaseO
//增加待支付列表
reduceCount(procurementOrder.getOrderThe(),procurementOrder.getCreateMemberId(), procurementOrder.getCreateRoleId(), OperateDataSourceEnum.TRADE_PURCHASE_ORDER.getCode(), 1L, PurchaseOrderOperateTypeEnum.TO_BE_PAY.getCode(), 0l, 0);
sendSystemMessagePur(procurementOrder, MessageTemplateCode.procurement_order_payment);
Wrapper<TaskResultVO> taskResult = executeWork(procurementOrder,OrderConstant.Auditing.TWO);
Wrapper<SimpleTaskCompleteVO> taskResult = executeWork(procurementOrder,OrderConstant.Auditing.TWO);
if (ResponseCode.SUCCESS.getCode() != taskResult.getCode()) {
return taskResult;
}
......@@ -133,7 +134,7 @@ public class OrderOfflinePayOnlineConfirmationStrategyImpl extends BasePurchaseO
sendSystemMessagePur(procurementOrder,MessageTemplateCode.procurement_order_contract);
reduceCount(procurementOrder.getOrderThe(),procurementOrder.getCreateMemberId(), procurementOrder.getCreateRoleId(), OperateDataSourceEnum.TRADE_PURCHASE_ORDER.getCode(), 1L, PurchaseOrderOperateTypeEnum.TO_BE_CONFIRM_CONTRACT.getCode(), 0l, 0);
procurementOrder.setSignatureLogId(request.getSignatureLogId());
Wrapper<TaskResultVO> taskResult = executeWork(procurementOrder,request.getState());
Wrapper<SimpleTaskCompleteVO> taskResult = executeWork(procurementOrder,request.getState());
if (ResponseCode.SUCCESS.getCode() != taskResult.getCode()) {
return taskResult;
}
......
......@@ -29,6 +29,7 @@ import com.ssy.lingxi.pay.api.feign.IWeChatPayFeign;
import com.ssy.lingxi.report.api.enums.OperateDataSourceEnum;
import com.ssy.lingxi.report.api.enums.PurchaseOrderOperateTypeEnum;
import com.ssy.lingxi.workflow.api.model.vo.TaskResultVO;
import com.ssy.lingxi.workflow.api.model.vo.response.SimpleTaskCompleteVO;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
......@@ -102,7 +103,7 @@ public class OrderWeixinStrategyImpl extends BasePurchaseOrder implements OrderP
//增加待支付列表
reduceCount(procurementOrder.getOrderThe(),procurementOrder.getCreateMemberId(), procurementOrder.getCreateRoleId(), OperateDataSourceEnum.TRADE_PURCHASE_ORDER.getCode(), 1L, PurchaseOrderOperateTypeEnum.TO_BE_PAY.getCode(), 0l, 0);
sendSystemMessagePur(procurementOrder, MessageTemplateCode.procurement_order_payment);
Wrapper<TaskResultVO> taskResult = executeWork(procurementOrder,OrderConstant.Auditing.TWO);
Wrapper<SimpleTaskCompleteVO> taskResult = executeWork(procurementOrder,OrderConstant.Auditing.TWO);
if (ResponseCode.SUCCESS.getCode() != taskResult.getCode()) {
return taskResult;
}
......@@ -115,7 +116,7 @@ public class OrderWeixinStrategyImpl extends BasePurchaseOrder implements OrderP
reduceCount(procurementOrder.getOrderThe(),procurementOrder.getCreateMemberId(), procurementOrder.getCreateRoleId(), OperateDataSourceEnum.TRADE_PURCHASE_ORDER.getCode(), 1L, PurchaseOrderOperateTypeEnum.TO_BE_CONFIRM_CONTRACT.getCode(), 0l, 0);
sendSystemMessagePur(procurementOrder, MessageTemplateCode.procurement_order_contract);
procurementOrder.setSignatureLogId(request.getSignatureLogId());
Wrapper<TaskResultVO> taskResult = executeWork(procurementOrder,request.getState());
Wrapper<SimpleTaskCompleteVO> taskResult = executeWork(procurementOrder,request.getState());
if (ResponseCode.SUCCESS.getCode() != taskResult.getCode()) {
return taskResult;
}
......
......@@ -34,6 +34,7 @@ import com.ssy.lingxi.workflow.api.model.vo.ProcessStartVO;
import com.ssy.lingxi.workflow.api.model.vo.TaskResultVO;
import com.ssy.lingxi.workflow.api.model.vo.TaskStepQueryVO;
import com.ssy.lingxi.workflow.api.model.vo.TaskStepVO;
import com.ssy.lingxi.workflow.api.model.vo.response.SimpleTaskCompleteVO;
import org.springframework.beans.BeanUtils;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
......@@ -91,7 +92,7 @@ public class OrderMultiplePayWorkImplStrategy extends BasePurchaseOrder implemen
*/
@Transactional(rollbackFor = Exception.class)
@Override
public Wrapper<ProcurementOrderAddResponse> procurementOrderAdd(ProcurementOrderAddRequest request, UserLoginCacheDTO sysUser) {
public Wrapper<ProcurementOrderAddResponse> procurementOrderAdd(Long time,ProcurementOrderAddRequest request, UserLoginCacheDTO sysUser) {
List<OrderProductRequest> orderProductRequests = request.getOrderProductRequests();
if (!RoleTypeEnum.SERVICE_CONSUMER.getCode().equals(sysUser.getMemberRoleType())) {
return Wrapper.fail(ResponseCode.ORDER_NO_OPERATION_PERMISSION);
......@@ -134,7 +135,7 @@ public class OrderMultiplePayWorkImplStrategy extends BasePurchaseOrder implemen
}
ProcurementOrderAddResponse procurementOrderAddResponse = new ProcurementOrderAddResponse();
//启动外部工作流
Wrapper<TaskResultVO> taskResultVOWrapperExterior = startExterior(request.getProcessEnum(), procurementOrder, sysUser);
Wrapper<SimpleTaskCompleteVO> taskResultVOWrapperExterior = startExterior(request.getProcessEnum(), procurementOrder, sysUser);
//查询工作流是否有多次支付
TaskStepVO taskStepVO = new TaskStepVO();
taskStepVO.setMemberId(sysUser.getMemberId());
......@@ -145,7 +146,7 @@ public class OrderMultiplePayWorkImplStrategy extends BasePurchaseOrder implemen
throw new RuntimeException(listWrapper.getMessage());
}
Map<Integer, TaskStepQueryVO> taskStepQueryVOMap = listWrapper.getData().stream().collect(Collectors.toMap(TaskStepQueryVO::getStep, TaskStepQueryVO -> TaskStepQueryVO));
Integer taskType = taskStepQueryVOMap.get(taskResultVOWrapperExterior.getData().getNextStep()).getTaskType();
Integer taskType = taskStepQueryVOMap.get(taskResultVOWrapperExterior.getData().getStep()).getTaskType();
procurementOrderAddResponse.setOrderId(procurementOrder.getId());
procurementOrderAddResponse.setIsPay(taskType);
//删除进货单里面商品
......@@ -372,9 +373,9 @@ public class OrderMultiplePayWorkImplStrategy extends BasePurchaseOrder implemen
procurementOrder.setInteriorState(OrderConstant.ProcurementOrderInteriorState.ORDER_COMPLETE);
orderConfirmationPaymentResult = OrderExternalStateEnum.ORDER_COMPLETE;
}
Wrapper<TaskResultVO> wrapper = examineSaleExt(sysUser, payCount ? OrderExternalStepEnum.CONFIRM_PAY_ORDER.getStep() : OrderExternalStepEnum.CONFIRM_PAY_ORDER_BALANCE.getStep(), procurementOrder, isDelivery ? OrderConstant.Auditing.TWO : OrderConstant.Auditing.PASS, orderConfirmationPaymentResult);
Wrapper<SimpleTaskCompleteVO> wrapper = examineSaleExt(sysUser, payCount ? OrderExternalStepEnum.CONFIRM_PAY_ORDER.getStep() : OrderExternalStepEnum.CONFIRM_PAY_ORDER_BALANCE.getStep(), procurementOrder, isDelivery ? OrderConstant.Auditing.TWO : OrderConstant.Auditing.PASS, orderConfirmationPaymentResult);
//记录到账内部记录
initPurchaseOrderLog(sysUser, wrapper.getData().getNextStep(), procurementOrder.getId(), PurchaseOrderInteriorStateEnum.SUBMIT_ORDER.getState(), PurchaseOrderInteriorStateEnum.SUBMIT_ORDER.getOperation(), "支付金额:" + paymentInformation.getPayPrice());
initPurchaseOrderLog(sysUser, wrapper.getData().getStep(), procurementOrder.getId(), PurchaseOrderInteriorStateEnum.SUBMIT_ORDER.getState(), PurchaseOrderInteriorStateEnum.SUBMIT_ORDER.getOperation(), "支付金额:" + paymentInformation.getPayPrice());
return wrapper;
}
......
......@@ -37,6 +37,7 @@ import com.ssy.lingxi.workflow.api.feign.TaskExecuteControllerFeign;
import com.ssy.lingxi.workflow.api.model.contant.ProcessEnum;
import com.ssy.lingxi.workflow.api.model.vo.ProcessStartVO;
import com.ssy.lingxi.workflow.api.model.vo.TaskResultVO;
import com.ssy.lingxi.workflow.api.model.vo.response.SimpleTaskCompleteVO;
import org.apache.commons.lang3.concurrent.BasicThreadFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
......@@ -89,7 +90,7 @@ public class OrderPurchaseContractStrategy extends BasePurchaseOrder implements
* 采购合同下单模式
*/
@Override
public Wrapper<ProcurementOrderAddResponse> procurementOrderAdd(ProcurementOrderAddRequest request, UserLoginCacheDTO sysUser) {
public Wrapper<ProcurementOrderAddResponse> procurementOrderAdd(Long time,ProcurementOrderAddRequest request, UserLoginCacheDTO sysUser) {
//计算订单金额 查询合同金额
Double coumtPrice = coumtPrice(request);
//判断金额是否已经超过下单金额
......@@ -128,7 +129,7 @@ public class OrderPurchaseContractStrategy extends BasePurchaseOrder implements
//记录支付总次数
procurementOrder.setSum(0);
//启动外部工作流
Wrapper<TaskResultVO> wrapperExterior = startExterior(request.getProcessEnum(), procurementOrder, sysUser);
Wrapper<SimpleTaskCompleteVO> wrapperExterior = startExterior(request.getProcessEnum(), procurementOrder, sysUser);
if (ResponseCode.SUCCESS.getCode() != wrapperExterior.getCode()) {
throw new RuntimeException(wrapperExterior.getMessage());
}
......
......@@ -63,6 +63,13 @@ public class ProcessConfig {
"after_sale_return_goods_contract_manual_delivery_ext",
"after_sale_return_goods_outer_verify_ext",
"after_sale_return_goods_manual_delivery_ext",
"purchase_order_inner_verify",
"purchase_order_sale_inner_verify",
"purchase_order_purchase_add_order_ext",
"purchase_order_outer_verify_repeat_pay_delivery_ext",
"purchase_order_outer_verify_one_ext",
"purchase_order_outer_verify_two_ext",
//"purchase_invite_tender"
"member_appraisal_verify"
).collect(Collectors.toList());
......
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
......@@ -2,6 +2,11 @@
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1h3ih66" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.1.1">
<bpmn:process id="purchase_order_inner_verify" name="采购订单新增订单订单内部流转" isExecutable="true" camunda:versionTag="2.0.0">
<bpmn:startEvent id="StartEvent_1">
<bpmn:extensionElements>
<camunda:properties>
<camunda:property name="status" value="1" />
</camunda:properties>
</bpmn:extensionElements>
<bpmn:outgoing>Flow_0l01w3i</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_0l01w3i" sourceRef="StartEvent_1" targetRef="Activity_1adi0hx" />
......@@ -13,6 +18,13 @@
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_1guoag3" sourceRef="Activity_1hfgqtg" targetRef="Gateway_1i7u2o8" />
<bpmn:sequenceFlow id="Flow_0r691k6" sourceRef="Gateway_1i7u2o8" targetRef="Activity_0queq23">
<bpmn:extensionElements>
<camunda:properties>
<camunda:property name="status" value="3" />
<camunda:property name="desc" value="待审核订单(二级)" />
<camunda:property name="oper" value="审核订单" />
</camunda:properties>
</bpmn:extensionElements>
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{agree ==1}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:exclusiveGateway id="Gateway_1nx805b">
......@@ -22,33 +34,80 @@
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_0ppos6v" sourceRef="Activity_0queq23" targetRef="Gateway_1nx805b" />
<bpmn:sequenceFlow id="Flow_1b7i57q" sourceRef="Gateway_1nx805b" targetRef="Activity_12rvi2p">
<bpmn:extensionElements>
<camunda:properties>
<camunda:property name="status" value="4" />
<camunda:property name="desc" value="待确认订单" />
<camunda:property name="oper" value="审核订单" />
</camunda:properties>
</bpmn:extensionElements>
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{agree ==1}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:endEvent id="Event_1xp323s" name="5">
<bpmn:incoming>Flow_0zpy3gx</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_0zpy3gx" sourceRef="Activity_12rvi2p" targetRef="Event_1xp323s" />
<bpmn:sequenceFlow id="Flow_0v94yah" name="不通过:6" sourceRef="Gateway_1i7u2o8" targetRef="Activity_1adi0hx">
<bpmn:sequenceFlow id="Flow_0v94yah" name="审核不通过" sourceRef="Gateway_1i7u2o8" targetRef="Activity_1adi0hx">
<bpmn:extensionElements>
<camunda:properties>
<camunda:property name="status" value="6" />
<camunda:property name="desc" value="审核不通过(一级)" />
<camunda:property name="oper" value="审核订单" />
</camunda:properties>
</bpmn:extensionElements>
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{agree ==0}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_1t7e7nf" name="审核不通过:7" sourceRef="Gateway_1nx805b" targetRef="Activity_1adi0hx">
<bpmn:sequenceFlow id="Flow_1t7e7nf" name="审核不通过" sourceRef="Gateway_1nx805b" targetRef="Activity_1adi0hx">
<bpmn:extensionElements>
<camunda:properties>
<camunda:property name="status" value="7" />
<camunda:property name="desc" value="审核不通过(二级)" />
<camunda:property name="oper" value="审核订单" />
</camunda:properties>
</bpmn:extensionElements>
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{agree ==0}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:userTask id="Activity_1adi0hx" name="新增订单:1" camunda:assignee="poiv1">
<bpmn:userTask id="Activity_1adi0hx" name="新增订单" camunda:assignee="poiv1">
<bpmn:extensionElements>
<camunda:properties>
<camunda:property name="step" value="1" />
<camunda:property name="status" value="2" />
<camunda:property name="desc" value="待审核订单(一级)" />
<camunda:property name="oper" value="新增订单" />
</camunda:properties>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0l01w3i</bpmn:incoming>
<bpmn:incoming>Flow_0v94yah</bpmn:incoming>
<bpmn:incoming>Flow_1t7e7nf</bpmn:incoming>
<bpmn:outgoing>Flow_0owekgg</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Activity_1hfgqtg" name="审核订单:2" camunda:assignee="poiv2">
<bpmn:userTask id="Activity_1hfgqtg" name="审核订单(一级)" camunda:assignee="poiv2">
<bpmn:extensionElements>
<camunda:properties>
<camunda:property name="step" value="2" />
</camunda:properties>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0owekgg</bpmn:incoming>
<bpmn:outgoing>Flow_1guoag3</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Activity_0queq23" name="审核订单:3" camunda:assignee="poiv3">
<bpmn:userTask id="Activity_0queq23" name="审核订单(二级)" camunda:assignee="poiv3">
<bpmn:extensionElements>
<camunda:properties>
<camunda:property name="step" value="3" />
</camunda:properties>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0r691k6</bpmn:incoming>
<bpmn:outgoing>Flow_0ppos6v</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Activity_12rvi2p" name="提交订单:4" camunda:assignee="poiv4">
<bpmn:userTask id="Activity_12rvi2p" name="提交订单" camunda:assignee="poiv4">
<bpmn:extensionElements>
<camunda:properties>
<camunda:property name="step" value="4" />
<camunda:property name="desc" value="已完成" />
<camunda:property name="status" value="5" />
<camunda:property name="oper" value="确认订单" />
</camunda:properties>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1b7i57q</bpmn:incoming>
<bpmn:outgoing>Flow_0zpy3gx</bpmn:outgoing>
</bpmn:userTask>
......@@ -61,7 +120,7 @@
<di:waypoint x="320" y="80" />
<di:waypoint x="320" y="137" />
<bpmndi:BPMNLabel>
<dc:Bounds x="574" y="62" width="73" height="14" />
<dc:Bounds x="583" y="62" width="56" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0v94yah_di" bpmnElement="Flow_0v94yah">
......@@ -70,7 +129,7 @@
<di:waypoint x="320" y="300" />
<di:waypoint x="320" y="217" />
<bpmndi:BPMNLabel>
<dc:Bounds x="445" y="282" width="50" height="14" />
<dc:Bounds x="443" y="282" width="56" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0zpy3gx_di" bpmnElement="Flow_0zpy3gx">
......
......@@ -115,7 +115,7 @@ public enum ProcessEnum {
/**
* 采购订单 - 订单外部流程复杂模式 22
*/
PURCHASE_ORDER_ONE_OUTER_VERIFY(22, 1, "purchase_order_outer_verify_one", "订单外部流程复杂模式", "poovone", "orderId", 1),
PURCHASE_ORDER_ONE_OUTER_VERIFY(22, 1, "purchase_order_outer_verify_one_ext", "订单外部流程复杂模式", "poovone", "orderId", 1),
/**
* 采购订单 - 销售订单内部审核流程 23
......@@ -125,12 +125,12 @@ public enum ProcessEnum {
/**
* 采购订单 - 订单外部流程简单模式 24
*/
PURCHASE_ORDER_PURCHASE_ADD_ORDER(24, 1, "purchase_order_purchase_add_order", "订单外部流程简单模式", "popao", "orderId", 1),
PURCHASE_ORDER_PURCHASE_ADD_ORDER(24, 1, "purchase_order_purchase_add_order_ext", "订单外部流程简单模式", "popao", "orderId", 1),
/**
* 采购订单 - 订单外部流程多次支付模式 25
*/
PURCHASE_ORDER_OUTER_VERIFY_REPEAT_PAY_DELIVERY(25, 1, "purchase_order_outer_verify_repeat_pay_delivery", "订单外部流程多次支付模式", "poovrpd", "orderId", 1),
PURCHASE_ORDER_OUTER_VERIFY_REPEAT_PAY_DELIVERY(25, 1, "purchase_order_outer_verify_repeat_pay_delivery_ext", "订单外部流程多次支付模式", "poovrpd", "orderId", 1),
/**
* 加工生产外部流转 26
......@@ -199,7 +199,7 @@ public enum ProcessEnum {
/**
* 订单外部流程采购询价合同下单模式 - 42
*/
ORDER_PURCHASE_INQUIRY_CONTRACT(42, 1, "purchase_order_outer_verify_two", "订单外部流程采购询价合同下单模式", "poovt", "orderId", 1),
ORDER_PURCHASE_INQUIRY_CONTRACT(42, 1, "purchase_order_outer_verify_two_ext", "订单外部流程采购询价合同下单模式", "poovt", "orderId", 1),
/**
* 售后退货合同审核流程 - 43
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment