luobang 3 rokov pred
rodič
commit
50d7a28605

+ 7 - 10
src/main/java/com/steerinfo/dil/controller/StatisticalReportController.java

@@ -86,6 +86,7 @@ public class StatisticalReportController extends BaseRESTfulController {
                                           String receiveName,
                                           String materialName
     ){
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
         if(carrierSsoId != null){
             if(!"null".equals(carrierSsoId)){
                 mapValue.put("carrierSsoId", carrierSsoId);
@@ -97,14 +98,12 @@ public class StatisticalReportController extends BaseRESTfulController {
         if (materialName != null && !"".equals(materialName) && !"null".equals(materialName)) {
             mapValue.put("remark","%" + materialName + "%");
         }
-        mapValue.put("orderType",orderType);
+        mapValue.put("orderTypee",orderType);
         mapValue.put("shipperId",shipperId);
-        DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
-        List<Map<String, Object>> allReport =  statisticalReportService.getAllSaleReportNum(mapValue);
         PageHelper.startPage(pageNum, pageSize);
         //分页数据
         List<Map<String, Object>> report = statisticalReportService.getAllSaleReport(mapValue);
-        PageListAdd pageList = columnDataUtil.tableColumnData2(apiId, allReport, report);
+        PageListAdd pageList = columnDataUtil.tableColumnData4(apiId, null, report);
         return success(pageList);
     }
 
@@ -172,14 +171,13 @@ public class StatisticalReportController extends BaseRESTfulController {
         if (userIds!=null){
             mapValue.put("userIds",userIds);
         }
-        if (con!=null&&!con.equals("undefined")){
+        if (con!=null&&!"null".equals(con)){
             mapValue.put("con","%"+con+"%");
         }
-        List<Map<String, Object>> allReport =  statisticalReportService.getSporadicSuppliesReportNum1(mapValue);
         PageHelper.startPage(pageNum, pageSize);
         //分页数据
         List<Map<String, Object>> report = statisticalReportService.getSporadicSuppliesReport1(mapValue);
-        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allReport, report);
+        PageListAdd pageList = columnDataUtil.tableColumnData4(apiId, null, report);
         return success(pageList);
     }
 
@@ -210,7 +208,7 @@ public class StatisticalReportController extends BaseRESTfulController {
             }
         }
         DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
-        if (con!=null&&!con.equals("undefined")){
+        if (con!=null&&!"null".equals(con)){
             mapValue.put("con","%"+con+"%");
         }
         if (userId!=null){
@@ -222,11 +220,10 @@ public class StatisticalReportController extends BaseRESTfulController {
         if (userIds!=null){
             mapValue.put("userIds",userIds);
         }
-        List<Map<String, Object>> allReport =  statisticalReportService.getSporadicSuppliesReportNum2(mapValue);
         PageHelper.startPage(pageNum, pageSize);
         //分页数据
         List<Map<String, Object>> report = statisticalReportService.getSporadicSuppliesReport2(mapValue);
-        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allReport, report);
+        PageListAdd pageList = columnDataUtil.tableColumnData4(apiId, null, report);
         return success(pageList);
     }
 

+ 3 - 1
src/main/java/com/steerinfo/dil/service/impl/StatisticalReportImpl.java

@@ -94,8 +94,10 @@ public class StatisticalReportImpl implements IStatisticalReportService {
                 map1.put("transportStatus", "已抵达");
                 continue;
             }
-            else
+            else{
                 map1.put("transportStatus", "已签收");
+            }
+
         }
         for (Map<String, Object> mesMap : mapList) {
             calculateDifferenceTime(mesMap);

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

@@ -195,7 +195,7 @@ public class TmstruckUnloadResultServiceImpl implements ITmstruckUnloadResultSer
         }
         map.putAll(dataMap);
         updateUnloadResultBy(map); //更新卸货实绩
-        if(netWeight == 0){ //如果没有净重 则更新路段顺序号  有则不更新
+        if(netWeight == 0 || (netWeight == 1 && (orderType == 10 || orderType == 20))){ //如果没有净重 则更新路段顺序号  有则不更新
             //路段顺序号 + 1
             map.put("orderId", mesMap.get("orderId"));
             utilsService.updateOrderLineSequence(map);

+ 0 - 2
src/main/java/com/steerinfo/dil/util/ColumnDataUtil.java

@@ -44,8 +44,6 @@ public class ColumnDataUtil {
 
 
 
-
-
     public PageListAdd tableColumnData2(Integer apiId, List<Map<String, Object>> list,List<Map<String,Object>> data) {
         List<Map<String, Object>> columnDataList = columnDataFeign.getColumnData(apiId);
         for (Map<String, Object> columnData : columnDataList) {

+ 11 - 308
src/main/resources/com/steerinfo/dil/mapper/StatisticalReportMapper.xml

@@ -326,7 +326,6 @@
 <!--  查询销售统计报表  -->
     <!--  查询销售统计报表  -->
     <select id="getAllSaleReport" parameterType="java.util.Map" resultType="java.util.Map">
-        select * from (
         select
         *
         from (
@@ -354,7 +353,8 @@
         RC2.CARRIER_NAME "carrierName",
         TAR.RESULT_ARRIVAL_ADDRESS "arrivalAddress",
         TRR.RESULT_ARRIVAL_ADDRESS "receiptAddress",
-        CONCAT(CONCAT(RM.MATERIAL_SPECIFICATION, '('), CONCAT(RM.MATERIAL_MODEL, ')')) "materialCode"
+        RM.MATERIAL_SPECIFICATION || RM.MATERIAL_MODEL "materialCode",
+        RM.MATERIAL_NAME  || TLR.INSERT_UPDATE_REMARK "likeRemark"
         from TMSTRUCK_WEIGHT_RESULT TWR
         left join TMSTRUCK_TOTAL_RESULT TTR
         on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
@@ -397,7 +397,7 @@
         on TAR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
         left join TMStRUCK_RECEIPT_RESULT TRR
         on TTR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
-        WHERE OO.ORDER_TYPE = #{orderType}
+        WHERE OO.ORDER_TYPE = #{orderTypee}
         AND ASO.SHIPPER_ID = #{shipperId}
         <if test="carrierSsoId != null">
             and RC2.CARRIER_SSO_ID = #{carrierSsoId}
@@ -412,104 +412,10 @@
             and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TWR.RESULT_GROSS_WEIGHT_TIME
             and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_GROSS_WEIGHT_TIME
         </if>
-        ) RRR
-            <where>
-                <if test="remark != null" >
-                    and RRR."materialName" LIKE #{remark} or RRR."materialRemark" LIKE #{remark}
-                </if>
-            </where>
         )
         <where>
-            <if test="orderNumber != null">
-                <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
-                    "orderNumber" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="carrierName != null">
-                <foreach collection="carrierName" item="item" open="(" separator="or" close=")">
-                    "carrierName" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="enGatepostName != null">
-                <foreach collection="enGatepostName" item="item" open="(" separator="or" close=")">
-                    "enGatepostName" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="outGatepostName != null">
-                <foreach collection="outGatepostName" item="item" open="(" separator="or" close=")">
-                    "outGatepostName" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="caseNumber != null">
-                <foreach collection="caseNumber" item="item" open="(" separator="or" close=")">
-                    "caseNumber" 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="receiveName != null">
-                and
-                <foreach collection="receiveName" item="item" open="(" separator="or" close=")">
-                    "receiveName" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="materialRemark != null">
-                and
-                <foreach collection="materialRemark" item="item" open="(" separator="or" close=")">
-                    "materialRemark" = #{item}
-                </foreach>
-            </if>
-            <if test="sendName != null">
-                and
-                <foreach collection="sendName" item="item" open="(" separator="or" close=")">
-                    "sendName" 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="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="resultLoadEndTime != null">
-                and
-                <foreach collection="resultLoadEndTime" item="item" open="(" separator="or" close=")">
-                    "resultLoadEndTime" 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="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 test="remark != null">
+               and "likeRemark" like #{remark}
             </if>
             <if test="materialName != null">
                 and
@@ -517,18 +423,6 @@
                     "materialName" 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="resultOutGateTime != null">
-                and
-                <foreach collection="resultOutGateTime" item="item" open="(" separator="or" close=")">
-                    "resultOutGateTime" like '%${item}%'
-                </foreach>
-            </if>
         </where>
         <include refid="orderBy"></include>
         <if test="orderField == null">
@@ -562,6 +456,7 @@
         RCON.CONSIGNEE_COMPANY_NAME "receiveName",
         RS.SUPPLIER_NAME            "sendName",
         RM.MATERIAL_NAME                     "materialName",
+        RS.SUPPLIER_NAME||RM.MATERIAL_NAME||RC.CAPACITY_NUMBER "conLike",
         CONCAT(CONCAT(RM.MATERIAL_SPECIFICATION, '('), CONCAT(RM.MATERIAL_MODEL, ')')) "materialCode"
         from OMSTRUCK_ORDER OO
         join TMSTRUCK_TOTAL_RESULT TTR
@@ -611,10 +506,6 @@
             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="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>
@@ -623,100 +514,8 @@
         </if>
         )
         <where>
-            <if test="receiveName != null">
-                and
-                <foreach collection="receiveName" item="item" open="(" separator="or" close=")">
-                    "receiveName" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="sendName != null">
-                and
-                <foreach collection="sendName" item="item" open="(" separator="or" close=")">
-                    "sendName" 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="orderNumber != null">
-                <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="resultEntryGateTime != null">
-                and
-                <foreach collection="resultEntryGateTime" item="item" open="(" separator="or" close=")">
-                    "resultEntryGateTime" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="resultTareWeightTime != null">
-                and
-                <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
-                    to_char("resultTareWeightTime",'yyyy-mm-dd hh24:mi:ss') 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="resultEndTime != null">
-                and
-                <foreach collection="resultEndTime" item="item" open="(" separator="or" close=")">
-                    to_char("resultEndTime",'yyyy-mm-dd hh24:mi:ss') 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="resultGrossWeightTime != null">
-                and
-                <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
-                    to_char("resultGrossWeightTime",'yyyy-mm-dd hh24:mi:ss') 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="resultNetWeight != null">
-                and
-                <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
-                    "resultNetWeight" 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="gatepostEntryName != null">
-                and
-                <foreach collection="gatepostEntryName" item="item" open="(" separator="or" close=")">
-                    "gatepostEntryName" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="gatepostOutName != null">
-                and
-                <foreach collection="gatepostOutName" item="item" open="(" separator="or" close=")">
-                    "gatepostOutName" like '%${item}%'
-                </foreach>
+            <if test="con != null">
+                and "conLike" like #{con}
             </if>
         </where>
         <include refid="orderBy"></include>
@@ -751,8 +550,8 @@
         RCON.CONSIGNEE_COMPANY_NAME "receiveName",
         RS.SUPPLIER_NAME            "sendName",
         RM.MATERIAL_NAME                     "materialName",
+        RCON.CONSIGNEE_COMPANY_NAME||RM.MATERIAL_NAME||RC.CAPACITY_NUMBER "conlike",
         CONCAT(CONCAT(RM.MATERIAL_SPECIFICATION, '('), CONCAT(RM.MATERIAL_MODEL, ')')) "materialCode"
-
         from OMSTRUCK_ORDER OO
         join TMSTRUCK_TOTAL_RESULT TTR
             on TTR.ORDER_ID = OO.ORDER_ID
@@ -801,10 +600,6 @@
             and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TWR.RESULT_GROSS_WEIGHT_TIME
             and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_GROSS_WEIGHT_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>
@@ -813,100 +608,8 @@
         </if>
         )
         <where>
-            <if test="receiveName != null">
-                and
-                <foreach collection="receiveName" item="item" open="(" separator="or" close=")">
-                    "receiveName" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="sendName != null">
-                and
-                <foreach collection="sendName" item="item" open="(" separator="or" close=")">
-                    "sendName" 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="orderNumber != null">
-                <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="resultEntryGateTime != null">
-                and
-                <foreach collection="resultEntryGateTime" item="item" open="(" separator="or" close=")">
-                    "resultEntryGateTime" 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="resultLoadEndTime != null">
-                and
-                <foreach collection="resultLoadEndTime" item="item" open="(" separator="or" close=")">
-                    "resultLoadEndTime" 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="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="resultNetWeight != null">
-                and
-                <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
-                    "resultNetWeight" 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="gatepostEntryName != null">
-                and
-                <foreach collection="gatepostEntryName" item="item" open="(" separator="or" close=")">
-                    "gatepostEntryName" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="gatepostOutName != null">
-                and
-                <foreach collection="gatepostOutName" item="item" open="(" separator="or" close=")">
-                    "gatepostOutName" like '%${item}%'
-                </foreach>
+            <if test="con != null">
+                and "conlike" like #{con}
             </if>
         </where>
         <include refid="orderBy"></include>