| | |
| | | @Lazy |
| | | private IDeviceInfoService deviceInfoService; |
| | | @Autowired |
| | | private INcLogInfoService iNcLogInfoService; |
| | | @Autowired |
| | | private IPermissionStreamService permissionStreamService; |
| | | @Autowired |
| | | private IProcessionDepartmentService processionDepartmentService; |
| | |
| | | private IDocRelativeService iDocRelativeService; |
| | | @Autowired |
| | | private IProcessStreamPermissionService processStreamPermissionService; |
| | | @Autowired |
| | | private IProductPermissionService productPermissionService; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | |
| | | if(!b) |
| | | ExceptionCast.cast(CommonCode.FAIL); |
| | | //添加用户权限 |
| | | ProcessionPermission permission = new ProcessionPermission(); |
| | | permission.setProcessId(stream.getProcessId()); |
| | | permission.setUserId(userId); |
| | | processStreamPermissionService.save(permission); |
| | | b = productPermissionService.add(stream.getProcessId(), userId,"5"); |
| | | if (!b) { |
| | | ExceptionCast.cast(ProductInfoCode.PRODUCT_SAVE_ERROR); |
| | | } |
| | | //添加权限验证 |
| | | PermissionStream permissionStream = new PermissionStream(); |
| | | permissionStream.setUserId(userId); |
| | |
| | | stream.setPartsId(null); |
| | | stream.setProcessName(stream.getProcessName().toUpperCase()); |
| | | stream.setProcessCode(null); |
| | | //添加日志 |
| | | NcLogInfo ncLogInfo = new NcLogInfo(); |
| | | //模块 |
| | | ncLogInfo.setModuleInfo("产品结构树"); |
| | | //类型 |
| | | ncLogInfo.setOperateType(3); |
| | | //日志内容 |
| | | ncLogInfo.setLogContent("工序号:"+en.getProcessCode()); |
| | | ncLogInfo.setRemark(JSONObject.toJSONString(en)); |
| | | iNcLogInfoService.saveLogNcInfos(ncLogInfo); |
| | | boolean b = super.updateById(stream); |
| | | if(!b) |
| | | ExceptionCast.cast(CommonCode.FAIL); |