自动化立体仓库 - WMS系统
skyouc
2 天以前 0f3025a6cf28e2cf9630f38a681f2dd8d7f1a052
src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java
@@ -345,7 +345,7 @@
                }
            }
        } else if (Integer.valueOf(docType.getDocId() + "").equals(OrderTypeEnum.TRANSFER.type)) {
            // 备货派工单(出库)
            // 备货指示派工单(出库)
            ReportOrderParam orderParam = new ReportOrderParam();
            orderParam.setCompany_id(order.getCstmrName())
                    .setWms_id(order.getId() + "")
@@ -354,7 +354,7 @@
                    .setInv_no(order.getNumber())
                    .setPm_tktid(order.getItemName())
                    .setUpdate_time(Utils.dateToStr(new Date(), "yyyy-MM-dd HH:mm:ss"))
                    .setTarget_location("");
                    .setTarget_location("1");
            List<ReportOrderParams> reportOrderParams = new ArrayList<>();
            orderDetls.forEach(detl -> {
@@ -376,7 +376,7 @@
                        // 上报时,默认目标位置是null
                        .setLocation_type(null)
                        // 上报时,默认上报时间是更新时间
                        .setSj_date(order.getUpdateBy().toString())
                        .setSj_date(order.getUpdateTime$())
                        // 上报时,默认上报人是更新人
                        .setSj_emp(order.getUpdateBy$())
                        // 上报时,默认上报数量是订单数量
@@ -401,8 +401,7 @@
                } else {
                    return FAIL;
                }
                if (true) {
                if (response.getSuccess()) {
                    success = true;
                    // 修改订单状态 4.完成 ===>> 6.已上报
                    if (!orderService.updateSettle(order.getId(), settle, null)) {
@@ -410,10 +409,22 @@
                    }
                } else {
                    log.error("请求接口失败!!!url:{};request:{};response:{}",
                            MesConstant.URL + MesConstant.OUT_DISPATCH_RESULT,
                            JSON.toJSONString(orderParam), JSON.toJSONString(response));
                            MesConstant.URL + MesConstant.OUT_DETAILS_RESULT,
                            JSON.toJSONString(orderParams), JSON.toJSONString(response));
                    throw new CoolException("上报KOPEN系统失败");
                }
//                if (true) {
//                    success = true;
//                    // 修改订单状态 4.完成 ===>> 6.已上报
//                    if (!orderService.updateSettle(order.getId(), settle, null)) {
//                        throw new CoolException("服务器内部错误,请联系管理员");
//                    }
//                } else {
//                    log.error("请求接口失败!!!url:{};request:{};response:{}",
//                            MesConstant.URL + MesConstant.OUT_DISPATCH_RESULT,
//                            JSON.toJSONString(orderParam), JSON.toJSONString(response));
//                    throw new CoolException("上报KOPEN系统失败");
//                }
            } catch (Exception e) {
                log.error("fail", e);
                return FAIL.setMsg(e.getMessage());