Fancy
2024-07-05 af69f416ff531ea7fd7a22e02885bf9d78536f41
add plan
1个文件已修改
20 ■■■■■ 已修改文件
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderSv.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderSv.java
@@ -135,22 +135,24 @@
        if (workLasts.size() > 0) {
            BeanUtils.copyProperties(workLasts.get(0), result);
            //校验planId processId nodeId
            /*PrAssemblyPlan assyPlan = assemblyDao.selectByPrimaryKey(workLasts.get(0).getPlanId());
            PrAssemblyPlan assyPlan = assemblyDao.selectByPrimaryKey(workLasts.get(0).getPlanId());
            if (assyPlan == null) {
                throw new RuntimeException("组装任务已经在系统中删除请检查,请先到登出界面解除工站占用 ,再重新扫描");
                //直接删除记录
                logout(workLasts.get(0).getId().toString());
            }
            boolean hasNodeId = assyPlan.getProcess().getNodes().stream()
                    .anyMatch(node -> node.id.equals(workLasts.get(0).getNodeId()));
            if (!hasNodeId) {
                throw new RuntimeException("节点信息有误或被其他人员修改,,请先到登出界面解除工站占用 ,再重新扫描");
                //直接删除记录
                logout(workLasts.get(0).getId().toString());
            } else {
                result.setPlan(assyPlan);
            }
            result.setPlan(assyPlan);*/
        } else {
            result.setStationId(stationInfo.getId());
            result.setStationName(stationInfo.getName());
            result.setLineId(stationInfo.getLineId());
            result.setLineName(stationInfo.getLineName());
        }
        result.setStationId(stationInfo.getId());
        result.setStationName(stationInfo.getName());
        result.setLineId(stationInfo.getLineId());
        result.setLineName(stationInfo.getLineName());
        return result;
    }