Bladeren bron

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

pull/383/head
wanjing 10 maanden geleden
bovenliggende
commit
32f9ec9c2f
2 gewijzigde bestanden met toevoegingen van 11 en 18 verwijderingen
  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 Bestand weergeven

import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;


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


/** /**
* @Author ChengWang * @Author ChengWang
/** /**
* 任务状态 5任务待飞行 7飞行失败 10任务飞行中 15任务飞行完成 * 任务状态 5任务待飞行 7飞行失败 10任务飞行中 15任务飞行完成
*/ */
private String status;
private List<Integer> statusList;


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

+ 9
- 17
tuoheng-service/tuoheng-miniprogram/src/main/resources/mapper/InspectionMapper.xml Bestand weergeven





<select id="queryPage" resultType="com.tuoheng.miniprogram.vo.InspectionInfoVo"> <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} where ti.mark=1 and ti.tenant_id = #{request.tenantId}
<if test="request.deptId !=null and request.deptId !=''"> <if test="request.deptId !=null and request.deptId !=''">
and ti.dept_id = #{request.deptId} and ti.dept_id = #{request.deptId}
</if> </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>
<if test="request.inspectionType !=null"> <if test="request.inspectionType !=null">
and ti.inspection_type = #{request.inspectionType} and ti.inspection_type = #{request.inspectionType}
<if test="request.startTimeDate !=null and request.endTimeDate !=null"> <if test="request.startTimeDate !=null and request.endTimeDate !=null">
and ti.execution_start_time BETWEEN #{request.startTimeDate} AND #{request.endTimeDate} and ti.execution_start_time BETWEEN #{request.startTimeDate} AND #{request.endTimeDate}
</if> </if>
ORDER BY
ti.create_time DESC
ORDER BY ti.create_time DESC
</select> </select>
</mapper> </mapper>

Laden…
Annuleren
Opslaan