Explorar o código

附件增加洗衣状态

xuhaifeng hai 9 meses
pai
achega
89251beb70

+ 9 - 8
yiqi-common/src/main/java/com/yiqi/common/enums/ClothOrderStatusType.java

@@ -3,18 +3,19 @@ package com.yiqi.common.enums;
 
 public enum ClothOrderStatusType implements CodeEnum{
 
-    APPOINTMENT("0", "预约待取")
+    APPOINTMENT("0", "待接单")
     , WAITING_TO_DOOR("1","待上门")
-    , HAS_TO_DOOR("2","已上门")
-    , HAS_TAKING("3", "已取货、待门店定价")
+    , HAS_TO_DOOR("2","待取衣")
+    , HAS_TAKING("3", "已取衣、待定价")
     , WAITING_FOR_PAY("4", "已定价、待支付")
     , WAIT_FACTORY("5", "待入厂")
     , WASHING("6", "清洗中")
-    , HAS_WASH("7", "洗衣完成、已到店")
-    , WAITING_TO_SEND("8","待送衣")
-    , SENDING("9", "送衣中")
-    , WAITING_FOR_COMMENT("10", "已送达、待评价")
-    , FINISH("11", "已完成")
+    , HAS_WASH("7", "已出厂")
+    , WAITING_FOR_HANG("8", "已到店")
+    , WAITING_TO_SEND("9","待送衣")
+    , SENDING("10", "送衣中")
+    , WAITING_FOR_COMMENT("11", "待评价")
+    , FINISH("12", "已完成")
     , CANCEL("100", "已取消");
 
     private final String code;

+ 1 - 1
yiqi-common/src/main/java/com/yiqi/common/utils/OrderNoUtils.java

@@ -10,7 +10,7 @@ public class OrderNoUtils {
     SnowFlakeConfig snowFlakeConfig;
 
     public final static String cloth_wash_code_header = "WA";
-    public final static String cloth_wash_adjust_code_header = "WAD";
+    public final static String cloth_wash_adjust_code_header = "WD";
     public final static String activity_order_header = "AC";
     public final static String cloth_order_header = "CL";
     public final static String purchase_order_header = "PU";

+ 4 - 0
yiqi-common/src/main/java/com/yiqi/order/domain/OrderClothAdjunct.java

@@ -59,6 +59,10 @@ public class OrderClothAdjunct extends BaseEntity
     @JsonSerialize(using = ToStringSerializer.class)
     private Long orderClothId;
 
+    @Excel(name = "洗衣状态", readConverterExp = "0=待入厂,1=已入厂,2=已检查,3=已出厂,4=已上挂,5=已取衣,6=已到店、待送衣,7=送衣中,8=已送达、待评价,9=已完成,100=重洗,101=删除入厂,102=撤单")
+    @ApiModelProperty("洗衣状态(0=待入厂,1=已入厂,2=已检查,3=已出厂,4=已上挂,5=已取衣,6=已到店、待送衣,7=送衣中,8=已送达、待评价,9=已完成,100=重洗,101=删除入厂,102=撤单)")
+    private String flowStatus;
+
     /** 附件数量 */
     @Excel(name = "附件数量")
     @ApiModelProperty("附件数量")

+ 23 - 8
yiqi-core/src/main/java/com/yiqi/order/service/impl/OrderClothServiceImpl.java

@@ -171,7 +171,8 @@ public class OrderClothServiceImpl extends ServiceImpl<OrderClothMapper, OrderCl
         //查询订单
         if (ClothOrderPayTimeType.take_cloth_pay.getCode().equals(orderCloth.getPayTimeType())) {//收衣付款
             orderCloth.setOrderStatus(ClothOrderStatusType.WAIT_FACTORY.getCode());
-        } else {//取衣付款
+        } else {
+            //取衣付款
             orderCloth.setOrderStatus(ClothOrderStatusType.HAS_WASH.getCode());
         }
         orderCloth.setPayStatus(PayStatus.HAS_PAY.getCode());
@@ -818,13 +819,27 @@ public class OrderClothServiceImpl extends ServiceImpl<OrderClothMapper, OrderCl
             }
 
             for (OrderClothAdjunctDTO orderClothAdjunctDTO : orderClothItemDTOS.get(i).getOrderClothAdjunctDTOS()) {
-                OrderClothAdjunct orderClothAdjunct = new OrderClothAdjunct();
-                BeanUtils.copyProperties(orderClothAdjunctDTO, orderClothAdjunct);
-                orderClothAdjunct.setAdjunctNo(orderNoUtils.getClothWashAdjustCode());
-                orderClothAdjunct.setOrderId(orderCloth.getId());
-                orderClothAdjunct.setOrderClothId(orderClothItems.get(i).getId());
-                orderClothAdjunct.buildCreateData();
-                orderClothAdjuncts.add(orderClothAdjunct);
+                if (orderClothAdjunctDTO.getNum() > 1) {
+                    for (int j = 0; j < orderClothAdjunctDTO.getNum(); j++) {
+                        OrderClothAdjunct orderClothAdjunct = new OrderClothAdjunct();
+                        orderClothAdjunct.setAdjunctId(orderClothAdjunctDTO.getAdjunctId());
+                        orderClothAdjunct.setAdjunctName(orderClothAdjunctDTO.getAdjunctName() + (j + 1));
+                        orderClothAdjunct.setAdjunctNo(orderNoUtils.getClothWashAdjustCode());
+                        orderClothAdjunct.setOrderId(orderCloth.getId());
+                        orderClothAdjunct.setNum(1);
+                        orderClothAdjunct.setOrderClothId(orderClothItems.get(i).getId());
+                        orderClothAdjunct.buildCreateData();
+                        orderClothAdjuncts.add(orderClothAdjunct);
+                    }
+                } else {
+                    OrderClothAdjunct orderClothAdjunct = new OrderClothAdjunct();
+                    BeanUtils.copyProperties(orderClothAdjunctDTO, orderClothAdjunct);
+                    orderClothAdjunct.setAdjunctNo(orderNoUtils.getClothWashAdjustCode());
+                    orderClothAdjunct.setOrderId(orderCloth.getId());
+                    orderClothAdjunct.setOrderClothId(orderClothItems.get(i).getId());
+                    orderClothAdjunct.buildCreateData();
+                    orderClothAdjuncts.add(orderClothAdjunct);
+                }
             }
         }
         orderClothFlawService.saveBatch(orderClothFlaws);