Browse Source

#巡检列表查询mapper修改

zhongwei
yang_shj 5 months ago
parent
commit
2dacb0ac0b
  1. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/inspect/impl/TaskServiceImpl.java
  2. 2
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.xml

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/inspect/impl/TaskServiceImpl.java

@ -41,8 +41,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, TaskEntity> impleme
// 查询所有巡检任务 // 查询所有巡检任务
List<TaskEntity> tasks = this.list(new LambdaQueryWrapper<TaskEntity>() {{ List<TaskEntity> tasks = this.list(new LambdaQueryWrapper<TaskEntity>() {{
ge(TaskEntity::getPlanStartTime, start) ge(TaskEntity::getPlanStartTime, start)
.le(TaskEntity::getPlanStartTime, end) .le(TaskEntity::getPlanStartTime, end)
.in(TaskEntity::getCreateDept, areas); .in(TaskEntity::getCreateDept, areas);
}}); }});
if(CollectionUtil.isEmpty(tasks)){ if(CollectionUtil.isEmpty(tasks)){
return task; return task;

2
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.xml

@ -16,7 +16,7 @@
and t.PLAN_START_TIME &gt;= #{task.planStartTime} and t.PLAN_START_TIME &gt;= #{task.planStartTime}
</if> </if>
<if test="task.planStartTimeEnd != null"> <if test="task.planStartTimeEnd != null">
and t.PLAN_START_TIME &gt;= #{task.planStartTime} and t.PLAN_START_TIME &lt;= #{task.planStartTimeEnd}
</if> </if>
<if test="task.planEndTime != null"> <if test="task.planEndTime != null">
and t.PLAN_END_TIME &lt;= #{task.planEndTime} and t.PLAN_END_TIME &lt;= #{task.planEndTime}

Loading…
Cancel
Save