Jelajahi Sumber

Merge branch 'master' into dev

txf 3 tahun lalu
induk
melakukan
8a77bb6ea0
17 mengubah file dengan 292 tambahan dan 38 penghapusan
  1. 53 4
      src/main/java/com/steerinfo/dil/controller/StatisticalReportController.java
  2. 18 3
      src/main/java/com/steerinfo/dil/controller/TmstruckEnfactoryResultController.java
  3. 22 7
      src/main/java/com/steerinfo/dil/controller/TmstruckLeaveFactoryResultController.java
  4. 21 4
      src/main/java/com/steerinfo/dil/controller/TmstruckLoadResultController.java
  5. 18 3
      src/main/java/com/steerinfo/dil/controller/TmstruckUnloadResultController.java
  6. 34 7
      src/main/java/com/steerinfo/dil/controller/TmstruckWeightResultController.java
  7. 1 1
      src/main/java/com/steerinfo/dil/mapper/StatisticalReportMapper.java
  8. 1 0
      src/main/java/com/steerinfo/dil/mapper/TmstruckLeaveFactoryResultMapper.java
  9. 1 1
      src/main/java/com/steerinfo/dil/service/impl/TmstruckLoadResultServiceImpl.java
  10. 2 2
      src/main/java/com/steerinfo/dil/service/impl/TmstruckWeightResultServiceImpl.java
  11. 22 0
      src/main/java/com/steerinfo/dil/util/DataChange.java
  12. 54 0
      src/main/resources/com/steerinfo/dil/mapper/StatisticalReportMapper.xml
  13. 7 1
      src/main/resources/com/steerinfo/dil/mapper/TmstruckEnfactoryResultMapper.xml
  14. 6 0
      src/main/resources/com/steerinfo/dil/mapper/TmstruckLeaveFactoryResultMapper.xml
  15. 7 0
      src/main/resources/com/steerinfo/dil/mapper/TmstruckLoadResultMapper.xml
  16. 6 0
      src/main/resources/com/steerinfo/dil/mapper/TmstruckUnloadResultMapper.xml
  17. 19 5
      src/main/resources/com/steerinfo/dil/mapper/TmstruckWeightResultMapper.xml

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

@@ -3,6 +3,7 @@ package com.steerinfo.dil.controller;
 import com.steerinfo.dil.service.impl.StatisticalReportImpl;
 import com.steerinfo.dil.util.BaseRESTfulController;
 import com.steerinfo.dil.util.ColumnDataUtil;
+import com.steerinfo.dil.util.DataChange;
 import com.steerinfo.dil.util.PageListAdd;
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.pagehelper.PageHelper;
@@ -15,6 +16,8 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -34,6 +37,8 @@ public class StatisticalReportController extends BaseRESTfulController {
     @Autowired
     ColumnDataUtil columnDataUtil;
 
+    private final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+
     @ApiOperation(value="查询辅料燃料统计报表")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
@@ -47,9 +52,12 @@ public class StatisticalReportController extends BaseRESTfulController {
                                                Integer apiId,
                                                Integer pageNum,
                                                Integer pageSize,
+                                               String startTime,
+                                               String endTime,
                                                Integer orderType
     ){
         mapValue.put("orderTypee", orderType);
+        DataChange.queryDataByDate(startTime, endTime, mapValue, sdf);//根据时间段查询数据
         List<Map<String, Object>> allReport =  statisticalReportService.getAllPurchaseFLRLReport(mapValue);
         PageHelper.startPage(pageNum, pageSize);
         //分页数据
@@ -71,6 +79,8 @@ public class StatisticalReportController extends BaseRESTfulController {
                                        Integer apiId,
                                        Integer pageNum,
                                        Integer pageSize,
+                                       String startTime,
+                                       String endTime,
                                        String carrierSsoId
     ){
         if(carrierSsoId != null){
@@ -78,6 +88,7 @@ public class StatisticalReportController extends BaseRESTfulController {
                 mapValue.put("carrierSsoId", carrierSsoId);
             }
         }
+        DataChange.queryDataByDate(startTime, endTime, mapValue, sdf);//根据时间段查询数据
         List<Map<String, Object>> allReport =  statisticalReportService.getAllSaleReportNum(mapValue);
         PageHelper.startPage(pageNum, pageSize);
         //分页数据
@@ -99,13 +110,32 @@ public class StatisticalReportController extends BaseRESTfulController {
                                           Integer apiId,
                                           Integer pageNum,
                                           Integer pageSize,
-                                          String carrierSsoId
+                                          String startTime,
+                                          String endTime,
+                                          String carrierSsoId,
+                                          String userId,
+                                           String userIds,
+                                           String con,
+                                           Integer orderType
     ){
-        if(carrierSsoId != null){
-            if(!"null".equals(carrierSsoId)){
+        if(carrierSsoId != null) {
+            if (!"null".equals(carrierSsoId)) {
                 mapValue.put("carrierSsoId", carrierSsoId);
             }
         }
+        DataChange.queryDataByDate(startTime, endTime, mapValue, sdf);//根据时间段查询数据
+            if (userId!=null){
+                mapValue.put("userId",userId);
+            }
+            if (orderType!=null){
+                mapValue.put("orderType",orderType);
+            }
+            if (userIds!=null){
+                mapValue.put("userIds",userIds);
+            }
+            if (con!=null&&!con.equals("undefined")){
+                mapValue.put("con","%"+con+"%");
+            }
         List<Map<String, Object>> allReport =  statisticalReportService.getSporadicSuppliesReportNum1(mapValue);
         PageHelper.startPage(pageNum, pageSize);
         //分页数据
@@ -127,13 +157,32 @@ public class StatisticalReportController extends BaseRESTfulController {
                                                    Integer apiId,
                                                    Integer pageNum,
                                                    Integer pageSize,
-                                                   String carrierSsoId
+                                                   String startTime,
+                                                   String endTime,
+                                                   String carrierSsoId,
+                                                    String userId,
+                                                    String userIds,
+                                                    String con,
+                                                    Integer orderType
     ){
         if(carrierSsoId != null){
             if(!"null".equals(carrierSsoId)){
                 mapValue.put("carrierSsoId", carrierSsoId);
             }
         }
+        DataChange.queryDataByDate(startTime, endTime, mapValue, sdf);//根据时间段查询数据
+        if (con!=null&&!con.equals("undefined")){
+            mapValue.put("con","%"+con+"%");
+        }
+        if (userId!=null){
+            mapValue.put("userId",userId);
+        }
+        if (orderType!=null){
+            mapValue.put("orderType",orderType);
+        }
+        if (userIds!=null){
+            mapValue.put("userIds",userIds);
+        }
         List<Map<String, Object>> allReport =  statisticalReportService.getSporadicSuppliesReportNum2(mapValue);
         PageHelper.startPage(pageNum, pageSize);
         //分页数据

+ 18 - 3
src/main/java/com/steerinfo/dil/controller/TmstruckEnfactoryResultController.java

@@ -57,9 +57,24 @@ public class TmstruckEnfactoryResultController extends BaseRESTfulController {
                                        Integer pageNum,
                                        Integer pageSize,
                                        Integer orderType,
-                                       String con
+                                       String con,
+                                       String userId,
+                                       String userIds
                                        ){
-        mapValue.put("orderTypee", orderType);
+        int count=0;
+        if (userId!=null){
+            mapValue.put("userId",userId);
+            count++;
+        }
+        if (userIds!=null){
+            mapValue.put("userIds",userIds);
+            count++;
+        }
+        if (orderType!=null){
+            mapValue.put("orderTypee", orderType);
+            count++;
+        }
+
         //框计算
         if(con != null){
             if(!"undefined".equals(con)){
@@ -71,7 +86,7 @@ public class TmstruckEnfactoryResultController extends BaseRESTfulController {
         }
         List<Map<String, Object>> allEnFactoryResult = null;
         //如果有条件查询则跳过初始化,和创建索引
-        if(mapValue.size() == 1){
+        if(mapValue.size() == count){
             //将查询结果存入索引中
             allEnFactoryResult = tmstruckEnfactoryResultService.getAllEnFactoryResult(mapValue);
             Map<String, Object> map = new HashMap<>();

+ 22 - 7
src/main/java/com/steerinfo/dil/controller/TmstruckLeaveFactoryResultController.java

@@ -70,12 +70,27 @@ public class TmstruckLeaveFactoryResultController extends BaseRESTfulController
     })
     @PostMapping("/getLeaveFactoryResult")
     public RESTfulResult getLeaveFactoryResult(@RequestBody(required=false) Map<String,Object> mapValue,
-                                          Integer apiId,
-                                          Integer pageNum,
-                                          Integer pageSize,
-                                          Integer orderType,
-                                          String con, String carrierSsoId){
-        mapValue.put("orderTypee", orderType);
+                                               Integer apiId,
+                                               Integer pageNum,
+                                               Integer pageSize,
+                                               Integer orderType,
+                                               String con,
+                                               String carrierSsoId,
+                                               String userId,
+                                               String userIds){
+        int count=0;
+        if (userId!=null){
+            mapValue.put("userId",userId);
+            count++;
+        }
+        if (userIds!=null){
+            mapValue.put("userIds",userIds);
+            count++;
+        }
+        if (orderType!=null){
+            mapValue.put("orderTypee", orderType);
+            count++;
+        }
         if(carrierSsoId != null){
             if(!"null".equals(carrierSsoId)){
                 mapValue.put("carrierSsoId", carrierSsoId);
@@ -90,7 +105,7 @@ public class TmstruckLeaveFactoryResultController extends BaseRESTfulController
         }
         List<Map<String, Object>> allLeaveFactoryResult = null;
         //如果有条件查询则跳过初始化,和创建索引
-        if(mapValue.size() == 1){
+        if(mapValue.size() == count){
             //将查询结果存入索引中
             allLeaveFactoryResult = tmstruckLeaveFactoryResultService.getLeaveFactoryResult(mapValue);
             Map<String, Object> map = new HashMap<>();

+ 21 - 4
src/main/java/com/steerinfo/dil/controller/TmstruckLoadResultController.java

@@ -126,9 +126,26 @@ public class TmstruckLoadResultController extends BaseRESTfulController {
                                         Integer pageSize,
                                         Integer status,
                                         Integer orderType,
-                                        String con){
-        mapValue.put("status", status);
-        mapValue.put("orderTypee", orderType);
+                                        String con,
+                                        String userId,
+                                        String userIds){
+        int count=0;
+        if (status!=null){
+            mapValue.put("status", status);
+            count++;
+        }
+        if (orderType!=null){
+            mapValue.put("orderTypee", orderType);
+            count++;
+        }
+        if (userId!=null){
+            mapValue.put("userId",userId);
+            count++;
+        }
+        if (userIds!=null){
+            mapValue.put("userIds",userIds);
+            count++;
+        }
         //框计算
         if(con != null){
             if(!"undefined".equals(con)){
@@ -139,7 +156,7 @@ public class TmstruckLoadResultController extends BaseRESTfulController {
         //不分页筛选数据
         List<Map<String, Object>> allLoadResult = null;
         //如果有条件查询则跳过初始化,和创建索引
-        if(mapValue.size() == 2){
+        if(mapValue.size() == count){
             //将查询结果存入索引中
             allLoadResult = tmstruckLoadResultService.getAllLoadResult(mapValue);
             Map<String, Object> map = new HashMap<>();

+ 18 - 3
src/main/java/com/steerinfo/dil/controller/TmstruckUnloadResultController.java

@@ -57,9 +57,24 @@ public class TmstruckUnloadResultController extends BaseRESTfulController {
                                            Integer apiId,
                                            Integer pageNum,
                                            Integer pageSize,
-                                           Integer orderType,String con
+                                           Integer orderType,
+                                           String con,
+                                           String userId,
+                                           String  userIds
     ){
-        mapValue.put("orderTypee", orderType);
+        int count=0;
+        if (orderType!=null){
+            mapValue.put("orderTypee", orderType);
+            count++;
+        }
+        if (userId!=null){
+            mapValue.put("userId",userId);
+            count++;
+        }
+        if (userIds!=null){
+            mapValue.put("userIds",userIds);
+            count++;
+        }
         //框计算
         if(con != null){
             if(!"undefined".equals(con)){
@@ -70,7 +85,7 @@ public class TmstruckUnloadResultController extends BaseRESTfulController {
         //不分页筛选数据
         List<Map<String, Object>> allUnloadResult = null;
         //如果有条件查询则跳过初始化,和创建索引
-        if(mapValue.size() == 1){
+        if(mapValue.size() == count){
             //将查询结果存入索引中
             allUnloadResult = tmstruckUnloadResultService.getUnloadResult(mapValue);
             Map<String, Object> map = new HashMap<>();

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

@@ -71,9 +71,23 @@ public class TmstruckWeightResultController extends BaseRESTfulController {
                                                Integer pageNum,
                                                Integer pageSize,
                                                Integer orderType,
-                                               String con
+                                               String con,
+                                               String userId,
+                                               String usersId
     ){
-        mapValue.put("orderTypee", orderType);
+        int count=0;
+        if (orderType!=null) {
+            mapValue.put("orderTypee", orderType);
+            count++;
+        }
+        if (userId!=null){
+            mapValue.put("userId",userId);
+            count++;
+        }
+        if (usersId!=null){
+            mapValue.put("usersId",usersId);
+            count++;
+        }
         //框计算
         if(con != null){
             if(!"undefined".equals(con)){
@@ -83,7 +97,7 @@ public class TmstruckWeightResultController extends BaseRESTfulController {
         }
         List<Map<String, Object>> allJiMaoResult = null;
         //如果有条件查询则跳过初始化,和创建索引
-        if(mapValue.size() == 1){
+        if(mapValue.size() == count){
             //将查询结果存入索引中
             allJiMaoResult = tmstruckWeightResultService.getAllJiMaoResult(mapValue);
             Map<String, Object> map = new HashMap<>();
@@ -122,10 +136,23 @@ public class TmstruckWeightResultController extends BaseRESTfulController {
                                            Integer pageNum,
                                            Integer pageSize,
                                            Integer orderType,
-                                           String con
+                                           String con,
+                                           String userId,
+                                           String userIds
     ){
-
-        mapValue.put("orderTypee", orderType);
+        int count=0;
+        if (orderType!=null) {
+            mapValue.put("orderTypee", orderType);
+            count++;
+        }
+        if (userId!=null) {
+            mapValue.put("userId",userId);
+            count++;
+        }
+        if (userIds!=null){
+            mapValue.put("usersId",userIds);
+            count++;
+        }
         //框计算
         if(con != null){
             if(!"undefined".equals(con)){
@@ -136,7 +163,7 @@ public class TmstruckWeightResultController extends BaseRESTfulController {
         //不分页筛选数据
         List<Map<String, Object>> allJiPiResult = null;
         //如果有条件查询则跳过初始化,和创建索引
-        if(mapValue.size() == 1){
+        if(mapValue.size() == count){
             //将查询结果存入索引中
             allJiPiResult = tmstruckWeightResultService.getAllJiPiResult(mapValue);
             Map<String, Object> map = new HashMap<>();

+ 1 - 1
src/main/java/com/steerinfo/dil/mapper/StatisticalReportMapper.java

@@ -21,6 +21,6 @@ public interface StatisticalReportMapper {
 //    查询零星物资进厂统计报表
     List<Map<String, Object>> getSporadicSuppliesReport1(Map<String, Object> mapValue);
 
-    //    查询零星物资厂统计报表
+    //    查询零星物资厂统计报表
     List<Map<String, Object>> getSporadicSuppliesReport2(Map<String, Object> mapValue);
 }

+ 1 - 0
src/main/java/com/steerinfo/dil/mapper/TmstruckLeaveFactoryResultMapper.java

@@ -51,6 +51,7 @@ public interface TmstruckLeaveFactoryResultMapper extends IBaseMapper<TmstruckLe
     Map<String, Object> getDeliveryOrder(String orderNumber);
 
     List<Map<String,Object>> getDeliveryOrderMaterial(String orderNumber);
+
     // 查询零星物资出厂列表
     List<Map<String,Object>> getSporadicLeaveFactory(Map<String, Object> mapValue);
 }

+ 1 - 1
src/main/java/com/steerinfo/dil/service/impl/TmstruckLoadResultServiceImpl.java

@@ -109,7 +109,7 @@ public class TmstruckLoadResultServiceImpl implements ITmstruckLoadResultService
             case 13:
             case 15:
             case 16:
-                 return tmstruckLoadResultMapper.getSporadicSuppliesLoadResult(map); //apiId = 404
+                 return tmstruckLoadResultMapper.getSporadicSuppliesLoadResult(map); //apiId = 430
         }
         return null;
     }

+ 2 - 2
src/main/java/com/steerinfo/dil/service/impl/TmstruckWeightResultServiceImpl.java

@@ -169,9 +169,9 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
             case 11:
                 break;
             case 12:
-                return tmstruckWeightResultMapper.getSporadicSuppliesJiPiResult(map);//apiId:392
+//                return tmstruckWeightResultMapper.getSporadicSuppliesJiPiResult(map);//apiId:392
             case 13:
-                return tmstruckWeightResultMapper.getFactorySkinSporadicJIPi(map); //apiId=401
+//                return tmstruckWeightResultMapper.getFactorySkinSporadicJIPi(map); //apiId=401
             case 15:
             case 16:
                 return tmstruckWeightResultMapper.getFactorySkinSporadicWeight(map); //apiId=401

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

@@ -166,4 +166,26 @@ public class DataChange {
         return sb.toString();
     }
 
+    /**
+     * 根据时间段查询数据
+     * @Author TXF
+     * @Date 2022/1/10 23:21
+     * @param startTime
+     * @param endTime
+     * @param map
+     * @param sdf
+     * @return
+     **/
+    public static void queryDataByDate(String startTime, String endTime, Map<String, Object> map, SimpleDateFormat sdf){
+        if (startTime != null && !"null".equals(startTime) && endTime != null && !"null".equals(endTime)) {
+            map.put("startDate", sdf.format(new Date(Long.parseLong(startTime))));
+            map.put("endDate", sdf.format(new Date(Long.parseLong(endTime) + 86400000)));
+        } else if (startTime != null && !"null".equals(startTime)) {
+            map.put("oneDate", sdf.format(new Date(Long.parseLong(startTime))));
+        } else if (endTime != null && !"null".equals(endTime)) {
+            map.put("oneDate", sdf.format(new Date(Long.parseLong(endTime))));
+        } else {
+            map.put("oneDate", sdf.format(new Date()));
+        }
+    }
 }

+ 54 - 0
src/main/resources/com/steerinfo/dil/mapper/StatisticalReportMapper.xml

@@ -76,6 +76,13 @@
                        </if>
               where OO.ORDER_STATUS in (5, 8, 9, 1, 2)
                 and OO.ORDER_TYPE = #{orderTypee}
+                    <if test="oneDate != null">
+                        and to_char(TER.RESULT_ENTRY_GATE_TIME, 'YYYY-MM-DD') = #{oneDate}
+                    </if>
+                    <if test="startDate != null">
+                        and to_date(#{startDate}, 'yyyy-mm-dd') &lt;= TER.RESULT_ENTRY_GATE_TIME
+                        and to_date(#{endDate}, 'yyyy-mm-dd') >= TER.RESULT_ENTRY_GATE_TIME
+                    </if>
              )
         <where>
             <if test="orderNumber != null">
@@ -205,6 +212,13 @@
                           <if test="carrierSsoId != null">
                               and RCA.CARRIER_SSO_ID = #{carrierSsoId}
                           </if>
+                          <if test="oneDate != null">
+                              and to_char(TER.RESULT_ENTRY_GATE_TIME, 'YYYY-MM-DD') = #{oneDate}
+                          </if>
+                          <if test="startDate != null">
+                              and to_date(#{startDate}, 'yyyy-mm-dd') &lt;= TER.RESULT_ENTRY_GATE_TIME
+                              and to_date(#{endDate}, 'yyyy-mm-dd') >= TER.RESULT_ENTRY_GATE_TIME
+                          </if>
              )
         <where>
             <if test="orderNumber != null">
@@ -348,6 +362,26 @@
         <if test="carrierSsoId != null">
             and RCA.CARRIER_SSO_ID = #{carrierSsoId}
         </if>
+        <if test="oneDate != null">
+            and to_char(TER.RESULT_ENTRY_GATE_TIME, 'YYYY-MM-DD') = #{oneDate}
+        </if>
+        <if test="startDate != null">
+            and to_date(#{startDate}, 'yyyy-mm-dd') &lt;= TER.RESULT_ENTRY_GATE_TIME
+            and to_date(#{endDate}, 'yyyy-mm-dd') >= TER.RESULT_ENTRY_GATE_TIME
+        </if>
+        <if test="con!=null">
+            where  "receiveName" like #{con} or  "sendName" like #{con} or "materialName" like #{con}
+            or "capacityNumber" like #{con}
+        </if>
+        <if test="userId!=null">
+            and ASO.INSERT_USERNAME=#{userId}
+        </if>
+        <if test="userIds!=null">
+            and ASO.UPDATE_USERNAME=#{userIds}
+        </if>
+        <if test="orderType!=null">
+            and OO.ORDER_TYPE=#{orderType}
+        </if>
         )
         <where>
             <if test="orderNumber != null">
@@ -491,6 +525,26 @@
         <if test="carrierSsoId != null">
             and RCA.CARRIER_SSO_ID = #{carrierSsoId}
         </if>
+        <if test="oneDate != null">
+            and to_char(TER.RESULT_ENTRY_GATE_TIME, 'YYYY-MM-DD') = #{oneDate}
+        </if>
+        <if test="startDate != null">
+            and to_date(#{startDate}, 'yyyy-mm-dd') &lt;= TER.RESULT_ENTRY_GATE_TIME
+            and to_date(#{endDate}, 'yyyy-mm-dd') >= TER.RESULT_ENTRY_GATE_TIME
+        </if>
+        <if test="con!=null">
+            where  "receiveName" like #{con} or  "sendName" like #{con} or "materialName" like #{con}
+           or "capacityNumber" like #{con}
+        </if>
+        <if test="userId!=null">
+            and ASO.INSERT_USERNAME=#{userId}
+        </if>
+        <if test="userIds!=null">
+            and ASO.UPDATE_USERNAME=#{userIds}
+        </if>
+        <if test="orderType!=null">
+            and OO.ORDER_TYPE=#{orderType}
+        </if>
         )
         <where>
             <if test="orderNumber != null">

+ 7 - 1
src/main/resources/com/steerinfo/dil/mapper/TmstruckEnfactoryResultMapper.xml

@@ -1192,7 +1192,13 @@
         on RG.GATEPOST_ID = TER.GATEPOST_ID
         left join RMS_CAPACITY RC
         on RC.CAPACITY_ID = OO.CAPACITY_ID
-        WHERE OO.ORDER_TYPE = #{orderTypee}
+        WHERE OO.ORDER_TYPE = #{orderTypee} and TER.RESULT_ENTRY_GATE_TIME IS NOT NULL
+            <if test="userId">
+               and ASO.INSERT_USERNAME=#{userId}
+            </if>
+            <if test="userIds">
+               and ASO.UPDATE_USERNAME=#{userIds}
+            </if>
         )
         <where>
             <if test="orderNumber != null">

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

@@ -1112,6 +1112,12 @@
         on RG.GATEPOST_ID = TLFR.GATEPOST_ID
         where RESULT_OUT_GATE_TIME is not null
         and OO.ORDER_TYPE = #{orderTypee}
+            <if test="userId!=null">
+             AND ASO.INSERT_USERNAME=#{userId}
+            </if>
+            <if test="userIds!=null">
+              AND ASO.UPDATE_USERNAME=#{userIds}
+            </if>
         )
         <where>
             <if test="orderNumber != null">

+ 7 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckLoadResultMapper.xml

@@ -1510,6 +1510,13 @@
         left join RMS_CAPACITY RC
         on RC.CAPACITY_ID = OO.CAPACITY_ID
         where TLR.STATUS = #{status} and OO.ORDER_TYPE = #{orderTypee}
+          and TLR.RESULT_LOAD_START_TIME IS NOT NULL
+          <if test="userId!=null">
+             AND  ASO.INSERT_USERNAME=#{userId}
+          </if>
+           <if test="userIds!=null">
+             and ASO.UPDATE_USERNAME = #{userIds}
+            </if>
         )
         <where>
             <if test="orderNumber != null">

+ 6 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckUnloadResultMapper.xml

@@ -945,6 +945,12 @@
         ON RW.WAREHOUSE_ID = TUR.RESULT_UNLOAD_PLACE_ID
         WHERE TUR.RESULT_END_TIME IS NOT NULL
         AND OO.ORDER_TYPE = #{orderTypee}
+         <if test="userId != null">
+             and ASO.INSERT_USERNAME=#{userId}
+         </if>
+         <if test="userIds!=null">
+              and ASO.UPDATE_USERNAME=#{userIds}
+         </if>
         )
         <where>
             <if test="orderNumber != null">

+ 19 - 5
src/main/resources/com/steerinfo/dil/mapper/TmstruckWeightResultMapper.xml

@@ -2216,6 +2216,12 @@
         on RTC.TRUCK_CALCULATE_ID = TWR.RESULT_GROSS_PLACE_ID
         where RESULT_GROSS_WEIGHT_TIME is not null and
         OO.ORDER_TYPE = #{orderTypee}
+            <if test="userId!=null">
+                and ASO.INSERT_USERNAME=#{userId}
+            </if>
+            <if test="usersId!=null">
+                and ASO.UPDATE_USERNAME=#{usersId}
+            </if>
         )
         <where>
             <if test="purchaseOrderNo != null">
@@ -2292,7 +2298,8 @@
         on OOM.ORDER_ID = OO.ORDER_ID
         left join RMS_MATERIAL RM
         on RM.MATERIAL_ID = OOM.MATERIAL_ID
-        where RESULT_TARE_WEIGHT_TIME is not null and OO.ORDER_TYPE = 12
+        where RESULT_TARE_WEIGHT_TIME is not null
+              and OO.ORDER_TYPE = 12
         )
         <where>
             <if test="purchaseOrderNo != null">
@@ -2378,7 +2385,7 @@
         from (
         select
         TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId",
-        APO.SPORADIC_ORDER_NO "purchaseOrderNo",
+        ASO.SPORADIC_ORDER_NO "purchaseOrderNo",
         RM.MATERIAL_NAME "materialName",
         OO.ORDER_NUMBER "orderNumber",
         RC.CAPACITY_NUMBER "capacityNumber",
@@ -2394,8 +2401,8 @@
         on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
         left join OMSTRUCK_ORDER OO
         on TTR.ORDER_ID = OO.ORDER_ID
-        left join AMSTRUCK_SPORADIC_ORDER APO
-        on APO.SPORADIC_ORDER_ID = OO.ORDER_PLAN_ID
+        left join AMSTRUCK_SPORADIC_ORDER ASO
+        on ASO.SPORADIC_ORDER_ID = OO.ORDER_PLAN_ID
         left join RMS_CAPACITY RC
         on RC.CAPACITY_ID = OO.CAPACITY_ID
         left join RMS_TRUCK_CALCULATE RTC
@@ -2404,7 +2411,14 @@
         on OOM.ORDER_ID = OO.ORDER_ID
         left join RMS_MATERIAL RM
         on RM.MATERIAL_ID = OOM.MATERIAL_ID
-        where RESULT_TARE_WEIGHT_TIME is not null and OO.ORDER_TYPE = #{orderTypee}
+        where RESULT_TARE_WEIGHT_TIME is not null
+              and OO.ORDER_TYPE = #{orderTypee}
+        <if test="userId!=null">
+            and ASO.INSERT_USERNAME=#{userId}
+        </if>
+        <if test="userIds!=null">
+            and ASO.UPDATE_USERNAME=#{userIds}
+        </if>
         )
         <where>
             <if test="purchaseOrderNo != null">