自动化立体仓库 - WMS系统
1
15 小时以前 2561f81f2c28480502f51775e618bceeb053644c
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -58,6 +58,10 @@
    private BasArmMastService basArmMastService;
    @Autowired
    private BasArmMastSignService basArmMastSignService;
    @Autowired
    private BasAgvMastService basAgvMastService;
    @Autowired
    private LocOwnerService locOwnerService;
    @Override
    @Transactional
@@ -68,6 +72,12 @@
        }
        DocType docType = docTypeService.selectOrAdd(param.getOrderType(), Boolean.TRUE);
        Date now = new Date();
        LocOwner locOwner = null;
        if (!Cools.isEmpty(param.getOwnerId())) {
            locOwner = locOwnerService.selectById(param.getOwnerId());
        } else {
            locOwner = locOwnerService.selectById(1);
        }
        // 单据主档
        order = new Order(
                String.valueOf(snowflakeIdWorker.nextId()),    // 编号[非空]
@@ -75,12 +85,12 @@
                DateUtils.convert(now),    // 单据日期
                docType.getDocId(),    // 单据类型
                null,    // 项目编号
                null,    //
                param.getStandby1(),    //项目名称 客户PO号
                null,    // 调拨项目编号
                null,    // 初始票据号
                null,    // 票据号
                null,    // 客户编号
                null,    // 客户
                locOwner.getOwnerUuid(),    // 客户编号
                locOwner.getOwner(),    // 客户
                null,    // 联系方式
                null,    // 操作人员
                null,    // 合计金额
@@ -136,6 +146,9 @@
            orderDetl.setStandby1(detlDto.getStandby1());
            orderDetl.setStandby2(detlDto.getStandby2());
            orderDetl.setStandby3(detlDto.getStandby3());
            orderDetl.setBoxType1(detlDto.getBoxType1());
            orderDetl.setBoxType2(detlDto.getBoxType2());
            orderDetl.setBoxType3(detlDto.getBoxType3());
            orderDetl.setOrderId(order.getId());
            orderDetl.setOrderNo(order.getOrderNo());
            orderDetl.setCreateBy(9527L);
@@ -228,6 +241,12 @@
        }
        DocType docType = docTypeService.selectOrAdd(param.getOrderType(), Boolean.FALSE);
        Date now = new Date();
        LocOwner locOwner = null;
        if (!Cools.isEmpty(param.getOwnerId())) {
            locOwner = locOwnerService.selectById(param.getOwnerId());
        } else {
            locOwner = locOwnerService.selectById(1);
        }
        // 单据主档
        order = new Order(
                String.valueOf(snowflakeIdWorker.nextId()),    // 编号[非空]
@@ -235,12 +254,12 @@
                DateUtils.convert(now),    // 单据日期
                docType.getDocId(),    // 单据类型
                null,    // 项目编号
                null,    //
                param.getStandby1(),    //项目名称 客户PO号
                null,    // 调拨项目编号
                null,    // 初始票据号
                null,    // 票据号
                null,    // 客户编号
                null,    // 客户
                locOwner.getOwnerUuid(),    // 客户编号
                locOwner.getOwner(),    // 客户
                null,    // 联系方式
                null,    // 操作人员
                null,    // 合计金额
@@ -298,6 +317,9 @@
            orderDetl.setStandby1(detlDto.getStandby1());
            orderDetl.setStandby2(detlDto.getStandby2());
            orderDetl.setStandby3(detlDto.getStandby3());
            orderDetl.setBoxType1(detlDto.getBoxType1());
            orderDetl.setBoxType2(detlDto.getBoxType2());
            orderDetl.setBoxType3(detlDto.getBoxType3());
            orderDetl.setOrderId(order.getId());
            orderDetl.setOrderNo(order.getOrderNo());
            orderDetl.setCreateBy(9527L);
@@ -641,6 +663,7 @@
                    new EntityWrapper<BasArmMastSign>()
                            .eq("matnr", param.getSku())
                            .eq("order_no", param.getOrderNo())
                            .eq("create_time", param.getBindingTags())
            );
            if (!Cools.isEmpty(basArmMastSign)){
                basArmMastSign.setStatus(1);
@@ -730,19 +753,10 @@
    @Override
    @Transactional
    public boolean TaskArmWorkOrderSign(OrderArmEndParam param) {
        BasArmMastSign basArmMastSign = basArmMastSignService.selectOne(
                new EntityWrapper<BasArmMastSign>()
                        .eq("matnr", param.getSku())
                        .eq("order_no", param.getOrderNo())
        );
        if (Cools.isEmpty(basArmMastSign)){
//            throw new CoolException("未查询到相关机械臂拆码垛任务!!!"+ JSON.toJSONString(param));
            return false;
        }
        BasArmMastSign basArmMastSignNew = basArmMastSignService.selectOne(
                new EntityWrapper<BasArmMastSign>()
                        .eq("order_no", param.getOrderNo())
                        .eq("create_time", basArmMastSign.getCreateTime())
                        .eq("create_time", param.getBindingTags())
                        .eq("status", 0)
        );
        if (Cools.isEmpty(basArmMastSignNew)){
@@ -751,4 +765,17 @@
        return true;
    }
    @Override
    @Transactional
    public boolean TaskAgvReport(TaskAgvReportParam param) {
        BasAgvMast basAgvMast = basAgvMastService.selectOne(new EntityWrapper<BasAgvMast>().eq("task_no", param.getTaskNo()));
        if (Cools.isEmpty(basAgvMast)){
            return false;
        }
        basAgvMast.setStatus(2);
        basAgvMastService.updateById(basAgvMast);
        return true;
    }
}