| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ycl.platform.mapper.CheckResultMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.platform.domain.vo.CheckResultVO"> |
| | | <result column="id" property="id" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="unit_name" property="checkUnitName" /> |
| | | <result column="examine_name" property="examineName" /> |
| | | <result column="check_score" property="checkScore" /> |
| | | <result column="system_score" property="systemScore" /> |
| | | <result column="manual_score" property="manualScore" /> |
| | | <result column="check_time" property="checkTime" /> |
| | | <result column="frequency" property="frequency" /> |
| | | <result column="examine_range" property="examineRange" /> |
| | | <result column="publish" property="publish" /> |
| | | </resultMap> |
| | | |
| | | <select id="page" resultMap="BaseResultMap"> |
| | | SELECT |
| | | tcr.id, |
| | | tyu.unit_name, |
| | | tcp.examine_name, |
| | | tcp.examine_range, |
| | | tcp.frequency, |
| | | tcr.check_time, |
| | | tcr.check_score, |
| | | tcr.system_score, |
| | | tcr.manual_score, |
| | | tcr.publish |
| | | FROM |
| | | t_check_result tcr |
| | | INNER JOIN t_check_publish tcp ON tcr.check_publish_id = tcp.id |
| | | INNER JOIN t_yw_unit tyu ON tcr.check_unit_id = tyu.id |
| | | <where> |
| | | AND tcr.deleted = 0 |
| | | <if test="query.checkUnitName != null and query.checkUnitName != ''"> |
| | | AND tyu.unit_name like concat('%', #{query.checkUnitName}, '%') |
| | | </if> |
| | | <if test="query.frequency != null and query.frequency != ''"> |
| | | AND tcp.frequency = #{query.frequency} |
| | | </if> |
| | | <if test="query.frequency != null and query.frequency != ''"> |
| | | AND tcp.examine_range = #{query.examineRange} |
| | | </if> |
| | | <if test="query.start != null and query.end != null"> |
| | | AND tcr.check_time BETWEEN #{query.start} AND #{query.end} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |