Bläddra i källkod

部门导入,用户导入修改查询部门、人员修改,导入人员空格处理

anderx 2 år sedan
förälder
incheckning
8e0e6bb499

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/project/service/impl/ProjectTaskServiceImpl.java

@@ -270,6 +270,7 @@ public class ProjectTaskServiceImpl   implements ProjectTaskService {
         for (ProjectStaff ps : projectStaffs) {
             boolean flag = true;
             for (String s : split) {
+                s=s.trim();
                 if (ps.getName().equals(s)) {
                     flag = false;
                 }
@@ -288,6 +289,7 @@ public class ProjectTaskServiceImpl   implements ProjectTaskService {
     private void addStaff( ProjectTaskListOut p, String[] split, List<ProjectStaff> projectStaffs) {
         Long company = deptService.selectCompanyByDeptId();
         for (String s : split) {
+            s=s.trim();
             boolean flag = true;
             for (ProjectStaff ps : projectStaffs) {
                 if (ps.getName().equals(s)) {

+ 2 - 1
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -110,7 +110,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</select>
     <select id="selectByDepName" resultMap="SysDeptResult">
 		<include refid="selectDeptVo"/>
-		where d.dept_name =#{deptName}
+		where d.del_flag=0
+		and d.dept_name =#{deptName}
 		<if test="companyId !=null and companyId != 0">
 			AND (d.dept_id = #{companyId} OR d.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{companyId}, ancestors) ))
 		</if>

+ 3 - 3
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -124,8 +124,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		</if>
 		<!-- 数据范围过滤 -->
 		${params.dataScope}
+		order by job_number,
 		<if test="projectQuantitySort !=null and durationSort !=null">
-			order by u.project_quantity
+			u.project_quantity
 			<if test="projectQuantitySort==1">
 				desc
 			</if>
@@ -135,14 +136,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			</if>
 		</if>
 		<if test="projectQuantitySort !=null and durationSort ==null">
-			order by u.project_quantity
+			u.project_quantity
 			<if test="projectQuantitySort==1">
 				desc
 			</if>
 
 		</if>
 		<if test="projectQuantitySort ==null and durationSort !=null">
-			order by
 			u.duration
 			<if test="durationSort==1">
 				desc