Forráskód Böngészése

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU1/DAL-TMS-TRUCK-API

txf 3 éve
szülő
commit
13ec5cb385

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

@@ -297,6 +297,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("/getInwardReportForAssemble")
+    public RESTfulResult getInwardReportForAssemble(@RequestBody(required=false) Map<String,Object> mapValue,
+                                         Integer apiId,
+                                         Integer pageNum,
+                                         Integer pageSize,
+                                         String startTime,
+                                         String endTime
+    ){
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
+        PageHelper.startPage(pageNum, pageSize);
+        //分页数据
+        List<Map<String, Object>> report = statisticalReportService.getInwardReportForAssemble(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
+        return success(pageList);
+    }
+
+
+
+
 
     @ApiOperation("对内转车辆装货点进行统计")
     @PostMapping("/getLoading")

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

@@ -47,4 +47,6 @@ 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);
 }

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

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

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

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

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

@@ -110,6 +110,8 @@ public class TmstruckLoadResultServiceImpl implements ITmstruckLoadResultService
                 return tmstruckLoadResultMapper.getCGJKLoadResult(map); // apiId = 91
             case 9:
             case 10:
+            case 15:
+            case 16:
             case 20:
                 return tmstruckLoadResultMapper.getImportedDomesticNzLoadResult(map); //apiId = 353
             case 11:

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

@@ -118,6 +118,8 @@ public class TmstruckUnloadResultServiceImpl implements ITmstruckUnloadResultSer
                 return tmstruckUnloadResultMapper.getImportedDomesticNzUnloadResult(map); //apiId:355
             case 10:
             case 20:
+            case 15:
+            case 16:
                 return tmstruckUnloadResultMapper.getImportedDomesticNzUnload2Result(map); //apiId:356
             case 11:
                 return tmstruckUnloadResultMapper.getInFactoryUnloadResult(map); //apiId:360

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

@@ -130,6 +130,8 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
                 return tmstruckWeightResultMapper.getImportedDomesticNzJiMaoResult(map); // apiID:354
             case 10:
             case 20:
+            case 15:
+            case 16:
                 return tmstruckWeightResultMapper.getImportedDomesticNzJiMao2Result(map); // apiID:354
             case 11:
                 return tmstruckWeightResultMapper.getInFactoryJiLiangResult(map);       //apiId: 358

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

@@ -1637,4 +1637,130 @@
             </if>
         </where>
     </select>
+    <select id="getInwardReportForAssemble" resultType="java.util.Map" parameterType="java.util.Map">
+        select * from (
+        select
+        OO.ORDER_NUMBER "orderNumber",
+        RC.CAPACITY_NUMBER  "capacityNumber",
+        RS.SHIPPER_NAME     "shipperName",
+        RW1.WAREHOUSE_NAME  "unloadName",
+        RW2.WAREHOUSE_NAME  "loadName",
+        APO.PURCHASE_ORDER_NO "purchaseOrderNo",
+        RM.MATERIAL_NAME    "materialName",
+        RTC2.TRUCK_CALCULATE_NUMBER "grossNumber",
+        RTC1.TRUCK_CALCULATE_NUMBER "tareNumber",
+        TWR.RESULT_NET_WEIGHT   "resultNetWeight",
+        TWR.RESULT_TARE_WEIGHT_TIME  "resultTareWeightTime",
+        TWR.RESULT_TARE_WEIGHT      "resultTareWeight",
+        TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
+        TWR.RESULT_GROSS_WEIGHT     "resultGrossWeight"
+        from OMSTRUCK_ORDER OO
+        left join TMSTRUCK_TOTAL_RESULT TTR on OO.ORDER_ID = TTR.ORDER_ID
+        left join TMSTRUCK_WEIGHT_RESULT  TWR  on TTR.RESULT_TOTAL_ID = TWR.RESULT_TOTAL_ID
+        left join RMS_CAPACITY RC on OO.CAPACITY_ID = RC.CAPACITY_ID
+        left join RMS_TRUCK_CALCULATE RTC1 on RTC1.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_ID
+        left join RMS_TRUCK_CALCULATE RTC2 on RTC2.TRUCK_CALCULATE_ID = TWR.RESULT_GROSS_PLACE_ID
+        left join AMSTRUCK_INWARD_PLAN AIP on AIP.PLAN_ID = OO.ORDER_PLAN_ID
+        left join AMSTRUCK_REQUIREMENT_PLAN ARP on AIP.PLAN_ID = ARP.PLAN_ID
+        left join AMSTRUCK_INWARD_REQUIREMENT AIR   on AIR.REQUIREMENT_ID = ARP.REQUIREMENT_ID
+        left join AMS_PURCHASE_ORDER APO ON APO.PURCHASE_ORDER_ID=AIR.PURCHASE_ORDER_ID
+        left join RMS_SHIPPER   RS on AIR.REQUIREMENT_SHIPPER_ID = RS.SHIPPER_ID
+        left join AMSTRUCK_REQUIREMENT_MATERIAL ARM on AIR.REQUIREMENT_ID = ARM.REQUIREMENT_ID
+        left join RMS_MATERIAL RM on ARM.MATERIAL_ID = RM.MATERIAL_ID
+        left join RMS_WAREHOUSE RW1 on ARM.REQUIREMENT_UNLOAD_UNIT_ID = RW1.WAREHOUSE_ID
+        left join RMS_WAREHOUSE RW2 on ARM.REQUIREMENT_PLATFORM_ID = RW2.WAREHOUSE_ID
+        where OO.ORDER_TYPE in (15,16) and TWR.RESULT_NET_WEIGHT >= 0
+        <if test="oneDate != null">
+            and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TWR.RESULT_TARE_WEIGHT_TIME
+        </if>
+        <if test="startDate != null">
+            and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TWR.RESULT_TARE_WEIGHT_TIME
+            and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_TARE_WEIGHT_TIME
+        </if>
+        )
+        <if test=" orderNumber != null">
+            and
+            <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
+                "orderNumber" 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=" shipperName != null">
+            and
+            <foreach collection="shipperName" item="item" open="(" separator="or" close=")">
+                "shipperName" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="unloadName != null">
+            and
+            <foreach collection="unloadName" item="item" open="(" separator="or" close=")">
+                "unloadName" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="loadName!= null">
+            and
+            <foreach collection="loadName" item="item" open="(" separator="or" close=")">
+                "loadName" 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="grossNumber!= null">
+            and
+            <foreach collection="grossNumber" item="item" open="(" separator="or" close=")">
+                "grossNumber" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="tareNumber!= null">
+            and
+            <foreach collection="tareNumber" item="item" open="(" separator="or" close=")">
+                "tareNumber" 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="resultTareWeightTime!= null">
+            and
+            <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
+                "resultTareWeightTime" 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="resultGrossWeightTime!= null">
+            and
+            <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
+                "resultGrossWeightTime" 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="purchaseOrderNo!= null">
+            and
+            <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
+                "purchaseOrderNo" like '%${item}%'
+            </foreach>
+        </if>
+    </select>
 </mapper>

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

@@ -1405,7 +1405,7 @@
     ON RC.CAPACITY_ID = OO.CAPACITY_ID
     LEFT JOIN RMS_WAREHOUSE RW
     ON RW.WAREHOUSE_ID = TLR.LOADING_ID
-    WHERE OO.ORDER_TYPE in (10,20)
+    WHERE OO.ORDER_TYPE in (10,20,15,16)
     AND TLR.RESULT_LOAD_START_TIME IS NOT NULL
     <if test="userId !=null">
       and AIR.INSERT_USERNAME = #{userId}

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

@@ -819,7 +819,7 @@
         LEFT JOIN RMS_WAREHOUSE RW
         ON RW.WAREHOUSE_ID = TUR.RESULT_UNLOAD_PLACE_ID
         WHERE TUR.RESULT_END_TIME IS NOT NULL
-        AND OO.ORDER_TYPE in (10,20)
+        AND OO.ORDER_TYPE in (10,20,15,16)
         <if test="userId !=null">
             AND AIR.INSERT_USERNAME = #{userId}
         </if>

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

@@ -1895,7 +1895,7 @@
         left join RMS_MATERIAL RM
         on RM.MATERIAL_ID = OOM.MATERIAL_ID
         where RESULT_TARE_WEIGHT_TIME is not null
-        and OO.ORDER_TYPE in (10,20)
+        and OO.ORDER_TYPE in (10,20,15,16)
         <if test="userId!=null">
             AND  air.INSERT_USERNAME =#{userId}
         </if>
@@ -2003,7 +2003,7 @@
         left join rms_shipper rsr
         on rsr.shipper_id = APO.RECEIVE_UNIT_ID
         where RESULT_GROSS_WEIGHT_TIME is not null
-        and OO.ORDER_TYPE in (10,20)
+        and OO.ORDER_TYPE in (10,20,15,16)
         <if test="userId !=null">
             AND AIR.INSERT_USERNAME = #{userId}
         </if>