zhs 3 سال پیش
والد
کامیت
95a901b54a

+ 16 - 2
src/main/java/com/supplier/controller/PrivateOrderController.java

@@ -48,6 +48,10 @@ public class PrivateOrderController {
             } else if(privateOrder.getOrderType() == 2) {
                 list = privateOrderService.getPrivateOrderTwo(privateOrder);
                 count = privateOrderService.getPrivateOrderCountTwo(privateOrder);
+            } else if(privateOrder.getOrderType() == 1){
+                System.out.println(111);
+                list = privateOrderService.getPrivateOrderOne(privateOrder);
+                count = privateOrderService.getPrivateOrderCountOne(privateOrder);
             } else {
                 list = privateOrderService.getPrivateOrder(privateOrder);
                 count = privateOrderService.getPrivateOrderCount(privateOrder);
@@ -76,12 +80,22 @@ public class PrivateOrderController {
             if(null != privateOrder.getDestination()){
                 privateOrder.setDestination(URLDecoder.decode(privateOrder.getDestination()));
             }
+            privateOrder.setOrderBy(URLDecoder.decode(privateOrder.getOrderBy()));
+            privateOrder.setOrderTypeVal(URLDecoder.decode(privateOrder.getOrderTypeVal()));
+
             //获取供应商code
             Map<String, Object> userMap = ParsingToken.tokenParsing(request);
             privateOrder.setCode((String) userMap.get("code"));
+            int count = 0;
+            List<PrivateOrder> list = new ArrayList<PrivateOrder>();
+            if(privateOrder.getOrderTypeVal().equals("0")){
+                list = privateOrderService.getPrivateOrderZeorSmall(privateOrder);
+                count = privateOrderService.getPrivateOrderCountZeor(privateOrder);
+            } else {
+                count = privateOrderService.getPrivateOrderCountSmall(privateOrder);
+                list = privateOrderService.getPrivateOrderSmall(privateOrder);
+            }
 
-            int count = privateOrderService.getPrivateOrderCount(privateOrder);
-            List<PrivateOrder> list = privateOrderService.getPrivateOrderSmall(privateOrder);
 
             map.put("count", count);
             map.put("data", list);

+ 8 - 0
src/main/java/com/supplier/mapper/PrivateOrderMapper.java

@@ -28,4 +28,12 @@ public interface PrivateOrderMapper {
     int getDemandCount(String uuid);
 
     List<PrivateOrder> getPrivateOrderSmall(PrivateOrder privateOrder);
+
+    int getPrivateOrderCountOne(PrivateOrder privateOrder);
+
+    List<PrivateOrder> getPrivateOrderOne(PrivateOrder privateOrder);
+
+    List<PrivateOrder> getPrivateOrderZeorSmall(PrivateOrder privateOrder);
+
+    int getPrivateOrderCountSmall(PrivateOrder privateOrder);
 }

+ 4 - 0
src/main/java/com/supplier/model/PrivateOrder.java

@@ -134,4 +134,8 @@ public class PrivateOrder implements Serializable {
      * 订单对应的游记编号
      */
     private String myOrderingTravelUuid;
+    /**
+     * 多条件小程序使用
+     */
+    private String orderTypeVal;
 }

+ 8 - 0
src/main/java/com/supplier/service/PrivateOrderService.java

@@ -27,4 +27,12 @@ public interface PrivateOrderService {
     int getDemandCount(String uuid);
 
     List<PrivateOrder> getPrivateOrderSmall(PrivateOrder privateOrder);
+
+    List<PrivateOrder> getPrivateOrderOne(PrivateOrder privateOrder);
+
+    int getPrivateOrderCountOne(PrivateOrder privateOrder);
+
+    List<PrivateOrder> getPrivateOrderZeorSmall(PrivateOrder privateOrder);
+
+    int getPrivateOrderCountSmall(PrivateOrder privateOrder);
 }

+ 22 - 0
src/main/java/com/supplier/service/impl/PrivateOrderServiceImpl.java

@@ -74,4 +74,26 @@ public class PrivateOrderServiceImpl implements PrivateOrderService {
         privateOrder.setPage((privateOrder.getPage() - 1) * privateOrder.getLimit());
         return privateOrderMapper.getPrivateOrderSmall(privateOrder);
     }
+
+    @Override
+    public List<PrivateOrder> getPrivateOrderOne(PrivateOrder privateOrder) {
+        privateOrder.setPage((privateOrder.getPage() - 1) * privateOrder.getLimit());
+        return privateOrderMapper.getPrivateOrderOne(privateOrder);
+    }
+
+    @Override
+    public int getPrivateOrderCountOne(PrivateOrder privateOrder) {
+        return privateOrderMapper.getPrivateOrderCountOne(privateOrder);
+    }
+
+    @Override
+    public List<PrivateOrder> getPrivateOrderZeorSmall(PrivateOrder privateOrder) {
+        privateOrder.setPage((privateOrder.getPage() - 1) * privateOrder.getLimit());
+        return privateOrderMapper.getPrivateOrderZeorSmall(privateOrder);
+    }
+
+    @Override
+    public int getPrivateOrderCountSmall(PrivateOrder privateOrder) {
+        return privateOrderMapper.getPrivateOrderCountSmall(privateOrder);
+    }
 }

+ 120 - 3
src/main/resources/config/mapping/privateOrderMapper.xml

@@ -37,10 +37,16 @@
     <!-- 查询私人订制小程序 -->
     <select id="getPrivateOrderSmall" resultType="PrivateOrder">
         SELECT
-            top ${limit} b.*,${orderType} as orderType,e.headpir,e.name as orderName
+            top ${limit} b.*,c.order_type as orderType,e.headpir,e.name as orderName
         FROM
             bus_private_ordering AS b
-            JOIN ( SELECT code,demand_uuid FROM bus_private_ordering_type WHERE code = #{code} and order_type = #{orderType}) as c on b.uuid = c.demand_uuid
+            JOIN ( SELECT code,demand_uuid,order_type FROM bus_private_ordering_type WHERE code = #{code} and
+                    <trim prefixOverrides="and | or">
+                        <foreach collection="orderTypeVal.split(',')" item="item" separator="or" open="(" close=")">
+                            order_type = #{item}
+                        </foreach>
+                    </trim>
+                ) as c on b.uuid = c.demand_uuid
             LEFT JOIN sys_users as e on b.code = e.code
         WHERE
             uuid NOT IN (SELECT ordering_uuid FROM bus_ignore_supplier WHERE code = #{code})
@@ -53,7 +59,13 @@
             and b.id not in
             (
             select top ${page} b.id from bus_private_ordering as b
-            JOIN ( SELECT code,demand_uuid FROM bus_private_ordering_type WHERE code = #{code} and order_type = #{orderType}) as c on b.uuid = c.demand_uuid
+            JOIN ( SELECT code,demand_uuid FROM bus_private_ordering_type WHERE code = #{code} and
+                    <trim prefixOverrides="and | or">
+                        <foreach collection="orderTypeVal.split(',')" item="item" separator="or" open="(" close=")">
+                            order_type = #{item}
+                        </foreach>
+                    </trim>
+                 ) as c on b.uuid = c.demand_uuid
             WHERE
             uuid NOT IN (SELECT ordering_uuid FROM bus_ignore_supplier WHERE code = #{code})
             <if test="startTime != null and startTime !=''">
@@ -98,6 +110,37 @@
         )
         order by b.id desc
     </select>
+    <select id="getPrivateOrderOne" resultType="PrivateOrder">
+        SELECT
+        top ${limit} b.*,c.order_type as orderType,e.headpir,e.name as orderName
+        FROM
+        bus_private_ordering AS b
+        JOIN ( SELECT code,demand_uuid,order_type FROM bus_private_ordering_type WHERE code = #{code} and (order_type = '1' or order_type = '7' or order_type = '6')) as c on b.uuid = c.demand_uuid
+        LEFT JOIN sys_users as e on b.code = e.code
+        WHERE
+        uuid NOT IN (SELECT ordering_uuid FROM bus_ignore_supplier WHERE code = #{code})
+        <if test="startTime != null and startTime !=''">
+            and CONVERT (datetime, start_time) <![CDATA[ >= ]]> #{startTime} and CONVERT(datetime, end_time) <![CDATA[ <= ]]> #{endTime}
+        </if>
+        <if test="destination != null and destination !=''">
+            and destination like concat('%', #{destination}, '%')
+        </if>
+        and b.id not in
+        (
+        select top ${page} b.id from bus_private_ordering as b
+        JOIN ( SELECT code,demand_uuid FROM bus_private_ordering_type WHERE code = #{code} and (order_type = '1' or order_type = '7' or order_type = '6')) as c on b.uuid = c.demand_uuid
+        WHERE
+        uuid NOT IN (SELECT ordering_uuid FROM bus_ignore_supplier WHERE code = #{code})
+        <if test="startTime != null and startTime !=''">
+            and CONVERT (datetime, start_time) <![CDATA[ >= ]]> #{startTime} and CONVERT(datetime, end_time) <![CDATA[ <= ]]> #{endTime}
+        </if>
+        <if test="destination != null and destination !=''">
+            and destination like concat('%', #{destination}, '%')
+        </if>
+        order by b.id desc
+        )
+        order by b.id desc
+    </select>
     <!-- 查询私人订制特殊 -->
     <select id="getPrivateOrderZeor" resultType="PrivateOrder">
         SELECT
@@ -167,6 +210,21 @@
                 and destination like concat('%', #{destination}, '%')
             </if>
     </select>
+    <select id="getPrivateOrderCountOne" resultType="int">
+        SELECT
+            COUNT( * ) AS COUNT
+        FROM
+            bus_private_ordering AS b
+            JOIN ( SELECT code,demand_uuid FROM bus_private_ordering_type WHERE code = #{code} and (order_type = '1' or order_type = '6' or order_type = '7')) as c on b.uuid = c.demand_uuid
+        WHERE
+            uuid NOT IN (SELECT ordering_uuid FROM bus_ignore_supplier WHERE code = #{code})
+            <if test="startTime != null and startTime !=''">
+                and CONVERT (datetime, start_time) <![CDATA[ >= ]]> #{startTime} and CONVERT(datetime, end_time) <![CDATA[ <= ]]> #{endTime}
+            </if>
+            <if test="destination != null and destination !=''">
+                and destination like concat('%', #{destination}, '%')
+            </if>
+    </select>
     <!-- 查询总条数特殊 -->
     <select id="getPrivateOrderCountZeor" resultType="int">
         SELECT
@@ -208,4 +266,63 @@
     <select id="getDemandCount" parameterType="String" resultType="int">
         select count(*) as count from bus_private_ordering_type where demand_uuid = #{uuid}
     </select>
+    <!-- 小程序查询私人订制特殊 -->
+    <select id="getPrivateOrderZeorSmall" resultType="PrivateOrder">
+        SELECT
+            top ${limit} b.*,${orderType} as orderType,e.headpir,e.name as orderName
+        FROM
+            bus_private_ordering AS b
+            JOIN ( SELECT code,uuid FROM bus_private_ordering WHERE uuid NOT IN ( SELECT demand_uuid FROM bus_private_ordering_type WHERE code = #{code} AND order_type != 0 ) ) AS c ON b.uuid = c.uuid
+            JOIN ( SELECT code,uuid FROM bus_private_ordering WHERE uuid NOT IN ( SELECT demand_uuid FROM bus_private_ordering_type WHERE order_type = 9 ) ) AS a ON b.uuid = a.uuid
+            JOIN ( SELECT code,uuid FROM bus_private_ordering WHERE uuid NOT IN ( SELECT demand_uuid FROM bus_private_ordering_type WHERE order_type = 10 ) ) AS d ON b.uuid = d.uuid
+            LEFT JOIN sys_users as e on b.code = e.code
+        WHERE
+            b.uuid NOT IN (SELECT ordering_uuid FROM bus_ignore_supplier WHERE code = #{code})
+            <if test="startTime != null and startTime !=''">
+                and CONVERT (datetime, b.start_time) <![CDATA[ >= ]]> #{startTime} and CONVERT(datetime, b.end_time) <![CDATA[ <= ]]> #{endTime}
+            </if>
+            <if test="destination != null and destination !=''">
+                and b.destination like concat('%', #{destination}, '%')
+            </if>
+            and b.id not in
+            (
+            select top ${page} b.id  from bus_private_ordering as b
+            JOIN ( SELECT code,uuid FROM bus_private_ordering WHERE uuid NOT IN ( SELECT demand_uuid FROM bus_private_ordering_type WHERE code = #{code} AND order_type != 0 ) ) AS c ON b.uuid = c.uuid
+            JOIN ( SELECT code,uuid FROM bus_private_ordering WHERE uuid NOT IN ( SELECT demand_uuid FROM bus_private_ordering_type WHERE order_type = 9 ) ) AS a ON b.uuid = a.uuid
+            JOIN ( SELECT code,uuid FROM bus_private_ordering WHERE uuid NOT IN ( SELECT demand_uuid FROM bus_private_ordering_type WHERE order_type = 10 ) ) AS d ON b.uuid = d.uuid
+            WHERE
+            b.uuid NOT IN (SELECT ordering_uuid FROM bus_ignore_supplier WHERE code = #{code})
+            <if test="startTime != null and startTime !=''">
+                and CONVERT (datetime, b.start_time) <![CDATA[ >= ]]> #{startTime} and CONVERT(datetime, b.end_time) <![CDATA[ <= ]]> #{endTime}
+            </if>
+            <if test="destination != null and destination !=''">
+                and b.destination like concat('%', #{destination}, '%')
+            </if>
+            order by ${orderBy}
+            )
+            and b.supplier_code = '000' or b.supplier_code = #{code}
+            order by ${orderBy}
+    </select>
+    <!-- 小程序查询总条数 -->
+    <select id="getPrivateOrderCountSmall" resultType="int">
+        SELECT
+        COUNT( * ) AS COUNT
+        FROM
+        bus_private_ordering AS b
+        JOIN ( SELECT code,demand_uuid FROM bus_private_ordering_type WHERE code = #{code}
+        <trim prefix="and" prefixOverrides="and | or">
+            <foreach collection="orderTypeVal.split(',')" item="item" separator="or"  open="(" close=")">
+                order_type = #{item}
+            </foreach>
+        </trim>
+        ) as c on b.uuid = c.demand_uuid
+        WHERE
+        uuid NOT IN (SELECT ordering_uuid FROM bus_ignore_supplier WHERE code = #{code})
+        <if test="startTime != null and startTime !=''">
+            and CONVERT (datetime, start_time) <![CDATA[ >= ]]> #{startTime} and CONVERT(datetime, end_time) <![CDATA[ <= ]]> #{endTime}
+        </if>
+        <if test="destination != null and destination !=''">
+            and destination like concat('%', #{destination}, '%')
+        </if>
+    </select>
 </mapper>

+ 1 - 1
src/main/resources/static/json/zh.json

@@ -45,7 +45,7 @@
   "baoche": "包车",
   "baochesijijieshao": "包车/司机介绍",
   "jiagemingxi": "价格明细",
-  "hetongshangchuan": "合同上传",
+  "hetongshangchuan": "合同上传(请上传pdf文件)",
   "jiagemingxijieshao": "价格明细介绍",
   "qita": "其他",
   "shanchu": "删除",

+ 1 - 1
src/main/resources/templates/demandForSingle/offer.html

@@ -230,7 +230,7 @@
                     </div>
                     <div class="editor-assets" data-v-400c2eb9="">
                         <div class="editor-assets-control" data-v-400c2eb9="">
-                            <div class="editor-assets-control-item file_contract" data-v-400c2eb9=""><i class="assets-icon assets-videos-icon" data-v-400c2eb9=""></i><span data-v-400c2eb9="" data-locale="hetongshangchuan">合同上传</span></div><input class="layui-upload-file" type="file" accept="video/*" name="file">
+                            <div class="editor-assets-control-item file_contract" data-v-400c2eb9=""><i class="assets-icon assets-videos-icon" data-v-400c2eb9=""></i><span data-v-400c2eb9="" data-locale="hetongshangchuan">合同上传(请上传pdf文件)</span></div><input class="layui-upload-file" type="file" accept="video/*" name="file">
                         </div>
                         <div class="editor-assets-content contract_uplod_file_name" data-v-400c2eb9=""></div>
                     </div>