luobang 2 jaren geleden
bovenliggende
commit
5bd3e7ba3b

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

@@ -741,6 +741,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();
+                }
                 //判断该车的运输订单号是否是钢材且是否是正在作业中的,如果不是就返回true
                 int i = tmstruckWeightResultMapper.checkOrderIsSteel(map);
                 if (i == 0) {

+ 1 - 1
src/main/java/com/steerinfo/dil/util/newFileTool.java

@@ -16,7 +16,7 @@ public class newFileTool {
         FastDateFormat format = FastDateFormat.getInstance("yyyy-MM-dd");
         String date  = format.format(new Date());
         //File file = new File("/icore/log/" + date + "-" + type + ".txt");
-        File file = new File("/icore/run/test.txt");
+        File file = new File("/shared/test.txt");
         FileWriter fileWriter = new FileWriter(file,true);
         FastDateFormat format1 = FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss");
         fileWriter.append("\n");