liusheng
2024-05-16 2f13f59f023fba63aa993172d48c14bcaaafb233
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<?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.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"    />
    </resultMap>
 
    <sql id="selectServiceRelativesconfirmationVo">
        select ID, InfoID, 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">
        <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>
        </where>
    </select>
    <select id="getCoordinateUserByInfoId" resultType="java.lang.String">
        select CoordinatedUserIDO from service_relativesconfirmation
        where InfoID = #{infoid}
    </select>
    <select id="selectVOList" resultType="com.ruoyi.project.domain.vo.RelativeConfirmationVO">
    SELECT
        `service_donatebaseinfo`.`ID` AS `ID`,
        `service_donatebaseinfo`.`Name` AS `Name`,
        `service_donatebaseinfo`.`Sex` AS `Sex`,
        `service_donatebaseinfo`.`IDCardType` AS `IDCardType`,
        `service_donatebaseinfo`.`IDCardNo` AS `IDCardNo`,
        `service_donatebaseinfo`.`Age` AS `Age`,
        `service_donatebaseinfo`.`Birthday` AS `Birthday`,
        `service_donatebaseinfo`.`AgeUnit` AS `AgeUnit`,
        `service_donatebaseinfo`.`Phone` AS `Phone`,
        `service_donatebaseinfo`.`Nationality` AS `Nationality`,
        `service_donatebaseinfo`.`NativePlace` AS `NativePlace`,
        `service_donatebaseinfo`.`Nation` AS `Nation`,
        `service_donatebaseinfo`.`Occupation` AS `Occupation`,
        `service_donatebaseinfo`.`Education` AS `Education`,
        `service_donatebaseinfo`.`RegisterAddress` AS `RegisterAddress`,
        `service_donatebaseinfo`.`RegisterProvince` AS `RegisterProvince`,
        `service_donatebaseinfo`.`RegisterProvinceName` AS `RegisterProvinceName`,
        `service_donatebaseinfo`.`RegisterCity` AS `RegisterCity`,
        `service_donatebaseinfo`.`RegisterCityName` AS `RegisterCityName`,
        `service_donatebaseinfo`.`RegisterTown` AS `RegisterTown`,
        `service_donatebaseinfo`.`RegisterTownName` AS `RegisterTownName`,
        `service_donatebaseinfo`.`RegisterCommunity` AS `RegisterCommunity`,
        `service_donatebaseinfo`.`RegisterCountyCode` AS `RegisterCountyCode`,
        `service_donatebaseinfo`.`RegisterCommunityName` AS `RegisterCommunityName`,
        `service_donatebaseinfo`.`RegisterCountyName` AS `RegisterCountyName`,
        `service_donatebaseinfo`.`RecordState` AS `RecordState`,
        `service_donatebaseinfo`.`ReporterNo` AS `ReporterNo`,
        `service_donatebaseinfo`.`ReporterName` AS `ReporterName`,
        `service_donatebaseinfo`.`ReporterPhone` AS `ReporterPhone`,
        `service_donatebaseinfo`.`ReportTime` AS `ReportTime`,
        `service_donatebaseinfo`.`DonorNo` AS `DonorNo`,
        `service_donatebaseinfo`.`TreatmentHospitalNo` AS `TreatmentHospitalNo`,
        `service_donatebaseinfo`.`TreatmentHospitalName` AS `TreatmentHospitalName`,
        `service_donatebaseinfo`.`TreatmentDeptName` AS `TreatmentDeptName`,
        `service_donatebaseinfo`.`create_by` AS `basecreateby`,
        `service_donatebaseinfo`.`workflow` AS `workflow`,
        `service_donatebaseinfo`.`termination_case` AS `terminationCase`,
        `service_donatebaseinfo`.`donatetime` AS `donatetime`,
        `service_relativesconfirmation`.`ID` AS `rcID`,
        `service_relativesconfirmation`.`InfoID` AS `InfoID`,
        `service_relativesconfirmation`.`DonorNo` AS `rcDonroNo`,
        `service_relativesconfirmation`.`Name` AS `rcName`,
        `service_relativesconfirmation`.`IDCardType` AS `erIDCardType`,
        `service_relativesconfirmation`.`IDCardNo` AS `rcIDCardNo`,
        `service_relativesconfirmation`.`Phone` AS `rcPhone`,
        `service_relativesconfirmation`.`FamilyRelations` AS `FamilyRelations`,
        `service_relativesconfirmation`.`OrganDecision` AS `OrganDecision`,
        `service_relativesconfirmation`.`ResidenceAddress` AS `ResidenceAddress`,
        `service_relativesconfirmation`.`ResidenceProvince` AS `ResidenceProvince`,
        `service_relativesconfirmation`.`CoordinatedUserNameT` AS `CoordinatedUserNameT`,
        `service_relativesconfirmation`.`CoordinatedUserIDT` AS `CoordinatedUserIDT`,
        `service_relativesconfirmation`.`CoordinatedUserNameO` AS `CoordinatedUserNameO`,
        `service_relativesconfirmation`.`CoordinatedUserIDO` AS `CoordinatedUserIDO`,
        `service_relativesconfirmation`.`ResponsibleUserName` AS `ResponsibleUserName`,
        `service_relativesconfirmation`.`ResponsibleUserID` AS `ResponsibleUserID`,
        `service_relativesconfirmation`.`AcquisitionTissueName` AS `AcquisitionTissueName`,
        `service_relativesconfirmation`.`AcquisitionTissueNo` AS `AcquisitionTissueNo`,
        `service_relativesconfirmation`.`SignFamilyRelations` AS `SignFamilyRelations`,
        `service_relativesconfirmation`.`RelativeConfirmationSign` AS `RelativeConfirmationSign`,
        `service_relativesconfirmation`.`OrganDecision_Other` AS `OrganDecision_Other`,
        `service_relativesconfirmation`.`ResidenceProvinceName` AS `ResidenceProvinceName`,
        `service_relativesconfirmation`.`ResidenceCityName` AS `ResidenceCityName`,
        `service_relativesconfirmation`.`ResidenceTown` AS `ResidenceTown`,
        `service_relativesconfirmation`.`ResidenceTownName` AS `ResidenceTownName`,
        `service_relativesconfirmation`.`ResidenceCommunity` AS `ResidenceCommunity`,
        `service_relativesconfirmation`.`ResidenceCommunityName` AS `ResidenceCommunityName`,
        `service_relativesconfirmation`.`ResidenceCountyCode` AS `ResidenceCountyCode`,
        `service_relativesconfirmation`.`ResidenceCountyName` AS `ResidenceCountyName`,
        `service_relativesconfirmation`.`ResidenceCity` AS `ResidenceCity`,
        `service_relativesconfirmation`.`Kinship` AS `Kinship`,
        `service_relativesconfirmation`.`Kinship_ChildrenNum` AS `Kinship_ChildrenNum`,
        `service_relativesconfirmation`.`KinshipConfirmationSign` AS `KinshipConfirmationSign`,
        `service_relativesconfirmation`.`SignDate` AS `SignDate`,
        `service_relativesconfirmation`.`del_flag` AS `delFlag`,
        `service_relativesconfirmation`.`create_by` AS `createBy`,
        `service_relativesconfirmation`.`create_time` AS `createTime`,
        `service_relativesconfirmation`.`update_by` AS `updateBy`,
        `service_relativesconfirmation`.`update_time` AS `updateTime`,
        `service_relativesconfirmation`.`operatorno` AS `operatorno`,
        `service_relativesconfirmation`.`operatorname` AS `operatorname`
    FROM
 
            `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>
            <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 &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="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>
 
        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 &lt;= #{endtime}
    </select>
 
</mapper>