| | |
| | | private IProcessSpecVersionDepartmentService processSpecVersionDepartmentService; |
| | | @Autowired |
| | | private IProductMixService productMixService; |
| | | @Autowired |
| | | private IWorkStepService workStepService; |
| | | @Autowired |
| | | private IProductPermissionService productPermissionService; |
| | | /** |
| | | * 根据用户id获取授权的工艺规程版本表信息 |
| | | * @param userId |
| | |
| | | ExceptionCast.cast(CommonCode.FAIL); |
| | | } |
| | | } |
| | | //添加用户权限 |
| | | b = productPermissionService.add(ProcessSpecVersion.getId(), userId,"4"); |
| | | if (!b) { |
| | | ExceptionCast.cast(ProductInfoCode.PRODUCT_SAVE_ERROR); |
| | | } |
| | | //添加结构树 |
| | | ProductMix productMix = new ProductMix(Long.parseLong(ProcessSpecVersion.getId()),Long.parseLong(ProcessSpecVersion.getPartsId()) |
| | | ,ProcessSpecVersion.getProcessSpecVersionName(),ProcessSpecVersion.getProcessSpecVersionCode(),"4"); |
| | | ,ProcessSpecVersion.getProcessSpecVersionName(),ProcessSpecVersion.getProcessSpecVersionCode(),4); |
| | | productMixService.save(productMix); |
| | | //添加用户权限 |
| | | PermissionStreamNew stream = new PermissionStreamNew(); |
| | |
| | | processSpecVersion.setComponentId(null); |
| | | processSpecVersion.setPartsId(null); |
| | | boolean b = super.updateById(processSpecVersion); |
| | | //同步修改结构树 |
| | | ProductMix productMix = productMixService.getById(Long.parseLong(id)); |
| | | productMix.setName(processSpecVersion.getProcessSpecVersionName()); |
| | | productMix.setCode(processSpecVersion.getProcessSpecVersionCode()); |
| | | productMixService.updateById(productMix); |
| | | if(!b) |
| | | return false; |
| | | ProcessSpecVersionPermission permission = processSpecVersionPermissionService.getByPsvIdAndUserId(id, userId); |
| | |
| | | */ |
| | | @Override |
| | | public Result<?> getProcessSpecVersionCount(String processSpecId){ |
| | | List<ProcessStream> list = processStreamService.findBypsvId(processSpecId); |
| | | List<WorkStep> workStepList=workStepService.list(new LambdaQueryWrapper<WorkStep>().eq(WorkStep::getPsvId,processSpecId)); |
| | | return null; |
| | | } |
| | | } |