| | |
| | | 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(","))); |
| | |
| | | }); |
| | | |
| | | 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)); |