|
|
@@ -3,6 +3,8 @@ package com.qlm.service;
|
|
|
|
|
|
import java.sql.Connection;
|
|
|
import java.sql.SQLException;
|
|
|
+import java.sql.Timestamp;
|
|
|
+import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
@@ -57,10 +59,8 @@ public class WmesService {
|
|
|
uploadData();
|
|
|
}
|
|
|
|
|
|
- @Before(Tx.class)
|
|
|
- @TxConfig("oracle")
|
|
|
public static void transData(){
|
|
|
- List<Record> find = Db.find("select * from jinzai_upload_master where upload_time is null limit 999");
|
|
|
+ List<Record> find = Db.find("select * from jinzai_upload_master where upload_time is null limit 1");
|
|
|
|
|
|
if(find.isEmpty()){
|
|
|
Log.info("当前无数据,不同步");
|
|
|
@@ -69,7 +69,7 @@ public class WmesService {
|
|
|
|
|
|
long start = System.currentTimeMillis();
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
-
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");
|
|
|
List<Record> datas = new ArrayList<Record>();
|
|
|
for (Record record : find) {
|
|
|
|
|
|
@@ -84,8 +84,7 @@ public class WmesService {
|
|
|
|
|
|
String pinxiang = record.getStr("sku");
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+ Timestamp now = new Timestamp(System.currentTimeMillis());
|
|
|
|
|
|
Record data = new Record();
|
|
|
data.set("WAREHOUSEID", "JZPJ");
|
|
|
@@ -94,7 +93,7 @@ public class WmesService {
|
|
|
data.set("SKU", pinxiang);
|
|
|
data.set("TRACEID", duo_code);
|
|
|
data.set("UDF06", "tm");
|
|
|
- data.set("ADDTIME", new Date());
|
|
|
+ data.set("ADDTIME", now);
|
|
|
data.set("SERIALNO", id);//箱码
|
|
|
datas.add(data);
|
|
|
}
|