123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <?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.platform.dao.mapper.repair.RepairProjectMapper">
- <sql id="Base_Column_List">
- repairProject.id,
- repairProject.name,
- repairProject.no,
- repairProject.type,
- repairProject.repair_id,
- repairProject.technology,
- repairProject.standard_hours,
- repairProject.standard_money,
- repairProject.check_hours,
- repairProject.sort,
- repairProject.delFlag,
- repairProject.remark,
- repairProject.created_user_id,
- repairProject.update_user_id,
- repairProject.created_user_name,
- repairProject.update_user_name,
- repairProject.created_time,
- repairProject.update_time
- </sql>
- <sql id="Ref_Column_List">
- repairProject.id,
- repairProject.name,repairProject.repair_id,
- repairProject.no,
- repairProject.type,
- repairProject.technology,
- repairProject.standard_hours,
- repairProject.standard_money,
- repairProject.check_hours,
- repairProject.sort,
- repairProject.delFlag,
- repairProject.remark
- </sql>
- <sql id="List_Condition">
- <if test="id != null and id != ''">
- and repairProject.id = #{id}
- </if>
- <if test="name != null and name != ''">
- and repairProject.name = #{name}
- </if>
- <if test="repairId != null and repairId != ''">
- and repairProject.repair_id = #{repairId}
- </if>
- <if test="no != null and no != ''">
- and repairProject.no = #{no}
- </if>
- <if test="type != null">
- and repairProject.type = #{type}
- </if>
- <if test="remark != null and remark != ''">
- and repairProject.remark = #{remark}
- </if>
- <if test="keyword != null and keyword != ''">
- and repairProject.name like concat('%',#{keyword},'%')
- </if>
- </sql>
- <select id="selectList" parameterType="com.platform.dao.dto.repair.RepairProjectDTO" resultType="com.platform.dao.entity.repair.RepairProject">
- select repairProject.*
- from t_repair_project as repairProject
- <where>
- <include refid="List_Condition"/>
- </where>
- order by repairProject.sort asc
- </select>
- <select id="selectRepairProjectListByRepairId" resultType="com.platform.dao.vo.repair.RepairProjectVO">
- select project.*, repair.id as repairId, tcppr.id as relationId
- from t_repair_project_relation tcppr
- inner join t_repair_application_form repair on tcppr.repair_id = repair.id
- inner join t_repair_project project on tcppr.project_id = project.id
- where tcppr.repair_id = #{repairId}
- </select>
- </mapper>
|