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 | 1 | package com.zteits.urbanops.module.garden.dal.mysql.assigntasks; |
| 2 | 2 | |
| 3 | -import java.util.*; | |
| 4 | - | |
| 5 | 3 | import com.zteits.urbanops.framework.common.pojo.PageResult; |
| 6 | -import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 7 | 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 | 7 | import com.zteits.urbanops.module.garden.dal.dataobject.assigntasks.AssignTasksDO; |
| 9 | 8 | import org.apache.ibatis.annotations.Mapper; |
| 10 | -import com.zteits.urbanops.module.garden.controller.admin.assigntasks.vo.*; | |
| 11 | 9 | |
| 12 | 10 | /** |
| 13 | 11 | * 派单任务主表(记录派单任务基本信息) Mapper | ... | ... |
urbanops-module-garden/src/main/resources/mapper/maintainplan/MaintainPlanCommitMapper.xml
| ... | ... | @@ -28,13 +28,12 @@ |
| 28 | 28 | a.company_id, |
| 29 | 29 | a.dept_id, |
| 30 | 30 | a.finish_percent as finishPercent, |
| 31 | - c.role_name, | |
| 32 | 31 | c.finish_time, |
| 33 | 32 | c.user_name |
| 34 | 33 | FROM |
| 35 | 34 | garden_maintain_plan_detail a, |
| 36 | 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 | 37 | WHERE |
| 39 | 38 | a.batch_no = b.batch_no |
| 40 | 39 | AND a.plan_no = c.plan_no |
| ... | ... | @@ -68,9 +67,9 @@ |
| 68 | 67 | <if test="req.deptId != null"> |
| 69 | 68 | and a.dept_id = #{req.deptId} |
| 70 | 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 | 73 | <if test="req.userName != null and req.userName !=''"> |
| 75 | 74 | AND c.user_name LIKE CONCAT(#{req.userName},'%') |
| 76 | 75 | </if> |
| ... | ... | @@ -114,4 +113,4 @@ |
| 114 | 113 | AND a.finish_state = 2 |
| 115 | 114 | AND c.plan_no = #{req.planNo} |
| 116 | 115 | </select> |
| 117 | -</mapper> | |
| 118 | 116 | \ No newline at end of file |
| 117 | +</mapper> | ... | ... |