审核订单取消申请接口修改

dev
徐杰盟 2024-04-17 10:58:12 +08:00
parent 379fe41118
commit 36b27b95b1
1 changed files with 42 additions and 23 deletions

View File

@ -577,61 +577,80 @@ public class SyncTaskService {
// 过滤新增数据
private List<Record> listFilter(String tablename, List<Record> list) {
System.out.println();
System.out.println();
System.out.println(tablename);
System.out.println(JSONObject.toJSONString(list));
System.out.println();
System.out.println();
List<Record> removeList = new ArrayList<>();
if ("order_temp".equals(tablename)) {
// sn
for (Record o : list) {
String sn = o.getStr("sn");
Record first = Db.findFirst("select * from " + tablename + " where sn = ?", sn);
if (o.toJson().equals(first.toJson())) {
removeList.add(o);
if (first != null ) {
Object create_time = first.get("create_time");
Object change_time = first.get("change_time");
System.out.println(String.valueOf(create_time));
System.out.println(String.valueOf(change_time));
if (o.toJson().equals(first.toJson())){
removeList.add(o);
}
}
}
}
if ("ticket_log".equals(tablename)) {
// id
for (Record o : list) {
String id = o.getStr("id");
Record first = Db.findFirst("select * from " + tablename + " where id = ?", id);
if (o.toJson().equals(first.toJson())) {
removeList.add(o);
if (first != null ) {
Object create_time = first.get("create_time");
Object change_time = first.get("change_time");
Object invalid_time = first.get("invalid_time");
System.out.println(String.valueOf(create_time));
System.out.println(String.valueOf(change_time));
System.out.println(String.valueOf(invalid_time));
if (o.toJson().equals(first.toJson())){
removeList.add(o);
}
}
}
}
if ("action_cmd_log".equals(tablename)) {
// id
for (Record o : list) {
String id = o.getStr("id");
Record first = Db.findFirst("select * from " + tablename + " where id = ?", id);
boolean equals = o.toJson().equals(first.toJson());
System.out.println();
System.out.println();
System.out.println(equals);
System.out.println(JSONObject.toJSONString(o));
System.out.println(JSONObject.toJSONString(first));
System.out.println();
System.out.println();
if (first != null ) {
Object create_time = first.get("create_time");
System.out.println(String.valueOf(create_time));
if (equals) {
removeList.add(o);
if (o.toJson().equals(first.toJson())){
removeList.add(o);
}
}
}
}
if ("transport".equals(tablename)) {
// id
for (Record o : list) {
String id = o.getStr("id");
Record first = Db.findFirst("select * from " + tablename + " where id = ?", id);
if (o.toJson().equals(first.toJson())) {
removeList.add(o);
if (first != null ) {
Object inTime = first.get("in_time");
Object outTime = first.get("out_time");
Object changeTime = first.get("change_time");
System.out.println(String.valueOf(inTime));
System.out.println(String.valueOf(outTime));
System.out.println(String.valueOf(changeTime));
if (o.toJson().equals(first.toJson())){
removeList.add(o);
}
}
}
}