zhouzh 3 سال پیش
والد
کامیت
f018c6a8bb

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

@@ -336,7 +336,24 @@ public class StatisticalReportController extends BaseRESTfulController {
         //分页数据
         List<Map<String, Object>> report = statisticalReportService.getUnLoading(mapValue);
         PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
+
         return success(pageList);
     }
 
+    //保卫部随机抽查车牌号查看所有信息
+    @ApiOperation("保卫部随机抽查车牌号查看所有信息")
+    @PostMapping("/getCapacityByDefend")
+    public RESTfulResult getCapacityByDefend(@RequestBody(required = false) Map<String,Object> map,
+                                             Integer apiId,
+                                             Integer pageNum,
+                                             Integer pageSize,
+                                             String con){
+        map.put("con",con);
+        PageHelper.startPage(pageNum, pageSize);
+        List<Map<String, Object>> report = statisticalReportService.getCapacityByDefend(map);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
+        return success(pageList);
+
+    }
+
 }

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

@@ -45,4 +45,6 @@ public interface StatisticalReportMapper {
 
     //获取装机统计报表
     List<Map<String,Object>> getLoaderResult(Map<String,Object> map);
+    //保卫部随机抽查车牌号
+    List<Map<String, Object>> getCapacityByDefend(Map<String, Object> map);
 }

+ 2 - 0
src/main/java/com/steerinfo/dil/service/IStatisticalReportService.java

@@ -45,5 +45,7 @@ public interface IStatisticalReportService {
     List<Map<String, Object>> getUnLoading(Map<String, Object> mapValue);
 
     List<Map<String, Object>> getLoaderResult(Map<String, Object> mapValue);
+
+    List<Map<String, Object>> getCapacityByDefend(Map<String, Object> map);
 }
 

+ 5 - 0
src/main/java/com/steerinfo/dil/service/impl/StatisticalReportImpl.java

@@ -174,4 +174,9 @@ public class StatisticalReportImpl implements IStatisticalReportService {
         return statisticalReportMapper.getLoaderResult(mapValue);
     }
 
+    @Override
+    public List<Map<String, Object>> getCapacityByDefend(Map<String, Object> map) {
+        return statisticalReportMapper.getCapacityByDefend(map);
+    }
+
 }

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

@@ -13,8 +13,6 @@ import com.steerinfo.dil.service.IUtilsService;
 import com.steerinfo.dil.util.DataChange;
 import com.steerinfo.framework.controller.RESTfulResult;
 import org.apache.commons.lang3.builder.ToStringExclude;
-import org.junit.jupiter.api.DynamicTest;
-import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;

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

@@ -1490,4 +1490,167 @@
         </if>
         </where>
     </select>
+
+
+    <select id="getCapacityByDefend" resultType="java.util.Map" parameterType="java.util.Map">
+        select * from(
+        select rc.CAPACITY_NUMBER "capacityNumber",
+               oo.ORDER_NUMBER "orderNumber",
+               twr.RESULT_GROSS_WEIGHT "resultGrossWeight",
+               twr.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
+               rtc1.TRUCK_CALCULATE_NUMBER "truckCalculateNumber1",
+               twr.RESULT_TARE_WEIGHT "resultTareWeight",
+               twr.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
+               rtc2.TRUCK_CALCULATE_NUMBER "truckCalculateNumber2",
+               twr.RESULT_NET_WEIGHT "resultNetWeight",
+               ter.RESULT_ENTRY_GATE_TIME "resultEntryGateTime",
+               rg1.GATEPOST_NAME "gatepostName1",
+               tlfr.RESULT_OUT_GATE_TIME "resultOutGateTime",
+               rg2.GATEPOST_NAME "gatepostName2",
+               tlr.RESULT_LOAD_END_TIME "resultLoadEndTime",
+               rw1.WAREHOUSE_NAME "warehouseName1",
+               tur.RESULT_END_TIME "resultEndTime",
+               rw2.WAREHOUSE_NAME "warehouseName2"
+        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
+        left join RMS_CAPACITY rc
+        on rc.CAPACITY_ID = oo.CAPACITY_ID
+        left join TMSTRUCK_TOTAL_RESULT ttr
+        on ttr.ORDER_ID = oo.ORDER_ID
+        left join TMSTRUCK_WEIGHT_RESULT twr
+        on twr.RESULT_TOTAL_ID = ttr.RESULT_TOTAL_ID
+        left join RMS_TRUCK_CALCULATE rtc1
+        on twr.RESULT_GROSS_PLACE_ID = rtc1.TRUCK_CALCULATE_ID
+        left join RMS_TRUCK_CALCULATE rtc2
+        on twr.RESULT_GROSS_PLACE_ID = rtc2.TRUCK_CALCULATE_ID
+        left join TMSTRUCK_ENFACTORY_RESULT ter
+        on ter.RESULT_TOTAL_ID = ttr.RESULT_TOTAL_ID
+        left join RMS_GATEPOST rg1
+        on rg1.GATEPOST_ID = ter.GATEPOST_ID
+        left join TMSTRUCK_LEAVE_FACTORY_RESULT tlfr
+        on tlfr.RESULT_TOTAL_ID = ttr.RESULT_TOTAL_ID
+        left join  RMS_GATEPOST rg2
+        on rg2.GATEPOST_ID = tlfr.GATEPOST_ID
+        left join TMSTRUCK_LOAD_RESULT tlr
+        on tlr.RESULT_TOTAL_ID = ttr.RESULT_TOTAL_ID
+        left join RMS_WAREHOUSE rw1
+        on tlr.LOADING_ID = rw1.WAREHOUSE_ID
+        left join TMSTRUCK_UNLOAD_RESULT tur
+        on tur.RESULT_TOTAL_ID = ttr.RESULT_TOTAL_ID
+        left join RMS_WAREHOUSE rw2
+        on tur.RESULT_UNLOAD_PLACE_ID = rw2.WAREHOUSE_ID
+		where trunc(ter.RESULT_ENTRY_GATE_TIME) =  trunc(sysdate)
+		<if test="con!=null">
+           and (instr(rc.CAPACITY_NUMBER , #{con}))>0
+        </if>
+		order by ter.RESULT_ENTRY_GATE_TIME desc
+		)
+		<where>
+            <if test=" capacityNumber!= null">
+                and
+                <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
+                    "capacityNumber" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="orderNumber != null">
+                and
+                <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
+                    "orderNumber" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultGrossWeight != null">
+                and
+                <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
+                    "resultGrossWeight" like '%${item}%'
+                </foreach>
+            </if>
+            <if test=" resultGrossWeightTime!= null">
+                and
+                <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
+                    "resultGrossWeightTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="truckCalculateNumber1 != null">
+                and
+                <foreach collection="truckCalculateNumber1" item="item" open="(" separator="or" close=")">
+                    "truckCalculateNumber1" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultTareWeight != null">
+                and
+                <foreach collection="resultTareWeight" item="item" open="(" separator="or" close=")">
+                    "resultTareWeight" like '%${item}%'
+                </foreach>
+            </if>
+            <if test=" resultTareWeightTime != null">
+                and
+                <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
+                    "resultTareWeightTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="truckCalculateNumber2 != null">
+                and
+                <foreach collection="truckCalculateNumber2" item="item" open="(" separator="or" close=")">
+                    "truckCalculateNumber2" like '%${item}%'
+                </foreach>
+            </if>
+            <if test=" resultNetWeight!= null">
+                and
+                <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
+                    "resultNetWeight" like '%${item}%'
+                </foreach>
+            </if>
+            <if test=" resultEntryGateTime!= null">
+                and
+                <foreach collection="resultEntryGateTime" item="item" open="(" separator="or" close=")">
+                    "resultEntryGateTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test=" gatepostName1!= null">
+                and
+                <foreach collection="gatepostName1" item="item" open="(" separator="or" close=")">
+                    "gatepostName1" like '%${item}%'
+                </foreach>
+            </if>
+            <if test=" resultOutGateTime!= null">
+                and
+                <foreach collection="resultOutGateTime" item="item" open="(" separator="or" close=")">
+                    "resultOutGateTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test=" gatepostName2 != null">
+                and
+                <foreach collection="gatepostName2" item="item" open="(" separator="or" close=")">
+                    "gatepostName2" like '%${item}%'
+                </foreach>
+            </if>
+            <if test=" resultLoadEndTime != null">
+                and
+                <foreach collection="resultLoadEndTime" item="item" open="(" separator="or" close=")">
+                    "resultLoadEndTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test=" warehouseName1 != null">
+                and
+                <foreach collection="warehouseName1" item="item" open="(" separator="or" close=")">
+                    "warehouseName1" like '%${item}%'
+                </foreach>
+            </if>
+            <if test=" resultEndTime != null">
+                and
+                <foreach collection="resultEndTime" item="item" open="(" separator="or" close=")">
+                    "resultEndTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test=" warehouseName2 != null">
+                and
+                <foreach collection="warehouseName2" item="item" open="(" separator="or" close=")">
+                    "warehouseName2" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+    </select>
 </mapper>

+ 10 - 1
src/main/resources/com/steerinfo/dil/mapper/TmstruckLoadResultMapper.xml

@@ -1479,7 +1479,8 @@
     TLR.RESULT_LOAD_START_TIME "resultLoadStartTime",
     TLR.RESULT_LOAD_END_TIME   "resultLoadEndTime",
     TLR.RESULT_LOAD_DURATION   "resultLoadDuration",
-    RW.WAREHOUSE_NAME          "warehouseName"
+    RW.WAREHOUSE_NAME          "warehouseName",
+    TWR.RESULT_NET_WEIGHT     "resultNetWeight"
     FROM TMSTRUCK_LOAD_RESULT TLR
     LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
     ON TTR.RESULT_TOTAL_ID = TLR.RESULT_TOTAL_ID
@@ -1493,6 +1494,8 @@
     ON RC.CAPACITY_ID = OO.CAPACITY_ID
     LEFT JOIN RMS_WAREHOUSE RW
     ON RW.WAREHOUSE_ID = TLR.LOADING_ID
+    LEFT JOIN TMSTRUCK_WEIGHT_RESULT TWR
+    ON TTR.RESULT_TOTAL_ID = TWR.RESULT_TOTAL_ID
     WHERE OO.ORDER_TYPE = #{orderTypee}
     AND TLR.RESULT_LOAD_START_TIME IS NOT NULL
     )
@@ -1544,6 +1547,12 @@
           "warehouseName" like '%${item}%'
         </foreach>
       </if>
+      <if test="resultNetWeight != null">
+        and
+        <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
+          "resultNetWeight" like '%${item}%'
+        </foreach>
+      </if>
     </where>
     <include refid="orderBy"></include>
     <if test="orderField == null  ">

+ 9 - 8
src/main/resources/com/steerinfo/dil/mapper/TmstruckUnloadResultMapper.xml

@@ -873,10 +873,9 @@
         RC.CAPACITY_NUMBER        "capacityNumber",
         RM.MATERIAL_NAME          "materialName",
         OOM.ORDER_MATERIAL_NUMBER "orderMaterialNumber",
-        TUR.RESULT_START_TIME     "resultStartTime",
         TUR.RESULT_END_TIME       "resultEndTime",
-        TUR.RESULT_DURATION       "resultDuration",
-        RW.WAREHOUSE_NAME         "warehouseName"
+        RW.WAREHOUSE_NAME         "warehouseName",
+        TWR.RESULT_NET_WEIGHT     "resultNetWeight"
         FROM TMSTRUCK_UNLOAD_RESULT TUR
         LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
         ON TTR.RESULT_TOTAL_ID = TUR.RESULT_TOTAL_ID
@@ -890,8 +889,10 @@
         ON RM.MATERIAL_ID = OOM.MATERIAL_ID
         LEFT JOIN RMS_WAREHOUSE RW
         ON RW.WAREHOUSE_ID = TUR.RESULT_UNLOAD_PLACE_ID
-        WHERE TUR.RESULT_START_TIME IS NOT NULL
-        AND OO.ORDER_TYPE = #{orderTypee}
+        LEFT JOIN TMSTRUCK_WEIGHT_RESULT TWR
+        ON TTR.RESULT_TOTAL_ID = TWR.RESULT_TOTAL_ID
+        WHERE OO.ORDER_TYPE = #{orderTypee}
+        ORDER BY TUR.RESULT_END_TIME desc
         )
         <where>
             <if test="orderNumber != null">
@@ -935,10 +936,10 @@
                     "resultEndTime" like '%${item}%'
                 </foreach>
             </if>
-            <if test="resultDuration != null">
+            <if test="resultNetWeight != null">
                 and
-                <foreach collection="resultDuration" item="item" open="(" separator="or" close=")">
-                    "resultDuration" like '%${item}%'
+                <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
+                    "resultNetWeight" like '%${item}%'
                 </foreach>
             </if>
         </where>