diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmGroupController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmGroupController.java index 00871b87..5a5a85e8 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmGroupController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmGroupController.java @@ -17,7 +17,7 @@ import com.xm.core.service.XmProjectService; import com.xm.core.service.XmRecordService; import com.xm.core.service.cache.XmProjectGroupCacheService; import com.xm.core.service.push.XmPushMsgService; -import com.xm.core.vo.XmProjectGroupVo; +import com.xm.core.vo.XmGroupVo; import io.swagger.annotations.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -149,7 +149,7 @@ public class XmGroupController { Map m = new HashMap<>(); RequestUtils.transformArray(params, "ids"); PageUtils.startPage(params); - List xmProjectGroupList=new ArrayList<>(); + List xmProjectGroupList=new ArrayList<>(); String iterationId= (String) params.get("iterationId"); String projectId= (String) params.get("projectId"); String productId= (String) params.get("productId"); diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmGroupUserController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmGroupUserController.java index da09a4a0..f5242327 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmGroupUserController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmGroupUserController.java @@ -12,7 +12,7 @@ import com.xm.core.entity.XmProject; import com.xm.core.entity.XmProjectGroupUser; import com.xm.core.service.*; import com.xm.core.service.push.XmPushMsgService; -import com.xm.core.vo.XmProjectGroupVo; +import com.xm.core.vo.XmGroupVo; import io.swagger.annotations.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -130,7 +130,7 @@ public class XmGroupUserController { return ResponseHelper.failed("product-0","产品已不存在"); } if(!xmProjectGroupService.checkUserIsProductAdm(xmProduct, user.getUserid())){ - XmProjectGroupVo xmProjectGroupVo=this.xmProjectGroupService.getProductGroupFromCache(xmProduct.getId(),gu.getGroupId()); + XmGroupVo xmProjectGroupVo=this.xmProjectGroupService.getProductGroupFromCache(xmProduct.getId(),gu.getGroupId()); if(xmProjectGroupVo==null){ return ResponseHelper.failed("group-0","小组已不存在"); } @@ -149,7 +149,7 @@ public class XmGroupUserController { return ResponseHelper.failed("product-0","产品已不存在"); } if(!xmProjectGroupService.checkUserIsProjectAdm(xmProject, user.getUserid())){ - XmProjectGroupVo xmProjectGroupVo=this.xmProjectGroupService.getProjectGroupFromCache(xmProject.getId(),gu.getGroupId()); + XmGroupVo xmProjectGroupVo=this.xmProjectGroupService.getProjectGroupFromCache(xmProject.getId(),gu.getGroupId()); if(xmProjectGroupVo==null){ return ResponseHelper.failed("group-0","小组已不存在"); } @@ -220,7 +220,7 @@ public class XmGroupUserController { return ResponseHelper.failed("product-0","产品已不存在"); } if(!xmProjectGroupService.checkUserIsProductAdm(xmProduct, user.getUserid())){ - XmProjectGroupVo xmProjectGroupVo=this.xmProjectGroupService.getProductGroupFromCache(xmProduct.getId(),gu.getGroupId()); + XmGroupVo xmProjectGroupVo=this.xmProjectGroupService.getProductGroupFromCache(xmProduct.getId(),gu.getGroupId()); if(xmProjectGroupVo==null){ return ResponseHelper.failed("group-0","小组已不存在"); } @@ -239,7 +239,7 @@ public class XmGroupUserController { return ResponseHelper.failed("project-0","项目已不存在"); } if(!xmProjectGroupService.checkUserIsProjectAdm(xmProject, user.getUserid())){ - XmProjectGroupVo xmProjectGroupVo=this.xmProjectGroupService.getProjectGroupFromCache(xmProject.getId(),gu.getGroupId()); + XmGroupVo xmProjectGroupVo=this.xmProjectGroupService.getProjectGroupFromCache(xmProject.getId(),gu.getGroupId()); if(xmProjectGroupVo==null){ return ResponseHelper.failed("group-0","小组已不存在"); } @@ -305,7 +305,7 @@ public class XmGroupUserController { return ResponseHelper.failed("product-0","产品已不存在"); } if(!xmProjectGroupService.checkUserIsProductAdm(xmProduct, user.getUserid())){ - XmProjectGroupVo xmProjectGroupVo=this.xmProjectGroupService.getProductGroupFromCache(xmProduct.getId(),gu.getGroupId()); + XmGroupVo xmProjectGroupVo=this.xmProjectGroupService.getProductGroupFromCache(xmProduct.getId(),gu.getGroupId()); if(xmProjectGroupVo==null){ return ResponseHelper.failed("group-0","小组已不存在"); } @@ -324,7 +324,7 @@ public class XmGroupUserController { return ResponseHelper.failed("product-0","产品已不存在"); } if(!xmProjectGroupService.checkUserIsProjectAdm(xmProject, user.getUserid())){ - XmProjectGroupVo xmProjectGroupVo=this.xmProjectGroupService.getProductGroupFromCache(xmProject.getId(),gu.getGroupId()); + XmGroupVo xmProjectGroupVo=this.xmProjectGroupService.getProductGroupFromCache(xmProject.getId(),gu.getGroupId()); if(xmProjectGroupVo==null){ return ResponseHelper.failed("group-0","小组已不存在"); } @@ -423,7 +423,7 @@ public class XmGroupUserController { if("1".equals(pgClass)){ boolean isPm=xmProjectGroupService.checkUserIsProductAdm(xmProduct,user.getUserid()); if(!isPm){ - XmProjectGroupVo xmProjectGroupVo=this.xmProjectGroupService.getProductGroupFromCache(xmProduct.getId(),groupId); + XmGroupVo xmProjectGroupVo=this.xmProjectGroupService.getProductGroupFromCache(xmProduct.getId(),groupId); if(xmProjectGroupVo==null){ continue; } @@ -435,7 +435,7 @@ public class XmGroupUserController { }else { boolean isPm=xmProjectGroupService.checkUserIsProjectAdm(xmProject,user.getUserid()); if(!isPm){ - XmProjectGroupVo xmProjectGroupVo=this.xmProjectGroupService.getProjectGroupFromCache(xmProject.getId(),groupId); + XmGroupVo xmProjectGroupVo=this.xmProjectGroupService.getProjectGroupFromCache(xmProject.getId(),groupId); if(xmProjectGroupVo==null){ continue; } @@ -540,7 +540,7 @@ public class XmGroupUserController { if("1".equals(pgClass)){ boolean isPm=xmProjectGroupService.checkUserIsProductAdm(xmProduct,user.getUserid()); if(!isPm){ - XmProjectGroupVo xmProjectGroupVo=this.xmProjectGroupService.getProductGroupFromCache(xmProduct.getId(),groupId); + XmGroupVo xmProjectGroupVo=this.xmProjectGroupService.getProductGroupFromCache(xmProduct.getId(),groupId); if(xmProjectGroupVo==null){ continue; } @@ -552,7 +552,7 @@ public class XmGroupUserController { }else { boolean isPm=xmProjectGroupService.checkUserIsProjectAdm(xmProject,user.getUserid()); if(!isPm){ - XmProjectGroupVo xmProjectGroupVo=this.xmProjectGroupService.getProjectGroupFromCache(xmProject.getId(),groupId); + XmGroupVo xmProjectGroupVo=this.xmProjectGroupService.getProjectGroupFromCache(xmProject.getId(),groupId); if(xmProjectGroupVo==null){ continue; } diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmProductPhaseController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmProductPhaseController.java index 7b98be14..9c938c23 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmProductPhaseController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmProductPhaseController.java @@ -14,7 +14,7 @@ import com.xm.core.PubTool; import com.xm.core.entity.XmProduct; import com.xm.core.entity.XmProjectPhase; import com.xm.core.service.*; -import com.xm.core.vo.XmProjectGroupVo; +import com.xm.core.vo.XmGroupVo; import io.swagger.annotations.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -163,7 +163,7 @@ public class XmProductPhaseController { return m; } XmProduct xmProduct=this.xmProductService.getProductFromCache(xmProjectPhaseDb.getProductId()); - List groupVoList=groupService.getProjectGroupVoList(xmProjectPhaseDb.getProductId()); + List groupVoList=groupService.getProjectGroupVoList(xmProjectPhaseDb.getProductId()); User user = LoginUtils.getCurrentUserInfo(); boolean meIsPm=groupService.checkUserIsProductAdm(xmProduct,user.getUserid()); boolean meIsTeamHead=groupService.checkUserIsOtherUserTeamHead(groupVoList,user.getUserid(),user.getUserid()); @@ -228,7 +228,7 @@ public class XmProductPhaseController { xmProjectPhase.setMngUsername(user.getUsername()); } XmProduct xmProduct=this.xmProductService.getProductFromCache(xmProjectPhase.getProductId()); - List groupVoList=groupService.getProjectGroupVoList(xmProjectPhase.getProductId()); + List groupVoList=groupService.getProjectGroupVoList(xmProjectPhase.getProductId()); boolean meIsPm=groupService.checkUserIsProductAdm(xmProduct,user.getUserid()); boolean meIsTeamHead=groupService.checkUserIsOtherUserTeamHead(groupVoList,user.getUserid(),user.getUserid()); @@ -298,7 +298,7 @@ public class XmProductPhaseController { return ResponseHelper.failed("data-0","该计划已不存在"); } XmProduct xmProduct=this.xmProductService.getProductFromCache(xmProjectPhaseDb.getProductId()); - List groupVoList=groupService.getProjectGroupVoList(xmProjectPhaseDb.getProductId()); + List groupVoList=groupService.getProjectGroupVoList(xmProjectPhaseDb.getProductId()); User user = LoginUtils.getCurrentUserInfo(); boolean meIsPm=groupService.checkUserIsProductAdm(xmProduct,user.getUserid()); boolean meIsTeamHead=groupService.checkUserIsOtherUserTeamHead(groupVoList,user.getUserid(),user.getUserid()); @@ -359,7 +359,7 @@ public class XmProductPhaseController { return ResponseHelper.failed("data-0","该计划已不存在"); } XmProduct xmProduct=this.xmProductService.getProductFromCache(xmProjectPhase.getProductId()); - List groupVoList=groupService.getProjectGroupVoList(xmProjectPhase.getProductId()); + List groupVoList=groupService.getProjectGroupVoList(xmProjectPhase.getProductId()); User user = LoginUtils.getCurrentUserInfo(); boolean meIsPm=groupService.checkUserIsProductAdm(xmProduct,user.getUserid()); boolean meIsTeamHead=groupService.checkUserIsOtherUserTeamHead(groupVoList,user.getUserid(),user.getUserid()); @@ -441,7 +441,7 @@ public class XmProductPhaseController { XmProduct xmProduct=this.xmProductService.getProductFromCache(xmProjectPhase.getProductId()); List existsTaskList=new ArrayList<>(); List hasChildList=new ArrayList<>(); - List groupVoList=groupService.getProjectGroupVoList(xmProjectPhase.getProductId()); + List groupVoList=groupService.getProjectGroupVoList(xmProjectPhase.getProductId()); User user = LoginUtils.getCurrentUserInfo(); boolean meIsPm=groupService.checkUserIsProductAdm(xmProduct,user.getUserid()); boolean meIsTeamHead=groupService.checkUserIsOtherUserTeamHead(groupVoList,user.getUserid(),user.getUserid()); @@ -534,7 +534,7 @@ public class XmProductPhaseController { return ResponseHelper.failed("productId-0","请上送项目编号"); } XmProduct xmProduct=this.xmProductService.getProductFromCache(xmProjectPhase.getProductId()); - List groupVoList=groupService.getProjectGroupVoList(xmProjectPhase.getProductId()); + List groupVoList=groupService.getProjectGroupVoList(xmProjectPhase.getProductId()); User user = LoginUtils.getCurrentUserInfo(); boolean meIsPm=groupService.checkUserIsProductAdm(xmProduct,user.getUserid()); boolean meIsTeamHead=groupService.checkUserIsOtherUserTeamHeadOrAss(groupVoList,user.getUserid(),user.getUserid()); @@ -644,7 +644,7 @@ public class XmProductPhaseController { } XmProduct xmProduct=this.xmProductService.getProductFromCache(xmProjectPhase.getProductId()); - List groupVoList=groupService.getProjectGroupVoList(xmProjectPhase.getProductId()); + List groupVoList=groupService.getProjectGroupVoList(xmProjectPhase.getProductId()); User user = LoginUtils.getCurrentUserInfo(); boolean meIsPm=groupService.checkUserIsProductAdm(xmProduct,user.getUserid()); boolean meIsTeamHead=groupService.checkUserIsOtherUserTeamHead(groupVoList,user.getUserid(),user.getUserid()); @@ -747,7 +747,7 @@ public class XmProductPhaseController { if(!StringUtils.hasText(productId)){ return ResponseHelper.failed("productId-0","请上送项目编号"); } - List groupVoList=groupService.getProjectGroupVoList(productId); + List groupVoList=groupService.getProjectGroupVoList(productId); User user = LoginUtils.getCurrentUserInfo(); XmProduct xmProduct=this.xmProductService.getProductFromCache(productId); @@ -788,7 +788,7 @@ public class XmProductPhaseController { if(!StringUtils.hasText(productId)){ return ResponseHelper.failed("productId-0","请上送项目编号"); } - List groupVoList=groupService.getProjectGroupVoList(productId); + List groupVoList=groupService.getProjectGroupVoList(productId); User user = LoginUtils.getCurrentUserInfo(); XmProduct xmProduct=this.xmProductService.getProductFromCache(productId); @@ -826,7 +826,7 @@ public class XmProductPhaseController { if(!StringUtils.hasText(productId)){ return ResponseHelper.failed("productId-0","请上送项目编号"); } - List groupVoList=groupService.getProjectGroupVoList(productId); + List groupVoList=groupService.getProjectGroupVoList(productId); User user = LoginUtils.getCurrentUserInfo(); XmProduct xmProduct=this.xmProductService.getProductFromCache(productId); diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmProjectController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmProjectController.java index 4ced6696..2622d543 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmProjectController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmProjectController.java @@ -13,8 +13,8 @@ import com.mdp.safe.client.entity.User; import com.mdp.safe.client.utils.LoginUtils; import com.xm.core.entity.XmProject; import com.xm.core.service.*; +import com.xm.core.vo.XmGroupVo; import com.xm.core.vo.XmProjectCopyVo; -import com.xm.core.vo.XmProjectGroupVo; import com.xm.core.vo.XmProjectVo; import io.swagger.annotations.*; import org.apache.commons.logging.Log; @@ -262,7 +262,7 @@ public class XmProjectController { m.put("tips", tips); return m; } - List groups=this.groupService.getProjectGroupVoList(xmProjectDb.getId()); + List groups=this.groupService.getProjectGroupVoList(xmProjectDb.getId()); boolean isCreate=user.getUserid().equals(xmProjectDb.getCreateUserid()); boolean isPm=groupService.checkUserIsProjectAdm(xmProjectDb,user.getUserid()); if( !isCreate && !isPm ) { @@ -330,7 +330,7 @@ public class XmProjectController { m.put("tips", tips); return m; } - List groups=this.groupService.getProjectGroupVoList(xmProjectDb.getId()); + List groups=this.groupService.getProjectGroupVoList(xmProjectDb.getId()); boolean isCreate=user.getUserid().equals(xmProjectDb.getCreateUserid()); boolean isPm=groupService.checkUserIsProjectAdm(xmProjectDb,user.getUserid()); if( !isCreate && !isPm ) { @@ -377,7 +377,7 @@ public class XmProjectController { m.put("tips", tips); return m; } - List groups=this.groupService.getProjectGroupVoList(xmProjectDb.getId()); + List groups=this.groupService.getProjectGroupVoList(xmProjectDb.getId()); boolean isCreate=user.getUserid().equals(xmProjectDb.getCreateUserid()); boolean isPm=groupService.checkUserIsProjectAdm(xmProjectDb,user.getUserid()); if( !isCreate && !isPm ) { @@ -423,7 +423,7 @@ public class XmProjectController { m.put("tips", tips); return m; } - List groups=this.groupService.getProjectGroupVoList(xmProjectDb.getId()); + List groups=this.groupService.getProjectGroupVoList(xmProjectDb.getId()); boolean isCreate=user.getUserid().equals(xmProjectDb.getCreateUserid()); boolean isPm=groupService.checkUserIsProjectAdm(xmProjectDb,user.getUserid()); if( !isCreate && !isPm ) { diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmProjectPhaseController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmProjectPhaseController.java index fe939f4d..1732fde9 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmProjectPhaseController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmProjectPhaseController.java @@ -14,7 +14,7 @@ import com.xm.core.PubTool; import com.xm.core.entity.XmProject; import com.xm.core.entity.XmProjectPhase; import com.xm.core.service.*; -import com.xm.core.vo.XmProjectGroupVo; +import com.xm.core.vo.XmGroupVo; import io.swagger.annotations.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -163,7 +163,7 @@ public class XmProjectPhaseController { return m; } XmProject xmProject=this.xmProjectService.getProjectFromCache(xmProjectPhaseDb.getProjectId()); - List groupVoList=groupService.getProjectGroupVoList(xmProjectPhaseDb.getProjectId()); + List groupVoList=groupService.getProjectGroupVoList(xmProjectPhaseDb.getProjectId()); User user = LoginUtils.getCurrentUserInfo(); boolean meIsPm=groupService.checkUserIsProjectAdm(xmProject,user.getUserid()); boolean meIsTeamHead=groupService.checkUserIsOtherUserTeamHead(groupVoList,user.getUserid(),user.getUserid()); @@ -228,7 +228,7 @@ public class XmProjectPhaseController { xmProjectPhase.setMngUsername(user.getUsername()); } XmProject xmProject=this.xmProjectService.getProjectFromCache(xmProjectPhase.getProjectId()); - List groupVoList=groupService.getProjectGroupVoList(xmProjectPhase.getProjectId()); + List groupVoList=groupService.getProjectGroupVoList(xmProjectPhase.getProjectId()); boolean meIsPm=groupService.checkUserIsProjectAdm(xmProject,user.getUserid()); boolean meIsTeamHead=groupService.checkUserIsOtherUserTeamHead(groupVoList,user.getUserid(),user.getUserid()); @@ -298,7 +298,7 @@ public class XmProjectPhaseController { return ResponseHelper.failed("data-0","该计划已不存在"); } XmProject xmProject=this.xmProjectService.getProjectFromCache(xmProjectPhaseDb.getProjectId()); - List groupVoList=groupService.getProjectGroupVoList(xmProjectPhaseDb.getProjectId()); + List groupVoList=groupService.getProjectGroupVoList(xmProjectPhaseDb.getProjectId()); User user = LoginUtils.getCurrentUserInfo(); boolean meIsPm=groupService.checkUserIsProjectAdm(xmProject,user.getUserid()); boolean meIsTeamHead=groupService.checkUserIsOtherUserTeamHead(groupVoList,user.getUserid(),user.getUserid()); @@ -359,7 +359,7 @@ public class XmProjectPhaseController { return ResponseHelper.failed("data-0","该计划已不存在"); } XmProject xmProject=this.xmProjectService.getProjectFromCache(xmProjectPhase.getProjectId()); - List groupVoList=groupService.getProjectGroupVoList(xmProjectPhase.getProjectId()); + List groupVoList=groupService.getProjectGroupVoList(xmProjectPhase.getProjectId()); User user = LoginUtils.getCurrentUserInfo(); boolean meIsPm=groupService.checkUserIsProjectAdm(xmProject,user.getUserid()); boolean meIsTeamHead=groupService.checkUserIsOtherUserTeamHead(groupVoList,user.getUserid(),user.getUserid()); @@ -441,7 +441,7 @@ public class XmProjectPhaseController { XmProject xmProject=this.xmProjectService.getProjectFromCache(xmProjectPhase.getProjectId()); List existsTaskList=new ArrayList<>(); List hasChildList=new ArrayList<>(); - List groupVoList=groupService.getProjectGroupVoList(xmProjectPhase.getProjectId()); + List groupVoList=groupService.getProjectGroupVoList(xmProjectPhase.getProjectId()); User user = LoginUtils.getCurrentUserInfo(); boolean meIsPm=groupService.checkUserIsProjectAdm(xmProject,user.getUserid()); boolean meIsTeamHead=groupService.checkUserIsOtherUserTeamHead(groupVoList,user.getUserid(),user.getUserid()); @@ -534,7 +534,7 @@ public class XmProjectPhaseController { return ResponseHelper.failed("projectId-0","请上送项目编号"); } XmProject xmProject=this.xmProjectService.getProjectFromCache(xmProjectPhase.getProjectId()); - List groupVoList=groupService.getProjectGroupVoList(xmProjectPhase.getProjectId()); + List groupVoList=groupService.getProjectGroupVoList(xmProjectPhase.getProjectId()); User user = LoginUtils.getCurrentUserInfo(); boolean meIsPm=groupService.checkUserIsProjectAdm(xmProject,user.getUserid()); boolean meIsTeamHead=groupService.checkUserIsOtherUserTeamHeadOrAss(groupVoList,user.getUserid(),user.getUserid()); @@ -644,7 +644,7 @@ public class XmProjectPhaseController { } XmProject xmProject=this.xmProjectService.getProjectFromCache(xmProjectPhase.getProjectId()); - List groupVoList=groupService.getProjectGroupVoList(xmProjectPhase.getProjectId()); + List groupVoList=groupService.getProjectGroupVoList(xmProjectPhase.getProjectId()); User user = LoginUtils.getCurrentUserInfo(); boolean meIsPm=groupService.checkUserIsProjectAdm(xmProject,user.getUserid()); boolean meIsTeamHead=groupService.checkUserIsOtherUserTeamHead(groupVoList,user.getUserid(),user.getUserid()); @@ -747,7 +747,7 @@ public class XmProjectPhaseController { if(!StringUtils.hasText(projectId)){ return ResponseHelper.failed("projectId-0","请上送项目编号"); } - List groupVoList=groupService.getProjectGroupVoList(projectId); + List groupVoList=groupService.getProjectGroupVoList(projectId); User user = LoginUtils.getCurrentUserInfo(); XmProject xmProject=this.xmProjectService.getProjectFromCache(projectId); @@ -788,7 +788,7 @@ public class XmProjectPhaseController { if(!StringUtils.hasText(projectId)){ return ResponseHelper.failed("projectId-0","请上送项目编号"); } - List groupVoList=groupService.getProjectGroupVoList(projectId); + List groupVoList=groupService.getProjectGroupVoList(projectId); User user = LoginUtils.getCurrentUserInfo(); XmProject xmProject=this.xmProjectService.getProjectFromCache(projectId); @@ -826,7 +826,7 @@ public class XmProjectPhaseController { if(!StringUtils.hasText(projectId)){ return ResponseHelper.failed("projectId-0","请上送项目编号"); } - List groupVoList=groupService.getProjectGroupVoList(projectId); + List groupVoList=groupService.getProjectGroupVoList(projectId); User user = LoginUtils.getCurrentUserInfo(); XmProject xmProject=this.xmProjectService.getProjectFromCache(projectId); diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmTaskController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmTaskController.java index f95fcb7c..058b2c21 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmTaskController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmTaskController.java @@ -20,7 +20,7 @@ import com.xm.core.service.cache.XmTaskCacheService; import com.xm.core.service.push.XmPushMsgService; import com.xm.core.vo.BatchRelTasksWithMenu; import com.xm.core.vo.BatchRelTasksWithPhase; -import com.xm.core.vo.XmProjectGroupVo; +import com.xm.core.vo.XmGroupVo; import com.xm.core.vo.XmTaskVo; import io.swagger.annotations.*; import org.apache.commons.logging.Log; @@ -341,7 +341,7 @@ public class XmTaskController { xmTaskVo.setCreateTime(new Date()); xmTaskVo.setCbranchId(user.getBranchId()); xmTaskVo.setCdeptid(user.getDeptid()); - List pgroups=groupService.getProjectGroupVoList(xmTaskVo.getProjectId()); + List pgroups=groupService.getProjectGroupVoList(xmTaskVo.getProjectId()); if(pgroups==null || pgroups.size()==0){ return ResponseHelper.failed("group-0","该项目还未建立项目团队,请先进行团队成员维护"); } @@ -471,7 +471,7 @@ public class XmTaskController { return m; } - List pgroups=groupService.getProjectGroupVoList(xmTask.getProjectId()); + List pgroups=groupService.getProjectGroupVoList(xmTask.getProjectId()); if(pgroups==null || pgroups.size()==0){ tips.setFailureMsg("该项目还未建立项目团队,请先进行团队成员维护"); m.put("tips", tips); @@ -534,7 +534,7 @@ public class XmTaskController { return m; } - List pgroups=groupService.getProjectGroupVoList(xmTaskVo.getProjectId()); + List pgroups=groupService.getProjectGroupVoList(xmTaskVo.getProjectId()); if(pgroups==null || pgroups.size()==0){ tips.setFailureMsg("该项目还未建立项目团队,请先进行团队成员维护"); m.put("tips", tips); @@ -598,7 +598,7 @@ public class XmTaskController { if(xmTaskDb==null){ return ResponseHelper.failed("data-0","任务已不存在"); } - List pgroups=groupService.getProjectGroupVoList(xmTaskDb.getProjectId()); + List pgroups=groupService.getProjectGroupVoList(xmTaskDb.getProjectId()); if(pgroups==null || pgroups.size()==0){ tips.setFailureMsg("该项目还未建立项目团队,请先进行团队成员维护"); m.put("tips", tips); @@ -640,9 +640,9 @@ public class XmTaskController { if(tips.isOk()) { xmTaskService.updateTask(xmTaskVo,xmTaskDb); if(!StringUtils.isEmpty(xmTaskVo.getExecutorUserid())) { - List groups=groupService.getUserGroupsByProjectId(xmTaskVo.getProjectId(), xmTaskVo.getExecutorUserid()); + List groups=groupService.getUserGroupsByProjectId(xmTaskVo.getProjectId(), xmTaskVo.getExecutorUserid()); if(groups!=null && groups.size()>0) { - for (XmProjectGroupVo g : groups) { + for (XmGroupVo g : groups) { xmPushMsgService.pushGroupMsg(user.getBranchId(), g.getId(), user.getUserid(), user.getUsername(), user.getUsername()+"修改了任务【"+xmTaskVo.getName()+"】信息"); } } @@ -681,7 +681,7 @@ public class XmTaskController { if(xmTaskDb==null){ return ResponseHelper.failed("data-0","任务已不存在"); } - List pgroups=groupService.getProjectGroupVoList(xmTaskDb.getProjectId()); + List pgroups=groupService.getProjectGroupVoList(xmTaskDb.getProjectId()); if(pgroups==null || pgroups.size()==0){ tips.setFailureMsg("该项目还未建立项目团队,请先进行团队成员维护"); m.put("tips", tips); @@ -731,7 +731,7 @@ public class XmTaskController { if(xmTaskDb==null){ return ResponseHelper.failed("data-0","任务已不存在"); } - List pgroups=groupService.getProjectGroupVoList(xmTaskDb.getProjectId()); + List pgroups=groupService.getProjectGroupVoList(xmTaskDb.getProjectId()); if(pgroups==null || pgroups.size()==0){ tips.setFailureMsg("该项目还未建立项目团队,请先进行团队成员维护"); m.put("tips", tips); @@ -749,9 +749,9 @@ public class XmTaskController { } xmTaskService.updateProgress(xmTask,xmTaskDb); if(!StringUtils.isEmpty(xmTaskDb.getExecutorUserid())) { - List groupVoList=this.groupService.getUserGroups(pgroups,xmTaskDb.getExecutorUserid()); + List groupVoList=this.groupService.getUserGroups(pgroups,xmTaskDb.getExecutorUserid()); if(groupVoList!=null && groupVoList.size()>0) { - for (XmProjectGroupVo g : groupVoList) { + for (XmGroupVo g : groupVoList) { xmPushMsgService.pushGroupMsg(g.getBranchId(), g.getId(), user.getUserid(), user.getUsername(), user.getUsername()+"将任务【"+xmTaskDb.getName()+"】进度更新为"+xmTask.getRate()+"%"); } } @@ -800,7 +800,7 @@ public class XmTaskController { return m; } - List pgroups=groupService.getProjectGroupVoList(projectId); + List pgroups=groupService.getProjectGroupVoList(projectId); if(pgroups==null || pgroups.size()==0){ tips.setFailureMsg("该项目还未建立项目团队,请先进行团队成员维护"); m.put("tips", tips); @@ -930,7 +930,7 @@ public class XmTaskController { if( "9".equals(xmProjectDb.getStatus())){ return ResponseHelper.failed("project-status-9","项目关闭,不能再修改"); } - List pgroups=groupService.getProjectGroupVoList(xmProjectDb.getId()); + List pgroups=groupService.getProjectGroupVoList(xmProjectDb.getId()); if(pgroups==null || pgroups.size()==0){ return ResponseHelper.failed("group-0","该项目还未建立项目团队,请先进行团队成员维护"); } @@ -1024,7 +1024,7 @@ public class XmTaskController { boolean hasMenuQx=true; boolean isPm=groupService.checkUserIsProductAdm(xmProductDb,user.getUserid()); if(!isPm){ - List pgroups=groupService.getProductGroupVoList(xmMenuDb.getProductId()); + List pgroups=groupService.getProductGroupVoList(xmMenuDb.getProductId()); if(StringUtils.hasText(xmMenuDb.getMmUserid()) ){ if(!user.getUserid().equals(xmMenuDb.getMmUserid())){ @@ -1064,7 +1064,7 @@ public class XmTaskController { for (Map.Entry> pt : projectTasksMap.entrySet()) { XmProject xmProjectDb=this.xmProjectService.getProjectFromCache(pt.getKey()); boolean isProjectAdm=groupService.checkUserIsProjectAdm(xmProjectDb,user.getUserid()); - List groupVoList=groupService.getProjectGroupVoList(xmProjectDb.getId()); + List groupVoList=groupService.getProjectGroupVoList(xmProjectDb.getId()); if(isProjectAdm==false){ if(groupVoList==null){ noAllowTasks.addAll(pt.getValue()); @@ -1146,7 +1146,7 @@ public class XmTaskController { return m; } - List pgroups=groupService.getProjectGroupVoList(projectId); + List pgroups=groupService.getProjectGroupVoList(projectId); if(pgroups==null || pgroups.size()==0){ tips.setFailureMsg("该项目还未建立项目团队,请先进行团队成员维护"); m.put("tips", tips); @@ -1261,7 +1261,7 @@ public class XmTaskController { m.put("tips", tips); return m; } - List pgroups=groupService.getProjectGroupVoList(projectId); + List pgroups=groupService.getProjectGroupVoList(projectId); if(pgroups==null || pgroups.size()==0){ tips.setFailureMsg("该项目还未建立项目团队,请先进行团队成员维护"); m.put("tips", tips); diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmTaskExecuserController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmTaskExecuserController.java index d5e87c70..307c7bba 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmTaskExecuserController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmTaskExecuserController.java @@ -17,7 +17,7 @@ import com.xm.core.service.XmGroupService; import com.xm.core.service.XmGroupUserService; import com.xm.core.service.XmTaskExecuserService; import com.xm.core.service.XmTaskService; -import com.xm.core.vo.XmProjectGroupVo; +import com.xm.core.vo.XmGroupVo; import io.swagger.annotations.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -135,7 +135,7 @@ public class XmTaskExecuserController { }else { boolean isPm=groupService.checkUserIsProjectAdm(xmTask.getProjectId(),user.getUserid()); if(!isPm){ - List myGgroups=groupService.getProjectGroupVoList(projectId); + List myGgroups=groupService.getProjectGroupVoList(projectId); boolean isTeamHeader= groupService.checkUserIsOtherUserTeamHeadOrAss(myGgroups,xmTaskExecuser.getCreateUserid(),user.getUserid()); if(!isTeamHeader){ return ResponseHelper.failed("no-qx","您无权操作!只有任务负责人、组长、项目管理者可以给任务分配候选人。"); @@ -182,7 +182,7 @@ public class XmTaskExecuserController { User user=LoginUtils.getCurrentUserInfo(); boolean isTaskCreater=user.getUserid().equals(xmTask.getCreateUserid()); - List pgroups=groupService.getProjectGroupVoList(projectId); + List pgroups=groupService.getProjectGroupVoList(projectId); List noAllowUsers=new ArrayList<>(); List allowUsers=new ArrayList<>(); List allowUserNames=new ArrayList<>(); @@ -261,7 +261,7 @@ public class XmTaskExecuserController { } User user=LoginUtils.getCurrentUserInfo(); boolean isTaskCreater=user.getUserid().equals(xmTask.getCreateUserid()); - List pgroups=groupService.getProjectGroupVoList(projectId); + List pgroups=groupService.getProjectGroupVoList(projectId); boolean isHead= groupService.checkUserIsOtherUserTeamHeadOrAss(pgroups, xmTaskExecuser.getUserid(), user.getUserid()); if( isHead || isTaskCreater ) { //放行,组长和任务责任人可以将候选人变更为执行人 @@ -330,7 +330,7 @@ public class XmTaskExecuserController { boolean isTaskCreater=user.getUserid().equals(xmTask.getCreateUserid()); if(!user.getUserid().equals(xmTaskExecuser.getUserid())) { String projectId=xmTaskExecuser.getProjectId(); - List pgroups=groupService.getProjectGroupVoList(projectId); + List pgroups=groupService.getProjectGroupVoList(projectId); boolean isHead= groupService.checkUserIsOtherUserTeamHeadOrAss(pgroups, xmTaskExecuser.getUserid(), user.getUserid()); if( !isHead && !isTaskCreater ) { tips.setFailureMsg("自己或者组长可以提交任务到测试,"+user.getUsername()+"不是"+xmTaskExecuser.getUsername()+"的组长,无权提交"); @@ -376,7 +376,7 @@ public class XmTaskExecuserController { User user=LoginUtils.getCurrentUserInfo(); boolean isTaskCreater=user.getUserid().equals(xmTask.getCreateUserid()); String projectId=xmTaskExecuser.getProjectId(); - List pgroups=groupService.getProjectGroupVoList(projectId); + List pgroups=groupService.getProjectGroupVoList(projectId); boolean isHead= groupService.checkUserIsOtherUserTeamHeadOrAss(pgroups, xmTaskExecuser.getUserid(), user.getUserid()); if( !isHead && !isTaskCreater ) { tips.setFailureMsg("您无权提交测试结果!任务责任人、组长可以提交该任务的测试结果。"); @@ -423,7 +423,7 @@ public class XmTaskExecuserController { User user=LoginUtils.getCurrentUserInfo(); boolean isTaskCreater=user.getUserid().equals(xmTask.getCreateUserid()); String projectId=xmTaskExecuser.getProjectId(); - List pgroups=groupService.getProjectGroupVoList(projectId); + List pgroups=groupService.getProjectGroupVoList(projectId); boolean isHead= groupService.checkUserIsOtherUserTeamHeadOrAss(pgroups, xmTaskExecuser.getUserid(), user.getUserid()); if( !isHead && !isTaskCreater ) { tips.setFailureMsg("您无权提交测试结果!任务责任人、组长可以提交该任务的测试结果。"); @@ -470,7 +470,7 @@ public class XmTaskExecuserController { boolean isTaskCreater=user.getUserid().equals(xmTask.getCreateUserid()); String projectId=xmTaskExecuser.getProjectId(); if(!user.getUserid().equals(xmTaskExecuser.getUserid())) { - List pgroups=groupService.getProjectGroupVoList(projectId); + List pgroups=groupService.getProjectGroupVoList(projectId); boolean isHead= groupService.checkUserIsOtherUserTeamHeadOrAss(pgroups, xmTaskExecuser.getUserid(), user.getUserid()); if( !isHead && !isTaskCreater ) { tips.setFailureMsg("无权操作!自己、任务责任人、组长可以修改任务的报价信息"); @@ -523,7 +523,7 @@ public class XmTaskExecuserController { boolean isTaskCreater=user.getUserid().equals(xmTask.getCreateUserid()); String projectId=xmTaskExecuser.getProjectId(); if(!user.getUserid().equals(xmTaskExecuser.getUserid())) { - List pgroups=groupService.getProjectGroupVoList(projectId); + List pgroups=groupService.getProjectGroupVoList(projectId); boolean isHead= groupService.checkUserIsOtherUserTeamHeadOrAss(pgroups, xmTaskExecuser.getUserid(), user.getUserid()); if( !isHead && !isTaskCreater ) { @@ -569,7 +569,7 @@ public class XmTaskExecuserController { boolean isTaskCreater=user.getUserid().equals(xmTask.getCreateUserid()); String projectId=xmTaskExecuser.getProjectId(); if(!user.getUserid().equals(xmTaskExecuser.getUserid())) { - List pgroups=groupService.getProjectGroupVoList(projectId); + List pgroups=groupService.getProjectGroupVoList(projectId); boolean isHead= groupService.checkUserIsOtherUserTeamHeadOrAss(pgroups, xmTaskExecuser.getUserid(), user.getUserid()); if( !isHead && !isTaskCreater ) { tips.setFailureMsg("无权操作!只有自己、任务责任人、组长可以删除任务执行人."); diff --git a/xm-core/src/main/java/com/xm/core/service/XmGroupService.java b/xm-core/src/main/java/com/xm/core/service/XmGroupService.java index 157bb69c..a1bd967a 100644 --- a/xm-core/src/main/java/com/xm/core/service/XmGroupService.java +++ b/xm-core/src/main/java/com/xm/core/service/XmGroupService.java @@ -8,7 +8,7 @@ import com.mdp.safe.client.utils.LoginUtils; import com.xm.core.entity.*; import com.xm.core.service.cache.XmProjectGroupCacheService; import com.xm.core.service.push.XmPushMsgService; -import com.xm.core.vo.XmProjectGroupVo; +import com.xm.core.vo.XmGroupVo; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -91,7 +91,7 @@ public class XmGroupService extends BaseService { noQxOpResult.addAll(menuList); }else{ if(!this.checkUserIsProductAdm(xmProduct,user.getUserid())){ - List groupVoList=this.getProductGroupVoList(xmProduct.getId()); + List groupVoList=this.getProductGroupVoList(xmProduct.getId()); for (XmMenu xmMenu : menuList) { boolean canOp=false; if(user.getUserid().equals(xmMenu.getMmUserid())){ @@ -122,9 +122,9 @@ public class XmGroupService extends BaseService { } /** 请在此类添加自定义函数 */ - public List getProjectGroupVoList(String projectId) { - List groupVoList=new ArrayList<>(); - List groupVoList2 = groupCacheService.getProjectGroups(projectId); + public List getProjectGroupVoList(String projectId) { + List groupVoList=new ArrayList<>(); + List groupVoList2 = groupCacheService.getProjectGroups(projectId); if(groupVoList2==null||groupVoList2.size()==0) { XmProjectGroup group = new XmProjectGroup(); @@ -140,7 +140,7 @@ public class XmGroupService extends BaseService { //return groupVoList; } groupList.forEach(g -> { - XmProjectGroupVo gvo = new XmProjectGroupVo(); + XmGroupVo gvo = new XmGroupVo(); BeanUtils.copyProperties(g,gvo); List groupUsers=new ArrayList<>(); groupUserList.forEach(gu -> { @@ -202,9 +202,9 @@ public class XmGroupService extends BaseService { } return false; } - public List getProductGroupVoList(String productId) { - List groupVoList=new ArrayList<>(); - List groupVoList2 = groupCacheService.getProductGroups(productId); + public List getProductGroupVoList(String productId) { + List groupVoList=new ArrayList<>(); + List groupVoList2 = groupCacheService.getProductGroups(productId); if(groupVoList2==null||groupVoList2.size()==0) { XmProjectGroup group = new XmProjectGroup(); @@ -218,7 +218,7 @@ public class XmGroupService extends BaseService { if(groupUserList==null || groupUserList.size()==0) { } groupList.forEach(g -> { - XmProjectGroupVo gvo = new XmProjectGroupVo(); + XmGroupVo gvo = new XmGroupVo(); BeanUtils.copyProperties(g,gvo); List groupUsers=new ArrayList<>(); groupUserList.forEach(gu -> { @@ -242,10 +242,10 @@ public class XmGroupService extends BaseService { * @param xmProjectGroupVoList */ @Transactional - public void addGroups(String projectId,List xmProjectGroupVoList) { + public void addGroups(String projectId,List xmProjectGroupVoList) { List groups=new ArrayList<>(); List groupUsers=new ArrayList<>(); - for (XmProjectGroupVo xmProjectGroupVo : xmProjectGroupVoList) { + for (XmGroupVo xmProjectGroupVo : xmProjectGroupVoList) { XmProjectGroup group=new XmProjectGroup(); xmProjectGroupVo.setId(this.createKey("id")); BeanUtils.copyProperties(xmProjectGroupVo, group); @@ -267,7 +267,7 @@ public class XmGroupService extends BaseService { this.batchInsert(groups); User u=LoginUtils.getCurrentUserInfo(); - for (XmProjectGroupVo group : xmProjectGroupVoList) { + for (XmGroupVo group : xmProjectGroupVoList) { List users=group.getGroupUsers(); List> umaps=new ArrayList<>(); for (XmProjectGroupUser xmProjectGroupUser : users) { @@ -320,8 +320,8 @@ public class XmGroupService extends BaseService { * @param userid * @return */ - public List getUserGroupsByProjectId(String projectId, String userid){ - List xmProjectGroupVoList=this.getProjectGroupVoList(projectId); + public List getUserGroupsByProjectId(String projectId, String userid){ + List xmProjectGroupVoList=this.getProjectGroupVoList(projectId); return this.getUserGroups(xmProjectGroupVoList, userid); } /** @@ -330,8 +330,8 @@ public class XmGroupService extends BaseService { * @param userid * @return */ - public List getUserGroupsByProductId(String productId, String userid){ - List xmProjectGroupVoList=this.getProductGroupVoList(productId); + public List getUserGroupsByProductId(String productId, String userid){ + List xmProjectGroupVoList=this.getProductGroupVoList(productId); return this.getUserGroups(xmProjectGroupVoList, userid); } @@ -341,12 +341,12 @@ public class XmGroupService extends BaseService { * @param teamHeadUserid * @return */ - public boolean checkUserIsHeadInGroups( List xmProjectGroupVoList,String teamHeadUserid){ + public boolean checkUserIsHeadInGroups(List xmProjectGroupVoList, String teamHeadUserid){ if(xmProjectGroupVoList==null || xmProjectGroupVoList.size()==0)return false; if(!StringUtils.hasText(teamHeadUserid)){ return false; } - for (XmProjectGroupVo xmProjectGroupVo : xmProjectGroupVoList) { + for (XmGroupVo xmProjectGroupVo : xmProjectGroupVoList) { if(teamHeadUserid.equals(xmProjectGroupVo.getLeaderUserid())){ return true; } @@ -362,7 +362,7 @@ public class XmGroupService extends BaseService { * @param teamHeadUserid * @return */ - public boolean checkUserIsHeadInGroup( List xmProjectGroupVoList,String groupId,String teamHeadUserid){ + public boolean checkUserIsHeadInGroup(List xmProjectGroupVoList, String groupId, String teamHeadUserid){ if(xmProjectGroupVoList==null || xmProjectGroupVoList.size()==0)return false; if(!StringUtils.hasText(teamHeadUserid)){ return false; @@ -371,7 +371,7 @@ public class XmGroupService extends BaseService { return false; } - for (XmProjectGroupVo xmProjectGroupVo : xmProjectGroupVoList) { + for (XmGroupVo xmProjectGroupVo : xmProjectGroupVoList) { if(groupId.equals(xmProjectGroupVo.getId())){ if(teamHeadUserid.equals(xmProjectGroupVo.getLeaderUserid())){ return true; @@ -380,12 +380,12 @@ public class XmGroupService extends BaseService { } return false; } - public List getUserGroups(List xmProjectGroupVoList, String userid){ - List userGroups=new ArrayList<>(); + public List getUserGroups(List xmProjectGroupVoList, String userid){ + List userGroups=new ArrayList<>(); if(xmProjectGroupVoList==null) { return userGroups; } - for (XmProjectGroupVo g : xmProjectGroupVoList) { + for (XmGroupVo g : xmProjectGroupVoList) { if(userid.equals(g.getLeaderUserid())||userid.equals(g.getAssUserid())){ userGroups.add(g); }else{ @@ -409,11 +409,11 @@ public class XmGroupService extends BaseService { return userGroups; } public boolean checkUserExistsGroup(String projectId,String userid){ - List userGroups= getUserGroupsByProjectId(projectId,userid); + List userGroups= getUserGroupsByProjectId(projectId,userid); return userGroups!=null && userGroups.size()>0; } - public boolean checkUserExistsGroup(List userGroups,String userid){ - List userGroups2= this.getUserGroups(userGroups, userid); + public boolean checkUserExistsGroup(List userGroups, String userid){ + List userGroups2= this.getUserGroups(userGroups, userid); return userGroups2!=null && userGroups2.size()>0; } /** @@ -422,7 +422,7 @@ public class XmGroupService extends BaseService { * @param headUserid * @return */ - public boolean checkUserIsTeamHead(XmProjectGroupVo xmProjectGroupVo, String headUserid){ + public boolean checkUserIsTeamHead(XmGroupVo xmProjectGroupVo, String headUserid){ if(xmProjectGroupVo==null){ return false; } @@ -438,7 +438,7 @@ public class XmGroupService extends BaseService { * @param headUserid * @return */ - public boolean checkUserIsTeamHeadOrAss(XmProjectGroupVo xmProjectGroupVo, String headUserid){ + public boolean checkUserIsTeamHeadOrAss(XmGroupVo xmProjectGroupVo, String headUserid){ if(xmProjectGroupVo==null){ return false; } @@ -455,16 +455,16 @@ public class XmGroupService extends BaseService { * @param headUserid * @return */ - public boolean checkUserIsOtherUserTeamHead(List xmProjectGroupVoList, String memUserid, String headUserid){ + public boolean checkUserIsOtherUserTeamHead(List xmProjectGroupVoList, String memUserid, String headUserid){ if(xmProjectGroupVoList==null || xmProjectGroupVoList.size()==0) { return false; } - List userGroups=this.getUserGroups(xmProjectGroupVoList, memUserid); + List userGroups=this.getUserGroups(xmProjectGroupVoList, memUserid); if(userGroups==null || userGroups.size()==0) { return false; } - for (XmProjectGroupVo ug : userGroups) { + for (XmGroupVo ug : userGroups) { if(headUserid.equals(ug.getLeaderUserid())){ return true; } @@ -479,24 +479,24 @@ public class XmGroupService extends BaseService { * @param headUserid * @return */ - public boolean checkUserIsOtherUserTeamHeadOrAss(List xmProjectGroupVoList, String memUserid, String headUserid){ + public boolean checkUserIsOtherUserTeamHeadOrAss(List xmProjectGroupVoList, String memUserid, String headUserid){ if(xmProjectGroupVoList==null || xmProjectGroupVoList.size()==0) { return false; } - List userGroups=this.getUserGroups(xmProjectGroupVoList, memUserid); + List userGroups=this.getUserGroups(xmProjectGroupVoList, memUserid); if(userGroups==null || userGroups.size()==0) { return false; } - for (XmProjectGroupVo ug : userGroups) { + for (XmGroupVo ug : userGroups) { if(headUserid.equals(ug.getLeaderUserid())||headUserid.equals(ug.getAssUserid())){ return true; } } return false; } - public List getProjectManagers( List xmProjectGroupVoList){ - for (XmProjectGroupVo g : xmProjectGroupVoList) { + public List getProjectManagers( List xmProjectGroupVoList){ + for (XmGroupVo g : xmProjectGroupVoList) { if("nbxmjl".equals(g.getPgTypeId())) { return g.getGroupUsers(); } @@ -514,7 +514,7 @@ public class XmGroupService extends BaseService { * @param pmUserid * @return */ - public boolean checkUserIsProjectManager( List xmProjectGroupVoList ,String pmUserid) { + public boolean checkUserIsProjectManager(List xmProjectGroupVoList , String pmUserid) { if(xmProjectGroupVoList==null || xmProjectGroupVoList.size()==0) { return false; } @@ -532,13 +532,13 @@ public class XmGroupService extends BaseService { } - public List getProjectGroupVoListByIterationId(String iterationId) { + public List getProjectGroupVoListByIterationId(String iterationId) { List list=this.xmProductProjectLinkService.selectListByIterationId(iterationId); - List datas=new ArrayList<>(); + List datas=new ArrayList<>(); if(list!=null && list.size()>0){ for (XmProductProjectLink productProjectLink : list) { - List data0=this.getProjectGroupVoList(productProjectLink.getProjectId()); + List data0=this.getProjectGroupVoList(productProjectLink.getProjectId()); if(data0!=null && data0.size()>0){ datas.addAll(data0); } @@ -552,8 +552,8 @@ public class XmGroupService extends BaseService { * @param productId * @return */ - public List getProjectGroupVoListByProductId(String productId) { - List data0=this.getProductGroupVoList(productId); + public List getProjectGroupVoListByProductId(String productId) { + List data0=this.getProductGroupVoList(productId); return data0; } @@ -923,8 +923,8 @@ public class XmGroupService extends BaseService { batchSumParents(canDelNodes); } - public XmProjectGroupVo getProductGroupFromCache(String productId, String groupId) { - XmProjectGroupVo groupVo=groupCacheService.getProductGroup(productId,groupId); + public XmGroupVo getProductGroupFromCache(String productId, String groupId) { + XmGroupVo groupVo=groupCacheService.getProductGroup(productId,groupId); if(groupVo==null){ XmProjectGroup group=this.selectOneObject(new XmProjectGroup(groupId)); if(group==null){ @@ -933,7 +933,7 @@ public class XmGroupService extends BaseService { XmProjectGroupUser xmProjectGroupUser=new XmProjectGroupUser(); xmProjectGroupUser.setGroupId(groupId); List users=this.xmProjectGroupUserService.selectListByWhere(xmProjectGroupUser); - XmProjectGroupVo xmProjectGroupVo=new XmProjectGroupVo(); + XmGroupVo xmProjectGroupVo=new XmGroupVo(); BeanUtils.copyProperties(group,xmProjectGroupVo); xmProjectGroupVo.setGroupUsers(users); this.groupCacheService.putProductGroup(xmProjectGroupVo); @@ -943,8 +943,8 @@ public class XmGroupService extends BaseService { return groupVo; } } - public XmProjectGroupVo getProjectGroupFromCache(String projectId, String groupId) { - XmProjectGroupVo groupVo=groupCacheService.getProjectGroup(projectId,groupId); + public XmGroupVo getProjectGroupFromCache(String projectId, String groupId) { + XmGroupVo groupVo=groupCacheService.getProjectGroup(projectId,groupId); if(groupVo==null){ XmProjectGroup group=this.selectOneObject(new XmProjectGroup(groupId)); if(group==null){ @@ -953,7 +953,7 @@ public class XmGroupService extends BaseService { XmProjectGroupUser xmProjectGroupUser=new XmProjectGroupUser(); xmProjectGroupUser.setGroupId(groupId); List users=this.xmProjectGroupUserService.selectListByWhere(xmProjectGroupUser); - XmProjectGroupVo xmProjectGroupVo=new XmProjectGroupVo(); + XmGroupVo xmProjectGroupVo=new XmGroupVo(); BeanUtils.copyProperties(group,xmProjectGroupVo); xmProjectGroupVo.setGroupUsers(users); this.groupCacheService.putProjectGroup(xmProjectGroupVo); diff --git a/xm-core/src/main/java/com/xm/core/service/XmProjectPhaseService.java b/xm-core/src/main/java/com/xm/core/service/XmProjectPhaseService.java index 43968077..e6baa108 100644 --- a/xm-core/src/main/java/com/xm/core/service/XmProjectPhaseService.java +++ b/xm-core/src/main/java/com/xm/core/service/XmProjectPhaseService.java @@ -6,7 +6,7 @@ import com.mdp.core.utils.NumberUtil; import com.mdp.safe.client.entity.User; import com.mdp.safe.client.utils.LoginUtils; import com.xm.core.entity.XmProjectPhase; -import com.xm.core.vo.XmProjectGroupVo; +import com.xm.core.vo.XmGroupVo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -42,7 +42,7 @@ public class XmProjectPhaseService extends BaseService { } public Tips checkUserHasQxToOperProjectPhase(String projectId,String mngUserid,String mngUsername,String myUserid){ Tips tips = new Tips("成功"); - List groupVoList=groupService.getProjectGroupVoList(projectId); + List groupVoList=groupService.getProjectGroupVoList(projectId); User user = LoginUtils.getCurrentUserInfo(); boolean meIsPm=groupService.checkUserIsProjectManager(groupVoList,user.getUserid()); boolean meIsTeamHead=groupService.checkUserIsOtherUserTeamHead(groupVoList,user.getUserid(),user.getUserid()); diff --git a/xm-core/src/main/java/com/xm/core/service/XmTaskExecuserService.java b/xm-core/src/main/java/com/xm/core/service/XmTaskExecuserService.java index 78aca404..5f3283e6 100644 --- a/xm-core/src/main/java/com/xm/core/service/XmTaskExecuserService.java +++ b/xm-core/src/main/java/com/xm/core/service/XmTaskExecuserService.java @@ -14,7 +14,7 @@ import com.xm.core.entity.XmTaskExecuser; import com.xm.core.service.client.CashOperateServie; import com.xm.core.service.client.MkClient; import com.xm.core.service.push.XmPushMsgService; -import com.xm.core.vo.XmProjectGroupVo; +import com.xm.core.vo.XmGroupVo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.StringUtils; @@ -133,9 +133,9 @@ public class XmTaskExecuserService extends BaseService { List usernames=new ArrayList<>(); User user=LoginUtils.getCurrentUserInfo(); - List pgroups=groupService.getProjectGroupVoList(projectId); + List pgroups=groupService.getProjectGroupVoList(projectId); for (XmTaskExecuser xmTaskExecuser : xmTaskExecuserList) { - List userGroups=groupService.getUserGroups(pgroups, xmTaskExecuser.getUserid()); + List userGroups=groupService.getUserGroups(pgroups, xmTaskExecuser.getUserid()); XmTaskExecuser xmTaskExecuser2=new XmTaskExecuser(); xmTaskExecuser2.setId(xmTaskExecuser.getId()); xmTaskExecuser2.setStatus("7"); @@ -154,7 +154,7 @@ public class XmTaskExecuserService extends BaseService { users.add(userMap); String imMsg=xmTaskExecuser.getUsername()+"放弃任务【"+xmTaskExecuser.getTaskId()+"-"+xmTaskExecuser.getTaskName()+"】"; - for (XmProjectGroupVo g : userGroups) { + for (XmGroupVo g : userGroups) { this.pushMsgService.pushGroupMsg(user.getBranchId(), g.getId(), xmTaskExecuser.getUserid(), xmTaskExecuser.getUsername(), imMsg); this.pushMsgService.pushLeaveChannelGroupMsg(user.getBranchId(), g.getId(), users); } @@ -177,10 +177,10 @@ public class XmTaskExecuserService extends BaseService { public void becomeExecute(XmTaskExecuser xmTaskExecuser){ String projectId=xmTaskExecuser.getProjectId(); String taskId=xmTaskExecuser.getTaskId(); - List pgroups=groupService.getProjectGroupVoList(projectId); + List pgroups=groupService.getProjectGroupVoList(projectId); User user=LoginUtils.getCurrentUserInfo(); - List userGroups=groupService.getUserGroups(pgroups, xmTaskExecuser.getUserid()); + List userGroups=groupService.getUserGroups(pgroups, xmTaskExecuser.getUserid()); XmTaskExecuser query=new XmTaskExecuser(); query.setTaskId(taskId); List xmTaskExecusersDb=this.selectListByWhere(query); @@ -206,7 +206,7 @@ public class XmTaskExecuserService extends BaseService { * 下面为推送任务执行人变更im通知消息 */ String imMsg=xmTaskExecuser.getUsername()+"变更为任务["+xmTaskExecuser.getTaskId()+"-"+xmTaskExecuser.getTaskName()+"]执行人"; - for (XmProjectGroupVo g : userGroups) { + for (XmGroupVo g : userGroups) { this.pushMsgService.pushGroupMsg(user.getBranchId(),g.getId(), xmTaskExecuser.getUserid(), xmTaskExecuser.getUsername(),imMsg ); this.pushMsgService.pushPrichatMsgToIm(user.getBranchId(), user.getUserid(),user.getUsername(),xmTaskExecuser.getUserid(), xmTaskExecuser.getUsername(),imMsg); } diff --git a/xm-core/src/main/java/com/xm/core/service/cache/XmProjectGroupCacheService.java b/xm-core/src/main/java/com/xm/core/service/cache/XmProjectGroupCacheService.java index 13f5c806..15fd763d 100644 --- a/xm-core/src/main/java/com/xm/core/service/cache/XmProjectGroupCacheService.java +++ b/xm-core/src/main/java/com/xm/core/service/cache/XmProjectGroupCacheService.java @@ -1,6 +1,6 @@ package com.xm.core.service.cache; -import com.xm.core.vo.XmProjectGroupVo; +import com.xm.core.vo.XmGroupVo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; @@ -46,16 +46,16 @@ public class XmProjectGroupCacheService { return "xm_group"; } - public List getProjectGroups(String projectId){ + public List getProjectGroups(String projectId){ String key=this.getProjectKey(projectId); - return (List) redisTemplate.opsForHash().values(key); + return (List) redisTemplate.opsForHash().values(key); } - public XmProjectGroupVo getProjectGroup(String projectId,String groupId){ + public XmGroupVo getProjectGroup(String projectId, String groupId){ String key=this.getProjectKey(projectId); - return (XmProjectGroupVo) redisTemplate.opsForHash().get(key,groupId); + return (XmGroupVo) redisTemplate.opsForHash().get(key,groupId); } - public void putProjectGroup(XmProjectGroupVo group){ + public void putProjectGroup(XmGroupVo group){ String key=this.getProjectKey(group.getProjectId()); redisTemplate.opsForHash().put(key, group.getId(), group); } @@ -68,13 +68,13 @@ public class XmProjectGroupCacheService { String key=this.getProjectKey(projectId); this.clearProjectGroups(projectId); } - public void putProjectGroups(String projectId,List groups){ + public void putProjectGroups(String projectId,List groups){ String key=this.getProjectKey(projectId); if(groups==null || groups.size()==0){ this.clearProjectGroups(projectId); return; } - for (XmProjectGroupVo group : groups) { + for (XmGroupVo group : groups) { String hashKey= group.getId(); redisTemplate.opsForHash().put(key, hashKey, group); } @@ -87,16 +87,16 @@ public class XmProjectGroupCacheService { } } - public List getProductGroups(String productId){ + public List getProductGroups(String productId){ String key=this.getProductKey(productId); - return (List) redisTemplate.opsForHash().values(key); + return (List) redisTemplate.opsForHash().values(key); } - public XmProjectGroupVo getProductGroup(String productId,String groupId){ + public XmGroupVo getProductGroup(String productId, String groupId){ String key=this.getProductKey(productId); - return (XmProjectGroupVo) redisTemplate.opsForHash().get(key,groupId); + return (XmGroupVo) redisTemplate.opsForHash().get(key,groupId); } - public void putProductGroup(XmProjectGroupVo group){ + public void putProductGroup(XmGroupVo group){ String key=this.getProductKey(group.getProductId()); redisTemplate.opsForHash().put(key, group.getId(), group); } @@ -104,13 +104,13 @@ public class XmProjectGroupCacheService { String key=this.getProductKey(productId); this.clearProductGroups(productId); } - public void putProductGroups(String productId,List groups){ + public void putProductGroups(String productId,List groups){ String key=this.getProductKey(productId); if(groups==null || groups.size()==0){ this.clearProductGroups(productId); return; } - for (XmProjectGroupVo group : groups) { + for (XmGroupVo group : groups) { String hashKey= group.getId(); redisTemplate.opsForHash().put(key, hashKey, group); } diff --git a/xm-core/src/main/java/com/xm/core/vo/XmProjectGroupVo.java b/xm-core/src/main/java/com/xm/core/vo/XmGroupVo.java similarity index 88% rename from xm-core/src/main/java/com/xm/core/vo/XmProjectGroupVo.java rename to xm-core/src/main/java/com/xm/core/vo/XmGroupVo.java index fd05af13..000d74df 100644 --- a/xm-core/src/main/java/com/xm/core/vo/XmProjectGroupVo.java +++ b/xm-core/src/main/java/com/xm/core/vo/XmGroupVo.java @@ -7,7 +7,7 @@ import io.swagger.annotations.ApiModel; import java.util.List; @ApiModel(description="xm_group") -public class XmProjectGroupVo extends XmProjectGroup { +public class XmGroupVo extends XmProjectGroup { List groupUsers; public List getGroupUsers() { return groupUsers; } diff --git a/xm-core/src/main/java/com/xm/core/vo/XmProjectVo.java b/xm-core/src/main/java/com/xm/core/vo/XmProjectVo.java index 278e78af..df364d88 100644 --- a/xm-core/src/main/java/com/xm/core/vo/XmProjectVo.java +++ b/xm-core/src/main/java/com/xm/core/vo/XmProjectVo.java @@ -6,15 +6,15 @@ import java.util.List; public class XmProjectVo extends XmProject { - List groups; + List groups; - public List getGroups() { + public List getGroups() { return groups; } - public void setGroups(List groups) { + public void setGroups(List groups) { this.groups = groups; } }