自动化立体仓库 - WMS系统
pang.jiabao
2024-09-12 a5990a214ba13119d617b4532e2b9eef2fe70cda
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -1210,6 +1210,8 @@
        List<PdckqrParam.Material> materials = param.getMaterials();
        boolean isFullyCancelled = compareAndCheckCancellation(wrkDetls, materials);
        // todo 两箱盘两箱需要确定位置没错
        if (isFullyCancelled) { // 盘点物料确成功,工作档转换 盘点出库->盘点再入库,下发回库命令
            // 保存工作主档历史档
            if (!wrkMastLogService.save(wrkMast.getWrkNo())) {
@@ -1252,11 +1254,19 @@
            return R.ok("盘点确认成功");
        } else { // 物料不一致
            // todo 不一致的处理处理方法待定
            // 不一致的处理处理方法:弹出调整界面
//            重新扫描实物上面的码进行调整
//            实物在库存里面的地方清空,任务所在库存清空
//            将实物和当前托盘位置和库位绑定
//            一个木箱情况直接调整
//            两个木箱出两个 都调整
//            两个木箱出一个 调整一个
//            工作档标记异常->回库
            return R.error("盘点确认异常");
        }
        return R.error("盘点确认异常");
    }
    @Override
@@ -1516,9 +1526,7 @@
        boolean success = false;
        // 获取请求头
        Map<String,Object> headers = new HashMap<>();
        headers.put("digi-type","sync ");
        headers.put("digi-protocol","raw");
        headers.put("digi-datakey"," XCommon.ImportData");
        headers.put("Content-Type","application/json;charset=UTF-8");
        // 构造请求体
        JSONObject jsonObject = new JSONObject();
@@ -1528,22 +1536,23 @@
        String response = "";
        try {
            response = new HttpHandler.Builder()
                    .setUri(MesConstant.MES_IP_PORT)
                    .setPath(MesConstant.MES_DP_URL)
                    .setUri(MesConstant.MES_CC_IP_PORT)
                    .setPath(MesConstant.MES_CC_DP_URL)
                    .setHeaders(headers)
                    .setJson(body)
                    .build()
                    .doPost();
                    .doGet();
            if (!Cools.isEmpty(response)) {
                JSONObject jsonObject1 = JSONObject.parseObject(response);
                int code = (int) jsonObject1.get("code");
                String msg = (String) jsonObject1.get("msg");
                if (code != 200) {
                    throw new CoolException(msg);
                boolean state  = jsonObject1.getBoolean("state");
                String msg = (String) jsonObject1.get("message");
                if (code == 200 && state) {
                    success = true;
                }
                success = true;
                throw new CoolException(msg);
            } else {
                log.error("返修品入库给mes推送待判失败!!!url:{};request:{};response:{}", MesConstant.URL + MesConstant.PAKIN_URL, body, response);
                log.error("返修品入库给mes推送待判失败!!!url:{};request:{};response:{}", MesConstant.MES_CC_IP_PORT + MesConstant.MES_CC_IP_PORT, body, response);
                throw new CoolException("返修品入库给mes推送待判失败");
            }
        } catch (Exception e) {
@@ -1553,7 +1562,7 @@
                // 保存接口日志
                apiLogService.save(
                        "返修品入库给mes推送待判",
                        MesConstant.MES_IP_PORT + MesConstant.MES_DP_URL,
                        MesConstant.MES_CC_IP_PORT + MesConstant.MES_CC_IP_PORT,
                        null,
                        "127.0.0.1",
                        body,