Bläddra i källkod

sku绑定包材取消事业部

24282 1 år sedan
förälder
incheckning
7d73e8adfa

+ 0 - 10
sd-business/src/main/java/com/sd/business/entity/sku/po/SkuSpec.java

@@ -35,16 +35,6 @@ public class SkuSpec extends BasePo {
      */
     private String specImgUrl;
 
-//    /**
-//     * 设计图
-//     */
-//    private String designImgUrl;
-
-//    /**
-//     * 共享文件夹
-//     */
-//    private String sharedFolder;
-
     /**
      * 图稿id
      */

+ 3 - 41
sd-business/src/main/java/com/sd/business/service/sku/impl/SkuServiceImpl.java

@@ -126,8 +126,7 @@ public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements SkuSe
         result.setSkuSpecList(skuSpecList);
 
         // sku规格关联
-        List<SkuSpecLink> skuSpecLinkList = skuSpecLinkService.list(
-                q -> q.eq(SkuSpecLink::getDepartmentId, SecurityUtils.getDeptId()).eq(SkuSpecLink::getSkuId, id));
+        List<SkuSpecLink> skuSpecLinkList = skuSpecLinkService.list(q -> q.eq(SkuSpecLink::getSkuId, id));
 
         // sku规格关联map
         Map<Long, Map<Integer, List<SkuSpecLink>>> map = skuSpecLinkList.stream().collect(
@@ -253,7 +252,6 @@ public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements SkuSe
     public Page<ReplacePackagingMaterialVo> getReplacePackagingMaterialPage(GetReplaceMaterialListDto dto) {
 
         IWrapper<Object> wrapper = IWrapper.getWrapper()
-                .eq("sslt", SkuSpecLink::getDepartmentId, SecurityUtils.getDeptId())
                 .eq("sslt", SkuSpecLink::getType, 1)
                 .eq("s", Sku::getCode, dto.getSkuCode())
                 .like("ss", SkuSpec::getCode, dto.getSkuSpecCode())
@@ -262,19 +260,6 @@ public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements SkuSe
                 .eq("ss", SkuSpec::getWidth, dto.getWidth())
                 .eq("ss", SkuSpec::getHeight, dto.getHeight());
 
-        Long deptId = SecurityUtils.getDeptId();
-        Department department = departmentService.getById(deptId);
-        if (department == null) {
-            throw new ServiceException("非事业部账号无法替换包材");
-        }
-
-        if (StrUtil.isNotBlank(department.getWlnBrand())) {
-            List<String> brandList = Arrays.asList(department.getWlnBrand().split(","));
-            wrapper.in("s", Sku::getBrand, brandList);
-        } else {
-            return new Page<>();
-        }
-
         Page<ReplacePackagingMaterialVo> page = baseMapper.getReplacePackagingMaterialPage(dto.getPage(), wrapper);
         List<ReplacePackagingMaterialVo> records = page.getRecords();
 
@@ -286,7 +271,6 @@ public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements SkuSe
 
         List<SkuSpecLink> skuSpecLinkList = skuSpecLinkService.list(q -> q
                 .in(SkuSpecLink::getSkuSpecId, skuSpecIdList)
-                .eq(SkuSpecLink::getDepartmentId, SecurityUtils.getDeptId())
                 .eq(SkuSpecLink::getType, 1));
 
         Map<Long, List<SkuSpecLink>> map = skuSpecLinkList.stream().collect(Collectors.groupingBy(SkuSpecLink::getSkuSpecId));
@@ -347,7 +331,6 @@ public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements SkuSe
     public void replacePackagingMaterial(ReplacePackagingMaterialDto dto) {
 
         IWrapper<Object> wrapper = IWrapper.getWrapper()
-                .eq("sslt", SkuSpecLink::getDepartmentId, SecurityUtils.getDeptId())
                 .eq("sslt", SkuSpecLink::getType, 1)
                 .eq("s", Sku::getCode, dto.getSkuCode())
                 .like("ss", SkuSpec::getCode, dto.getSkuSpecCode())
@@ -356,19 +339,6 @@ public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements SkuSe
                 .eq("ss", SkuSpec::getWidth, dto.getWidth())
                 .eq("ss", SkuSpec::getHeight, dto.getHeight());
 
-        Long deptId = SecurityUtils.getDeptId();
-        Department department = departmentService.getById(deptId);
-        if (department == null) {
-            throw new ServiceException("非事业部账号无法替换包材");
-        }
-
-        if (StrUtil.isNotBlank(department.getWlnBrand())) {
-            List<String> brandList = Arrays.asList(department.getWlnBrand().split(","));
-            wrapper.in("s", Sku::getBrand, brandList);
-        } else {
-            return;
-        }
-
         List<ReplacePackagingMaterialVo> list = baseMapper.getReplacePackagingMaterialList(wrapper);
 
         if (list.isEmpty()) {
@@ -377,10 +347,8 @@ public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements SkuSe
 
         List<Long> skuSpecIdList = list.stream().map(ReplacePackagingMaterialVo::getSkuSpecId).collect(Collectors.toList());
 
-        List<SkuSpecLink> skuSpecLinkList = skuSpecLinkService.list(q -> q
-                .in(SkuSpecLink::getSkuSpecId, skuSpecIdList)
-                .eq(SkuSpecLink::getDepartmentId, SecurityUtils.getDeptId())
-                .eq(SkuSpecLink::getType, 1));
+        List<SkuSpecLink> skuSpecLinkList = skuSpecLinkService.list(q ->
+                q.in(SkuSpecLink::getSkuSpecId, skuSpecIdList).eq(SkuSpecLink::getType, 1));
 
         Map<Long, List<SkuSpecLink>> map = skuSpecLinkList.stream().collect(Collectors.groupingBy(SkuSpecLink::getSkuSpecId));
 
@@ -407,7 +375,6 @@ public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements SkuSe
                 skuSpecLink.setSkuId(record.getSkuId());
                 skuSpecLink.setSkuSpecId(record.getSkuSpecId());
                 skuSpecLink.setBomSpecId(replaceBomSpecId);
-                skuSpecLink.setDepartmentId(SecurityUtils.getDeptId());
                 skuSpecLink.setType(1);
                 skuSpecLink.setQuantity(BigDecimal.ONE);
                 addOrEditSkuSpecLinkList.add(skuSpecLink);
@@ -439,7 +406,6 @@ public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements SkuSe
                 skuSpecLink.setSkuId(record.getSkuId());
                 skuSpecLink.setSkuSpecId(record.getSkuSpecId());
                 skuSpecLink.setBomSpecId(replaceBomSpecId);
-                skuSpecLink.setDepartmentId(SecurityUtils.getDeptId());
                 skuSpecLink.setType(1);
                 skuSpecLink.setQuantity(BigDecimal.ONE);
                 addOrEditSkuSpecLinkList.add(skuSpecLink);
@@ -470,7 +436,6 @@ public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements SkuSe
 
         skuSpecLinkService.remove(q -> q
                 .eq(SkuSpecLink::getBomSpecId, bomSpec.getId())
-                .eq(SkuSpecLink::getDepartmentId, SecurityUtils.getDeptId())
                 .eq(SkuSpecLink::getType, 1));
 
     }
@@ -546,7 +511,6 @@ public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements SkuSe
 
         skuSpecLinkService.remove(q -> q
                 .eq(SkuSpecLink::getSkuId, skuId)
-                .eq(SkuSpecLink::getDepartmentId, SecurityUtils.getDeptId())
                 .notIn(ObjectUtil.isNotEmpty(skuSpecLinkIdList), BaseIdPo::getId, skuSpecLinkIdList));
 
         List<SkuSpecLink> skuSpecLinkList = createSkuSpecLink(skuSpecDtoList);
@@ -565,7 +529,6 @@ public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements SkuSe
             for (SkuSpecLink skuSpecLink : packagingMaterialList) {
                 skuSpecLink.setSkuId(item.getSkuId());
                 skuSpecLink.setSkuSpecId(item.getId());
-                skuSpecLink.setDepartmentId(SecurityUtils.getDeptId());
                 skuSpecLink.setType(1);
             }
 
@@ -573,7 +536,6 @@ public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements SkuSe
             for (SkuSpecLink skuSpecLink : expressPackingList) {
                 skuSpecLink.setSkuId(item.getSkuId());
                 skuSpecLink.setSkuSpecId(item.getId());
-                skuSpecLink.setDepartmentId(SecurityUtils.getDeptId());
                 skuSpecLink.setType(2);
             }
 

+ 1 - 4
sd-business/src/main/java/com/sd/business/service/sku/impl/SkuSpecServiceImpl.java

@@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.common.core.domain.BaseIdPo;
 import com.ruoyi.common.exception.ServiceException;
-import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.wrapper.IWrapper;
 import com.sd.business.entity.board.dto.SkuSpecQuotationDto;
 import com.sd.business.entity.board.vo.SkuSpecQuotationVo;
@@ -210,9 +209,7 @@ public class SkuSpecServiceImpl extends ServiceImpl<SkuSpecMapper, SkuSpec> impl
         // 获取sku关联的所有bom数据
         List<Long> skuSpecIds = skuSpecList.stream().map(BaseIdPo::getId).collect(Collectors.toList());
         Map<Long, List<SkuSpecLink>> linkMap = skuSpecLinkService.mapKGroup(SkuSpecLink::getSkuSpecId,
-                q -> q.in(SkuSpecLink::getSkuSpecId, skuSpecIds)
-                        .eq(SkuSpecLink::getDepartmentId, department.getId())
-                        .eq(SkuSpecLink::getType, 1));
+                q -> q.in(SkuSpecLink::getSkuSpecId, skuSpecIds).eq(SkuSpecLink::getType, 1));
         Set<Long> bomSpecIds = skuSpecList.stream().map(SkuSpec::getBomSpecId).collect(Collectors.toSet());
         bomSpecIds.addAll(linkMap.values().stream().flatMap(item -> item.stream().map(SkuSpecLink::getBomSpecId)).collect(Collectors.toList()));
         Map<Long, BomSpecBo> bomSpecBoMap = this.getBomSpecBoByIdList(bomSpecIds);

+ 12 - 12
sd-business/src/main/resources/mapper/sku/SkuSpecLinkMapper.xml

@@ -1,19 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.sd.business.mapper.sku.SkuSpecLinkMapper">
+
     <select id="getPage" resultType="com.sd.business.entity.sku.vo.SkuSpecLinkVo">
-        select ssl.id,
-               ssl.sku_id,
-               ssl.sku_spec_id,
-               ssl.bom_spec_id,
-               ssl.department_id,
-               ssl.type,
-               ssl.quantity,
-               ssl.create_user,
-               ssl.create_time,
-               ssl.update_user,
-               ssl.update_time
-        from sku_spec_link ssl
+        select sslt.id,
+               sslt.sku_id,
+               sslt.sku_spec_id,
+               sslt.bom_spec_id,
+               sslt.type,
+               sslt.quantity,
+               sslt.create_user,
+               sslt.create_time,
+               sslt.update_user,
+               sslt.update_time
+        from sku_spec_link sslt
             ${ew.customSqlSegment}
     </select>
 

+ 53 - 0
sd-starter/src/test/java/H1_RemoveSkuLinked.java

@@ -0,0 +1,53 @@
+import com.baomidou.dynamic.datasource.annotation.DSTransactional;
+import com.ruoyi.common.annotation.LogicIgnore;
+import com.ruoyi.common.core.domain.BaseIdPo;
+import com.ruoyi.framework.mybatis.holder.LogicHolder;
+import com.sd.SdApplication;
+import com.sd.business.entity.sku.po.Sku;
+import com.sd.business.entity.sku.po.SkuSpecLink;
+import com.sd.business.service.sku.SkuService;
+import com.sd.business.service.sku.SkuSpecLinkService;
+import lombok.SneakyThrows;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 删除
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SdApplication.class, webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
+public class H1_RemoveSkuLinked {
+
+    private static final Long A9_DEPARTMENT_ID = 1689164611148677121L;
+    @Autowired
+    private SkuService skuService;
+    @Autowired
+    private SkuSpecLinkService skuSpecLinkService;
+
+    @LogicIgnore
+    @SneakyThrows
+    @DSTransactional
+    @Test
+    public void test() {
+        LogicHolder.setLogicHolder(true);
+
+        // 集团sku
+        List<Sku> list = skuService.list(q -> q.eq(Sku::getType, 1));
+        List<Long> skuIdList = list.stream().map(BaseIdPo::getId).collect(Collectors.toList());
+        skuSpecLinkService.remove(q -> q.in(SkuSpecLink::getSkuId, skuIdList).ne(SkuSpecLink::getDepartmentId, 100L));
+
+        // 非集团sku
+        List<Sku> list2 = skuService.list(q -> q.eq(Sku::getType, 0));
+        List<Long> skuIdList2 = list2.stream().map(BaseIdPo::getId).collect(Collectors.toList());
+        skuSpecLinkService.remove(q -> q.in(SkuSpecLink::getSkuId, skuIdList2).ne(SkuSpecLink::getDepartmentId, A9_DEPARTMENT_ID));
+
+        LogicHolder.setLogicHolder(false);
+    }
+
+}

+ 4 - 26
sd-wln/src/main/java/com/sd/wln/context/OrderContext.java

@@ -13,7 +13,6 @@ import com.sd.business.entity.department.po.Department;
 import com.sd.business.entity.order.po.*;
 import com.sd.business.entity.price.po.PriceBillingStandard;
 import com.sd.business.entity.price.po.PriceBillingStandardDetail;
-import com.sd.business.entity.sku.po.Sku;
 import com.sd.business.entity.sku.po.SkuSpec;
 import com.sd.business.entity.sku.po.SkuSpecLink;
 import com.sd.business.service.artwork.ArtworkLibraryService;
@@ -22,7 +21,6 @@ import com.sd.business.service.order.OrderService;
 import com.sd.business.service.order.OrderSkuService;
 import com.sd.business.service.price.PriceBillingStandardDetailService;
 import com.sd.business.service.price.PriceBillingStandardService;
-import com.sd.business.service.sku.SkuService;
 import com.sd.business.service.sku.SkuSpecLinkService;
 import com.sd.business.service.sku.SkuSpecService;
 import lombok.Getter;
@@ -39,7 +37,6 @@ public class OrderContext {
     private static final OrderService orderService = SpringUtil.getBean(OrderService.class);
     private static final OrderSkuService orderSkuService = SpringUtil.getBean(OrderSkuService.class);
     private static final DepartmentService departmentService = SpringUtil.getBean(DepartmentService.class);
-    private static final SkuService skuService = SpringUtil.getBean(SkuService.class);
     private static final SkuSpecService skuSpecService = SpringUtil.getBean(SkuSpecService.class);
     private static final SkuSpecLinkService skuSpecLinkService = SpringUtil.getBean(SkuSpecLinkService.class);
     private static final PriceBillingStandardService priceBillingStandardService = SpringUtil.getBean(PriceBillingStandardService.class);
@@ -220,30 +217,11 @@ public class OrderContext {
                 return skuSpecLinkBomSpecMap;
             }
 
-            List<Long> skuIdList = values.stream().map(SkuSpec::getSkuId).collect(Collectors.toList());
+            List<Long> skuSpecIdList = values.stream().map(SkuSpec::getId).distinct().collect(Collectors.toList());
+            List<SkuSpecLink> list = skuSpecLinkService.list(q -> q.in(SkuSpecLink::getSkuSpecId, skuSpecIdList));
 
-            // skuId,是否集团sku 集合
-            Map<Long, Integer> map = skuService.listByIds(skuIdList).stream().collect(Collectors.toMap(BaseIdPo::getId, Sku::getType));
-
-            // 集团sku
-            List<Long> skSkuSpecId = values.stream()
-                    .filter(item -> map.getOrDefault(item.getSkuId(), 0) == 1)
-                    .map(SkuSpec::getId)
-                    .collect(Collectors.toList());
-
-            // 非集团sku
-            List<Long> skuSpecId = values.stream()
-                    .filter(item -> map.getOrDefault(item.getSkuId(), 0) == 0)
-                    .map(SkuSpec::getId)
-                    .collect(Collectors.toList());
-
-            List<SkuSpecLink> list = skuSpecLinkService.list(q -> q
-                    .and(!skuSpecId.isEmpty(), r -> r.in(SkuSpecLink::getSkuSpecId, skuSpecId).eq(SkuSpecLink::getDepartmentId, department.getId()))
-                    .or(!skSkuSpecId.isEmpty(), r -> r.in(SkuSpecLink::getSkuSpecId, skSkuSpecId).eq(SkuSpecLink::getDepartmentId, 100L))
-            );
-
-            skuSpecLinkBomSpecMap = list.stream().collect(
-                    Collectors.groupingBy(SkuSpecLink::getSkuSpecId, Collectors.groupingBy(SkuSpecLink::getType)));
+            skuSpecLinkBomSpecMap = list.stream().collect(Collectors.groupingBy(
+                    SkuSpecLink::getSkuSpecId, Collectors.groupingBy(SkuSpecLink::getType)));
         }
 
         return skuSpecLinkBomSpecMap;

+ 30 - 24
sd-wln/src/main/java/com/sd/wln/service/impl/WlnOrderServiceImpl.java

@@ -9,6 +9,7 @@ import com.fjhx.tenant.service.dict.DictCommonDataService;
 import com.ruoyi.common.constant.StatusConstant;
 import com.ruoyi.common.core.domain.BaseIdPo;
 import com.ruoyi.common.exception.ServiceException;
+import com.ruoyi.framework.mybatis.holder.LogicHolder;
 import com.sd.business.entity.artwork.po.ArtworkLibrary;
 import com.sd.business.entity.bom.bo.BomSpecBo;
 import com.sd.business.entity.department.po.Department;
@@ -84,10 +85,6 @@ public class WlnOrderServiceImpl implements WlnOrderService {
     public void syncOrder() {
 
         List<DictCommonData> warehouseCodeList = dictCommonDataService.list(q -> q.eq(DictCommonData::getDictCode, "warehouse_code"));
-        if (warehouseCodeList.isEmpty()) {
-            log.error("订单同步失败,仓库字典:warehouse_code 为空");
-            return;
-        }
 
         for (DictCommonData dictCommonData : warehouseCodeList) {
 
@@ -117,6 +114,7 @@ public class WlnOrderServiceImpl implements WlnOrderService {
                 // 不存在新增
                 if (orderInfo == null) {
 
+                    // 9月1号之前的订单不同步
                     Date printTime = wlnOrder.getDate("print_time");
                     if (printTime != null && printTime.before(DateUtil.parse("2023-09-01 00:00:00"))) {
                         continue;
@@ -142,9 +140,8 @@ public class WlnOrderServiceImpl implements WlnOrderService {
 
             }
 
-
+            // 保存新增、修改的订单
             save(context);
-
         }
 
     }
@@ -227,10 +224,27 @@ public class WlnOrderServiceImpl implements WlnOrderService {
      * 修改订单
      */
     public void updateOrder(OrderContext context, JSONObject wlnOrder, OrderInfo orderInfo) {
+
+        // 已删除不在修改订单
         if (orderInfo.getDelFlag().equals(StatusConstant.DELETED)) {
             return;
         }
 
+        // 生产中、生产完成、已发货不在修改订单
+        if (Objects.equals(orderInfo.getStatus(), OrderStatusEnum.IN_PRODUCTION.getKey())
+                || Objects.equals(orderInfo.getStatus(), OrderStatusEnum.COMPLETION_PRODUCTION.getKey())
+                || Objects.equals(orderInfo.getStatus(), OrderStatusEnum.HAVE_BEEN_SHIPPED.getKey())) {
+            return;
+        }
+
+        // 打回审核真删订单
+        if (wlnOrder.getInteger("process_status") == 0) {
+            LogicHolder.setLogicHolder(true);
+            orderService.deleteAndStore(orderInfo.getId());
+            LogicHolder.clear();
+            return;
+        }
+
         Department department = context.getDepartment();
         Map<Long, List<OrderSku>> existOrderSkuMap = context.getExistOrderSkuMap();
         List<OrderInfo> updateOrderList = context.getUpdateOrderList();
@@ -260,16 +274,17 @@ public class WlnOrderServiceImpl implements WlnOrderService {
         if (orderInfo.getWlnStatus() == 10) {
             addExceptionType(orderInfo, OrderExceptionTypeEnum.ORDER_CLOSURE);
             // 万里牛状态异常:订单关闭的订单类型修改为无理由并生成对账单
-            if (orderInfo.getStatus() != null && orderInfo.getStatus() >= OrderStatusEnum.IN_PRODUCTION.getKey()) {
-                if (ObjectUtil.notEqual(orderInfo.getClassify(), OrderClassifyEnum.NO_REASON_ORDER.getKey())) {
-                    if (ObjectUtil.equals(orderInfo.getStatus(), OrderStatusEnum.IN_PRODUCTION.getKey())) {
-                        orderInfo.setStatus(OrderStatusEnum.COMPLETION_PRODUCTION.getKey());
-                    }
-                    orderInfo.setClassify(OrderClassifyEnum.NO_REASON_ORDER.getKey());
-                    orderInfo.setShippingTime(new Date());
-                    // 保存对账单列表
-                    saveStatementOrderList.add(orderInfo);
+            if (orderInfo.getStatus() != null && orderInfo.getStatus() >= OrderStatusEnum.IN_PRODUCTION.getKey()
+                    && ObjectUtil.notEqual(orderInfo.getClassify(), OrderClassifyEnum.NO_REASON_ORDER.getKey())) {
+
+                if (ObjectUtil.equals(orderInfo.getStatus(), OrderStatusEnum.IN_PRODUCTION.getKey())) {
+                    orderInfo.setStatus(OrderStatusEnum.COMPLETION_PRODUCTION.getKey());
                 }
+                orderInfo.setClassify(OrderClassifyEnum.NO_REASON_ORDER.getKey());
+                orderInfo.setShippingTime(new Date());
+
+                // 保存对账单列表
+                saveStatementOrderList.add(orderInfo);
             }
         }
         if (orderInfo.getWlnStatus() == 11) {
@@ -278,9 +293,6 @@ public class WlnOrderServiceImpl implements WlnOrderService {
         if (orderInfo.getWlnStatus() == 12) {
             addExceptionType(orderInfo, OrderExceptionTypeEnum.ORDER_EXCEPTION_HANDLING);
         }
-        if (orderInfo.getWlnStatus() == 0 && Objects.equals(orderInfo.getStatus(), OrderStatusEnum.STOCK_PREPARATION.getKey())) {
-            addExceptionType(orderInfo, OrderExceptionTypeEnum.ORDER_CHECK);
-        }
 
         // 事业部
         if (department == null) {
@@ -627,12 +639,6 @@ public class WlnOrderServiceImpl implements WlnOrderService {
      * 添加订单异常类型
      */
     private void addExceptionType(OrderInfo orderInfo, OrderExceptionTypeEnum exceptionTypeEnum) {
-
-        // 生产中之后的订单不变为异常
-        if (orderInfo.getStatus() != null && orderInfo.getStatus() >= OrderStatusEnum.IN_PRODUCTION.getKey()) {
-            return;
-        }
-
         String exceptionType = orderInfo.getExceptionType();
         orderInfo.setExceptionType(orderService.addExceptionType(exceptionType, exceptionTypeEnum.getKey()));
         orderInfo.setExceptionTime(ObjectUtil.defaultIfNull(orderInfo.getExceptionTime(), new Date()));