Преглед изворни кода

项目列表新增部门筛选

anderx пре 2 година
родитељ
комит
62ceb569c4

+ 10 - 0
ruoyi-system/src/main/java/com/ruoyi/project/bo/ProjectListInput.java

@@ -14,6 +14,7 @@ public class ProjectListInput extends BaseEntity {
     private String projectYear;
     private Integer crossYear;
     private Integer projectStatus;
+    private Integer deptId;
     /**
      *  0=否,1=是
      */
@@ -25,6 +26,15 @@ public class ProjectListInput extends BaseEntity {
      */
     private Integer roleType;
 
+
+    public Integer getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(Integer deptId) {
+        this.deptId = deptId;
+    }
+
     public Long getCreateAid() {
         return createAid;
     }

+ 3 - 2
ruoyi-system/src/main/resources/mapper/project/ProjectTaskMapper.xml

@@ -265,10 +265,8 @@
     a.id, a.aid, a.`name`, a.project_status , a.create_time, a.remark, a.admin_name, a.staff_name, a.project_number,
     a.project_year, a.create_year, a.cross_year,a.duration,a.start_time,a.end_time
     from project_task a
-    <if test="companyId !=null">
       left join sys_user c on a.aid=c.user_id
       left join sys_dept d on c.dept_id=d.dept_id
-    </if>
     where 1=1
     <if test="roleType ==0">
       and (a.aid =#{uid} or  a.id in (select pid from project_staff where aid= #{uid}))
@@ -303,6 +301,9 @@
     <if test="companyId !=null">
       and (d.dept_id= #{companyId} or find_in_set(#{companyId},d.ancestors))
     </if>
+    <if test="deptId !=null">
+      and (d.dept_id= #{deptId} or find_in_set(#{deptId},d.ancestors))
+    </if>
   </select>
   <select id="projectAddDuration">
     update project_task