自动化立体仓库 - WMS系统
src/main/java/com/zy/api/service/impl/HmesApiServiceImpl.java
@@ -251,18 +251,34 @@
    }
    @Override
    public R getDeviceFreezeStatus() {
        List<BasDevice> devices = basDeviceService.selectList(new EntityWrapper<BasDevice>()
                .eq("status", 1)
                .orderBy("dev_no", true));
    public R getDeviceFreezeStatus(String devNo) {
        EntityWrapper<BasDevice> deviceWrapper = new EntityWrapper<>();
        deviceWrapper.eq("status", 1);
        deviceWrapper.orderBy("dev_no", true);
        if (!Cools.isEmpty(devNo)) {
            deviceWrapper.eq("dev_no", devNo.trim());
        }
        List<BasDevice> devices = basDeviceService.selectList(deviceWrapper);
        if (Cools.isEmpty(devices)) {
            if (!Cools.isEmpty(devNo)) {
                return R.error("机台[" + devNo + "]不存在或已禁用");
            }
            return R.ok(Collections.emptyList());
        }
        List<LocAroundBind> binds = locAroundBindService.selectList(new EntityWrapper<LocAroundBind>()
                .orderBy("dev_no", true)
                .orderBy("order_no", true)
                .orderBy("id", true));
        Set<String> deviceTypes = devices.stream()
                .map(BasDevice::getType)
                .filter(type -> !Cools.isEmpty(type))
                .collect(Collectors.toCollection(LinkedHashSet::new));
        EntityWrapper<LocAroundBind> bindWrapper = new EntityWrapper<>();
        bindWrapper.orderBy("dev_no", true);
        bindWrapper.orderBy("order_no", true);
        bindWrapper.orderBy("id", true);
        if (!Cools.isEmpty(deviceTypes)) {
            bindWrapper.in("dev_no", deviceTypes);
        }
        List<LocAroundBind> binds = locAroundBindService.selectList(bindWrapper);
        Map<String, List<LocAroundBind>> bindMap = new HashMap<>();
        if (!Cools.isEmpty(binds)) {
            bindMap = binds.stream()