You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
123 lines
4.3 KiB
XML
123 lines
4.3 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.glxp.udi.admin.dao.receipt.ProductInfoDao">
|
|
|
|
<select id="filterList" parameterType="com.glxp.udi.admin.req.receipt.ProductInfoFilterRequest"
|
|
resultType="com.glxp.udi.admin.entity.receipt.ProductInfoEntity">
|
|
SELECT * FROM productinfo where
|
|
addType =#{addType}
|
|
<if test="unit != ''">
|
|
AND unit LIKE concat(#{unit},'%')
|
|
</if>
|
|
<if test="coName != ''">
|
|
AND coName LIKE concat(#{coName},'%')
|
|
</if>
|
|
<if test="nameCode != ''">
|
|
AND nameCode LIKE concat(#{nameCode},'%')
|
|
</if>
|
|
order by id desc
|
|
|
|
</select>
|
|
|
|
<select id="filterDrugList" parameterType="com.glxp.udi.admin.req.receipt.ProductInfoFilterRequest"
|
|
resultType="com.glxp.udi.admin.res.inout.ProductInfoResponse">
|
|
|
|
select
|
|
id,type,unit,coName,form,formSpec,packSpec,authCode,name,
|
|
productinfo.nameCode,productinfo.packRatio,productinfo.packLevel,
|
|
bhxjsl,bhzxxsbzsl,zxxsbzbhsydysl,bhxjcpbm,bzcj,thirdProductNo,addType
|
|
from productinfo INNER join druginfo on druginfo.nameCode = productinfo.nameCode
|
|
WHERE
|
|
addType =#{addType}
|
|
<if test="unit != '' and unit != null">
|
|
AND druginfo.unit LIKE concat(#{unit},'%')
|
|
</if>
|
|
<if test="coName != '' and coName != null">
|
|
AND druginfo.coName LIKE concat(#{coName},'%')
|
|
</if>
|
|
<if test="nameCode != '' and nameCode != null">
|
|
AND productinfo.nameCode LIKE concat(#{nameCode},'%')
|
|
</if>
|
|
<if test="customerId != '' and customerId != null">
|
|
AND productinfo.customerId = #{customerId}
|
|
</if>
|
|
|
|
|
|
order by id desc
|
|
|
|
</select>
|
|
|
|
<select id="filterUdiList" parameterType="com.glxp.udi.admin.req.receipt.ProductInfoFilterRequest"
|
|
resultType="com.glxp.udi.admin.res.inout.ProductInfoResponse">
|
|
|
|
select
|
|
id,device.qxlb,device.ylqxzcrbarmc,device.cpmctymc,
|
|
device.ybbm,device.cphhhbh,device.ggxh,device.tyshxydm,
|
|
device.spmc,productinfo.nameCode,productinfo.packRatio,
|
|
productinfo.packLevel,bhxjsl,bhzxxsbzsl,zxxsbzbhsydysl,bhxjcpbm,bzcj,addType
|
|
from productinfo INNER join device on device.deviceRecordKey = productinfo.deviceRecordKey
|
|
WHERE
|
|
addType =#{addType}
|
|
<if test="unit != ''">
|
|
AND device.ylqxzcrbarmc LIKE concat(#{unit},'%')
|
|
</if>
|
|
<if test="coName != ''">
|
|
AND device.cpmctymc LIKE concat(#{coName},'%')
|
|
</if>
|
|
<if test="nameCode != ''">
|
|
AND productinfo.nameCode LIKE concat(#{nameCode},'%')
|
|
</if>
|
|
order by id desc
|
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertProductInfo" keyProperty="id"
|
|
parameterType="com.glxp.udi.admin.entity.receipt.ProductInfoEntity">
|
|
replace INTO productinfo
|
|
(
|
|
nameCode,packRatio,packLevel,bhxjsl,
|
|
bhzxxsbzsl,zxxsbzbhsydysl,bhxjcpbm,bzcj,thirdProductNo,addType,deviceRecordKey,customerId)
|
|
values
|
|
(
|
|
#{nameCode},
|
|
#{packRatio},
|
|
#{packLevel},
|
|
#{bhxjsl},
|
|
#{bhzxxsbzsl},
|
|
#{zxxsbzbhsydysl},
|
|
#{bhxjcpbm},
|
|
#{bzcj},
|
|
#{thirdProductNo},
|
|
#{addType},#{deviceRecordKey},#{customerId}
|
|
)
|
|
</insert>
|
|
|
|
<delete id="deleteById" parameterType="Map">
|
|
DELETE FROM productinfo WHERE id = #{id}
|
|
</delete>
|
|
|
|
<update id="updateProductInfo" parameterType="com.glxp.udi.admin.entity.receipt.ProductInfoEntity">
|
|
UPDATE productinfo SET
|
|
nameCode = #{nameCode},
|
|
packRatio = #{packRatio},
|
|
packLevel = #{packLevel},
|
|
bhxjsl = #{bhxjsl},
|
|
bhzxxsbzsl = #{bhzxxsbzsl},
|
|
zxxsbzbhsydysl = #{zxxsbzbhsydysl},
|
|
bhxjcpbm = #{bhxjcpbm},
|
|
bzcj = #{bzcj},
|
|
thirdProductNo = #{thirdProductNo},
|
|
addType = #{addType},
|
|
deviceRecordKey = #{deviceRecordKey},
|
|
customerId = #{customerId}
|
|
|
|
WHERE id = #{id}
|
|
</update>
|
|
|
|
<select id="selectById" parameterType="Map" resultType="com.glxp.udi.admin.entity.receipt.ProductInfoEntity">
|
|
select * FROM productinfo WHERE id = #{id}
|
|
</select>
|
|
</mapper>
|