liyg 2 years ago
parent
commit
28ad0dab81

+ 13 - 0
src/main/java/com/steerinfo/dil/service/impl/AmsSaleOrderServiceImpl.java

@@ -127,6 +127,19 @@ public class AmsSaleOrderServiceImpl implements IAmsSaleOrderService {
     @Transactional
     @Override
     public int operationSaleOrder(Map<String, Object> mapVal) {
+        try{
+            new Thread( new Runnable() {
+                public void run(){
+                    try {
+                        newFileTool.newFile(mapVal.toString(),"计量物流金蝶核对");
+                    } catch (IOException e) {
+                        e.printStackTrace();
+                    }
+                }
+            }).start();
+        }catch (Exception e) {
+            e.printStackTrace();
+        }
         System.out.println("-----------------------------" + new Date() + "销售订单对接接口" + "-----------------------------");
         JSONObject jsonObject = new JSONObject(mapVal);
         logger.info(jsonObject.toString());

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

@@ -91,6 +91,19 @@ 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) {
@@ -805,19 +818,19 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
                 logger.info("=========" + "计量检查" + format.format(new Date()));
                 logger.info(jsonObject.toString());
                 logger.info("=========" + "计量检查" + format.format(new Date()));
-                //try{
-                //    new Thread( new Runnable() {
-                //        public void run(){
-                //            try {
-                //                newFileTool.newFile(jsonObject.toString(),"计量物流金蝶核对");
-                //            } catch (IOException e) {
-                //                e.printStackTrace();
-                //            }
-                //        }
-                //    }).start();
-                //}catch (Exception 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();
+                }
                 //判断该车的运输订单号是否是钢材且是否是正在作业中的,如果不是就返回true
                 int i = tmstruckWeightResultMapper.checkOrderIsSteel(map);
                 if (i == 0) {