32 lines
2.1 KiB
XML
32 lines
2.1 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.transitPlatForm.transitPF.mapper.RegRequestInfoMapper">
|
|
<select id="queryRegRequestInfo" resultType="com.transitPlatForm.common.core.domain.entity.reg.RegApply">
|
|
<![CDATA[select *,CONVERT(VARCHAR(20), OrderTime, 23) as OrderDate from reg_apply where OrderTime >= #{begdate} and OrderTime <= #{enddate} ]]>
|
|
<if test="patId != null and patId != ''"> and PatId = #{patId}</if>
|
|
<if test="brxm != null and brxm != ''">and PatName like '%'+#{brxm}+'%'</if>
|
|
<if test="status == 1">and Status in ('10','20','30','40')</if>
|
|
<if test="status == 2">and Status in ('50','60')</if>
|
|
<if test="status == 3">and Status in ('70','80')</if>
|
|
<if test="SrcHospCode != null and SrcHospCode != ''">and SrcHospCode = #{SrcHospCode}</if>
|
|
order by OrderTime desc
|
|
</select>
|
|
|
|
<select id="queryReqDetail" resultType="com.transitPlatForm.common.core.domain.entity.reg.RegApplyDetail">
|
|
select a.*,b.itemclass, c.classid,d.barcode,c.itemclass_bkcolor,c.itemclass_tips from reg_apply_detail a left join reg_TransitSample_detail d on (d.applyid = a.applyid and d.applyDetailId = a.uid),reg_item b,reg_itemclass c
|
|
where a.applyid = #{applyid} and a.OrderItemCode = b.itemcode and c.itemclass_code = b.itemclass
|
|
</select>
|
|
|
|
<select id="getItemInfo" resultType="map">
|
|
select b.itemclass_tips, b.classid,(case when isnull(a.yblx,'') = '' then b.itemclass_yblx else a.yblx end) as itemclass_yblx, a.*,
|
|
(case #{hospitalType} when '1' then a.dj1 when '2' then a.dj2 when '3' then a.dj3 else a.dj end ) as price
|
|
from reg_item a,reg_itemclass b where a.itemclass = b.itemclass_code and a.status = '0'
|
|
</select>
|
|
|
|
<select id="existSQD" resultType="com.transitPlatForm.common.core.domain.entity.reg.RegTransitSampleDetail">
|
|
select * from reg_TransitSample_detail where applyid = #{applyId} and applyDetailId = #{applyDetailId}
|
|
</select>
|
|
|
|
</mapper> |