| | |
| | | |
| | | <resultMap type="com.ruoyi.project.domain.ServiceEthicalreviewopinions" id="ServiceEthicalreviewopinionsResult"> |
| | | <result property="id" column="ID"/> |
| | | <result property="del_flag" column="del_flag"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="caseNo" column="case_no"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | |
| | | <result property="conclusiontime" column="ConclusionTime"/> |
| | | <result property="conclusionannex" column="ConclusionAnnex"/> |
| | | <result property="conclusionorder" column="ConclusionOrder"/> |
| | | <result property="sendType" column="send_type"/> |
| | | <result property="receiveStatus" column="receive_status"/> |
| | | <result property="deptCode" column="dept_code"/> |
| | | <result property="deptName" column="dept_name"/> |
| | | <result property="organType" column="organ_type"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectServiceEthicalreviewopinionsVo"> |
| | | select ID, |
| | | case_no, |
| | | dept_code, |
| | | dept_name, |
| | | organ_type, |
| | | send_type, |
| | | receive_status, |
| | | del_flag, |
| | | create_by, |
| | | create_time, |
| | |
| | | <include refid="selectServiceEthicalreviewopinionsVo"/> |
| | | <where> |
| | | <if test="infoid != null ">and InfoID = #{infoid}</if> |
| | | <if test="deptCode != null ">and dept_code = #{deptCode}</if> |
| | | <if test="deptName != null ">and dept_name = #{deptName}</if> |
| | | <if test="organType != null ">and organ_type = #{organType}</if> |
| | | <if test="caseNo != null ">and case_no = #{caseNo}</if> |
| | | <if test="donorno != null and donorno != ''">and DonorNo = #{donorno}</if> |
| | | <if test="expertopinion != null and expertopinion != ''">and ExpertOpinion = #{expertopinion}</if> |
| | | <if test="expertconclusion != null ">and ExpertConclusion = #{expertconclusion}</if> |
| | |
| | | <if test="conclusiontime != null ">and ConclusionTime = #{conclusiontime}</if> |
| | | <if test="conclusionannex != null and conclusionannex != ''">and ConclusionAnnex = #{conclusionannex}</if> |
| | | <if test="conclusionorder != null ">and ConclusionOrder = #{conclusionorder}</if> |
| | | <if test="sendType != null ">and send_type = #{sendType}</if> |
| | | <if test="receiveStatus != null ">and receive_status = #{receiveStatus}</if> |
| | | send_type, |
| | | receive_status, |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectVOList" resultType="com.ruoyi.project.domain.vo.EthicalReviewVO"> |
| | | SELECT |
| | | service_donatebaseinfo.ID as id, |
| | |
| | | service_donatebaseinfo.deptname, |
| | | service_ethicalreviewopinions.ID as fcid, |
| | | service_ethicalreviewopinions.ExpertOpinion as expertopinion, |
| | | service_ethicalreviewopinions.send_type as sendType, |
| | | service_ethicalreviewopinions.receive_status as receiveStatus, |
| | | service_ethicalreviewopinions.ExpertConclusion as expertconclusion, |
| | | service_ethicalreviewopinions.ExpertName as expertname, |
| | | service_ethicalreviewopinions.ConclusionTime as conclusiontime, |
| | | service_ethicalreviewopinions.ConclusionAnnex as conclusionannex, |
| | | service_ethicalreviewopinions.ConclusionOrder as conclusionorder |
| | | FROM |
| | | service_donatebaseinfo |
| | | LEFT JOIN |
| | | service_ethicalreviewopinions |
| | | ON |
| | | service_donatebaseinfo.ID = service_ethicalreviewopinions.InfoID |
| | | service_ethicalreviewopinions.case_no as case_no, |
| | | service_ethicalreviewopinions.dept_name as dept_name, |
| | | service_ethicalreviewopinions.dept_code as dept_code, |
| | | service_ethicalreviewopinions.organ_type as organ_type, |
| | | service_ethicalreviewopinions.ConclusionOrder as conclusionorder, |
| | | service_ethicalreviewopinions.nitiate_id as nitiateId, |
| | | service_ethicalreviewopinions.expert_no as expertNo, |
| | | service_ethicalreviewopinions.start_time, |
| | | service_ethicalreviewopinions.end_time, |
| | | service_ethicalreviewopinions.expert_type, |
| | | c.file_patch, |
| | | service_ethicalreviewopinions.sigin as sigin |
| | | FROM service_donatebaseinfo |
| | | LEFT JOIN service_ethicalreviewopinions |
| | | ON service_donatebaseinfo.ID = service_ethicalreviewopinions.InfoID |
| | | LEFT JOIN base_organization ON |
| | | base_organization.OrganizationID = service_donatebaseinfo.TreatmentHospitalNo |
| | | |
| | | left join service_ethicalreviewinitiate c on c.InfoID=service_donatebaseinfo.id |
| | | <where> |
| | | service_donatebaseinfo.del_flag=0 |
| | | and service_ethicalreviewopinions.del_flag=0 |
| | |
| | | <if test="treatmenthospitalno != null and treatmenthospitalno != ''">and |
| | | `service_donatebaseinfo`.`TreatmentHospitalNo` = #{treatmenthospitalno} |
| | | </if> |
| | | <if test="recordstate != null and recordstate != ''">and `service_donatebaseinfo`.`RecordState` = |
| | | #{recordstate} |
| | | <if test="recordstate != null and recordstate != ''"> |
| | | and `service_donatebaseinfo`.`RecordState` = #{recordstate} |
| | | </if> |
| | | <if test="caseNo != null and caseNo != ''">and `service_donatebaseinfo`.`case_no` = |
| | | #{caseNo} |
| | | </if> |
| | | <if test="basecreateby != null and basecreateby != ''">and `service_donatebaseinfo`.`create_by` = |
| | | #{basecreateby} |
| | |
| | | </if> |
| | | <if test="city != null and city != ''">and `base_organization`.`City` = #{city}</if> |
| | | <if test="fcid != null ">and `service_ethicalreviewopinions`.`ID` = #{fcid}</if> |
| | | <if test="workflow != null "> and `service_donatebaseinfo`.`workflow` = #{workflow}</if> |
| | | <if test="workflow != null ">and `service_donatebaseinfo`.`workflow` = #{workflow}</if> |
| | | <if test="nitiateId != null ">and `service_ethicalreviewopinions`.`nitiate_id` = #{nitiateId}</if> |
| | | <if test="expertNo != null ">and `service_ethicalreviewopinions`.`expert_no` = #{expertNo}</if> |
| | | <if test="receiveStatus != null and receiveStatus != ''"> |
| | | and `service_ethicalreviewopinions`.`receive_status` in(${receiveStatus}) |
| | | </if> |
| | | <if test="expertname != null ">and `service_ethicalreviewopinions`.`expertname` = #{expertname}</if> |
| | | <if test="expertconclusion != null ">and `service_ethicalreviewopinions`.`expertconclusion` = #{expertconclusion}</if> |
| | | |
| | | </where> |
| | | |
| | | order by `service_ethicalreviewopinions`.`ConclusionTime` desc |
| | | |
| | | </select> |
| | | |
| | | <select id="countNumber" resultType="java.lang.Integer"> |
| | | select count(*) |
| | | from service_donateflowchart |
| | |
| | | and create_time <= #{endtime} |
| | | </select> |
| | | |
| | | <select id="expertTotal" resultType="com.ruoyi.project.domain.vo.EthicalreviewopinionsTotalVO"> |
| | | SELECT COUNT(*) count,SUM(CASE WHEN receive_status = 1 THEN 1 ELSE 0 END) AS acceptCount, |
| | | SUM(CASE WHEN receive_status =0 THEN 1 ELSE 0 END) AS notAcceptCount, |
| | | SUM(CASE WHEN ExpertOpinion IS not null THEN 1 ELSE 0 END) AS opinionCount, |
| | | SUM(CASE WHEN ExpertOpinion IS null THEN 1 ELSE 0 END) AS notApinionCount, |
| | | SUM(CASE WHEN ConclusionAnnex IS not null THEN 1 ELSE 0 END) AS annexCount, |
| | | SUM(CASE WHEN ConclusionAnnex IS null THEN 1 ELSE 0 END) AS notAnnexCount |
| | | |
| | | FROM service_ethicalreviewopinions |
| | | <where> |
| | | <if test="expertNo != null ">expert_no = #{expertNo}</if> |
| | | </where> |
| | | |
| | | GROUP BY receive_status,ExpertOpinion,ConclusionAnnex |
| | | </select> |
| | | |
| | | <update id="updateTimeOut" > |
| | | UPDATE service_ethicalreviewopinions SET receive_status=0 |
| | | WHERE end_time IS NOT NULL AND end_time <= NOW() |
| | | </update> |
| | | |
| | | <select id="stateTotal" resultType="com.ruoyi.project.domain.vo.EthicalreviewopinionsStateTotalVO"> |
| | | SELECT COUNT(*) count,SUM(CASE WHEN receive_status = 5 THEN 1 ELSE 0 END) AS throughCount, |
| | | SUM(CASE WHEN receive_status =4 THEN 1 ELSE 0 END) AS rejectCount, |
| | | SUM(CASE WHEN receive_status =3 THEN 1 ELSE 0 END) AS waiveCount |
| | | |
| | | FROM service_ethicalreviewopinions |
| | | <where> |
| | | <if test="expertNo != null ">expert_no = #{expertNo}</if> |
| | | </where> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |