1
2 天以前 e8855038f6e47cde0d6a8a9ddb2fa5a629e0efbb
lsh#
4个文件已修改
103 ■■■■■ 已修改文件
rsf-server/src/main/java/com/vincent/rsf/server/api/service/AgvService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/AgvServiceImpl.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/WkOrder.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaitPakinServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/api/service/AgvService.java
@@ -17,4 +17,5 @@
    R getStaMsgSelect(Map<String, Object> params);
    R AGVBindAndInTaskStart(WaitPakinParam waitPakinPda, Long loginUserId);
    R AGVBindAndInTaskStart(String barcode);
}
rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/AgvServiceImpl.java
@@ -47,6 +47,17 @@
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public R AGVBindAndInTaskStart(String barcode) {
        //验证条码
        boolean b = checkStaStatus(barcode);
        if (!b) {
            return R.error("条码未找到对应规则");
        }
        return R.ok();
    }
    @Override
    public R getStaMsgSelect(Map<String, Object> params) {
        String sta = params.get("sta").toString();
        if (Cools.isEmpty(sta)) {
@@ -345,4 +356,42 @@
        return basStation;
    }
    private boolean checkStaStatus(String barcode) {
        if (Cools.isEmpty(barcode)) {
            throw new CoolException("容器码不能为空");
        }
        WaitPakin waitPakin = waitPakinService.getOne(new LambdaQueryWrapper<WaitPakin>()
                .eq(WaitPakin::getBarcode, barcode)
                .eq(WaitPakin::getIoStatus, PakinIOStatus.PAKIN_IO_STATUS_DONE.val)
        );
        if (Cools.isEmpty(waitPakin)) {
            throw new CoolException("容器码未找到组托信息,请检查组托状态");
        }
        BasStation isBarcodeSta = basStationService.getOne(new LambdaQueryWrapper<BasStation>()
                        .eq(BasStation::getBarcode, barcode)
                , false
        );
        if (!Cools.isEmpty(isBarcodeSta)) {
            throw new CoolException("该条码已被" + isBarcodeSta.getStationName() + "站绑定");
        }
        List<BasContainer> containers = basContainerService.list(
                new LambdaQueryWrapper<BasContainer>());
        boolean matches = false;
        for (BasContainer container : containers) {
            String codeType = container.getCodeType();  // 获取正则表达式
            if (barcode.matches(codeType)) {  // 判断条码是否符合这个正则
                matches = true;
                return true;
            }
        }
//            boolean matches = containers.stream()
//                    .map(BasContainer::getCodeType)
//                    .anyMatch(codeType -> barcode.matches(codeType));
        if (!matches) {
            throw new CoolException("容器与站点不匹配");
        }
        return true;
    }
}
rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/WkOrder.java
@@ -5,6 +5,7 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.vincent.rsf.server.api.controller.erp.params.SyncOrderParams;
import com.vincent.rsf.server.manager.enums.OrderType;
import com.vincent.rsf.server.manager.enums.OrderWorkType;
import com.vincent.rsf.server.system.constant.DictTypeCode;
@@ -343,6 +344,56 @@
        this.memo = memo;
    }
    public WkOrder(SyncOrderParams syncOrderParams) {
        this.code = code;
        this.poCode = poCode;
        this.poId = poId;
        this.type = type;
        this.wkType = wkType;
        this.checkType = checkType;
        this.anfme = anfme;
        this.workQty = workQty;
        this.qty = qty;
        this.logisNo = logisNo;
        this.waveId = waveId;
        this.arrTime = arrTime;
        this.ntyStatus = ntyStatus;
        this.reportOnce = reportOnce;
        this.rleStatus = rleStatus;
        this.exceStatus = exceStatus;
        this.status = status;
        this.deleted = deleted;
        this.tenantId = tenantId;
        this.createBy = createBy;
        this.createTime = createTime;
        this.updateBy = updateBy;
        this.updateTime = updateTime;
        this.memo = memo;
        this.warehouseId = warehouseId;
        this.wareAreaId = wareAreaId;
        this.businessTime = businessTime;
        this.stationId = stationId;
        this.shipperId = shipperId;
        this.orderInternalCode = orderInternalCode;
        this.stockDirect = stockDirect;
        this.customerId = customerId;
        this.customerName = customerName;
        this.supplierId = supplierId;
        this.supplierName = supplierName;
        this.stockOrgId = stockOrgId;
        this.stockOrgName = stockOrgName;
        this.purchaseOrgId = purchaseOrgId;
        this.purchaseOrgName = purchaseOrgName;
        this.purchaseUserId = purchaseUserId;
        this.purchaseUserName = purchaseUserName;
        this.prdOrgId = prdOrgId;
        this.prdOrgName = prdOrgName;
        this.saleOrgId = saleOrgId;
        this.saleOrgName = saleOrgName;
        this.saleUserId = saleUserId;
        this.saleUserName = saleUserName;
    }
    public String getExceStatus$() {
        if (Cools.isEmpty(this.exceStatus)) {
            return "";
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaitPakinServiceImpl.java
@@ -297,6 +297,8 @@
        }
        if (waitPakin.getAgvSign()==1) {
            agvService.AGVBindAndInTaskStart(waitPakin, userId);
        } else {
            agvService.AGVBindAndInTaskStart(waitPakin.getBarcode());
        }
        return pakin;