| | |
| | | private void dealWorkType(Solutions solutions, Solutions newModel, List<SolutionWorktype> worktypes) { |
| | | |
| | | int num =0; |
| | | List<SolutionWorktype> typeList = new ArrayList<>(); |
| | | for(SolutionWorktype type : worktypes) { |
| | | //基础版本 |
| | | SolutionWorktype w = new SolutionWorktype(); |
| | |
| | | //历史版本的工种信息 |
| | | SolutionWorktype newType = new SolutionWorktype(); |
| | | BeanUtils.copyProperties(w, newType); |
| | | newType.setId(null); |
| | | newType.setSolutionId(newModel.getId()); |
| | | solutionWorktypeJoinMapper.insert(newType); |
| | | typeList.add(newType); |
| | | } |
| | | if(typeList.size()>0){ |
| | | solutionWorktypeJoinMapper.insert(typeList); |
| | | } |
| | | } |
| | | |