Browse Source

合并冲突

txf 3 năm trước cách đây
mục cha
commit
8bb8ca26e7

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

@@ -112,14 +112,30 @@ public class StatisticalReportController extends BaseRESTfulController {
                                           Integer pageSize,
                                           String startTime,
                                           String endTime,
-                                          String carrierSsoId
+                                          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);
         //分页数据
@@ -143,7 +159,11 @@ public class StatisticalReportController extends BaseRESTfulController {
                                                    Integer pageSize,
                                                    String startTime,
                                                    String endTime,
-                                                   String carrierSsoId
+                                                   String carrierSsoId,
+                                                    String userId,
+                                                    String userIds,
+                                                    String con,
+                                                    Integer orderType
     ){
         if(carrierSsoId != null){
             if(!"null".equals(carrierSsoId)){
@@ -151,6 +171,18 @@ public class StatisticalReportController extends BaseRESTfulController {
             }
         }
         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

@@ -96,7 +96,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

@@ -123,9 +123,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

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

@@ -369,6 +369,19 @@
             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">
@@ -519,6 +532,19 @@
             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">