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.
92 lines
3.3 KiB
XML
92 lines
3.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.info.FacidentcodeDao">
|
|
|
|
|
|
<insert id="insertFacidentcode"
|
|
parameterType="com.glxp.udi.admin.entity.info.FacidentcodeEntity">
|
|
replace INTO udi_facidentcode
|
|
(
|
|
UDI_FacIdentCodeOID,IndentCode,Text1,NoDigit,UDI_Customer_FK,UDI_StandAgency_FK
|
|
)
|
|
values
|
|
(
|
|
#{UDI_FacIdentCodeOID},
|
|
#{IndentCode},
|
|
#{Text1},
|
|
#{NoDigit},
|
|
#{UDI_Customer_FK},
|
|
#{UDI_StandAgency_FK}
|
|
)
|
|
</insert>
|
|
|
|
|
|
<insert id="insertFacidentcodeList" keyProperty="id"
|
|
parameterType="com.glxp.udi.admin.entity.info.FacidentcodeEntity">
|
|
replace INTO udi_facidentcode
|
|
(
|
|
UDI_FacIdentCodeOID,IndentCode,Text1,NoDigit,UDI_Customer_FK,UDI_StandAgency_FK
|
|
)
|
|
VALUES
|
|
<foreach collection="facidentcodeEntities" item="item" index="index"
|
|
separator=",">
|
|
(
|
|
#{item.UDI_FacIdentCodeOID},
|
|
#{item.IndentCode},
|
|
#{item.Text1},
|
|
#{item.NoDigit},
|
|
#{item.UDI_Customer_FK},
|
|
#{item.UDI_StandAgency_FK}
|
|
)
|
|
</foreach>
|
|
</insert>
|
|
|
|
<delete id="deleteFacidentcode" parameterType="com.glxp.udi.admin.req.publish.DeleteUdiDeviceCliRequest">
|
|
delete from udi_facidentcode where UDI_FacIdentCodeOID = #{id}
|
|
</delete>
|
|
|
|
|
|
<update id="modifyFacidentcode" parameterType="com.glxp.udi.admin.entity.info.FacidentcodeEntity">
|
|
UPDATE udi_facidentcode
|
|
<set>
|
|
<if test="IndentCode != null">IndentCode=#{IndentCode},</if>
|
|
<if test="Text1 != null">Text1=#{Text1},</if>
|
|
<if test="NoDigit != null">NoDigit=#{NoDigit},</if>
|
|
<if test="UDI_Customer_FK != null">UDI_Customer_FK=#{UDI_Customer_FK},</if>
|
|
<if test="UDI_StandAgency_FK != null">UDI_StandAgency_FK=#{UDI_StandAgency_FK},</if>
|
|
<if test="isGenerate != null">isGenerate=#{isGenerate},</if>
|
|
</set>
|
|
WHERE UDI_FacIdentCodeOID=#{UDI_FacIdentCodeOID}
|
|
</update>
|
|
|
|
<select id="selectByCustomerId" parameterType="com.glxp.udi.admin.req.info.FilterFacidentcodeRequest"
|
|
resultType="com.glxp.udi.admin.res.basic.FacidentcodeResponse">
|
|
select
|
|
udi_facidentcode.UDI_FacIdentCodeOID,udi_standagency.issuingAgency,udi_facidentcode.IndentCode,udi_facidentcode.isGenerate,
|
|
udi_standagency.AgencyName,udi_facidentcode.NoDigit,udi_facidentcode.Text1
|
|
from udi_facidentcode INNER JOIN udi_standagency
|
|
on udi_standagency.UDI_StandAgencyOID = udi_facidentcode.UDI_StandAgency_FK
|
|
|
|
<where>
|
|
<if test="agency != null and agency != ''">
|
|
and udi_standagency.AgencyName like concat('%',#{agency},'%')
|
|
</if>
|
|
|
|
<if test="customerId != null and customerId != ''">
|
|
and udi_facidentcode.UDI_Customer_FK = #{customerId}
|
|
</if>
|
|
|
|
</where>
|
|
</select>
|
|
<select id="selectAll" parameterType="java.lang.String"
|
|
resultType="java.lang.String">
|
|
select
|
|
IndentCode
|
|
from udi_facidentcode where UDI_Customer_FK = #{customerId}
|
|
|
|
|
|
</select>
|
|
|
|
</mapper>
|