Browse Source

[add] 预约列表

BKGin 6 months ago
parent
commit
720c4440ce

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

@@ -8,7 +8,7 @@ public enum ClothOrderStatusType implements CodeEnum{
     , HAS_TO_DOOR("2","已上门")
     , HAS_TAKING("3", "已取货、待门店定价")
     , WAITING_FOR_PAY("4", "已定价、待支付")
-    , CONFIRM_PAY("5", "支付确认中")
+    , CONFIRM_PAY("5", "待入厂")
     , WASHING("6", "清洗中")
     , HAS_WASH("7", "洗衣完成、已到店")
     , WAITING_TO_SEND("8","待送衣")

+ 6 - 4
yiqi-common/src/main/java/com/yiqi/order/domain/dto/OrderAppointmentDTO2.java

@@ -9,6 +9,7 @@ import lombok.Data;
 
 import javax.validation.constraints.NotNull;
 import java.util.Date;
+import java.util.List;
 
 @Data
 public class OrderAppointmentDTO2 {
@@ -35,10 +36,6 @@ public class OrderAppointmentDTO2 {
     @ApiModelProperty("订单状态(0=预约待取,1=已取货、待门店定价,2=已定价、待支付,3=已支付、待工厂取货,4=工厂已取货、洗衣中,5=洗衣完成、待送店,6=已到店、待送衣,7=送衣中,8=已送达、待评价,9=已完成,100=已取消)")
     private String orderStatus;
 
-    /** 预约状态(1=待接单,2=待上门,3=已取物,4=待配送,5=配送中,9=已完成,100=已取消) */
-    @ApiModelProperty("预约状态(0=未预约,1=待接单,2=待上门,3=已取物,4=待配送,5=配送中,9=已完成,100=已取消)")
-    private String appointmentStatus;
-
     /** 联系人 */
     @Excel(name = "联系人")
     @ApiModelProperty("联系人")
@@ -68,4 +65,9 @@ public class OrderAppointmentDTO2 {
 
     @ApiModelProperty(value = "导出最大数量")
     private int pageSizeExport ;
+
+    @ApiModelProperty("虚拟定单状态 1:待接单 2:取衣中 3:待支付 4:待入厂 5:清洗中 6:待上挂 7:待送衣 8:送衣中 10:已完成")
+    private Integer virtualListStatus;
+
+    private List<Integer> queryOrderStatus;
 }

+ 46 - 14
yiqi-core/src/main/java/com/yiqi/order/service/impl/OrderClothServiceImpl.java

@@ -1022,21 +1022,53 @@ public class OrderClothServiceImpl extends ServiceImpl<OrderClothMapper, OrderCl
         if (!SourceType.MANAGER.getCode().equals(SecurityUtils.getLoginUser().getSourceType())) {
             orderAppointmentDTO2.setOrgId(SecurityUtils.getLoginUser().getOrgId());
         }
-        /** 预约状态(1=待接单,2=待上门,3=已取物,4=待配送,5=配送中,9=已完成,100=已取消) */
-        if (ClothAppointmentStatus.APPOINTMENT.getCode().equals(orderAppointmentDTO2.getAppointmentStatus()) ||
-                ClothAppointmentStatus.WAITING_TO_DOOR.getCode().equals(orderAppointmentDTO2.getAppointmentStatus()) ||
-                ClothAppointmentStatus.HAS_TAKING.getCode().equals(orderAppointmentDTO2.getAppointmentStatus())
-        ) {
-            orderAppointmentDTO2.setTakeClothWay(TakeOrSendClothWay.DELIVERY.getCode());
+        Integer[] orderStatus = new Integer[]{0};
+        // 虚拟定单状态 1:待接单 2:取衣中 3:待支付 4:待入厂 5:清洗中 6:待上挂 7:待送衣 8:送衣中 99:已完成 100:已取消
+        switch (orderAppointmentDTO2.getVirtualListStatus()) {
+            case 1:
+                // 待接单
+                orderStatus = new Integer[]{0};
+                break;
+            case 2:
+                // 取衣中
+                orderStatus = new Integer[]{1,2,3};
+                break;
+            case 3:
+                // 待支付
+                orderStatus = new Integer[]{4};
+                break;
+            case 4:
+                // 待入厂
+                orderStatus = new Integer[]{5};
+                break;
+            case 5:
+                // 清洗中
+                orderStatus = new Integer[]{6};
+                break;
+            case 6:
+                // 待上挂
+                orderStatus = new Integer[]{};
+                break;
+            case 7:
+                // 待送衣
+                orderStatus = new Integer[]{8};
+                break;
+            case 8:
+                // 送衣中
+                orderStatus = new Integer[]{9};
+                break;
+            case 99:
+                // 已完成
+                orderStatus = new Integer[]{10,11};
+                break;
+            case 100:
+                orderStatus = new Integer[]{100};
+                break;
+            default:
+                orderStatus = new Integer[]{0};
+                break;
         }
-
-        if (ClothAppointmentStatus.WAITING_TO_SEND.getCode().equals(orderAppointmentDTO2.getAppointmentStatus()) ||
-                ClothAppointmentStatus.SENDING.getCode().equals(orderAppointmentDTO2.getAppointmentStatus()) ||
-                ClothAppointmentStatus.FINISH.getCode().equals(orderAppointmentDTO2.getAppointmentStatus())
-        ) {
-            orderAppointmentDTO2.setSendClothWay(TakeOrSendClothWay.DELIVERY.getCode());
-        }
-
+        orderAppointmentDTO2.setQueryOrderStatus(Arrays.asList(orderStatus));
         List<OrderClothAppointmentVO> orderClothAppointmentVOList = baseMapper.getAppointmentClothOrderList(orderAppointmentDTO2);
         for (OrderClothAppointmentVO orderClothAppointmentVO : orderClothAppointmentVOList) {
             orderClothAppointmentVO.setOrderClothAddress(orderClothAddressService.getByorderSn(orderClothAppointmentVO.getOrderNo()));

+ 6 - 3
yiqi-core/src/main/resources/mapper/order/OrderClothMapper.xml

@@ -236,7 +236,7 @@
     </select>
 
     <select id="getAppointmentClothOrderList" resultType="com.yiqi.order.domain.vo.OrderClothAppointmentVO">
-        select o.order_no as orderNo, o.appointment_status as appointmentStatus, o.appointment_time as appointmentTime, o.appointment_count as appointmentCount, o.pay_status as payStatus,
+        select o.order_no as orderNo, o.appointment_time as appointmentTime, o.appointment_count as appointmentCount, o.pay_status as payStatus,
         o.take_cloth_app_user_id as takeClothAppUserId, o.order_status AS orderStatus, a.province as province, a.city as city, a.area as area,
         a.address as address, a.address_detail as addressDetail, o.take_cloth_way as takeClothWay, o.send_cloth_way AS sendClothWay,
         o.is_disassembly_and_assembly as isDisassemblyAndAssembly, o.is_large_item as isLargeItem, b.real_name as takeClothAppUserName,
@@ -256,8 +256,11 @@
         <if test="orderType != null  and orderType != ''">
             and o.order_type=#{orderType}
         </if>
-        <if test="appointmentStatus != null  and appointmentStatus != ''">
-            and o.appointment_status=#{appointmentStatus}
+        <if test="queryOrderStatus != null  and queryOrderStatus.size > 0 ">
+            and o.order_status in
+            <foreach item="id" collection="queryOrderStatus" open="(" separator="," close=")">
+                #{id}
+            </foreach>
         </if>
         <if test="orgId != null">
             and o.org_id = #{orgId}