From 47b5de28773c5cf551ff9cbebd36e9c49c17609f Mon Sep 17 00:00:00 2001 From: lyh <liuyuanheng@xalxzn.com> Date: 星期四, 20 二月 2025 15:12:57 +0800 Subject: [PATCH] 修改bug --- lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/PartsInfoServiceImpl.java | 43 ++++++------------------------------------- 1 files changed, 6 insertions(+), 37 deletions(-) diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/PartsInfoServiceImpl.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/PartsInfoServiceImpl.java index 414797d..8cee5f7 100644 --- a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/PartsInfoServiceImpl.java +++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/PartsInfoServiceImpl.java @@ -57,6 +57,8 @@ private INcLogInfoService iNcLogInfoService; @Autowired private IDocRelativeService iDocRelativeService; + @Autowired + private IProductPermissionService productPermissionService; @Override @Transactional(rollbackFor = {Exception.class}) public boolean addPartsInfo(PartsInfo partsInfo) { @@ -84,15 +86,6 @@ if(componentInfo == null) ExceptionCast.cast(PartsInfoCode.PARTS_COMPONENT_NONE); partsInfo.setPartsStatus(1); - //娣诲姞鏃ュ織 - NcLogInfo ncLogInfo = new NcLogInfo(); - //妯″潡 - ncLogInfo.setModuleInfo("浜у搧缁撴瀯鏍�"); - //绫诲瀷 - ncLogInfo.setOperateType(2); - //鏃ュ織鍐呭 - ncLogInfo.setLogContent("闆朵欢鍚嶇О锛�"+partsInfo.getPartsName()+"锛岄浂浠朵唬鍙凤細"+partsInfo.getPartsCode()); - iNcLogInfoService.saveLogNcInfos(ncLogInfo); boolean b = super.save(partsInfo); List<PermissionStream> oldDepartPermList = permissionStreamService.getByComponentId(componentInfo.getProductId(), componentInfo.getComponentId()); if(oldDepartPermList != null && !oldDepartPermList.isEmpty()) { @@ -123,29 +116,16 @@ } if(!b) ExceptionCast.cast(CommonCode.FAIL); - PartsPermission permission = new PartsPermission(); - permission.setPartsId(partsInfo.getPartsId()); - permission.setUserId(userId); - b = partsPermissionService.save(permission); - if(!b) - ExceptionCast.cast(CommonCode.FAIL); -// if(!b) -// ExceptionCast.cast(CommonCode.FAIL); + b = productPermissionService.add(partsInfo.getPartsId(), userId,"3"); + if (!b) { + ExceptionCast.cast(ProductInfoCode.PRODUCT_SAVE_ERROR); + } //娣诲姞鐢ㄦ埛鏉冮檺 PermissionStream stream = new PermissionStream(); stream.setProductId(partsInfo.getProductId()); stream.setComponentId(partsInfo.getComponentId()); stream.setPartsId(partsInfo.getPartsId()); stream.setUserId(userId); -// //娣诲姞鏃ュ織 -// NcLogInfo ncLogInfogx = new NcLogInfo(); -// //妯″潡 -// ncLogInfogx.setModuleInfo("浜у搧缁撴瀯鏍�"); -// //绫诲瀷 -// ncLogInfogx.setOperateType(2); -// //鏃ュ織鍐呭 -// ncLogInfogx.setLogContent("闆朵欢鍚嶇О锛�"+partsInfo.getPartsName()+"鐢熸垚榛樿宸ュ簭锛屽伐搴忓彿锛�"+processStream.getProcessCode()); -// iNcLogInfoService.saveLogNcInfos(ncLogInfogx); return permissionStreamService.save(stream); } @@ -165,17 +145,6 @@ partsInfo.setPartsStatus(null); partsInfo.setProductId(null); partsInfo.setComponentId(null); - //娣诲姞鏃ュ織 - NcLogInfo ncLogInfo = new NcLogInfo(); - //妯″潡 - ncLogInfo.setModuleInfo("浜у搧缁撴瀯鏍�"); - //绫诲瀷 - ncLogInfo.setOperateType(3); - //淇敼淇濆瓨澶囨敞 - ncLogInfo.setRemark(JSONObject.toJSONString(en)); - //鏃ュ織鍐呭 - ncLogInfo.setLogContent("淇敼閮ㄤ欢鍚嶇О锛�"+productInfoMapper.selectById(en.getProductId()).getProductName()+"瀛愰泦闆朵欢"); - iNcLogInfoService.saveLogNcInfos(ncLogInfo); boolean b = super.updateById(partsInfo); if(!b) return false; -- Gitblit v1.9.3