Bläddra i källkod

发货时间筛选

lxb 3 veckor sedan
förälder
incheckning
eb05eb69f3

+ 3 - 0
fs-company/src/main/java/com/fs/hisStore/controller/FsStoreOrderScrmController.java

@@ -101,6 +101,9 @@ public class FsStoreOrderScrmController extends BaseController
         if(!StringUtils.isEmpty(param.getPayTimeRange())){
             param.setPayTimeList(param.getPayTimeRange().split("--"));
         }
+        if(!StringUtils.isEmpty(param.getDeliverySendTimeRange())){
+            param.setDeliverySendTimeList(param.getDeliverySendTimeRange().split("--"));
+        }
         if(!StringUtils.isEmpty(param.getDeliveryImportTimeRange())){
             param.setDeliveryImportTimeList(param.getDeliveryImportTimeRange().split("--"));
         }

+ 4 - 0
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreOrderScrmMapper.java

@@ -165,6 +165,10 @@ public interface FsStoreOrderScrmMapper
             " AND date_format(o.pay_time,'%y%m%d') >= date_format(#{maps.payTimeList[0]},'%y%m%d') " +
             " AND date_format(o.pay_time,'%y%m%d') <= date_format(#{maps.payTimeList[1]},'%y%m%d') " +
             "</if>" +
+            "<if test = 'maps.deliverySendTimeList != null    '> " +
+            " AND date_format(o.delivery_send_time,'%y%m%d') &gt;= date_format(#{maps.deliverySendTimeList[0]},'%y%m%d') " +
+            " AND date_format(o.delivery_send_time,'%y%m%d') &lt;= date_format(#{maps.deliverySendTimeList[1]},'%y%m%d') " +
+            "</if>" +
             "<if test = 'maps.deliveryImportTimeList != null    '> " +
             " AND date_format(o.delivery_import_time,'%y%m%d') &gt;= date_format(#{maps.deliveryImportTimeList[0]},'%y%m%d') " +
             " AND date_format(o.delivery_import_time,'%y%m%d') &lt;= date_format(#{maps.deliveryImportTimeList[1]},'%y%m%d') " +

+ 4 - 1
fs-service/src/main/resources/mapper/hisStore/FsStoreOrderScrmMapper.xml

@@ -877,7 +877,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectFsStoreProductCountsByDept" resultType="java.util.HashMap">
         SELECT
         t.order_type as orderType,
-        COUNT(t.item_id) AS `count`,
+        #COUNT(t.item_id) AS `count`,
+        SUM(
+        t.json_info->>'$.num' + 0
+        )  AS `count`,
         SUM(
         (t.json_info->>'$.price' + 0) *
         (t.json_info->>'$.num' + 0)