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
833da1e80c

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

@@ -351,8 +351,13 @@ public class StatisticalReportController extends BaseRESTfulController {
                                              Integer apiId,
                                              Integer pageNum,
                                              Integer pageSize,
+                                             String startTime,
+                                             String endTime,
                                              String con){
-        map.put("con",con);
+        if (con != null && !"undefined".equals(con)) {
+            map.put("con",con);
+        }
+        DataChange.queryDataByDateTime(startTime ,endTime, map, sdfDateTime);//根据时间段查询数据
         PageHelper.startPage(pageNum, pageSize);
         List<Map<String, Object>> report = statisticalReportService.getCapacityByDefend(map);
         PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);

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

@@ -46,5 +46,5 @@ 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>>   getCapacityByDefend(Map<String, Object> map);
 }

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

@@ -184,7 +184,7 @@ public class TmstruckLeaveFactoryResultServiceImpl implements ITmstruckLeaveFact
         Map<String, Object> mesMap = utilsMapper.getOrderTypeByOrderNumber(orderNumber);
         int orderType = DataChange.dataToBigDecimal(mesMap.get("orderType")).intValue();
         String capacityNumber = (String) mesMap.get("capacityNumber");
-        if(orderType == 11){
+        if(orderType == 11 || orderType == 15 || orderType == 16){
            return orderType11Use(map, mesMap,capacityNumber);
         }else if(orderType == 21){
             return tmstruckEnfactoryResultService.orderType21Use(map, orderNumber, DataChange.dataToBigDecimal(mesMap.get("orderId")));

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

@@ -174,7 +174,7 @@ public class UtilsServiceImpl implements IUtilsService {
 
         //添加消息实体
         HashMap<Object, Object> mesMap = new HashMap<>();
-        mesMap.put("messageType", 5); //用于进厂后 刷新消息
+        mesMap.put("messageType", 4); //用于进厂后 刷新消息
         mesMap.put("sendPerson", "system");
         mesMap.put("receivePerson", capacityNumber);
         mesMap.put("messageContent", pushMes + new Date());

+ 1 - 1
src/main/resources/application-dev.yml

@@ -46,6 +46,6 @@ openfeign:
   AmsFeign:
     url: ${AMSFEIGN_URL:172.16.33.162:8015}
   OTMSFeign:
-    url: ${OTMSFEIGN_URL:172.16.33.166:8087}
+    url: ${OTMSFEIGN_URL:172.16.33.166:8038}
 server:
   port: 8008

+ 1 - 1
src/main/resources/application-prod.yml

@@ -46,6 +46,6 @@ openfeign:
   AmsFeign:
     url: ${AMSFEIGN_URL:172.16.33.166:8079}
   OTMSFeign:
-    url: ${OTMSFEIGN_URL:172.16.33.166:8087}
+    url: ${OTMSFEIGN_URL:172.16.33.166:8038}
 server:
   port: 8088

+ 21 - 35
src/main/resources/com/steerinfo/dil/mapper/StatisticalReportMapper.xml

@@ -1487,24 +1487,14 @@
 
 
     <select id="getCapacityByDefend" resultType="java.util.Map" parameterType="java.util.Map">
-        select * from(
+        select distinct * 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"
+        oo.ORDER_NUMBER "orderNumber",
+        ter.RESULT_ENTRY_GATE_TIME "resultEntryGateTime",
+        rg1.GATEPOST_NAME "gatepostName1",
+        tlfr.RESULT_OUT_GATE_TIME "resultOutGateTime",
+        rg2.GATEPOST_NAME "gatepostName2",
+        rm.material_name "materialName"
         from OMSTRUCK_ORDER oo
         left join OMSTRUCK_ORDER_MATERIAL oom
         on oom.ORDER_ID = oo.ORDER_ID
@@ -1514,32 +1504,28 @@
         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
+        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
+        <where>
+        <if test="oneDate != null">
+           and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt; = tlfr.RESULT_OUT_GATE_TIME
+        </if>
+        <if test="startDate != null" >
+           and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt; = tlfr.RESULT_OUT_GATE_TIME
         </if>
+        <if test="endDate != null" >
+            and to_date(#{endDate},'yyyy-mm-dd hh24:mi:ss') >= tlfr.RESULT_OUT_GATE_TIME
+        </if>
+        <if test="con != null">
+            and (instr(rc.CAPACITY_NUMBER, #{con}) > 0 or instr(rg1.GATEPOST_NAME, #{con}) > 0 or instr(rg2.GATEPOST_NAME, #{con}) > 0 )
+        </if>
+        </where>
 		order by ter.RESULT_ENTRY_GATE_TIME desc
 		)
 		<where>