From cda5ded993e1d735cbe8fa76f6f988e89024afe0 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期三, 24 七月 2024 15:59:07 +0800
Subject: [PATCH] 变更

---
 ruoyi-project/src/main/resources/mapper/project/ServiceDonationwitnessMapper.xml |  231 ++++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 146 insertions(+), 85 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..6071d8c 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`,
@@ -78,6 +119,9 @@
         `service_donatebaseinfo`.`ReporterPhone` AS `ReporterPhone`,
         `service_donatebaseinfo`.`ReportTime` AS `ReportTime`,
         `service_donatebaseinfo`.`create_by` AS `basecreateby`,
+        `service_donatebaseinfo`.`workflow` AS `workflow`,
+        `service_donatebaseinfo`.`termination_case` AS `terminationCase`,
+        `service_donatebaseinfo`.`donatetime` AS `donatetime`,
         `service_donationwitness`.`ID` AS `dwID`,
         `service_donationwitness`.`InfoID` AS `InfoID`,
         `service_donationwitness`.`DonorNo` AS `dwDonorNo`,
@@ -116,25 +160,36 @@
         `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 &lt;= #{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>
+            service_donationwitness.del_flag=0
+            <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 &lt;= #{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="workflow != null ">and `service_donatebaseinfo`.`workflow` = #{workflow}</if>
         </where>
 
         order by `service_donationwitness`.`create_time` desc
@@ -145,20 +200,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 &lt;= #{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 &lt;= #{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 &lt;= #{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 &lt;= #{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 +221,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 &lt;= #{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 &lt;= #{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 &lt;= #{endtime}
+        select count(*)
+        from service_donationwitness
+        where OperationBegTime >= #{starttime}
+          and OperationBegTime &lt;= #{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 +250,12 @@
         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 &lt;= #{endtime}</if>
-        <if test="city != null and city != ''"> and o.City = #{city} </if>
-        <if test="reporterno != null and reporterno != ''"> and b.ReporterNo = #{reporterno}</if>
+            w.del_flag=0
+            and b.del_flag=0
+            <if test="starttime != null ">and w.OperationBegTime >= #{starttime}</if>
+            <if test="endtime != null ">and w.OperationBegTime &lt;= #{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">
@@ -210,4 +271,4 @@
     </select>
 
 
-</mapper>
\ No newline at end of file
+</mapper>

--
Gitblit v1.9.3