72 lines
3.5 KiB
XML
72 lines
3.5 KiB
XML
<?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.czblood.busBloodbank.mapper.SearchTransfuseBillMapper">
|
|
|
|
<select id="queryList" resultType="java.util.Map">
|
|
SELECT xk_search_transfuse_bill.sid,
|
|
xk_search_transfuse_bill.bill_no,
|
|
xk_search_transfuse_bill.input_person,
|
|
xk_search_transfuse_bill.input_date,
|
|
xk_search_transfuse_bill.hgbz,
|
|
xk_search_transfuse_bill.hgyy,
|
|
xk_transfuse_apply.patient_bed,
|
|
xk_transfuse_apply.dept_id,
|
|
xk_transfuse_apply.apply_date,
|
|
xk_transfuse_apply.apply_medic,
|
|
xk_transfuse_apply.diagnoses,
|
|
xk_patient_info.patient_name,
|
|
xk_patient_info.patient_sex,
|
|
xk_transfuse_apply_bloodbreed.blood_breed,
|
|
xk_transfuse_apply_bloodbreed.blood_num,
|
|
xk_transfuse_apply_bloodbreed.unit,
|
|
xk_transfuse_apply.abo_type,
|
|
xk_transfuse_apply.rh_type ,
|
|
xk_transfuse_apply.beinhos_id
|
|
FROM xk_patient_info,
|
|
xk_search_transfuse_bill,
|
|
xk_transfuse_apply,
|
|
xk_transfuse_apply_bloodbreed
|
|
WHERE ( xk_search_transfuse_bill.bill_no = xk_transfuse_apply.bill_no ) and
|
|
( xk_transfuse_apply.beinhos_id = xk_patient_info.beinhos_id ) and
|
|
( xk_transfuse_apply.bill_no = xk_transfuse_apply_bloodbreed.bill_no )
|
|
<if test="stime != null and etime != null">and xk_search_transfuse_bill.input_date between #{stime} and #{etime}</if>
|
|
<if test="dept != null and dept != ''">and xk_transfuse_apply.dept_id = #{dept}</if>
|
|
<if test="billNo != null and billNo != ''">and xk_transfuse_apply.bill_no = #{billNo}</if>
|
|
<if test="hgbz != null and hgbz != ''">and xk_search_transfuse_bill.hgbz = #{hgbz}</if>
|
|
<if test="status != null and status != ''">and xk_transfuse_apply.bill_stasus = #{status}</if>
|
|
</select>
|
|
<select id="getMaxSid" resultType="java.lang.Integer">
|
|
select max(sid) from xk_search_transfuse_bill
|
|
</select>
|
|
<select id="queryOne" resultType="java.util.Map">
|
|
SELECT xk_search_transfuse_bill.sid,
|
|
xk_search_transfuse_bill.bill_no,
|
|
xk_search_transfuse_bill.input_person,
|
|
xk_search_transfuse_bill.input_date,
|
|
xk_search_transfuse_bill.hgbz,
|
|
xk_search_transfuse_bill.hgyy,
|
|
xk_transfuse_apply.patient_bed,
|
|
xk_transfuse_apply.dept_id,
|
|
xk_transfuse_apply.apply_date,
|
|
xk_transfuse_apply.apply_medic,
|
|
xk_transfuse_apply.diagnoses,
|
|
xk_patient_info.patient_name,
|
|
xk_patient_info.patient_sex,
|
|
xk_transfuse_apply_bloodbreed.blood_breed,
|
|
xk_transfuse_apply_bloodbreed.blood_num,
|
|
xk_transfuse_apply_bloodbreed.unit ,
|
|
CONVERT(datetime, getdate(), 20) as input_date_temp
|
|
FROM xk_patient_info,
|
|
xk_search_transfuse_bill,
|
|
xk_transfuse_apply,
|
|
xk_transfuse_apply_bloodbreed
|
|
WHERE ( xk_search_transfuse_bill.bill_no = xk_transfuse_apply.bill_no ) and
|
|
( xk_transfuse_apply.beinhos_id = xk_patient_info.beinhos_id ) and
|
|
( xk_transfuse_apply.bill_no = xk_transfuse_apply_bloodbreed.bill_no ) and
|
|
( ( xk_search_transfuse_bill.bill_no = #{billNo} ) )
|
|
|
|
</select>
|
|
|
|
|
|
</mapper> |