| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.acs.manager.manager.mapper.TaskMapper"> |
| | | |
| | | <!-- 关联查询sql --> |
| | | <sql id="selectSql"> |
| | | <!-- 分页查询 --> |
| | | <select id="selectPageRel" resultType="com.zy.acs.manager.manager.entity.Task"> |
| | | SELECT a.* |
| | | FROM man_task a |
| | | <where> |
| | | AND a.deleted = 0 |
| | | <if test="param.id != null"> |
| | | AND a.id = #{param.id} |
| | | </if> |
| | | <if test="param.busId != null"> |
| | | AND a.bus_id = #{param.busId} |
| | | </if> |
| | | <if test="param.seqNum != null"> |
| | | AND a.seq_num like concat('%',#{param.seqNum},'%') |
| | | </if> |
| | | <if test="param.taskType != null"> |
| | | AND a.task_type = #{param.taskType} |
| | |
| | | <if test="param.agvId != null"> |
| | | AND a.agv_id = #{param.agvId} |
| | | </if> |
| | | <if test="param.oriSta != null"> |
| | | AND a.ori_sta = #{param.oriSta} |
| | | </if> |
| | | <if test="param.oriLoc != null"> |
| | | AND a.ori_loc = #{param.oriLoc} |
| | | </if> |
| | | <if test="param.destSta != null"> |
| | | AND a.dest_sta = #{param.destSta} |
| | | </if> |
| | | <if test="param.destLoc != null"> |
| | | AND a.dest_loc = #{param.destLoc} |
| | | </if> |
| | | <if test="param.destCode != null"> |
| | | AND a.dest_code = #{param.destCode} |
| | | </if> |
| | | <if test="param.status != null"> |
| | | AND a.status = #{param.status} |
| | | </if> |
| | | <if test="param.timeStart != null"> |
| | | and a.create_time >= #{param.timeStart} |
| | | </if> |
| | | <if test="param.timeEnd != null"> |
| | | and a.create_time < #{param.timeEnd} |
| | | </if> |
| | | <if test="param.keywords != null"> |
| | | AND ( |
| | | a.memo LIKE CONCAT('%', #{param.keywords}, '%') |
| | | OR a.memo LIKE CONCAT('%', #{param.keywords}, '%') |
| | | OR a.seq_num LIKE CONCAT('%', #{param.keywords}, '%') |
| | | ) |
| | | </if> |
| | | </where> |
| | | order by a.create_time desc |
| | | </sql> |
| | | |
| | | <!-- 分页查询 --> |
| | | <select id="selectPageRel" resultType="com.zy.acs.manager.manager.entity.Task"> |
| | | <include refid="selectSql"/> |
| | | ORDER BY FIELD(a.task_sts, 18, 17, 16, 15, 20, 19), io_time DESC |
| | | </select> |
| | | |
| | | <select id="selectStatByLastSevenDays" resultType="java.util.Map"> |