自动化立体仓库 - WMS系统
pang.jiabao
2024-09-19 80cd1569120416b096d28ebbe9a8e6e1d867f6e0
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -1054,7 +1054,7 @@
        StartupDto dto = commonService.getLocNo(1, param.getPalletizingNo(), locTypeDto, 0);
        // 返回GWCS目标信息
        boolean result = pushStaNoToGwcs(param.getPalletizingNo(), dto.getStaNo(), dto.getWorkNo(), param.getBarcode());
        pushStaNoToGwcs(param.getPalletizingNo(), dto.getStaNo(), dto.getWorkNo(), param.getBarcode(),"一楼反修品入库推送gwcs");
//        if (!result) {
//            throw new CoolException("入库回推入库码头给GWCS失败");
//        }
@@ -1173,7 +1173,7 @@
            throw new CoolException("保存工作档失败");
        }
        // 返回GWCS目标信息
        pushStaNoToGwcs(param.getPalletizingNo(),wrkMast.getSourceStaNo(),workNo,param.getBarcode());
        pushStaNoToGwcs(param.getPalletizingNo(),wrkMast.getSourceStaNo(),workNo,param.getBarcode(),"二楼空托回流推送gwcs");
        return R.ok("空托回流请求成功");
    }
@@ -1233,7 +1233,7 @@
        StartupDto dto = commonService.getLocNo(iotype, param.getPalletizingNo(), locTypeDto,0);
        // 返回GWCS目标信息
        pushStaNoToGwcs(param.getPalletizingNo(),dto.getStaNo(),dto.getWorkNo(),param.getBarcode());
        pushStaNoToGwcs(param.getPalletizingNo(),dto.getStaNo(),dto.getWorkNo(),param.getBarcode(),"gwms申请入库后推送gwcs");
        int workNo = dto.getWorkNo();
@@ -1741,7 +1741,7 @@
        return wrkDetls.size() > 1 ? 1 : 4; // 一条记录就是一卷
    }
    public boolean pushStaNoToGwcs(Integer palletizingNo, Integer staNo, Integer workNo,String barcode) {
    public boolean pushStaNoToGwcs(Integer palletizingNo, Integer staNo, Integer workNo,String barcode,String message) {
        boolean success = false;
        // 获取请求头
        Map<String, Object> headers = getHeaders();
@@ -1764,23 +1764,16 @@
                    .doPost();
            if (!Cools.isEmpty(response)) {
                success = true;
//                // 修改订单状态 4.完成 ===>> 6.已上报
//                if (!orderService.updateSettle(order.getId(), 6L, null)) {
//                    throw new CoolException("服务器内部错误,请联系管理员");
//                }
            } else {
                log.error("zmws推送入库码头站点接口失败!!!url:{};request:{};response:{}", MesConstant.URL + MesConstant.PAKIN_URL, body, response);
                throw new CoolException("上报mes系统失败");
                log.error(message + "失败!!!url:{};request:{};response:{}", MesConstant.URL + MesConstant.PAKIN_URL, body, response);
            }
        } catch (Exception e) {
            log.error("入库请求接口失败:{}", e.getMessage());
//            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
//            return FAIL.setMsg(e.getMessage());
            log.error(message + "异常:{}", e);
        } finally {
            try {
                // 保存接口日志
                apiLogService.save(
                        "入库",
                        message,
                        MesConstant.GWCS_IP_PORT + MesConstant.GWCS_FPKW_URL,
                        null,
                        "127.0.0.1",