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

修改小程序查询任务分页列表中传状态字段参数

pull/383/head
wanjing пре 10 месеци
родитељ
комит
32f9ec9c2f
2 измењених фајлова са 11 додато и 18 уклоњено
  1. +2
    -1
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/entity/query/InspectionQuery.java
  2. +9
    -17
      tuoheng-service/tuoheng-miniprogram/src/main/resources/mapper/InspectionMapper.xml

+ 2
- 1
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/entity/query/InspectionQuery.java Прегледај датотеку

@@ -7,6 +7,7 @@ import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
* @Author ChengWang
@@ -38,7 +39,7 @@ public class InspectionQuery extends BaseQuery {
/**
* 任务状态 5任务待飞行 7飞行失败 10任务飞行中 15任务飞行完成
*/
private String status;
private List<Integer> statusList;

/**
*巡检方式类型 1 无人机 2机场

+ 9
- 17
tuoheng-service/tuoheng-miniprogram/src/main/resources/mapper/InspectionMapper.xml Прегледај датотеку

@@ -59,25 +59,18 @@


<select id="queryPage" resultType="com.tuoheng.miniprogram.vo.InspectionInfoVo">
select
ti.id,
ti.code,
ti.name,
ti.type,
ti.status,
ti.inspection_type as inspectionType,
ti.inspection_line as inspectionLine,
ti.create_user as createUser,
ti.execution_start_time as executionStartTime,
ti.ai_video_url as aiVideoUrl
from
th_inspection ti
select ti.id, ti.code, ti.name, ti.type, ti.status, ti.inspection_type as inspectionType, ti.inspection_line as inspectionLine,
ti.create_user as createUser, ti.execution_start_time as executionStartTime, ti.ai_video_url as aiVideoUrl
from th_inspection ti
where ti.mark=1 and ti.tenant_id = #{request.tenantId}
<if test="request.deptId !=null and request.deptId !=''">
and ti.dept_id = #{request.deptId}
</if>
<if test="request.status !=null">
and ti.status = #{request.status}
<if test="request.statusList != null and request.statusList.size() > 0">
and ti.status in
<foreach item="status" collection="request.statusList" open="(" separator="," close=")">
#{status}
</foreach>
</if>
<if test="request.inspectionType !=null">
and ti.inspection_type = #{request.inspectionType}
@@ -88,7 +81,6 @@
<if test="request.startTimeDate !=null and request.endTimeDate !=null">
and ti.execution_start_time BETWEEN #{request.startTimeDate} AND #{request.endTimeDate}
</if>
ORDER BY
ti.create_time DESC
ORDER BY ti.create_time DESC
</select>
</mapper>

Loading…
Откажи
Сачувај