Parcourir la source

大屏柱图接口调整

Sun il y a 3 ans
Parent
commit
b0771b5fb2

+ 12 - 5
ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/service/impl/TWhgenlegServiceImpl.java

@@ -25,6 +25,7 @@ import com.ruoyi.reportManagement.service.ITWhgenlegService;
 import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
 import com.ruoyi.warehouseBusiness.domain.enums.WarehouseTypeEnum;
 import com.ruoyi.warehouseBusiness.mapper.TWarehouseBillsMapper;
+import com.ruoyi.warehouseBusiness.mapper.TWarehousebillsitemsMapper;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -50,9 +51,13 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
 
     @Autowired
     private TWarehouseMapper tWarehouseMapper;
+
     @Autowired
     private TCustomerContactMapper customerContactMapper;
 
+    @Autowired
+    private TWarehousebillsitemsMapper tWarehousebillsitemsMapper;
+
     /**
      * 查询库存总账
      *
@@ -685,10 +690,12 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
         for (int i = -5; i <= 0; i++) {
             categories.add(DateUtils.offsetOnlyMonth(i) + "月");
 
-            weightMap = tWhgenlegMapper.biWeightInfo(DateUtils.beginOfOffsetMonth(i) + " 00:00:00",
-                    DateUtils.endOfOffsetMonth(i) + " 23:59:59", warehouseId);
-            quantityInList.add(weightMap.get("quantityIn"));
-            quantityList.add(weightMap.get("quantity"));
+            weightMap = tWarehousebillsitemsMapper.inAndOutStockStatistics("SJRK", DateUtils.beginOfOffsetMonth(i) + " 00:00:00",
+                    DateUtils.endOfOffsetMonth(i) + " 23:59:59", null, warehouseId);
+            quantityInList.add(weightMap.get("total"));
+            weightMap = tWarehousebillsitemsMapper.inAndOutStockStatistics("SJCK", DateUtils.beginOfOffsetMonth(i) + " 00:00:00",
+                    DateUtils.endOfOffsetMonth(i) + " 23:59:59", null, warehouseId);
+            quantityList.add(weightMap.get("total"));
         }
 
         seriesMap = new HashMap<>();
@@ -696,7 +703,7 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
         seriesMap.put("data", quantityInList);
         series.add(seriesMap);
         seriesMap = new HashMap<>();
-        seriesMap.put("name", "库毛重");
+        seriesMap.put("name", "库毛重");
         seriesMap.put("data", quantityList);
         series.add(seriesMap);
 

+ 2 - 2
ruoyi-warehouse/src/main/resources/mapper/reportManagement/TWhgenlegMapper.xml

@@ -567,7 +567,7 @@
             tc.f_name as fName
         from t_whgenleg tw left join t_corps tc on tw.f_corpid = tc.f_id
         <where>
-            <if test="fId != null and fId != ''">and tw.f_mblno = #{fMblno}</if>
+            <if test="fId != null and fId != ''">and tw.f_mblno like concat('%',#{fMblno},'%')</if>
         </where>
         group by tc.f_id, tc.f_name
     </select>
@@ -1230,7 +1230,7 @@
     <select id="biCustomerInfo" resultType="map">
         select
             tc.f_cname as customerName,
-            round(ifnull(sum(tw.f_grossweightblc), 0) / 1000, 2) as quantity
+            round(ifnull(sum(tw.f_grossweightblc), 0) / 1000) as quantity
         from t_whgenleg tw left join t_corps tc on tw.f_corpid = tc.f_id
         where
             tw.f_qtyD != 0

+ 2 - 2
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsMapper.xml

@@ -417,7 +417,7 @@
             <if test="fNewTrademodeid != null ">and bill.f_new_trademodeid = #{fNewTrademodeid}</if>
         </where>
         ${params.dataScope}
-        ORDER BY bill.create_time DESC, bill.f_bsdate DESC, bill.f_bstime DESC,bill.f_id DESC,bill.f_billstatus
+        ORDER BY bill.f_bsdate DESC, bill.f_bstime DESC,bill.f_id DESC,bill.f_billstatus
     </select>
 
     <select id="selectWarehouseBusinessList1" parameterType="TWarehousebills" resultType="Map">
@@ -585,7 +585,7 @@
             <if test="fNewTrademodeid != null ">and bill.f_new_trademodeid = #{fNewTrademodeid}</if>
         </where>
         ${params.dataScope}
-        ORDER BY bill.create_time DESC, bill.f_bsdate DESC, bill.f_bstime DESC,bill.f_id DESC,bill.f_billstatus
+        ORDER BY bill.f_bsdate DESC, bill.f_bstime DESC,bill.f_id DESC,bill.f_billstatus
     </select>
 
     <select id="selectTWarehousebillsById" parameterType="Long" resultMap="TWarehousebillsResult">