自动化立体仓库 - WMS系统
skyouc
2 天以前 af8a669a028838d4896eb4167a6895551938dd29
src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java
@@ -19,6 +19,8 @@
import com.zy.asrs.entity.*;
import com.zy.asrs.enums.OrderTypeEnum;
import com.zy.asrs.service.*;
import com.zy.asrs.service.impl.TaskDetlLogServiceImpl;
import com.zy.asrs.service.impl.TaskDetlServiceImpl;
import com.zy.asrs.task.AbstractHandler;
import com.zy.asrs.task.core.ReturnT;
import com.zy.asrs.utils.OrderInAndOutUtil;
@@ -69,6 +71,8 @@
    private LocDetlService locDetlService;
    @Autowired
    CheckOrderDetlService checkOrderDetlService;
    @Autowired
    private TaskDetlLogService taskDetlLogService;
    @Transactional
@@ -288,9 +292,9 @@
                        .setPro_id(detl.getSuppCode())
                        .setLocation_no(locDetl.getZpallet())
                        .setSj_emp(locDetl.getModiUser$())
                        .setLocation_type(MatLocType.getMatTag(material.getTagId()  + ""))
                        .setLocation_type(MatLocType.getMatTag(material.getTagId() + ""))
                        // 上报时,默认上报时间是更新时间
                        .setSj_date(Utils.dateToStr(order.getUpdateTime(), "yyyy-MM-dd HH:mm:ss") )
                        .setSj_date(Utils.dateToStr(order.getUpdateTime(), "yyyy-MM-dd HH:mm:ss"))
                        // 上报时,默认上报数量是订单数量
                        .setPick_qty(detl.getQty().intValue())
                        // 上报时,默认损坏数量是0
@@ -361,6 +365,15 @@
                if (Objects.isNull(material)) {
                    throw new CoolException("物料不存在");
                }
                TaskDetlLog detlLog = taskDetlLogService.selectOne(new EntityWrapper<TaskDetlLog>()
                        .eq("matnr", detl.getMatnr())
                        .eq("supp_code", detl.getStandby1())
                        .eq("order_no", detl.getOrderNo()));
                if (Objects.isNull(detlLog)) {
                    throw new CoolException("数据错误 ,请检查AGV任务档是否已完成!!");
                }
                //目标库区
                orderParam.setTarget_location(detlLog.getAreaType());
                OrderItemsParam itemParam = new OrderItemsParam();
                // BS Code
                itemParam
@@ -371,12 +384,19 @@
                        // 上报时,默认产品id是供应商编码
                        .setPro_id(detl.getSuppCode())
//                        // 上报时,默认来源位置是null
                        .setLocation_no(null)
                        .setLocation_no(detlLog.getZpallet())
                        // 上报时,默认上报数量是订单数量
                        .setPick_qty(detl.getQty().intValue());
                reportOrderParams.add(itemParam);
            });
            if (orderParam.getTarget_location().equals("2")) {
                orderParam.setType("11");
            } else if (orderParam.getTarget_location().equals("3")) {
                orderParam.setType("12");
            } else {
                orderParam.setType("13");
            }
            orderParam.setPartList(reportOrderParams);
            XSR response = null;
@@ -516,7 +536,7 @@
    /**
     * 损溢单完结上报
     *
     *
     * @param order
     * @return
     */
@@ -562,7 +582,7 @@
            if (response.getSuccess()) {
                return SUCCESS;
            } else {
                return  FAIL;
                return FAIL;
            }
        }