| | |
| | | params.setProcessId(vo.getProcessId()); |
| | | List<PrAssemblyPlan> planList = selectAssyPlanList(params); |
| | | boolean hasNodeId= planList.stream() |
| | | .flatMap(process -> process.nodes.stream()) |
| | | .flatMap(process -> process.getProcess().getNodes().stream()) |
| | | .anyMatch(node -> node.id.equals(vo.getNodeId())); |
| | | if(!hasNodeId){ |
| | | throw new RuntimeException("节点信息有误或被其他人员修改,请重新选择节点信息"); |
| | |
| | | // 保存history |
| | | StaAssemblyWorkHistory history = new StaAssemblyWorkHistory(); |
| | | BeanUtils.copyProperties(workLast,history); |
| | | history.setId(null); |
| | | //history.setId(null); |
| | | int count = assemblyWorkHistoryDao.insertSelective(history); |
| | | //删除last |
| | | assemblyWorkLastDao.deleteByPrimaryKey(Long.parseLong(id)); |
| | |
| | | public List<PrAssemblyPlan> selectAssyPlanList(PrAssemblyPlan params){ |
| | | List<PrAssemblyPlan> planList = assemblyDao.selectAssyPlanList(params); |
| | | planList.stream().forEach(process -> { |
| | | process.nodes.forEach(node -> { |
| | | process.getProcess().getNodes().forEach(node -> { |
| | | if(node.instruction != null){ |
| | | addUrl(node.instruction); |
| | | } |