2026-03-10 18:04:19 +08:00
<?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" >
2026-03-17 15:40:02 +08:00
<![CDATA[select *,CONVERT(VARCHAR(20), OrderTime, 23) as OrderDate from reg_apply where OrderTime >= #{begdate} and OrderTime <= #{enddate} ]]>
2026-03-10 18:04:19 +08:00
<if test= "patId != null and patId != ''" > and PatId = #{patId}</if>
2026-03-13 15:44:33 +08:00
<if test= "brxm != null and brxm != ''" > and PatName like '%'+#{brxm}+'%'</if>
2026-03-20 12:01:24 +08:00
<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>
2026-03-19 17:38:03 +08:00
<if test= "SrcHospCode != null and SrcHospCode != ''" > and SrcHospCode = #{SrcHospCode}</if>
2026-03-17 15:40:02 +08:00
order by OrderTime desc
2026-03-10 18:04:19 +08:00
</select>
<select id= "queryReqDetail" resultType= "com.transitPlatForm.common.core.domain.entity.reg.RegApplyDetail" >
2026-03-16 17:39:38 +08:00
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
2026-03-13 15:44:33 +08:00
where a.applyid = #{applyid} and a.OrderItemCode = b.itemcode and c.itemclass_code = b.itemclass
2026-03-10 18:04:19 +08:00
</select>
2026-03-12 10:52:16 +08:00
<select id= "getItemInfo" resultType= "map" >
2026-03-18 16:53:08 +08:00
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'
2026-03-12 16:59:25 +08:00
</select>
<select id= "existSQD" resultType= "com.transitPlatForm.common.core.domain.entity.reg.RegTransitSampleDetail" >
select * from reg_TransitSample_detail where applyid = #{applyId} and applyDetailId = #{applyDetailId}
2026-03-10 18:04:19 +08:00
</select>
</mapper>