| | |
| | | <?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.ServiceRelativesconfirmationMapper"> |
| | | |
| | | <resultMap type="com.ruoyi.project.domain.ServiceRelativesconfirmation" id="ServiceRelativesconfirmationResult"> |
| | | <result property="id" column="ID" /> |
| | | <result property="infoid" column="InfoID" /> |
| | | <result property="donorno" column="DonorNo" /> |
| | | <result property="name" column="Name" /> |
| | | <result property="idcardtype" column="IDCardType" /> |
| | | <result property="idcardno" column="IDCardNo" /> |
| | | <result property="phone" column="Phone" /> |
| | | <result property="residenceaddress" column="ResidenceAddress" /> |
| | | <result property="residenceprovince" column="ResidenceProvince" /> |
| | | <result property="residenceprovincename" column="ResidenceProvinceName" /> |
| | | <result property="residencecity" column="ResidenceCity" /> |
| | | <result property="residencecityname" column="ResidenceCityName" /> |
| | | <result property="residencetown" column="ResidenceTown" /> |
| | | <result property="residencetownname" column="ResidenceTownName" /> |
| | | <result property="residencecommunity" column="ResidenceCommunity" /> |
| | | <result property="residencecommunityname" column="ResidenceCommunityName" /> |
| | | <result property="residencecountycode" column="ResidenceCountyCode" /> |
| | | <result property="residencecountyname" column="ResidenceCountyName" /> |
| | | <result property="kinship" column="Kinship" /> |
| | | <result property="kinshipChildrennum" column="Kinship_ChildrenNum" /> |
| | | <result property="signfamilyrelations" column="SignFamilyRelations" /> |
| | | <result property="kinshipconfirmationsign" column="KinshipConfirmationSign" /> |
| | | <result property="organdecision" column="OrganDecision" /> |
| | | <result property="organdecisionOther" column="OrganDecision_Other" /> |
| | | <result property="relativeconfirmationsign" column="RelativeConfirmationSign" /> |
| | | <result property="familyrelations" column="FamilyRelations" /> |
| | | <result property="acquisitiontissueno" column="AcquisitionTissueNo" /> |
| | | <result property="acquisitiontissuename" column="AcquisitionTissueName" /> |
| | | <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="signdate" column="SignDate" /> |
| | | <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="operatorno" column="operatorno" /> |
| | | <result property="operatorname" column="operatorname" /> |
| | | <result property="nation" column="nation" /> |
| | | <result property="education" column="education" /> |
| | | <result property="occupation" column="occupation" /> |
| | | <result property="id" column="ID"/> |
| | | <result property="infoid" column="InfoID"/> |
| | | <result property="donorno" column="DonorNo"/> |
| | | <result property="name" column="Name"/> |
| | | <result property="idcardtype" column="IDCardType"/> |
| | | <result property="idcardno" column="IDCardNo"/> |
| | | <result property="phone" column="Phone"/> |
| | | <result property="residenceaddress" column="ResidenceAddress"/> |
| | | <result property="residenceprovince" column="ResidenceProvince"/> |
| | | <result property="residenceprovincename" column="ResidenceProvinceName"/> |
| | | <result property="residencecity" column="ResidenceCity"/> |
| | | <result property="residencecityname" column="ResidenceCityName"/> |
| | | <result property="residencetown" column="ResidenceTown"/> |
| | | <result property="residencetownname" column="ResidenceTownName"/> |
| | | <result property="residencecommunity" column="ResidenceCommunity"/> |
| | | <result property="residencecommunityname" column="ResidenceCommunityName"/> |
| | | <result property="residencecountycode" column="ResidenceCountyCode"/> |
| | | <result property="residencecountyname" column="ResidenceCountyName"/> |
| | | <result property="kinship" column="Kinship"/> |
| | | <result property="kinshipChildrennum" column="Kinship_ChildrenNum"/> |
| | | <result property="signfamilyrelations" column="SignFamilyRelations"/> |
| | | <result property="kinshipconfirmationsign" column="KinshipConfirmationSign"/> |
| | | <result property="organdecision" column="OrganDecision"/> |
| | | <result property="organdecisionOther" column="OrganDecision_Other"/> |
| | | <result property="relativeconfirmationsign" column="RelativeConfirmationSign"/> |
| | | <result property="familyrelations" column="FamilyRelations"/> |
| | | <result property="acquisitiontissueno" column="AcquisitionTissueNo"/> |
| | | <result property="acquisitiontissuename" column="AcquisitionTissueName"/> |
| | | <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="signdate" column="SignDate"/> |
| | | <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="operatorno" column="operatorno"/> |
| | | <result property="operatorname" column="operatorname"/> |
| | | <result property="nation" column="nation"/> |
| | | <result property="education" column="education"/> |
| | | <result property="occupation" column="occupation"/> |
| | | <result property="assessannex" column="assessannex"/> |
| | | <result property="relativeRemark" column="relative_remark"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectServiceRelativesconfirmationVo"> |
| | | select ID, InfoID,nation,education,occupation, DonorNo, Name, IDCardType, IDCardNo, Phone, ResidenceAddress, ResidenceProvince, ResidenceProvinceName, ResidenceCity, ResidenceCityName, ResidenceTown, ResidenceTownName, ResidenceCommunity, ResidenceCommunityName, ResidenceCountyCode, ResidenceCountyName, Kinship, Kinship_ChildrenNum, SignFamilyRelations, KinshipConfirmationSign, OrganDecision, OrganDecision_Other, RelativeConfirmationSign, FamilyRelations, AcquisitionTissueNo, AcquisitionTissueName, ResponsibleUserID, ResponsibleUserName, CoordinatedUserIDO, CoordinatedUserNameO, CoordinatedUserIDT, CoordinatedUserNameT, SignDate, del_flag, create_by, create_time, update_by, update_time,operatorname,operatorno from service_relativesconfirmation |
| | | select ID, |
| | | InfoID, |
| | | assessannex, |
| | | relative_remark, |
| | | nation, |
| | | education, |
| | | occupation, |
| | | DonorNo, |
| | | Name, |
| | | IDCardType, |
| | | IDCardNo, |
| | | Phone, |
| | | ResidenceAddress, |
| | | ResidenceProvince, |
| | | ResidenceProvinceName, |
| | | ResidenceCity, |
| | | ResidenceCityName, |
| | | ResidenceTown, |
| | | ResidenceTownName, |
| | | ResidenceCommunity, |
| | | ResidenceCommunityName, |
| | | ResidenceCountyCode, |
| | | ResidenceCountyName, |
| | | Kinship, |
| | | Kinship_ChildrenNum, |
| | | SignFamilyRelations, |
| | | KinshipConfirmationSign, |
| | | OrganDecision, |
| | | OrganDecision_Other, |
| | | RelativeConfirmationSign, |
| | | FamilyRelations, |
| | | AcquisitionTissueNo, |
| | | AcquisitionTissueName, |
| | | ResponsibleUserID, |
| | | ResponsibleUserName, |
| | | CoordinatedUserIDO, |
| | | CoordinatedUserNameO, |
| | | CoordinatedUserIDT, |
| | | CoordinatedUserNameT, |
| | | SignDate, |
| | | del_flag, |
| | | create_by, |
| | | create_time, |
| | | update_by, |
| | | update_time, |
| | | operatorname, |
| | | operatorno |
| | | from service_relativesconfirmation |
| | | </sql> |
| | | |
| | | <select id="selectServiceRelativesconfirmationList" parameterType="com.ruoyi.project.domain.ServiceRelativesconfirmation" resultMap="ServiceRelativesconfirmationResult"> |
| | | <select id="selectServiceRelativesconfirmationList" |
| | | parameterType="com.ruoyi.project.domain.ServiceRelativesconfirmation" |
| | | resultMap="ServiceRelativesconfirmationResult"> |
| | | <include refid="selectServiceRelativesconfirmationVo"/> |
| | | <where> |
| | | <if test="donorno != null and donorno != ''"> and DonorNo = #{donorno}</if> |
| | | <if test="name != null and name != ''"> and Name like concat('%', #{name}, '%')</if> |
| | | <if test="idcardno != null and idcardno != ''"> and IDCardNo = #{idcardno}</if> |
| | | <if test="acquisitiontissueno != null and acquisitiontissueno != ''"> and AcquisitionTissueNo = #{acquisitiontissueno}</if> |
| | | <if test="params.beginSigndate != null and params.beginSigndate != '' and params.endSigndate != null and params.endSigndate != ''"> and SignDate between #{params.beginSigndate} and #{params.endSigndate}</if> |
| | | <if test="donorno != null and donorno != ''">and DonorNo = #{donorno}</if> |
| | | <if test="name != null and name != ''">and Name like concat('%', #{name}, '%')</if> |
| | | <if test="idcardno != null and idcardno != ''">and IDCardNo = #{idcardno}</if> |
| | | <if test="acquisitiontissueno != null and acquisitiontissueno != ''">and AcquisitionTissueNo = |
| | | #{acquisitiontissueno} |
| | | </if> |
| | | <if test="params.beginSigndate != null and params.beginSigndate != '' and params.endSigndate != null and params.endSigndate != ''"> |
| | | and SignDate between #{params.beginSigndate} and #{params.endSigndate} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="getCoordinateUserByInfoId" resultType="java.lang.String"> |
| | | select CoordinatedUserIDO from service_relativesconfirmation |
| | | select CoordinatedUserIDO |
| | | from service_relativesconfirmation |
| | | where InfoID = #{infoid} |
| | | </select> |
| | | <select id="selectVOList" resultType="com.ruoyi.project.domain.vo.RelativeConfirmationVO"> |
| | | SELECT |
| | | SELECT |
| | | `service_donatebaseinfo`.`ID` AS `ID`, |
| | | `service_donatebaseinfo`.`Name` AS `Name`, |
| | | `service_donatebaseinfo`.`Sex` AS `Sex`, |
| | |
| | | `service_relativesconfirmation`.`nation` AS `nation`, |
| | | `service_relativesconfirmation`.`education` AS `education`, |
| | | `service_relativesconfirmation`.`occupation` AS `occupation` |
| | | FROM |
| | | FROM |
| | | |
| | | `service_donatebaseinfo` |
| | | LEFT JOIN `service_relativesconfirmation` ON |
| | | `service_donatebaseinfo`.`ID` = `service_relativesconfirmation`.`InfoID` |
| | | `service_donatebaseinfo` |
| | | LEFT JOIN `service_relativesconfirmation` ON |
| | | `service_donatebaseinfo`.`ID` = `service_relativesconfirmation`.`InfoID` |
| | | LEFT JOIN `base_organization` ON |
| | | `base_organization`.`OrganizationID` = `service_donatebaseinfo`.`TreatmentHospitalNo` |
| | | |
| | | <where> |
| | | service_donatebaseinfo.del_flag=0 |
| | | and service_relativesconfirmation.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="infoid != null and infoid != ''"> and `service_relativesconfirmation`.`InfoID` = #{infoid}</if> |
| | | <if test="starttime != null "> and `service_relativesconfirmation`.SignDate >= #{starttime} </if> |
| | | <if test="endtime != null "> and `service_relativesconfirmation`.SignDate <= #{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="residenceprovince != null and residenceprovince != ''"> and `service_relativesconfirmation`.`ResidenceProvince` = #{residenceprovince}</if> |
| | | <if test="residencecity != null and residencecity != ''"> and `service_relativesconfirmation`.`ResidenceCity` = #{residencecity}</if> |
| | | <if test="residencetown != null and residencetown != ''"> and `service_relativesconfirmation`.`ResidenceTown` = #{residencetown}</if> |
| | | <if test="workflow != null "> and `service_donatebaseinfo`.`workflow` = #{workflow}</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="infoid != null and infoid != ''">and `service_relativesconfirmation`.`InfoID` = #{infoid}</if> |
| | | <if test="starttime != null ">and `service_relativesconfirmation`.SignDate >= #{starttime}</if> |
| | | <if test="endtime != null ">and `service_relativesconfirmation`.SignDate <= #{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="residenceprovince != null and residenceprovince != ''">and |
| | | `service_relativesconfirmation`.`ResidenceProvince` = #{residenceprovince} |
| | | </if> |
| | | <if test="residencecity != null and residencecity != ''">and `service_relativesconfirmation`.`ResidenceCity` |
| | | = #{residencecity} |
| | | </if> |
| | | <if test="residencetown != null and residencetown != ''">and `service_relativesconfirmation`.`ResidenceTown` |
| | | = #{residencetown} |
| | | </if> |
| | | <if test="workflow != null ">and `service_donatebaseinfo`.`workflow` = #{workflow}</if> |
| | | |
| | | </where> |
| | | </where> |
| | | |
| | | order by `service_relativesconfirmation`.`create_time` desc |
| | | |
| | | </select> |
| | | <select id="countNumber" resultType="java.lang.Integer"> |
| | | select count(*) from service_relativesconfirmation |
| | | where SignDate >= #{starttime} and SignDate <= #{endtime} |
| | | select count(*) |
| | | from service_relativesconfirmation |
| | | where SignDate >= #{starttime} |
| | | and SignDate <= #{endtime} |
| | | </select> |
| | | |
| | | <select id="confirmationBaseInfoList" resultType="com.ruoyi.project.domain.dto.RelativeConfirmationBaseInfoDTO"> |
| | | SELECT sd.TreatmentHospitalName as treatmenthospitalname, |
| | | sd.TreatmentHospitalNo as treatmenthospitalno, |
| | | sd.DonorNo as donorno, |
| | | sd.case_no as caseNo, |
| | | sd.Name as name, |
| | | sd.InpatientNo as inpatientno, |
| | | sd.extracontent as extracontent, |
| | | sd.RecordState as recordstate, |
| | | sd.Sex as sex, |
| | | sd.Age as age, |
| | | sd.BloodType as bloodtype, |
| | | sd.idcardno as idcardno, |
| | | sd.diagnosisname as diagnosisname, |
| | | sd.ID as infoid, |
| | | sr.ID as id, |
| | | sr.Name as relativesName, |
| | | sr.FamilyRelations as familyRelations, |
| | | sr.IDCardType as idCardType, |
| | | sr.IDCardNo as idCardNo, |
| | | sr.Phone as phone, |
| | | sr.Kinship_ChildrenNum as kinshipChildrenNum, |
| | | sr.KinshipConfirmationSign as kinshipConfirmationSign, |
| | | sr.RelativeConfirmationSign as relativeConfirmationSign, |
| | | sr.OrganDecision as organDecision, |
| | | sr.OrganDecision_Other as organDecisionOther, |
| | | sr.SignFamilyRelations as signFamilyRelations, |
| | | sr.SignDate as signdate, |
| | | sr.ResponsibleUserName as responsibleusername, |
| | | sr.ResponsibleUserID as responsibleuserid, |
| | | sr.CoordinatedUserIDO as coordinateduserido, |
| | | sr.CoordinatedUserNameO as coordinatedusernameo, |
| | | sr.CoordinatedUserNameT as coordinateduseridt, |
| | | sr.ResponsibleUserID as responsibleuserid, |
| | | sr.nation as nation, |
| | | sr.occupation as occupation, |
| | | sr.relative_remark as relativeRemark, |
| | | sr.assessannex as assessannex, |
| | | sr.education as education |
| | | FROM service_donatebaseinfo sd |
| | | LEFT JOIN service_relativesconfirmation sr ON sd.ID = sr.InfoID and sd.del_flag = 0 |
| | | AND sr.del_flag = 0 |
| | | <where> |
| | | <if test="infoid != null">AND sd.ID = #{infoid}</if> |
| | | <if test="recordstate != null and recordstate != ''">AND sd.RecordState = #{recordstate}</if> |
| | | <if test="caseNo != null and caseNo != ''">AND sd.case_no = #{caseNo}</if> |
| | | <if test="treatmenthospitalname != null and treatmenthospitalname != ''">AND sd.TreatmentHospitalName = |
| | | #{treatmenthospitalname} |
| | | </if> |
| | | <if test="name != null and name != ''">AND sd.Name = #{name}</if> |
| | | <if test="inpatientno != null ">AND sd.InpatientNo = #{inpatientno}</if> |
| | | <if test="responsibleusername != null and responsibleusername != ''">AND sd.ResponsibleUserName = |
| | | #{responsibleusername} |
| | | </if> |
| | | <if test="responsibleusername != null and responsibleusername != ''">AND sd.SignDate = |
| | | #{responsibleusername} |
| | | </if> |
| | | <if test="relativeconfirmationsign != null and relativeconfirmationsign != ''">AND |
| | | sd.RelativeConfirmationSign = |
| | | #{relativeconfirmationsign} |
| | | </if> |
| | | <if test="startSigndate != null and startSigndate != ''"><!-- 确认开始时间检索 --> |
| | | and sr.SignDate >= #{startSigndate} |
| | | </if> |
| | | <if test="endSigndate != null and endSigndate != ''"><!-- 确认结束时间检索 --> |
| | | and sr.SignDate <= #{endSigndate} |
| | | </if> |
| | | </where> |
| | | <if test="pageNum != null and pageSize != null">limit #{pageNum},#{pageSize}</if> |
| | | </select> |
| | | |
| | | </mapper> |