Newer
Older
casic-metering-biz-xichang / casic-metering-dao / src / main / resources / mapper / quality / BizQualityInternalAuditManagementMapper.xml
liwenhao on 11 Feb 4 KB 1.质量部分问题整改
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.casic.missiles.mapper.quality.BizQualityInternalAuditManagementMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.casic.missiles.model.quality.BizQualityInternalAuditManagement">
        <result column="id" property="id"/>
        <result column="create_time" property="createTime"/>
        <result column="update_time" property="updateTime"/>
        <result column="year_time" property="yearTime"/>
        <result column="biz_lab_code" property="bizLabCode"/>
        <result column="year_num" property="yearNum"/>
        <result column="begin_time" property="beginTime"/>
        <result column="end_time" property="endTime"/>
        <result column="commander_name" property="commanderName"/>
        <result column="group_leader" property="groupLeader"/>
        <result column="team_members" property="teamMembers"/>
        <result column="current_stage" property="currentStage"/>
        <result column="dept_id" property="deptId"/>
        <result column="is_include" property="isInclude"/>
        <result column="year_no" property="yearNo"/>
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id
        ,
                    create_time as createTime ,
                    update_time as updateTime ,
                    year_time as yearTime ,
                    biz_lab_code as bizLabCode ,
                    year_num as yearNum ,
                    begin_time as beginTime ,
                    end_time as endTime ,
                a.commander_id as commanderId ,
                    commander_name as commanderName ,
                    group_leader as groupLeader ,
                    team_members as teamMembers ,
                    current_stage as currentStage ,
                    dept_id as deptId ,
                    is_include as isInclude ,
                    year_no as yearNo,work_name as workName
    </sql>

    <select id="selectBizQualityInternalAuditManagementPage"
            resultType="com.casic.missiles.model.quality.BizQualityInternalAuditManagement">
        select
        a.id ,
        a.create_time as createTime ,
        a.update_time as updateTime ,
        a.year_time as yearTime ,a.work_name as workName,
        a.biz_lab_code as bizLabCode ,
        a.year_num as yearNum ,
        a.begin_time as beginTime ,
        a.end_time as endTime ,
        a.commander_name as commanderName ,
        a.commander_id as commanderId ,
        a.group_leader as groupLeader ,
        a.team_members as teamMembers ,
        a.current_stage as currentStage ,
        a.dept_id as deptId ,
        a.is_include as isInclude ,
        a.year_no as yearNo,
               a.create_id as createId,
               a.create_name as createName
        from biz_quality_internal_audit_management a
        <where>
            <if test="ew != null">
                ${ew.sqlSegment}
            </if>
        </where>
        order by a.year_no desc,a.year_num desc,a.create_time desc
    </select>
    <sql id="Base_Column_Query">
        <if test="request!=null">
            <if test="request.yearTime!= null and request.yearTime!=''">
                and year_time = #{request.yearTime}
            </if>
            <if test="request.bizLabCode!= null and request.bizLabCode!=''">
                and biz_lab_code = #{request.bizLabCode}
            </if>
            <if test="request.yearNum!= null and request.yearNum!=''">
                and year_num = #{request.yearNum}
            </if>
            <if test="request.beginTime!= null and request.beginTime!=''">
                and begin_time = #{request.beginTime}
            </if>
            <if test="request.endTime!= null and request.endTime!=''">
                and end_time = #{request.endTime}
            </if>
            <if test="request.commanderName!= null and request.commanderName!=''">
                and commander_name like concat('%',#{request.commanderName},'%')
            </if>
            <if test="request.groupLeader!= null and request.groupLeader!=''">
                and group_leader = #{request.groupLeader}
            </if>
            <if test="request.teamMembers!= null and request.teamMembers!=''">
                and team_members = #{request.teamMembers}
            </if>
            <if test="request.currentStage!= null and request.currentStage!=''">
                and current_stage = #{request.currentStage}
            </if>
            <if test="request.deptId!= null and request.deptId!=''">
                and dept_id = #{request.deptId}
            </if>
            <if test="request.isInclude!= null and request.isInclude!=''">
                and is_include = #{request.isInclude}
            </if>
            <if test="request.yearNo!= null and request.yearNo!=''">
                and year_no = #{request.yearNo}
            </if>
        </if>
    </sql>
</mapper>