|
@@ -69,22 +69,17 @@ public class OrderFlow extends FlowDelegate {
|
|
|
OrderInfoDto dto = submitData.toJavaObject(OrderInfoDto.class);
|
|
|
orderInfoService.edit(dto);
|
|
|
|
|
|
- // 查询委外订单是否存在包材
|
|
|
- Boolean isExist = orderInfoService.isExistOrderSkuBom(businessId);
|
|
|
-
|
|
|
orderInfoService.update(q -> q
|
|
|
.eq(BaseIdPo::getId, businessId)
|
|
|
.set(OrderInfo::getFlowStatus, FlowStatusEnum.PASS.getKey())
|
|
|
// 委外订单不存在包材则直接修改为生产中
|
|
|
- .set(OrderInfo::getStatus, !isExist ? OrderStatusEnum.IN_PRODUCTION.getKey() : OrderStatusEnum.STOCK_PREPARATION.getKey())
|
|
|
+ .set(OrderInfo::getStatus, OrderStatusEnum.IN_PRODUCTION.getKey())
|
|
|
.set(BasePo::getUpdateTime, new Date())
|
|
|
.set(BasePo::getUpdateUser, SecurityUtils.getUserId())
|
|
|
);
|
|
|
|
|
|
- if (!isExist) {
|
|
|
- // 生成生产任务和工单
|
|
|
- productionWorkOrderService.addByOrderId(businessId);
|
|
|
- }
|
|
|
+ // 生成生产任务和工单
|
|
|
+ productionWorkOrderService.addByOrderId(businessId);
|
|
|
|
|
|
orderFlowExampleService.update(q -> q.eq(OrderFlowExample::getOrderId, businessId)
|
|
|
.eq(OrderFlowExample::getFlowId, flowId)
|