zhouzh hace 3 años
padre
commit
ca00b663d7

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

@@ -265,4 +265,37 @@ public class StatisticalReportController extends BaseRESTfulController {
         PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
         return success(pageList);
     }
+
+    @ApiOperation("对内转车辆装货点进行统计")
+    @PostMapping("/getLoading")
+    public RESTfulResult getLoading(@RequestBody(required=false) Map<String,Object> mapValue,
+                                    Integer apiId,
+                                    Integer pageNum,
+                                    Integer pageSize,
+                                    String startTime,
+                                    String endTime){
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDate);//根据时间段查询数据
+        PageHelper.startPage(pageNum, pageSize);
+        //分页数据
+        List<Map<String, Object>> report = statisticalReportService.getLoading(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
+        return success(pageList);
+    }
+
+    @ApiOperation("对内转车辆装卸货点进行统计")
+    @PostMapping("/getUnLoading")
+    public RESTfulResult getUnLoading(@RequestBody(required=false) Map<String,Object> mapValue,
+                                    Integer apiId,
+                                    Integer pageNum,
+                                    Integer pageSize,
+                                    String startTime,
+                                    String endTime){
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDate);//根据时间段查询数据
+        PageHelper.startPage(pageNum, pageSize);
+        //分页数据
+        List<Map<String, Object>> report = statisticalReportService.getUnLoading(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
+        return success(pageList);
+    }
+
 }

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

@@ -36,4 +36,8 @@ public interface StatisticalReportMapper {
 
     //查看内转统计报表
     List<Map<String, Object>> getInwardReport(Map<String, Object> mapValue);
+    //查看装货点统计表
+    List<Map<String, Object>> getLoading(Map<String, Object> mapValue);
+
+    List<Map<String, Object>> getUnLoading(Map<String, Object> mapValue);
 }

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

@@ -37,5 +37,9 @@ public interface IStatisticalReportService {
 
     //查看内转统计报表
     List<Map<String, Object>> getInwardReport(Map<String, Object> mapValue);
+
+    List<Map<String, Object>> getLoading(Map<String, Object> mapValue);
+
+    List<Map<String, Object>> getUnLoading(Map<String, Object> mapValue);
 }
 

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

@@ -143,4 +143,14 @@ public class StatisticalReportImpl implements IStatisticalReportService {
         return statisticalReportMapper.getInwardReport(mapValue);
     }
 
+    @Override
+    public List<Map<String, Object>> getLoading(Map<String, Object> mapValue) {
+        return statisticalReportMapper.getLoading(mapValue);
+    }
+
+    @Override
+    public List<Map<String, Object>> getUnLoading(Map<String, Object> mapValue) {
+        return statisticalReportMapper.getUnLoading(mapValue);
+    }
+
 }

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

@@ -1098,4 +1098,59 @@
             and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_TARE_WEIGHT_TIME
         </if>
     </select>
+
+    <select id="getLoading" parameterType="map" resultType="java.util.Map">
+        SELECT * FROM(
+        SELECT MATERIAL_NAME "materialName",
+        COUNT(RC.CAPACITY_NUMBER) "capacityNumber",
+        WAREHOUSE_NAME "warehouseName"
+        FROM TMSTRUCK_LOAD_RESULT TLR
+        LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
+        ON TTR.RESULT_TOTAL_ID = TLR.RESULT_TOTAL_ID
+        LEFT JOIN OMSTRUCK_ORDER OO
+        ON OO.ORDER_ID = TTR.ORDER_ID
+        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 RMS_WAREHOUSE RW
+        ON RW.WAREHOUSE_ID = TLR.LOADING_ID
+        WHERE OO.ORDER_TYPE = 11
+        AND TLR.RESULT_LOAD_START_TIME IS NOT NULL
+        <if test="oneDate != null and (con ==null || con == '') ">
+            and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt; = TLR.INSERT_TIME
+        </if>
+        <if test="startDate != null">
+            and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TLR.INSERT_TIME
+            and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TLR.INSERT_TIME
+        </if>
+        GROUP BY MATERIAL_NAME, WAREHOUSE_NAME
+        )
+        <where>
+        <if test="materialName != null">
+            and
+            <foreach collection="materialName" item="item" open="(" separator="or" close=")">
+                "materialName" like '%${item}%'
+            </foreach>
+        </if>
+            <if test="capacityNumber != null">
+                and
+                <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
+                    "capacityNumber" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="warehouseName != null">
+                and
+                <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
+                    "warehouseName" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+    </select>
+
+    <select id="getUnLoading" parameterType="map" resultType="java.util.Map">
+
+    </select>
 </mapper>