From 054cfdd53b732d2f60627fc9ac7cf92233d3c200 Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期五, 17 十一月 2023 16:17:56 +0800 Subject: [PATCH] 代码提交 --- ruoyi-project/src/main/resources/mapper/project/ServiceDonationwitnessMapper.xml | 222 ++++++++++++++++++++++++++++++++++--------------------- 1 files changed, 138 insertions(+), 84 deletions(-) diff --git a/ruoyi-project/src/main/resources/mapper/project/ServiceDonationwitnessMapper.xml b/ruoyi-project/src/main/resources/mapper/project/ServiceDonationwitnessMapper.xml index 6f37717..03fbb1b 100644 --- a/ruoyi-project/src/main/resources/mapper/project/ServiceDonationwitnessMapper.xml +++ b/ruoyi-project/src/main/resources/mapper/project/ServiceDonationwitnessMapper.xml @@ -1,65 +1,106 @@ <?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.ServiceDonationwitnessMapper"> - + <resultMap type="com.ruoyi.project.domain.ServiceDonationwitness" id="ServiceDonationwitnessResult"> - <result property="id" column="ID" /> - <result property="infoid" column="InfoID" /> - <result property="donorno" column="DonorNo" /> - <result property="gainhospitalno" column="GainHospitalNo" /> - <result property="gainhospitalname" column="GainHospitalName" /> - <result property="deathtime" column="DeathTime" /> - <result property="deathreason" column="DeathReason" /> - <result property="deathjudgedocto" column="DeathJudgeDoctO" /> - <result property="deathjudgedoctt" column="DeathJudgeDoctT" /> - <result property="deathjudgeannex" column="DeathJudgeAnnex" /> - <result property="operationbegtime" column="OperationBegTime" /> - <result property="operationendtime" column="OperationEndTime" /> - <result property="operationdoctor" column="OperationDoctor" /> - <result property="isspendremember" column="IsSpendRemember" /> - <result property="isrestoreremains" column="IsRestoreRemains" /> - <result property="rememberannex" column="RememberAnnex" /> - <result property="responsibleuserid" column="ResponsibleUserID" /> - <result property="responsibleusername" column="ResponsibleUserName" /> - <result property="coordinateduserido" column="CoordinatedUserIDO" /> - <result property="coordinatedusernameo" column="CoordinatedUserNameO" /> - <result property="coordinateduseridt" column="CoordinatedUserIDT" /> - <result property="coordinatedusernamet" column="CoordinatedUserNameT" /> - <result property="abdominalaortacannulatime" column="AbdominalAortaCannulaTime" /> - <result property="abdominalaortaperfusiontime" column="AbdominalAortaPerfusionTime" /> - <result property="portalveincannulatime" column="PortalVeinCannulaTime" /> - <result property="portalveinperfusiontime" column="PortalVeinPerfusionTime" /> - <result property="pulmonaryarterycannulatime" column="PulmonaryArteryCannulaTime" /> - <result property="pulmonaryarteryperfusiontime" column="PulmonaryArteryPerfusionTime" /> - <result property="aortacannulatime" column="AortaCannulaTime" /> - <result property="aortaperfusiontime" column="AortaPerfusionTime" /> - <result property="del_flag" 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="organdonation" column="OrganDonation" /> - <result property="organdonationOther" column="OrganDonation_Other" /> - <result property="donationcategory" column="DonationCategory" /> + <result property="id" column="ID"/> + <result property="infoid" column="InfoID"/> + <result property="donorno" column="DonorNo"/> + <result property="gainhospitalno" column="GainHospitalNo"/> + <result property="gainhospitalname" column="GainHospitalName"/> + <result property="deathtime" column="DeathTime"/> + <result property="deathreason" column="DeathReason"/> + <result property="deathjudgedocto" column="DeathJudgeDoctO"/> + <result property="deathjudgedoctt" column="DeathJudgeDoctT"/> + <result property="deathjudgeannex" column="DeathJudgeAnnex"/> + <result property="operationbegtime" column="OperationBegTime"/> + <result property="operationendtime" column="OperationEndTime"/> + <result property="operationdoctor" column="OperationDoctor"/> + <result property="isspendremember" column="IsSpendRemember"/> + <result property="isrestoreremains" column="IsRestoreRemains"/> + <result property="rememberannex" column="RememberAnnex"/> + <result property="responsibleuserid" column="ResponsibleUserID"/> + <result property="responsibleusername" column="ResponsibleUserName"/> + <result property="coordinateduserido" column="CoordinatedUserIDO"/> + <result property="coordinatedusernameo" column="CoordinatedUserNameO"/> + <result property="coordinateduseridt" column="CoordinatedUserIDT"/> + <result property="coordinatedusernamet" column="CoordinatedUserNameT"/> + <result property="abdominalaortacannulatime" column="AbdominalAortaCannulaTime"/> + <result property="abdominalaortaperfusiontime" column="AbdominalAortaPerfusionTime"/> + <result property="portalveincannulatime" column="PortalVeinCannulaTime"/> + <result property="portalveinperfusiontime" column="PortalVeinPerfusionTime"/> + <result property="pulmonaryarterycannulatime" column="PulmonaryArteryCannulaTime"/> + <result property="pulmonaryarteryperfusiontime" column="PulmonaryArteryPerfusionTime"/> + <result property="aortacannulatime" column="AortaCannulaTime"/> + <result property="aortaperfusiontime" column="AortaPerfusionTime"/> + <result property="del_flag" 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="organdonation" column="OrganDonation"/> + <result property="organdonationOther" column="OrganDonation_Other"/> + <result property="donationcategory" column="DonationCategory"/> </resultMap> <sql id="selectServiceDonationwitnessVo"> - select ID, InfoID, DonorNo, GainHospitalNo, GainHospitalName, DeathTime, DeathReason, DeathJudgeDoctO, DeathJudgeDoctT, DeathJudgeAnnex, OperationBegTime, OperationEndTime, OperationDoctor, IsSpendRemember, IsRestoreRemains, RememberAnnex, ResponsibleUserID, ResponsibleUserName, CoordinatedUserIDO, CoordinatedUserNameO, CoordinatedUserIDT, CoordinatedUserNameT, AbdominalAortaCannulaTime, AbdominalAortaPerfusionTime, PortalVeinCannulaTime, PortalVeinPerfusionTime, PulmonaryArteryCannulaTime, PulmonaryArteryPerfusionTime, AortaCannulaTime, AortaPerfusionTime, del_flag, create_by, create_time, update_by, update_time, OrganDonation, OrganDonation_Other, DonationCategory from service_donationwitness + select ID, + InfoID, + DonorNo, + GainHospitalNo, + GainHospitalName, + DeathTime, + DeathReason, + DeathJudgeDoctO, + DeathJudgeDoctT, + DeathJudgeAnnex, + OperationBegTime, + OperationEndTime, + OperationDoctor, + IsSpendRemember, + IsRestoreRemains, + RememberAnnex, + ResponsibleUserID, + ResponsibleUserName, + CoordinatedUserIDO, + CoordinatedUserNameO, + CoordinatedUserIDT, + CoordinatedUserNameT, + AbdominalAortaCannulaTime, + AbdominalAortaPerfusionTime, + PortalVeinCannulaTime, + PortalVeinPerfusionTime, + PulmonaryArteryCannulaTime, + PulmonaryArteryPerfusionTime, + AortaCannulaTime, + AortaPerfusionTime, + del_flag, + create_by, + create_time, + update_by, + update_time, + OrganDonation, + OrganDonation_Other, + DonationCategory + from service_donationwitness </sql> - <select id="selectServiceDonationwitnessList" parameterType="com.ruoyi.project.domain.ServiceDonationwitness" resultMap="ServiceDonationwitnessResult"> + <select id="selectServiceDonationwitnessList" parameterType="com.ruoyi.project.domain.ServiceDonationwitness" + resultMap="ServiceDonationwitnessResult"> <include refid="selectServiceDonationwitnessVo"/> <where> - <if test="donorno != null and donorno != ''"> and DonorNo = #{donorno}</if> - <if test="gainhospitalname != null and gainhospitalname != ''"> and GainHospitalName like concat('%', #{gainhospitalname}, '%')</if> - <if test="operationdoctor != null and operationdoctor != ''"> and OperationDoctor = #{operationdoctor}</if> + <if test="donorno != null and donorno != ''">and DonorNo = #{donorno}</if> + <if test="gainhospitalname != null and gainhospitalname != ''">and GainHospitalName like concat('%', + #{gainhospitalname}, '%') + </if> + <if test="operationdoctor != null and operationdoctor != ''">and OperationDoctor = #{operationdoctor}</if> </where> </select> <select id="selectVOList" resultType="com.ruoyi.project.domain.vo.DonationWitnessVO"> - SELECT + SELECT `service_donatebaseinfo`.`ID` AS `ID`, `service_donatebaseinfo`.`DonorNo` AS `DonorNo`, `service_donatebaseinfo`.`DonationCategory` AS `DonationCategory`, @@ -116,25 +157,34 @@ `service_donationwitness`.`create_time` AS `createtime`, `service_donationwitness`.`update_by` AS `updateby`, `service_donationwitness`.`update_time` AS `updatetime` - FROM + FROM - `service_donatebaseinfo` - LEFT JOIN `service_donationwitness` ON - `service_donatebaseinfo`.`ID` = `service_donationwitness`.`InfoID` - LEFT JOIN `base_organization` ON - `base_organization`.`OrganizationID` = `service_donatebaseinfo`.`TreatmentHospitalNo` + `service_donatebaseinfo` + LEFT JOIN `service_donationwitness` ON + `service_donatebaseinfo`.`ID` = `service_donationwitness`.`InfoID` + LEFT JOIN `base_organization` ON + `base_organization`.`OrganizationID` = `service_donatebaseinfo`.`TreatmentHospitalNo` <where> - <if test="donorno != null and donorno != ''"> and `service_donatebaseinfo`.`DonorNo` = #{donorno}</if> - <if test="name != null and name != ''"> and `service_donatebaseinfo`.`Name` like concat('%', #{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="basecreateby != null and basecreateby != ''"> and `service_donatebaseinfo`.`create_by` = #{basecreateby}</if> - <if test="starttime != null "> and `service_donationwitness`.OperationBegTime >= #{starttime} </if> - <if test="endtime != null "> and `service_donationwitness`.OperationBegTime <= #{endtime}</if> - <if test="reporterno != null and reporterno != ''"> and `service_donatebaseinfo`.ReporterNo = #{reporterno}</if> - <if test="city != null and city != ''"> and `base_organization`.`City` = #{city}</if> + <if test="donorno != null and donorno != ''">and `service_donatebaseinfo`.`DonorNo` = #{donorno}</if> + <if test="name != null and name != ''">and `service_donatebaseinfo`.`Name` like concat('%', #{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="basecreateby != null and basecreateby != ''">and `service_donatebaseinfo`.`create_by` = + #{basecreateby} + </if> + <if test="starttime != null ">and `service_donationwitness`.OperationBegTime >= #{starttime}</if> + <if test="endtime != null ">and `service_donationwitness`.OperationBegTime <= #{endtime}</if> + <if test="reporterno != null and reporterno != ''">and `service_donatebaseinfo`.ReporterNo = + #{reporterno} + </if> + <if test="city != null and city != ''">and `base_organization`.`City` = #{city}</if> </where> order by `service_donationwitness`.`create_time` desc @@ -145,20 +195,20 @@ inner join service_donatebaseinfo b on w.InfoID = b.id inner join base_organization o on b.TreatmentHospitalNo = o.OrganizationID where w.DonationCategory = "DBD" - <if test="starttime != null "> and w.OperationBegTime >= #{starttime} </if> - <if test="endtime != null "> and w.OperationBegTime <= #{endtime}</if> - <if test="city != null and city != ''"> and o.City = #{city} </if> - <if test="reporterno != null and reporterno != ''"> and b.ReporterNo = #{reporterno}</if> + <if test="starttime != null ">and w.OperationBegTime >= #{starttime}</if> + <if test="endtime != null ">and w.OperationBegTime <= #{endtime}</if> + <if test="city != null and city != ''">and o.City = #{city}</if> + <if test="reporterno != null and reporterno != ''">and b.ReporterNo = #{reporterno}</if> </select> <select id="getDCDDonaterNumberThisYear" resultType="java.lang.Integer"> select count(*) from service_donationwitness w inner join service_donatebaseinfo b on w.InfoID = b.id inner join base_organization o on b.TreatmentHospitalNo = o.OrganizationID where w.DonationCategory = "DCD" - <if test="starttime != null "> and w.OperationBegTime >= #{starttime} </if> - <if test="endtime != null "> and w.OperationBegTime <= #{endtime}</if> - <if test="city != null and city != ''"> and o.City = #{city} </if> - <if test="reporterno != null and reporterno != ''"> and b.ReporterNo = #{reporterno}</if> + <if test="starttime != null ">and w.OperationBegTime >= #{starttime}</if> + <if test="endtime != null ">and w.OperationBegTime <= #{endtime}</if> + <if test="city != null and city != ''">and o.City = #{city}</if> + <if test="reporterno != null and reporterno != ''">and b.ReporterNo = #{reporterno}</if> </select> <select id="getDBCDDonaterNumberThisYear" resultType="java.lang.Integer"> @@ -166,22 +216,26 @@ inner join service_donatebaseinfo b on w.InfoID = b.id inner join base_organization o on b.TreatmentHospitalNo = o.OrganizationID where w.DonationCategory = "DBCD" - <if test="starttime != null "> and w.OperationBegTime >= #{starttime} </if> - <if test="endtime != null "> and w.OperationBegTime <= #{endtime}</if> - <if test="city != null and city != ''"> and o.City = #{city} </if> - <if test="reporterno != null and reporterno != ''"> and b.ReporterNo = #{reporterno}</if> + <if test="starttime != null ">and w.OperationBegTime >= #{starttime}</if> + <if test="endtime != null ">and w.OperationBegTime <= #{endtime}</if> + <if test="city != null and city != ''">and o.City = #{city}</if> + <if test="reporterno != null and reporterno != ''">and b.ReporterNo = #{reporterno}</if> </select> <select id="getDonationCategoryByInfoId" resultType="java.lang.String"> - select DonationCategory from service_donationwitness - where InfoID = #{infoId} and del_flag = 0 + select DonationCategory + from service_donationwitness + where InfoID = #{infoId} + and del_flag = 0 </select> <select id="countNumber" resultType="java.lang.Integer"> - select count(*) from service_donationwitness - where OperationBegTime >= #{starttime} and OperationBegTime <= #{endtime} + select count(*) + from service_donationwitness + where OperationBegTime >= #{starttime} + and OperationBegTime <= #{endtime} </select> <select id="selectByInfoId" resultType="com.ruoyi.project.domain.ServiceDonationwitness"> <include refid="selectServiceDonationwitnessVo"/> - where InfoID = #{infoid} + where InfoID = #{infoid} and del_flag!=1 </select> <select id="getAllDonatePeople" resultType="com.ruoyi.project.domain.ServiceDonationwitness"> <include refid="selectServiceDonationwitnessVo"/> @@ -191,10 +245,10 @@ inner join service_donatebaseinfo b on w.InfoID = b.id inner join base_organization o on b.TreatmentHospitalNo = o.OrganizationID <where> - <if test="starttime != null "> and w.OperationBegTime >= #{starttime} </if> - <if test="endtime != null "> and w.OperationBegTime <= #{endtime}</if> - <if test="city != null and city != ''"> and o.City = #{city} </if> - <if test="reporterno != null and reporterno != ''"> and b.ReporterNo = #{reporterno}</if> + <if test="starttime != null ">and w.OperationBegTime >= #{starttime}</if> + <if test="endtime != null ">and w.OperationBegTime <= #{endtime}</if> + <if test="city != null and city != ''">and o.City = #{city}</if> + <if test="reporterno != null and reporterno != ''">and b.ReporterNo = #{reporterno}</if> </where> </select> <select id="getWitnessList" resultType="com.ruoyi.project.domain.ServiceDonationwitness"> -- Gitblit v1.9.3