Commit 6b7cc52a85bec2154d85d94d3649f9bc542a672a
1 parent
8facf901
refactor(garden): 优化派单任务和维护计划相关代码
- 移除 AssignTasksMapper 中无用的 import 语句 - 精简 MaintainPlanCommitMapper.xml 查询字段,移除 role_name 相关逻辑 - 注释掉 MaintainPlanCommitMapper.xml 中 roleName 的查询条件 - 调整 SQL 查询结构以提高可读性和执行效率
Showing
2 changed files
with
7 additions
and
10 deletions
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/assigntasks/AssignTasksMapper.java
| 1 | package com.zteits.urbanops.module.garden.dal.mysql.assigntasks; | 1 | package com.zteits.urbanops.module.garden.dal.mysql.assigntasks; |
| 2 | 2 | ||
| 3 | -import java.util.*; | ||
| 4 | - | ||
| 5 | import com.zteits.urbanops.framework.common.pojo.PageResult; | 3 | import com.zteits.urbanops.framework.common.pojo.PageResult; |
| 6 | -import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | ||
| 7 | import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | 4 | import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; |
| 5 | +import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | ||
| 6 | +import com.zteits.urbanops.module.garden.controller.admin.assigntasks.vo.AssignTasksPageReqVO; | ||
| 8 | import com.zteits.urbanops.module.garden.dal.dataobject.assigntasks.AssignTasksDO; | 7 | import com.zteits.urbanops.module.garden.dal.dataobject.assigntasks.AssignTasksDO; |
| 9 | import org.apache.ibatis.annotations.Mapper; | 8 | import org.apache.ibatis.annotations.Mapper; |
| 10 | -import com.zteits.urbanops.module.garden.controller.admin.assigntasks.vo.*; | ||
| 11 | 9 | ||
| 12 | /** | 10 | /** |
| 13 | * 派单任务主表(记录派单任务基本信息) Mapper | 11 | * 派单任务主表(记录派单任务基本信息) Mapper |
urbanops-module-garden/src/main/resources/mapper/maintainplan/MaintainPlanCommitMapper.xml
| @@ -28,13 +28,12 @@ | @@ -28,13 +28,12 @@ | ||
| 28 | a.company_id, | 28 | a.company_id, |
| 29 | a.dept_id, | 29 | a.dept_id, |
| 30 | a.finish_percent as finishPercent, | 30 | a.finish_percent as finishPercent, |
| 31 | - c.role_name, | ||
| 32 | c.finish_time, | 31 | c.finish_time, |
| 33 | c.user_name | 32 | c.user_name |
| 34 | FROM | 33 | FROM |
| 35 | garden_maintain_plan_detail a, | 34 | garden_maintain_plan_detail a, |
| 36 | garden_maintain_plan b, | 35 | garden_maintain_plan b, |
| 37 | - (SELECT plan_no, role_name , finish_time,user_id,user_name FROM garden_maintain_plan_commit ORDER BY id ASC LIMIT 1) c | 36 | + (SELECT plan_no,finish_time,user_id,user_name FROM garden_maintain_plan_commit ORDER BY id ASC LIMIT 1) c |
| 38 | WHERE | 37 | WHERE |
| 39 | a.batch_no = b.batch_no | 38 | a.batch_no = b.batch_no |
| 40 | AND a.plan_no = c.plan_no | 39 | AND a.plan_no = c.plan_no |
| @@ -68,9 +67,9 @@ | @@ -68,9 +67,9 @@ | ||
| 68 | <if test="req.deptId != null"> | 67 | <if test="req.deptId != null"> |
| 69 | and a.dept_id = #{req.deptId} | 68 | and a.dept_id = #{req.deptId} |
| 70 | </if> | 69 | </if> |
| 71 | - <if test="req.roleName != null and req.roleName !=''"> | ||
| 72 | - AND c.role_name LIKE CONCAT(#{req.roleName},'%') | ||
| 73 | - </if> | 70 | +<!-- <if test="req.roleName != null and req.roleName !=''">--> |
| 71 | +<!-- AND c.role_name LIKE CONCAT(#{req.roleName},'%')--> | ||
| 72 | +<!-- </if>--> | ||
| 74 | <if test="req.userName != null and req.userName !=''"> | 73 | <if test="req.userName != null and req.userName !=''"> |
| 75 | AND c.user_name LIKE CONCAT(#{req.userName},'%') | 74 | AND c.user_name LIKE CONCAT(#{req.userName},'%') |
| 76 | </if> | 75 | </if> |
| @@ -114,4 +113,4 @@ | @@ -114,4 +113,4 @@ | ||
| 114 | AND a.finish_state = 2 | 113 | AND a.finish_state = 2 |
| 115 | AND c.plan_no = #{req.planNo} | 114 | AND c.plan_no = #{req.planNo} |
| 116 | </select> | 115 | </select> |
| 117 | -</mapper> | ||
| 118 | \ No newline at end of file | 116 | \ No newline at end of file |
| 117 | +</mapper> |