luobang 2 gadi atpakaļ
vecāks
revīzija
7bef839825

+ 56 - 2
src/main/java/com/steerinfo/dil/service/impl/OmstrainOrderServiceImpl.java

@@ -328,7 +328,61 @@ public class OmstrainOrderServiceImpl implements IOmstrainOrderService {
 
     @Override
     public List<Map<String, Object>> getWagonShippingDetails(Map<String, Object> map) {
-
-        return omstrainOrderMapper.getWagonShippingDetails(map);
+        List<Map<String,Object>> mapList = omstrainOrderMapper.getWagonShippingDetails(map);
+        HashSet set = new HashSet<>();
+        HashSet<Map<String,Object>> filterConsigneeList = new HashSet<>();
+        HashSet<Map<String,Object>> filterCapacityList = new LinkedHashSet<>();
+        HashSet<Map<String,Object>> filterUnloadPlaceList = new LinkedHashSet<>();
+        HashSet<Map<String,Object>> filterToStationList = new LinkedHashSet<>();
+        HashSet<Map<String,Object>> filterOutStationList = new LinkedHashSet<>();
+        HashSet<Map<String,Object>> filterEnStationList = new LinkedHashSet<>();
+        HashSet<Map<String,Object>> filtermaterialNameList = new LinkedHashSet<>();
+        HashSet<Map<String,Object>> filtermaterialSpaList = new LinkedHashSet<>();
+        for(int j=0;j < mapList.size();j++) {
+            Map<String,Object> stringObjectMap = mapList.get(j);
+            Map<String,Object> filterConsigneeMap = new HashMap<>();
+            filterConsigneeMap.put("text",stringObjectMap.get("consigneeName"));
+            filterConsigneeMap.put("value",stringObjectMap.get("consigneeName"));
+            filterConsigneeList.add(filterConsigneeMap);
+            Map<String,Object> filterCapacityMap = new HashMap<>();
+            filterCapacityMap.put("text",stringObjectMap.get("capacityNum"));
+            filterCapacityMap.put("value",stringObjectMap.get("capacityNum"));
+            filterCapacityList.add(filterCapacityMap);
+            Map<String,Object> filterUnloadPlaceMap = new HashMap<>();
+            filterUnloadPlaceMap.put("text",stringObjectMap.get("unloadPoint"));
+            filterUnloadPlaceMap.put("value",stringObjectMap.get("unloadPoint"));
+            filterUnloadPlaceList.add(filterUnloadPlaceMap);
+            Map<String,Object> filterToStationMap = new HashMap<>();
+            filterToStationMap.put("text",stringObjectMap.get("arrivalStation"));
+            filterToStationMap.put("value",stringObjectMap.get("arrivalStation"));
+            filterToStationList.add(filterToStationMap);
+            Map<String,Object> filterOutStationMap = new HashMap<>();
+            filterOutStationMap.put("text",stringObjectMap.get("OutStation"));
+            filterOutStationMap.put("value",stringObjectMap.get("OutStation"));
+            filterOutStationList.add(filterOutStationMap);
+            Map<String,Object> filterEnStationMap = new HashMap<>();
+            filterEnStationMap.put("text",stringObjectMap.get("EnStation"));
+            filterEnStationMap.put("value",stringObjectMap.get("EnStation"));
+            filterEnStationList.add(filterEnStationMap);
+            Map<String,Object> filtermaterialNameMap = new HashMap<>();
+            filtermaterialNameMap.put("text",stringObjectMap.get("materialName"));
+            filtermaterialNameMap.put("value",stringObjectMap.get("materialName"));
+            filtermaterialNameList.add(filtermaterialNameMap);
+            Map<String,Object> filtermaterialSpaMap = new HashMap<>();
+            filtermaterialSpaMap.put("text",stringObjectMap.get("materialSpa"));
+            filtermaterialSpaMap.put("value",stringObjectMap.get("materialSpa"));
+            filtermaterialSpaList.add(filtermaterialSpaMap);
+        }
+        if(mapList.size() > 0) {
+            mapList.get(0).put("filterConsigneeList",filterConsigneeList);
+            mapList.get(0).put("filterCapacityList",filterCapacityList);
+            mapList.get(0).put("filterUnloadPlaceList",filterUnloadPlaceList);
+            mapList.get(0).put("filterToStationList",filterToStationList);
+            mapList.get(0).put("filterOutStationList",filterOutStationList);
+            mapList.get(0).put("filterEnStationList",filterEnStationList);
+            mapList.get(0).put("filtermaterialNameList",filtermaterialNameList);
+            mapList.get(0).put("filtermaterialSpaList",filtermaterialSpaList);
+        }
+        return mapList;
     }
 }

+ 13 - 3
src/main/resources/com/steerinfo/dil/mapper/OmstrainOrderMapper.xml

@@ -559,7 +559,7 @@
                                    ASO.SALE_NUMBER                                "saleOrderNo",
                                    ASM.SALE_MATERIAL_ID                           "saleMaterialId",
                                    ASM.MATERIAL_NUMBER                            "materialNum",
-                                   ASM.METER_WEIGHT                               "theoryWeight",
+                                   ASM.MATERIAL_WEIGHT                               "theoryWeight",
                                    ASM.EAS_PRIMARY_ID                             "closeEntryId",
                                    RC.CONSIGNEE_COMPANY_NAME                      "consigneeName",
                                    RC.CONSIGNEE_ID                                "consigneeId",
@@ -571,6 +571,7 @@
                                    TWR.RESULT_NET_WEIGHT                          "materialWeight",
                                    to_char(OTO.OUTSTATION_TIME,'yyyy-mm-dd')      "OutStation",
                                    to_char(TUR.RESULT_END_TIME,'yyyy-mm-dd')       "EnStation",
+                                   to_char(ASO.INSERT_TIME,'yyyy-mm-dd')        "orderTime",
                                    OTO.ORDER_WAGON_NO                             "wagonNo",
                                    OTO.ORDER_WAGON_WEIGHT                         "wagonWeight",
                                    OTO.BILLING_WEIGHT                             "wagonBillWeight",
@@ -582,7 +583,14 @@
                                    RPG.INSERT_UPDATE_REMARK                         "stackName",
                                    decode(wgm.DELETED,0,'入库',1,'出库','未入库')      "wgmDelete",
                                    R_CAPACITY.CAPACITY_NUMBER                       "capacityNum",
-                                   RW.WAREHOUSE_NAME                                "unloadPoint",
+                                   (CASE WHEN
+                                    RW.WAREHOUSE_NAME IS NOT NULL
+                                        THEN RW.WAREHOUSE_NAME
+                                       WHEN RC.CONSIGNEE_COMPANY_NAME != '成都积微物联电子商务有限公司'
+                                       THEN RAR1.DAYPLAN_DEDICATED_LINE
+                                       ELSE RAR1.UPDATE_USERNAME
+                                       END)
+                                       "unloadPoint",
                                    RAR1.RAILWAY_BUREAU                              "railwayBureau",
                                    OTO.STRAWMATS                                    "strawMats",
                                    OO.ORDER_NUMBER                                  "number",
@@ -593,7 +601,8 @@
                                    RPG.INSERT_TIME                                   "inboundTime",
                                    RPG.UPDATE_TIME                                  "outboundTime",
                                    RP2.PERSONNEL_NAME                               "outboundPersonnelName",
-                                   TWR.INSERT_UPDATE_REMARK                         "weightNo"
+                                   TWR.INSERT_UPDATE_REMARK                         "weightNo",
+                                   TLFR.RESULT_OUT_GATE_TIME                        "outGateTime"
                    FROM AMS_SALE_ORDER ASO
                           LEFT JOIN RMS_CONSIGNEE RC ON RC.CONSIGNEE_ID = ASO.RECEIVE_ID
                           LEFT JOIN RMS_SHIPPER RS ON RS.SHIPPER_ID = ASO.SHIPPER_ID
@@ -615,6 +624,7 @@
                                     AND TWR.SALE_MATERIAL_ID = ASM.SALE_MATERIAL_ID
                           LEFT JOIN TMSTRUCK_UNLOAD_RESULT  TUR ON TUR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
                                     AND TUR.MATERIAL_ID = RM.MATERIAL_ID
+                          LEFT JOIN TMSTRUCK_LEAVE_FACTORY_RESULT TLFR ON TLFR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
                           LEFT JOIN TMSTT_ORDER TTO ON TTO.TRUCK_ORDER_ID = OO.ORDER_ID
                           LEFT JOIN OMSTRAIN_ORDER OTO ON OTO.ORDER_ID = TTO.TRAIN_ORDER_ID
                           LEFT JOIN RMS_PWAREHOUSE_GRID RPG ON RPG.STACKING_ID = OO.ORDER_ID