瀏覽代碼

jd 已完成

zangbin 3 年之前
父節點
當前提交
00d7c03ab3

+ 5 - 0
lb-module/src/main/java/com/ydd/module/dto/SystemOrderDto.java

@@ -445,6 +445,11 @@ public class SystemOrderDto implements Serializable {
      */
     private List<Long> personnelIds;
 
+    /**
+     * 精确门店id
+     */
+    private List<Long> shopIds;
+
     @Data
     public static class DeliveryStatus {
         Integer deliveryStatus;

+ 5 - 3
lb-module/src/main/java/com/ydd/module/service/impl/OrderServiceImpl.java

@@ -363,12 +363,14 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
         }
         // 新增订单门店查询按钮
         if (StringUtils.isNotEmpty(order.getShopName())) {
-          Shop shop = iShopService.getOne(new QueryWrapper<Shop>().eq("deleted", 0)
+          List<Shop> shopList = iShopService.list(new QueryWrapper<Shop>().eq("deleted", 0)
             .eq("status", 1).like("name", order.getShopName()));
+          List<Long> shopIds = shopList.stream().map(Shop::getId).collect(Collectors.toList());
 
-          if (shop != null) {
-            order.setShopId(shop.getId());
+          if (CollectionUtils.isEmpty(shopIds)) {
+            result = false;
           }
+          order.setShopIds(shopIds);
         }
         return result;
     }

+ 18 - 9
lb-module/src/main/resources/mapper/module/orderMapper.xml

@@ -545,9 +545,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="params.paymentType != null">
             AND (o.payment_type = #{params.paymentType} and o.status != 0)
         </if>
-        <if test="params.shopName != null and params.shopName != ''">
-            AND o.shop_name like concat('%', #{params.shopName}, '%')
-        </if>
+        <if test="params.shopIds != null and params.shopIds > 0">
+             and o.shop_id in
+             <foreach collection="params.shopIds" index="index" item="shopId" open="(" separator="," close=")">
+                 #{shopId}
+             </foreach>
+         </if>
         ORDER BY o.create_time DESC
     </select>
 
@@ -1000,9 +1003,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="params.paymentType != null">
             AND (o.payment_type = #{params.paymentType} and o.status != 0)
         </if>
-        <if test="params.shopId != null">
-            AND o.shop_id = #{params.shopId}
-        </if>
+        <if test="params.shopIds != null and params.shopIds > 0">
+             and o.shop_id in
+             <foreach collection="params.shopIds" index="index" item="shopId" open="(" separator="," close=")">
+                 #{shopId}
+             </foreach>
+         </if>
     </select>
 
     <select id="selectExportOrder" resultType="com.ydd.module.dto.OrderExportDto">
@@ -1186,9 +1192,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="params.paymentType != null">
             AND (o.payment_type = #{params.paymentType} and o.status != 0)
         </if>
-        <if test="params.shopId != null">
-            AND o.shop_id = #{params.shopId}
-        </if>
+        <if test="params.shopIds != null and params.shopIds > 0">
+             and o.shop_id in
+             <foreach collection="params.shopIds" index="index" item="shopId" open="(" separator="," close=")">
+                 #{shopId}
+             </foreach>
+         </if>
         ORDER BY o.create_time DESC
     </select>
 

+ 8 - 11
web-ui/src/views/module/order/index.vue

@@ -350,18 +350,15 @@
                   <span v-if="scope.row.takeType == 1 || scope.row.takeType == 2"> 预约 </span>
                 </el-tag>
                 <span  style="margin-left: 20px">订单号:
-                  <!-- <div class="serial" v-if="scope.row.daySeq != null">
+                  <div v-if="scope.row.platformType != null">
+                    <span class="serial_text" v-if="scope.row.platformType == 0">猎豹 &nbsp;</span>
+                    <span class="serial_text" v-if="scope.row.platformType == 1">美团 &nbsp;</span>
+                    <span class="serial_text" v-if="scope.row.platformType == 2">饿了么 &nbsp;</span>
+                    <span class="serial_text" v-if="scope.row.platformType == 3">饿百零售 &nbsp;</span>
+                    <span class="serial_text" v-if="scope.row.platformType == 5">美团闪购 &nbsp;</span>
+                  </div>
+                  <div class="serial" v-if="scope.row.daySeq != null">
                     <span class="serial_text">{{scope.row.daySeq}} &nbsp; #</span>
-                  </div> -->
-                  <div class="serial">
-                     <div v-if="scope.row.platformType != null">
-                       <span class="serial_text" v-if="scope.row.platformType == 0">猎豹 &nbsp;</span>
-                       <span class="serial_text" v-if="scope.row.platformType == 1">美团 &nbsp;</span>
-                       <span class="serial_text" v-if="scope.row.platformType == 2">饿了么 &nbsp;</span>
-                       <span class="serial_text" v-if="scope.row.platformType == 3">饿百零售 &nbsp;</span>
-                       <span class="serial_text" v-if="scope.row.platformType == 5">美团闪购 &nbsp;</span>
-                      </div>
-                    <div v-if="scope.row.daySeq != null"><span class="serial_text">{{scope.row.daySeq}} &nbsp; #</span></div>
                   </div>
                   <el-button style="user-select: unset" type="text" @click="deliveryInfo(scope.row.orderSn)" v-if="type != 2">
                     {{ scope.row.orderSn }}