自动化立体仓库 - WMS系统
*
lsh
10 小时以前 5829b04e534b0779b1e67993bc3246adcecaf164
src/main/java/com/zy/asrs/task/handler/GroupOrderFormHandler.java
@@ -25,10 +25,7 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
 * Created by Monkey D. Luffy on 2025.11.10
@@ -145,10 +142,13 @@
                }
            }
            OrderInspectionRollParam orderInspectionRollParam = new OrderInspectionRollParam(orderDetl.getModel());
//            OrderInspectionRollParam orderInspectionRollParam = new OrderInspectionRollParam(orderDetl.getModel());
            String response = "";
            boolean success = false;
            Map<String, Object> params = JSON.parseObject(JSON.toJSONString(orderInspectionRollParam), Map.class);
//            Map<String, Object> params = JSON.parseObject(JSON.toJSONString(orderInspectionRollParam), Map.class);
            Map<String, Object> params = new HashMap<>();
            params.put("batchNo", orderDetl.getModel());
            try {
                response = new HttpHandler.Builder()
                        .setUri(qualityFinishedCheckoutUrl)
@@ -158,37 +158,29 @@
                        .build()
                        .doPost();
                JSONObject jsonObject = JSON.parseObject(response);
                if (jsonObject.getInteger("code").equals(200)) {
                    if (jsonObject.getBoolean("state")) {
                        String value = jsonObject.getString("value");
                        if (value.equals("合格")){
                            orderDetl.setDanger(1);
                            orderDetlPakoutService.updateById(orderDetl);
                        } else if (!Cools.isEmpty(orderDetl.getDanger$()) && value.equals(orderDetl.getDanger$())){
                            if (Cools.isEmpty(memo)){
                                memo = "卷号"+ orderDetl.getModel()+"查询结果:"+jsonObject.getString("message");
                            }else {
                                memo = memo+";卷号"+ orderDetl.getModel()+"查询结果:"+jsonObject.getString("message");
                            }
                            continue;
                        } else {
                            if (Cools.isEmpty(memo)){
                                memo = "卷号"+ orderDetl.getModel()+"查询结果:"+jsonObject.getString("message");
                            }else {
                                memo = memo+";卷号"+ orderDetl.getModel()+"查询结果:"+jsonObject.getString("message");
                            }
                            if (value.equals("不合格")){
                                orderDetl.setDanger(2);
                                orderDetlPakoutService.updateById(orderDetl);
                            }
                            continue;
                if (jsonObject.getBoolean("state")) {
                    String value = jsonObject.getString("value");
                    if (value.equals("合格")){
                        orderDetl.setDanger(1);
                        orderDetlPakoutService.updateById(orderDetl);
                    } else if (!Cools.isEmpty(orderDetl.getDanger$()) && value.equals(orderDetl.getDanger$())){
                        if (Cools.isEmpty(memo)){
                            memo = "卷号"+ orderDetl.getModel()+"查询结果:"+jsonObject.getString("message");
                        }else {
                            memo = memo+";卷号"+ orderDetl.getModel()+"查询结果:"+jsonObject.getString("message");
                        }
                        continue;
                    } else {
                        if (Cools.isEmpty(memo)){
                            memo = "卷号"+ orderDetl.getModel()+"查询结果:"+jsonObject.getString("message");
                        }else {
                            memo = memo+";卷号"+ orderDetl.getModel()+"查询结果:"+jsonObject.getString("message");
                        }
                        if (value.equals("不合格")){
                            orderDetl.setDanger(2);
                            orderDetlPakoutService.updateById(orderDetl);
                        }
                        continue;
                    }
                    success = true;
                } else {
@@ -197,7 +189,7 @@
                    }else {
                        memo = memo+";卷号"+ orderDetl.getModel()+"查询结果:"+jsonObject.getString("message");
                    }
                    log.error("请求接口失败!!!url:{};request:{};response:{}", qualityFinishedCheckoutUrl+"/"+qualityFinishedCheckout, JSON.toJSONString(orderInspectionRollParam), response);
                    log.error("请求接口失败!!!url:{};request:{};response:{}", qualityFinishedCheckoutUrl+"/"+qualityFinishedCheckout, JSON.toJSONString(params), response);
//                    throw new CoolException("查询卷号是否合格失败");
                }
            } catch (Exception e) {
@@ -217,7 +209,7 @@
                            qualityFinishedCheckoutUrl+"/"+qualityFinishedCheckout,
                            null,
                            "127.0.0.1",
                            JSON.toJSONString(orderInspectionRollParam),
                            JSON.toJSONString(params),
                            response,
                            success
                    );