ソースを参照

首页统计新增托运订单

lengfaqiang 2 年 前
コミット
8b67aba32d

+ 9 - 1
sckw-modules-api/sckw-transport-api/src/main/java/com/sckw/transport/api/dubbo/TransportStatisticsService.java

@@ -10,13 +10,21 @@ package com.sckw.transport.api.dubbo;
  */
 public interface TransportStatisticsService {
     /**
-     * 统计承运
+     * 统计承运
      *
      * @param topEntId
      * @return
      */
     Integer statisticsLogistics(Long topEntId);
 
+    /**
+     * 统计托运订单
+     *
+     * @param topEntId
+     * @return
+     */
+    Integer statisticsLogisticsByConsign(Long topEntId);
+
     /**
      * 统计调度派车
      *

+ 1 - 1
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/dao/KwtLogisticsOrderMapper.java

@@ -357,7 +357,7 @@ public interface KwtLogisticsOrderMapper extends BaseMapper<KwtLogisticsOrder> {
 
     List<Long> statisticsLogistics(@Param("topEntId") Long topEntId);
 
-    Integer statisticsLogisticsByTopEntIdAndOrderStatus(@Param("topEntId") Long topEntId, @Param("orderList") List<Integer> orderList);
+    Integer statisticsLogisticsByTopEntIdAndOrderStatus(@Param("topEntId") Long topEntId, @Param("orderList") List<Integer> orderList,@Param("unitType") String unitType);
 
     /**
      * @param statusList 单据状态集合

+ 20 - 1
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/dubbo/TransportStatisticsServiceImpl.java

@@ -99,7 +99,26 @@ public class TransportStatisticsServiceImpl implements TransportStatisticsServic
         orderList.add(LogisticsOrderEnum.HAVE_FINISHED.getCode());
         orderList.add(LogisticsOrderEnum.HAVE_RECONCILED.getCode());
         orderList.add(LogisticsOrderEnum.HAVE_ALREADY_SETTLED.getCode());
-        Integer count = logisticsOrderMapper.statisticsLogisticsByTopEntIdAndOrderStatus(topEntId, orderList);
+        Integer count = logisticsOrderMapper.statisticsLogisticsByTopEntIdAndOrderStatus(topEntId, orderList,"2");
+        return count;
+    }
+
+    /**
+     * 统计托运订单数量
+     *
+     * @param topEntId 集团企业id
+     * @return
+     */
+    @Override
+    public Integer statisticsLogisticsByConsign(Long topEntId) {
+        //统计维度
+        List<Integer> orderList = new ArrayList<>();
+        orderList.add(LogisticsOrderEnum.WAIT_DELIVERY.getCode());
+        orderList.add(LogisticsOrderEnum.IN_TRANSIT.getCode());
+        orderList.add(LogisticsOrderEnum.HAVE_FINISHED.getCode());
+        orderList.add(LogisticsOrderEnum.HAVE_RECONCILED.getCode());
+        orderList.add(LogisticsOrderEnum.HAVE_ALREADY_SETTLED.getCode());
+        Integer count = logisticsOrderMapper.statisticsLogisticsByTopEntIdAndOrderStatus(topEntId, orderList,"1");
         return count;
     }
 }

+ 1 - 0
sckw-modules/sckw-transport/src/main/resources/mapper/KwtLogisticsOrderMapper.xml

@@ -1897,6 +1897,7 @@
         <if test="topEntId != null and topEntId != ''">
             AND ( b.ent_id = #{topEntId} OR b.top_ent_id = #{topEntId} )
         </if>
+        AND b.unit_type=#{unitType}
         And a.status in
         <foreach collection="orderList" open="(" close=")" separator="," item="item">
             #{item}