|
@@ -3,8 +3,10 @@ package com.qlm.service;
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
|
|
+import java.util.HashSet;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
+import java.util.Set;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -89,8 +91,28 @@ public class WmesService {
|
|
|
String post = HttpKit.post("http://192.168.0.190:18080/datahubjson/WMS_EM/?method=QRCODE&apptoken=BAB75C8B843F1C92AC3FFE3BD2A06A5F×tamp=2024-06-25%2015:59:16&sign=1&format=JSON", bigData.toString(),headers);
|
|
String post = HttpKit.post("http://192.168.0.190:18080/datahubjson/WMS_EM/?method=QRCODE&apptoken=BAB75C8B843F1C92AC3FFE3BD2A06A5F×tamp=2024-06-25%2015:59:16&sign=1&format=JSON", bigData.toString(),headers);
|
|
|
Log.info("第一次上传:"+post+",箱码:"+sb);
|
|
Log.info("第一次上传:"+post+",箱码:"+sb);
|
|
|
Thread.sleep(2000);
|
|
Thread.sleep(2000);
|
|
|
- post = HttpKit.post("http://192.168.0.190:18080/datahubjson/WMS_EM/?method=QRCODE&apptoken=BAB75C8B843F1C92AC3FFE3BD2A06A5F×tamp=2024-06-25%2015:59:16&sign=1&format=JSON", bigData.toString(),headers);
|
|
|
|
|
- Log.info("第二次上传:"+post+",箱码:"+sb);
|
|
|
|
|
|
|
+ String udfSqlString = "SELECT SERIALNO FROM SELECT * from RUKUXIANGMA where SERIALNO in ("+sb+") and UDF06 ='tm'";
|
|
|
|
|
+ List<Record> exists = Db.use("oracle").find(udfSqlString);
|
|
|
|
|
+ Set<String> wmsSet =new HashSet<String>();
|
|
|
|
|
+ for (Record record : exists) {
|
|
|
|
|
+ String SERIALNO = record.getStr("SERIALNO");
|
|
|
|
|
+ wmsSet.add(SERIALNO);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(exists.size() != find.size()){
|
|
|
|
|
+ StringBuilder diff = new StringBuilder();
|
|
|
|
|
+ for (Record record : find) {
|
|
|
|
|
+ String id = record.getStr("id");
|
|
|
|
|
+ if(!wmsSet.contains(id)){
|
|
|
|
|
+ diff.append(id);
|
|
|
|
|
+ diff.append(",");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ Log.info("上传数据不一致,"+diff);
|
|
|
|
|
+ post = HttpKit.post("http://192.168.0.190:18080/datahubjson/WMS_EM/?method=QRCODE&apptoken=BAB75C8B843F1C92AC3FFE3BD2A06A5F×tamp=2024-06-25%2015:59:16&sign=1&format=JSON", bigData.toString(),headers);
|
|
|
|
|
+ Log.info("第二次上传:"+post+",箱码:"+sb);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
int count = 0;
|
|
int count = 0;
|
|
|
if(sb.length()>0){
|
|
if(sb.length()>0){
|
|
|
count = Db.update("update jinzai_upload_master set upload_time = ? where id in ("+sb+")",new Date());
|
|
count = Db.update("update jinzai_upload_master set upload_time = ? where id in ("+sb+")",new Date());
|