luobang 3 years ago
parent
commit
53794a2d26

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

@@ -269,9 +269,13 @@ public class StatisticalReportController extends BaseRESTfulController {
                                             Integer pageNum,
                                             Integer pageSize,
                                             String startTime,
-                                            String endTime
+                                            String endTime,
+                                           String con
     ){
         DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
+        if(con != null && !"null".equals(con)){
+            mapValue.put("con","%" + con + "%");
+        }
         PageHelper.startPage(pageNum, pageSize);
         //分页数据
         List<Map<String, Object>> report = statisticalReportService.getLXInwardReport(mapValue);

+ 9 - 3
src/main/java/com/steerinfo/dil/controller/TmstruckLoadResultController.java

@@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
 import java.util.*;
 
 /**
@@ -46,6 +47,9 @@ public class TmstruckLoadResultController extends BaseRESTfulController {
     @Autowired
     ColumnDataUtil columnDataUtil;
 
+
+    private final SimpleDateFormat sdfDateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
     @ApiOperation(value="生成装车实绩 :远程调用专用")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "resultId", value = "装车作业实绩ID", required = false, dataType = "Integer"),
@@ -103,8 +107,8 @@ public class TmstruckLoadResultController extends BaseRESTfulController {
                                         Integer orderType,
                                         String con,
                                         String userId,
-                                        String userIds){
-
+                                        String userIds, String startTime, String endTime){
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
         if (status!=null){
             mapValue.put("status", status);
         }
@@ -117,7 +121,9 @@ public class TmstruckLoadResultController extends BaseRESTfulController {
         if (userIds!=null){
             mapValue.put("userIds",userIds);
         }
-
+        if (con != null && !"null".equals(con)){
+            mapValue.put("con","%" + con + "%");
+        }
         PageHelper.startPage(pageNum,pageSize);
         //分页数据
         List<Map<String, Object>> loadResult = tmstruckLoadResultService.getAllLoadResult(mapValue);

+ 7 - 1
src/main/java/com/steerinfo/dil/controller/TmstruckWeightResultController.java

@@ -47,6 +47,8 @@ public class TmstruckWeightResultController extends BaseRESTfulController {
     @Autowired
     ColumnDataUtil columnDataUtil;
 
+
+
     @ApiOperation(value="新增计量实绩 ")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "mapValue", value = "总实绩ID、计皮点、计毛点", required = false, dataType = "Map"),
@@ -74,7 +76,8 @@ public class TmstruckWeightResultController extends BaseRESTfulController {
                                                Integer orderType,
                                                String con,
                                                String userId,
-                                               String usersId
+                                               String usersId,
+                                            String startTime,String endTime
     ){
         if (orderType!=null) {
             mapValue.put("orderTypee", orderType);
@@ -85,6 +88,9 @@ public class TmstruckWeightResultController extends BaseRESTfulController {
         if (usersId!=null){
             mapValue.put("usersId",usersId);
         }
+        if(con != null && !"null".equals(con)){
+            mapValue.put("con","%" + con + "%");
+        }
         PageHelper.startPage(pageNum,pageSize);
         //分页数据
         List<Map<String, Object>> jiMaoResult = tmstruckWeightResultService.getAllJiMaoResult(mapValue);

+ 8 - 4
src/main/resources/com/steerinfo/dil/mapper/StatisticalReportMapper.xml

@@ -1098,7 +1098,8 @@
         TLFR2.RESULT_OUT_GATE_TIME    "outGatepostTimeSecond",
         TLFR2.RESULT_OUT_GATE_TIME    "resultOutGateTime",
         TLFR2.RESULT_OUT_MODE         "outModeSecond",
-        RG4.GATEPOST_NAME             "gatepostNameSecond"
+        RG4.GATEPOST_NAME             "gatepostNameSecond",
+        RC.CAPACITY_NUMBER || RM.MATERIAL_NAME || RS.SUPPLIER_NAME || RCE.CONSIGNEE_COMPANY_NAME "likeCon"
         FROM OMSTRUCK_ORDER OO
         LEFT JOIN OMSTRUCK_ORDER_MATERIAL OOM ON OOM.ORDER_ID = OO.ORDER_ID
         LEFT JOIN RMS_MATERIAL RM ON RM.MATERIAL_ID = OOM.MATERIAL_ID
@@ -1127,8 +1128,7 @@
         LEFT JOIN RMS_TRUCK_CALCULATE RTC4  ON RTC4.TRUCK_CALCULATE_ID = TWR4.RESULT_TARE_PLACE_ID
         LEFT JOIN TMSTRUCK_LEAVE_FACTORY_RESULT TLFR2  ON TLFR2.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
         LEFT JOIN RMS_GATEPOST RG4  ON TLFR2.GATEPOST_ID = RG4.GATEPOST_ID
-        WHERE OO.ORDER_TYPE = 14
-        AND TER1.SEGMEN_SQE = 1
+        WHERE  TER1.SEGMEN_SQE = 1
         AND TWR1.TARE_SEGMENT_SQE = 2
         AND TLR.SEGMENT_SQE = 3
         AND TWR2.GROSS_SEGMENT_SQE = 4
@@ -1139,6 +1139,7 @@
         AND TWR4.TARE_SEGMENT_SQE = 9
         AND TLFR2.SEGMENT_SQE = 10
         AND TWR2.RESULT_GROSS_WEIGHT_TIME IS NOT NULL
+        AND OO.ORDER_TYPE = 14
         <if test="oneDate != null">
             and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TWR4.RESULT_TARE_WEIGHT_TIME
         </if>
@@ -1148,8 +1149,11 @@
         </if>
         )
         <where>
+            <if test="con != null">
+                and "likeCon" like #{con}
+            </if>
             <if test="consigneeName != null">
-                <foreach collection="consigneeName" item="item" open="(" separator="or" close=")">
+                and <foreach collection="consigneeName" item="item" open="(" separator="or" close=")">
                     "consigneeName" like '%${item}%'
                 </foreach>
             </if>

+ 13 - 2
src/main/resources/com/steerinfo/dil/mapper/TmstruckLoadResultMapper.xml

@@ -1480,7 +1480,8 @@
     TLR.RESULT_LOAD_END_TIME   "resultLoadEndTime",
     TLR.RESULT_LOAD_DURATION   "resultLoadDuration",
     RW.WAREHOUSE_NAME          "warehouseName",
-    TWR.RESULT_NET_WEIGHT     "resultNetWeight"
+    TWR.RESULT_NET_WEIGHT     "resultNetWeight",
+    RC.CAPACITY_NUMBER || RM.MATERIAL_NAME || RW.WAREHOUSE_NAME "likeCon"
     FROM TMSTRUCK_LOAD_RESULT TLR
     LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
     ON TTR.RESULT_TOTAL_ID = TLR.RESULT_TOTAL_ID
@@ -1498,10 +1499,20 @@
     ON TTR.RESULT_TOTAL_ID = TWR.RESULT_TOTAL_ID
     WHERE OO.ORDER_TYPE = #{orderTypee}
     AND TLR.RESULT_LOAD_START_TIME IS NOT NULL
+    <if test="oneDate != null">
+      and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TLR.RESULT_LOAD_END_TIME
+    </if>
+    <if test="startDate != null">
+      and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TLR.RESULT_LOAD_END_TIME
+      and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TLR.RESULT_LOAD_END_TIME
+    </if>
     )
     <where>
+      <if test="con != null">
+        and "likeCon" like #{con}
+      </if>
       <if test="resultLoadEndTime != null">
-        <foreach collection="resultLoadEndTime" item="item" open="(" separator="or" close=")">
+        and <foreach collection="resultLoadEndTime" item="item" open="(" separator="or" close=")">
           "resultLoadEndTime" like '%${item}%'
         </foreach>
       </if>

+ 2 - 1
src/main/resources/com/steerinfo/dil/mapper/TmstruckWeightResultMapper.xml

@@ -2088,7 +2088,8 @@
         TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
         TWR.RESULT_NET_WEIGHT "resultNetWeight",
         TWR.RESULT_POUND_NO "resultPoundNo",
-        TWR.INSERT_UPDATE_REMARK "insertUpdateRemark"
+        TWR.INSERT_UPDATE_REMARK "insertUpdateRemark",
+        RC.CAPACITY_NUMBER
         from TMSTRUCK_WEIGHT_RESULT TWR
         left join TMSTRUCK_TOTAL_RESULT TTR
         on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID