浏览代码

用户\项目模块修改

anderx 2 年之前
父节点
当前提交
ee86b1ed30

+ 1 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ProjectTaskController.java

@@ -204,8 +204,7 @@ public class ProjectTaskController extends BaseController {
     {
         ExcelUtil<ProjectStaffRecordOut> util = new ExcelUtil<>(ProjectStaffRecordOut.class);
         List<ProjectStaffRecordOut> list = util.importExcel(file.getInputStream());
-        String operName = getUsername();
-        String message = projectStaffRecordService.importProject(list, updateSupport, operName);
+        String message = projectStaffRecordService.importProject(list, updateSupport);
         return success(message);
     }
 

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/project/service/ProjectStaffRecordService.java

@@ -16,7 +16,7 @@ public interface ProjectStaffRecordService {
 
     List<ProjectStaffRecordOut> listRecord(ProjectStaffRecordInput in);
 
-    String importProject(List<ProjectStaffRecordOut> list, boolean updateSupport, String operName);
+    String importProject(List<ProjectStaffRecordOut> list, boolean updateSupport);
 
     AjaxResult myDuration(Long id,String recordTime);
 

+ 3 - 9
ruoyi-system/src/main/java/com/ruoyi/project/service/impl/ProjectStaffRecordServiceImpl.java

@@ -322,15 +322,9 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
     @Override
     public List<ProjectStaffRecordOut> listRecord(ProjectStaffRecordInput in) {
         if (in.getRoleType()==null)in.setRoleType(0);
-        if (in.getRoleType()==0){
             in.setAid(SecurityUtils.getUserId());
-        }else if (in.getRoleType()==1){
-        //判定1=经理审核成员2=技术总监审核经理
-            if (SecurityUtils.hashRoles(UserRolesType.INSPECTORS.getCode())){
-                in.setRoleType(2);
-            }else if (SecurityUtils.hashRoles(UserRolesType.CEO.getCode())||SecurityUtils.hashRoles(UserRolesType.ADMIN.getCode())){
-                in.setRoleType(3);
-            }
+        if (SecurityUtils.hashRoles(UserRolesType.CEO.getCode())||SecurityUtils.hashRoles(UserRolesType.ADMIN.getCode())){
+            in.setRoleType(2);
         }
         Long companyId = deptService.selectCompanyByDeptId();
         if (companyId!=null)in.setCompanyId(companyId);
@@ -339,7 +333,7 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
     }
 
     @Override
-    public String importProject(List<ProjectStaffRecordOut> list, boolean updateSupport, String operName) {
+    public String importProject(List<ProjectStaffRecordOut> list, boolean updateSupport) {
         if (StringUtils.isNull(list) || list.size() == 0)
         {
             throw new ServiceException("导入用户数据不能为空!");

+ 1 - 4
ruoyi-system/src/main/resources/mapper/project/ProjectStaffRecordMapper.xml

@@ -202,10 +202,7 @@
       and a.aid =#{aid}
     </if>
     <if test="roleType==1">
-      and a.aid in (select user_id from sys_user_role where role_id=2)
-    </if>
-    <if test="roleType==2">
-      and a.aid in (select user_id from sys_user_role where role_id=3)
+      and c.superior_id= #{aid}
     </if>
     <if test="processStatus  !=null">
       and a.process_status= #{processStatus}