| | |
| | | @Autowired |
| | | private IProcessSpecVersionService processSpecVersionService; |
| | | @Autowired |
| | | private IProcessStreamService processStreamService; |
| | | @Autowired |
| | | private IWorkStepService workStepService; |
| | | @Autowired |
| | | private IDocRelativeService iDocRelativeService; |
| | | @Autowired |
| | | private IProductPermissionService productPermissionService; |
| | |
| | | boolean b = super.updateById(partsInfo); |
| | | //同步修改结构树 |
| | | ProductMix productMix = productMixService.getById(Long.parseLong(id)); |
| | | productMix.setName(partsInfo.getPartsName()); |
| | | productMix.setCode(partsInfo.getPartsCode()); |
| | | productMix.setTreeName(partsInfo.getPartsName()); |
| | | productMix.setTreeCode(partsInfo.getPartsCode()); |
| | | productMixService.updateById(productMix); |
| | | if(!b) |
| | | return false; |
| | |
| | | List<String> id =new ArrayList<>(); |
| | | id.add(treeInfoRequest.getAttributionId()); |
| | | treeInfoRequest.setPartsIds(id); |
| | | //工艺规程版本 |
| | | List<DocInfo> processSpecVersions = processSpecVersionService.getByProcessSpecVersion(treeInfoRequest); |
| | | docInfos.addAll(processSpecVersions); |
| | | //工序 |
| | | List<DocInfo> processStreams = processStreamService.getByProcessStreamOtherFile(treeInfoRequest); |
| | | docInfos.addAll(processStreams); |
| | | //工步 |
| | | List<DocInfo> workSteps = workStepService.getByWorkStepOtherFile(treeInfoRequest); |
| | | docInfos.addAll(workSteps); |
| | | } |
| | | return docInfos; |
| | | } |
| | | |
| | | @Override |
| | | public boolean assignPermission(Object entity, Collection<SysUser> userList, boolean isAdd){ |
| | | if (isAdd) { |
| | | return assignAddUser((PartsInfo) entity, userList); |
| | | } else { |
| | | return assignRemoveUser((PartsInfo) entity, userList); |
| | | } |
| | | } |
| | | @Override |
| | | public boolean assignDepartPermission(Object entity, Collection<MdcProduction> departments, boolean isAdd) { |
| | | if (isAdd) { |
| | | return assignAddDepart((PartsInfo) entity, departments); |
| | | } else { |
| | | return assignRemoveDepart((PartsInfo) entity, departments); |
| | | } |
| | | } |
| | | } |