Procházet zdrojové kódy

getWorkTrend接口的value改为查询单据数量

wangzhuo před 2 roky
rodič
revize
cd0de4e7bb

+ 1 - 1
ruoyi-plugin/src/main/java/com/ruoyi/ccb/service/impl/ForeignHttpServiceImpl.java

@@ -352,7 +352,7 @@ public class ForeignHttpServiceImpl implements ForeignHttpService{
         }
 
         //出库单据
-        List<Map<String, Object>> outputReceiptList = itWarehouseService.getWorkTrend(wareHouseId,startTime,endTime, "SJRK");
+        List<Map<String, Object>> outputReceiptList = itWarehouseService.getWorkTrend(wareHouseId,startTime,endTime, "SJCK");
         outputReceiptList.removeAll(Collections.singleton(null));
         if (outputReceiptList == null){
             data.put("outputReceiptList", new ArrayList<Map<String,Object>>());

+ 4 - 3
ruoyi-warehouse/src/main/resources/mapper/basicData/TWarehouseMapper.xml

@@ -713,12 +713,13 @@
 
     <select id="getWorkTrend"  resultType="map">
         SELECT
-            f_bsdate as time,
-            ROUND( SUM( TW.f_grossweight ) / 1000, 2 ) AS value
+            TW.f_bsdate as time,
+            count(*) AS value
         FROM
         t_warehousebills TW
+        inner join t_warehousebillsitems TWI on TW.f_id = TWI.f_pid
         <where>
-            TW.del_flag = '0'
+            TW.del_flag = '0' and TWI.del_flag = '0'
             AND TW.f_warehouseid = #{wareHouseId}
             <if test="countType != null and countType != ''">
                 and TW.f_billtype = #{countType}