lis8.0/liswork/src/main/resources/mapper/LisWorkGermMapper.xml

46 lines
2.4 KiB
XML
Raw Normal View History

2025-10-29 17:59:05 +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.czlis.liswork.mapper.LisWorkGermMapper">
2025-11-05 16:53:46 +08:00
<select id="getLabResultMedInfo" resultType="com.czlis.common.core.domain.entity.lis.LabResultMed">
select * from lab_resultmed where jyrq = #{jyrq} and yq = #{yq}
<if test="ybh != null and ybh !=''">and ybh = #{ybh}</if>
<if test="xmdh != null and xmdh !=''">and xmdh = #{xmdh}</if>
<if test="xh != null">and xh = #{xh}</if>
<if test="ywdh != null and ywdh != ''">and ywdh = #{ywdh}</if>
</select>
2025-10-29 17:59:05 +08:00
<select id="getmedium" resultType="com.czlis.liswork.pojo.DTO.MediumDTO">
SELECT lab_germsheet_new.jyrq,
lab_germsheet_new.yq,
lab_germsheet_new.ybh,
lab_germsheet_new.mediumno,
lab_germsheet_new.sheetdate,
lab_germsheet_new.sheetuser,
lab_germsheet_new.medium,
bact_medium.mediumname,
bact_medium.watchinterval,
bact_medium.conidtions,
bact_medium.culturehour,
bact_medium.comments
FROM lab_germsheet_new
left join bact_medium on
bact_medium.mediumno=lab_germsheet_new.mediumno
WHERE ( lab_germsheet_new.jyrq = #{jyrq} ) AND
( lab_germsheet_new.yq = #{yq}) AND
( lab_germsheet_new.ybh = #{ybh} )
</select>
<select id="getmediumno" resultType="String">
select max(mediumno) from bact_specimen_medium a join lab_reqdetail b on a.req_itemid=b.sqxmdh where specimencode=#{yblx} and b.sqh=#{sqh};
</select>
<select id="getmediumnox" resultType="String">
select max(mediumno) from bact_specimen_medium where specimencode=#{yblx} and req_itemid='-1';
</select>
<select id="getBactMediumgroupdet" resultType="com.czlis.common.core.domain.entity.lis.BactMediumgroupdet">
SELECT * FROM bact_mediumgroupdet WHERE mediumgroupno = #{mediumno}
</select>
<insert id="insertmedium" parameterType="com.czlis.common.core.domain.entity.lis.LabGermsheetNew">
insert into lab_germsheet_new (jyrq, yq, ybh,mediumno,sheetdate,sheetuser,medium)
values (#{jyrq},#{yq},#{ybh},#{mediumno},#{sheetdate},#{sheetuser},#{medium})
</insert>
</mapper>