| | |
| | | <?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"> |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.project.mapper.ServiceDonateannexMapper"> |
| | | |
| | | <resultMap type="com.ruoyi.project.domain.ServiceDonateannex" id="ServiceDonateannexResult"> |
| | | <result property="id" column="ID" /> |
| | | <result property="infoid" column="InfoID" /> |
| | | <result property="donorno" column="DonorNo" /> |
| | | <result property="delFlag" column="del_flag" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="annexname" column="AnnexName" /> |
| | | <result property="annexno" column="AnnexNo" /> |
| | | <result property="annexurl" column="AnnexUrl" /> |
| | | <result property="annexfilestype" column="AnnexfilesType" /> |
| | | <result property="annextypeid" column="annextypeid" /> |
| | | <result property="id" column="ID"/> |
| | | <result property="infoid" column="InfoID"/> |
| | | <result property="caseNo" column="case_no"/> |
| | | <result property="donorno" column="DonorNo"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="annexname" column="AnnexName"/> |
| | | <result property="annexno" column="AnnexNo"/> |
| | | <result property="annexurl" column="AnnexUrl"/> |
| | | <result property="annexfilestype" column="AnnexfilesType"/> |
| | | <result property="annextypeid" column="annextypeid"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectServiceDonateannexVo"> |
| | | select ID, InfoID, DonorNo, del_flag, create_by, create_time, update_by, update_time, AnnexName, AnnexNo, AnnexUrl,AnnexfilesType,annextypeid from service_donateannex |
| | | select ID, |
| | | case_no, |
| | | InfoID, |
| | | DonorNo, |
| | | del_flag, |
| | | create_by, |
| | | create_time, |
| | | update_by, |
| | | update_time, |
| | | AnnexName, |
| | | AnnexNo, |
| | | AnnexUrl, |
| | | AnnexfilesType, |
| | | annextypeid |
| | | from service_donateannex |
| | | </sql> |
| | | |
| | | <select id="selectServiceDonateannexList" parameterType="com.ruoyi.project.domain.ServiceDonateannex" resultMap="ServiceDonateannexResult"> |
| | | <select id="selectServiceDonateannexList" parameterType="com.ruoyi.project.domain.ServiceDonateannex" |
| | | resultMap="ServiceDonateannexResult"> |
| | | <include refid="selectServiceDonateannexVo"/> |
| | | <where> |
| | | <if test="infoid != null "> and InfoID = #{infoid}</if> |
| | | <if test="donorno != null and donorno != ''"> and DonorNo = #{donorno}</if> |
| | | <if test="annexname != null and annexname != ''"> and AnnexName like concat('%', #{annexname}, '%')</if> |
| | | <if test="annexno != null and annexno != ''"> and AnnexNo = #{annexno}</if> |
| | | <if test="annexurl != null and annexurl != ''"> and AnnexUrl = #{annexurl}</if> |
| | | <if test="infoid != null ">and InfoID = #{infoid}</if> |
| | | <if test="caseNo != null ">and case_no = #{caseNo}</if> |
| | | <if test="donorno != null and donorno != ''">and DonorNo = #{donorno}</if> |
| | | <if test="annexname != null and annexname != ''">and AnnexName like concat('%', #{annexname}, '%')</if> |
| | | <if test="annexno != null and annexno != ''">and AnnexNo = #{annexno}</if> |
| | | <if test="annexurl != null and annexurl != ''">and AnnexUrl = #{annexurl}</if> |
| | | </where> |
| | | </select> |
| | | <select id="selectVOList" resultType="com.ruoyi.project.domain.vo.DonateAnnexVO"> |
| | | SELECT |
| | | SELECT |
| | | `service_donatebaseinfo`.`ID` AS `ID`, |
| | | `service_donatebaseinfo`.`DonorNo` AS `DonorNo`, |
| | | `service_donatebaseinfo`.`RecordState` AS `RecordState`, |
| | |
| | | `service_donateannex`.`create_by` AS `create_by`, |
| | | `service_donateannex`.`create_time` AS `create_time`, |
| | | `service_donateannex`.`update_by` AS `update_by`, |
| | | `service_donateannex`.`case_no` AS `case_no`, |
| | | `service_donateannex`.`update_time` AS `update_time` |
| | | FROM |
| | | FROM |
| | | ( |
| | | `service_donatebaseinfo` |
| | | JOIN `service_donateannex` ON (( |
| | | `service_donatebaseinfo`.`ID` = `service_donateannex`.`InfoID` |
| | | `service_donatebaseinfo` |
| | | JOIN `service_donateannex` ON (( |
| | | `service_donatebaseinfo`.`ID` = `service_donateannex`.`InfoID` |
| | | ))) |
| | | |
| | | |
| | | <where> |
| | | <if test="donorno != null and donorno != ''"> and `service_donatebaseinfo`.`DonorNo` = #{donorno}</if> |
| | | <if test="name != null and name != ''"> and `service_donatebaseinfo`.`Name` = #{name}</if> |
| | | <if test="idcardno != null and idcardno != ''"> and `service_donatebaseinfo`.`IDCardNo` = #{idcardno}</if> |
| | | <if test="treatmenthospitalno != null and treatmenthospitalno != ''"> and `service_donatebaseinfo`.`TreatmentHospitalNo` = #{treatmenthospitalno}</if> |
| | | <if test="recordstate != null and recordstate != ''"> and `service_donatebaseinfo`.`RecordState` = #{recordstate}</if> |
| | | <if test="create_by != null and create_by != ''"> and `service_donateannex`.`create_by` = #{create_by}</if> |
| | | <if test="donorno != null and donorno != ''">and `service_donatebaseinfo`.`DonorNo` = #{donorno}</if> |
| | | <if test="name != null and name != ''">and `service_donatebaseinfo`.`Name` = #{name}</if> |
| | | <if test="idcardno != null and idcardno != ''">and `service_donatebaseinfo`.`IDCardNo` = #{idcardno}</if> |
| | | <if test="treatmenthospitalno != null and treatmenthospitalno != ''">and |
| | | `service_donatebaseinfo`.`TreatmentHospitalNo` = #{treatmenthospitalno} |
| | | </if> |
| | | <if test="recordstate != null and recordstate != ''">and `service_donatebaseinfo`.`RecordState` = |
| | | #{recordstate} |
| | | </if> |
| | | <if test="create_by != null and create_by != ''">and `service_donateannex`.`create_by` = #{create_by}</if> |
| | | <if test="caseNo != null and caseNo != ''">and `service_donateannex`.`case_no` = #{caseNo}</if> |
| | | </where> |
| | | |
| | | order by `service_donateannex`.`create_time` desc |
| | | </select> |
| | | |
| | | </mapper> |
| | | </mapper> |