Fancy
2024-06-27 fb9432524649ab3b6f2314b1e0978cc6c26020eb
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java
@@ -69,8 +69,9 @@
        long workId = Long.parseLong(params.workId);
        StaAssemblyWorkLast workLast = assemblyWorkLastDao.selectByPrimaryKey(workId);
        if (workLast == null) {
            throw new RuntimeException("工单不存在");
            throw new RuntimeException("系统中没有该条登录信息");//工单不存在
        }
        //fancy 2024/6/27 是不是可以不用检查任务与设备码...
        PrAssemblyPlan plan = assemblyPlanDao.selectByPrimaryKey(workLast.getPlanId());
        // 验证并处理设备号和物料号
        Set<String> deviceSet = new HashSet<>(Arrays.asList(params.deviceNo.split(",")));
@@ -87,10 +88,10 @@
        });
        if (deviceList.isEmpty()) {
            throw new RuntimeException("设备号不属于当前任务计划");
            throw new RuntimeException("设备号("+ params.deviceNo +")均不属于当前任务计划");
        }
        if (deviceList.size() > 1) {
            throw new RuntimeException("设备号有且只能有一个");
            throw new RuntimeException("设备号有且只能有一个属于当前任务计划");
        }
        StaDeviceLast deviceLast = buildDeviceLast(params, workLast, deviceList.get(0));