luobang 2 lat temu
rodzic
commit
498cf42f17

+ 26 - 18
src/main/java/com/steerinfo/dil/service/impl/TmstruckWeightResultServiceImpl.java

@@ -91,19 +91,6 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
     @Override
     @Transactional
     public String receiveTmsTruckWeightResultByDaGang(List<Map<String, Object>> mapList){
-        try{
-            new Thread( new Runnable() {
-                public void run(){
-                    try {
-                        newFileTool.newFile(mapList.toString(),"计量传输物流实绩");
-                    } catch (IOException e) {
-                        e.printStackTrace();
-                    }
-                }
-            }).start();
-        }catch (Exception e) {
-            e.printStackTrace();
-        }
         //遍历列表
         StringBuilder sb = new StringBuilder();
         for (Map<String, Object> map : mapList) {
@@ -149,11 +136,19 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
         JSONObject jsonObject = new JSONObject(map);
         logger.info("计量信息:{}", jsonObject.toString());
         System.out.println("---------------------------------" + new Date() + "新接收到的计量实绩"  + "---------------------------------");
-        //try {
-        //    newFileTool.newFile(jsonObject.toString(),"计量");
-        //} catch (IOException e) {
-        //    e.printStackTrace();
-        //}
+        try{
+            new Thread( new Runnable() {
+                public void run(){
+                    try {
+                        newFileTool.newFile(jsonObject.toString(),"计量传输物流实绩");
+                    } catch (IOException e) {
+                        e.printStackTrace();
+                    }
+                }
+            }).start();
+        }catch (Exception e) {
+            e.printStackTrace();
+        }
         if(map.get("flag") != null && map.get("flag").equals("GCXS")){
             System.out.println("这是钢材销售");
             TmstruckWeightResult tmstruckWeightResult = null;
@@ -725,6 +720,19 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
      * @return
      */
     public String linkageDeleteTransportOrder(List<Map<String, Object>> mapList) throws Exception{
+        try{
+            new Thread( new Runnable() {
+                public void run(){
+                    try {
+                        newFileTool.newFile(mapList.toString(),"计量-物流联动删单");
+                    } catch (IOException e) {
+                        e.printStackTrace();
+                    }
+                }
+            }).start();
+        }catch (Exception e) {
+            e.printStackTrace();
+        }
         //联动删除
         for (Map<String, Object> map : mapList) {
             String orderNumber = (String) map.get("orderNumber");

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

@@ -1246,5 +1246,6 @@
         ON ARP.REQUIREMENT_ID = AIR.REQUIREMENT_ID
         WHERE AIR.PURCHASE_ORDER_ID = #{purchaseOrderId}
         ORDER BY AIR.REQUIREMENT_ID DESC
+        FETCH FIRST 1 ROW ONLY
     </select>
 </mapper>