53 lines
1.9 KiB
XML
53 lines
1.9 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.czlis.interfaceCommon.mapper.LabInstrvsreqclassMapper">
|
|
<select id="getLabInstrvsreqclassList" resultType="com.czlis.common.core.domain.entity.lis.LabInstrvsreqclass">
|
|
select * from lab_instrvsreqclass
|
|
<where>
|
|
<if test="yq != null and yq != ''"> and yq = #{yq}</if>
|
|
<if test="bgddh != null and bgddh !=''"> and bgddh = #{bgddh}</if>
|
|
<if test="seq != null"> and seq = #{seq}</if>
|
|
<if test="brly != null and brly != ''"> and brly = #{brly}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<insert id="add">
|
|
insert into lab_instrvsreqclass(
|
|
yq,bgddh,seq,brly,bk
|
|
)values(
|
|
#{yq},#{bgddh},#{seq},#{brly},#{bk}
|
|
)
|
|
</insert>
|
|
|
|
<update id="update">
|
|
update lab_instrvsreqclass
|
|
<set>
|
|
<if test="seq != null">seq = #{seq},</if>
|
|
<if test="brly != null and brly != ''">brly = #{brly},</if>
|
|
<if test="bk != null and bk != ''">bk = #{bk},</if>
|
|
yq = #{yq},bgddh = #{bgddh}
|
|
</set>
|
|
where yq = #{yq} and bgddh = #{bgddh}
|
|
</update>
|
|
|
|
<delete id="delete">
|
|
delete from lab_instrvsreqclass where yq = #{yq} and bgddh = #{bgddh}
|
|
</delete>
|
|
|
|
<select id="queryReqClass" resultType="com.czlis.common.core.domain.entity.lis.view.VwReqitemclass">
|
|
SELECT vw_reqitemclass.classno,
|
|
vw_reqitemclass.classname,
|
|
vw_reqitemclass.bkcolor,
|
|
vw_reqitemclass.yblx
|
|
FROM vw_reqitemclass
|
|
WHERE not exists
|
|
( select * from lab_instrvsreqclass
|
|
where lab_instrvsreqclass.yq = #{yq}
|
|
and vw_reqitemclass.classno = lab_instrvsreqclass.bgddh)
|
|
</select>
|
|
|
|
|
|
|
|
</mapper>
|