zx 3 yıl önce
ebeveyn
işleme
71ee811cb1

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

@@ -320,7 +320,33 @@ public class StatisticalReportController extends BaseRESTfulController {
         PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
         return success(pageList);
     }
-
+    @ApiOperation(value="装机展示明细")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId", value = "477", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
+    })
+    @PostMapping("/getLoaderForResultDetail")
+    public RESTfulResult getLoaderForResultDetail(@RequestBody(required=false) Map<String,Object> mapValue,
+                                                    Integer apiId,
+                                                    Integer pageNum,
+                                                    Integer pageSize,
+                                                    String startTime,
+                                                    String endTime,
+                                                   String con
+    ){
+        if (con != null && !"undefined".equals(con)) {
+            mapValue.put("con",con);
+        }
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
+        PageHelper.startPage(pageNum, pageSize);
+        //分页数据
+        List<Map<String, Object>> report = statisticalReportService.getLoaderForResultDetail(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
+        return success(pageList);
+    }
 
 
 

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

@@ -45,8 +45,15 @@ public interface StatisticalReportMapper {
 
     //获取装机统计报表
     List<Map<String,Object>> getLoaderResult(Map<String,Object> map);
+
     //保卫部随机抽查车牌号
     List<Map<String, Object>>   getCapacityByDefend(Map<String, Object> map);
+
     //拼装车统计报表
     List<Map<String, Object>> getInwardReportForAssemble(Map<String, Object> mapValue);
+
+    //判断是否装机备注
+    List<Map<String,Object>> getCapacityRemark(Map<String,Object> map);
+
+    List<Map<String, Object>> getLoaderForResultDetail(Map<String, Object> mapValue);
 }

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

@@ -50,5 +50,7 @@ public interface IStatisticalReportService {
 
     //查看内转拼装车统计报表
     List<Map<String, Object>> getInwardReportForAssemble(Map<String, Object> mapValue);
+
+    List<Map<String, Object>> getLoaderForResultDetail(Map<String, Object> mapValue);
 }
 

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

@@ -205,4 +205,11 @@ public class StatisticalReportImpl implements IStatisticalReportService {
         return statisticalReportMapper.getInwardReportForAssemble(mapValue);
     }
 
+    @Override
+    public List<Map<String, Object>> getLoaderForResultDetail(Map<String, Object> mapValue) {
+        //判断是否含有装机备注
+
+        return statisticalReportMapper.getLoaderForResultDetail(mapValue);
+    }
+
 }

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

@@ -1762,4 +1762,94 @@
             </foreach>
         </if>
     </select>
+    <select id="getCapacityRemark" resultType="java.util.Map" parameterType="java.util.Map">
+      select OO.ORDER_TYPE,
+             OO.ORDER_ID "orderId"
+      from OMSTRUCK_ORDER OO
+      LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
+      ON OO.ORDER_ID=TTR.ORDER_ID
+      LEFT JOIN TMSTRUCK_LOAD_RESULT TLR
+      ON TLR.RESULT_TOTAL_ID=TTR.RESULT_TOTAL_ID
+      WHERE  TLR.CAPACITY_REMARK IS NOT NULL
+    </select>
+    <select id="getLoaderForResultDetail" resultType="java.util.Map" parameterType="java.util.Map">
+        SELECT *
+        FROM (
+                 SELECT
+                     DISTINCT RM.MATERIAL_NAME           "materialName",
+                                  OO.ORDER_NUMBER            "orderNumber",
+                                  RC.CAPACITY_NUMBER         "capacityNumber",
+                                  OOM.ORDER_MATERIAL_NUMBER  "orderMaterialNumber",
+                                  TLR.RESULT_LOAD_START_TIME "resultLoadStartTime",
+                                  TLR.RESULT_LOAD_END_TIME   "resultLoadEndTime",
+                                  TLR.RESULT_LOAD_DURATION   "resultLoadDuration",
+                                  RW.WAREHOUSE_NAME          "warehouseName",
+                                  TWR.RESULT_NET_WEIGHT     "resultNetWeight",
+                                  TLR.CAPACITY_REMARK "capacityRemark",
+                                  TLR.RESULT_ID "resultId"
+                          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
+                          LEFT JOIN TMSTRUCK_WEIGHT_RESULT TWR
+                          ON TTR.RESULT_TOTAL_ID = TWR.RESULT_TOTAL_ID
+                          WHERE  TLR.CAPACITY_REMARK 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>
+        <if test="con != null">
+            and (instr(tlr.CAPACITY_REMARK, #{con}) > 0)
+        </if>
+        ORDER BY TLR.RESULT_LOAD_END_TIME,OO.ORDER_NUMBER DESC
+             )
+        <if test=" orderNumber != null">
+            and
+            <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
+                "orderNumber" like '%${item}%'
+            </foreach>
+        </if>
+        <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=" resultLoadStartTime != null">
+            and
+            <foreach collection="resultLoadStartTime" item="item" open="(" separator="or" close=")">
+                "resultLoadStartTime" like '%${item}%'
+            </foreach>
+        </if>
+        <if test=" warehouseName != null">
+            and
+            <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
+                "warehouseName" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="capacityRemark != null">
+            and
+            <foreach collection="capacityRemark" item="item" open="(" separator="or" close=")">
+                "capacityRemark" like '%${item}%'
+            </foreach>
+        </if>
+    </select>
 </mapper>