Procházet zdrojové kódy

Merge branch 'master' into dev

zx před 3 roky
rodič
revize
25288f661b

+ 2 - 2
src/main/java/com/steerinfo/dil/controller/StatisticalReportController.java

@@ -87,7 +87,7 @@ public class StatisticalReportController extends BaseRESTfulController {
                 mapValue.put("carrierSsoId", carrierSsoId);
             }
         }
-        DataChange.queryDataByTwoDate(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
         List<Map<String, Object>> allReport =  statisticalReportService.getAllSaleReportNum(mapValue);
         PageHelper.startPage(pageNum, pageSize);
         //分页数据
@@ -115,7 +115,7 @@ public class StatisticalReportController extends BaseRESTfulController {
                 mapValue.put("carrierSsoId", carrierSsoId);
             }
         }
-        DataChange.queryDataByTwoDate(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
         List<Map<String, Object>> allReport =  statisticalReportService.getAllSaleReportNum(mapValue);
         //获取销售统计报表筛选过后的总净重
         BigDecimal AllResultNetWeight = new BigDecimal(0);

+ 1 - 1
src/main/java/com/steerinfo/dil/util/DataChange.java

@@ -198,7 +198,7 @@ public class DataChange {
      * @param sdf
      * @return
      **/
-    public static void queryDataByTwoDate(String startTime, String endTime, Map<String, Object> map,SimpleDateFormat sdf){
+    public static void queryDataByDateTime(String startTime, String endTime, Map<String, Object> map,SimpleDateFormat sdf){
         SimpleDateFormat sdfDate = new SimpleDateFormat("yyyy-MM-dd");
         if (startTime != null && !"null".equals(startTime) && endTime != null && !"null".equals(endTime)) {
             map.put("startDate", sdf.format(new Date(Long.parseLong(startTime))));

+ 9 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckLeaveFactoryResultMapper.xml

@@ -464,6 +464,7 @@
                 TLFR.RESULT_ID "resultId",
                 APO.PURCHASE_ORDER_NO "purchaseOrderNo",
                 RM.MATERIAL_NAME "materialName",
+                TWR.RESULT_NET_WEIGHT "netWeight",
                 DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
                 OO.ORDER_NUMBER "orderNumber",
                 RC.CAPACITY_NUMBER "capacityNumber",
@@ -475,6 +476,8 @@
         from TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
         left join TMSTRUCK_TOTAL_RESULT TTR
             on TTR.RESULT_TOTAL_ID = TLFR.RESULT_TOTAL_ID
+        left join TMSTRUCK_WEIGHT_RESULT TWR
+        on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
         left join OMSTRUCK_ORDER OO
             on OO.ORDER_ID = TTR.ORDER_ID
         left join AMS_PURCHASE_ORDER APO
@@ -511,6 +514,12 @@
                     "materialName" like '%${item}%'
                 </foreach>
             </if>
+            <if test="netWeight != null">
+                and
+                <foreach collection="netWeight" item="item" open="(" separator="or" close=")">
+                    "netWeight" like '%${item}%'
+                </foreach>
+            </if>
             <if test="resultForeignShipName != null">
                 and
                 <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">