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.
udiwms-java/api-admin/target/classes/mybatis/mapper/inventory/InvStockPrintDao.xml

142 lines
5.4 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.api.admin.dao.inventory.InvStockPrintDao">
<select id="filterStockPrint" parameterType="com.glxp.api.admin.req.basic.FilterStockprintRequest"
resultType="com.glxp.api.admin.entity.basic.StockPrintEntity">
SELECT * FROM stockprint
<where>
<if test="nameCode != '' and nameCode != null">
AND nameCode = #{nameCode}
</if>
<if test="udiCode != '' and udiCode != null">
AND udiCode = #{udiCode}
</if>
<if test="printStatus != '' and printStatus != null">
AND printStatus = #{printStatus}
</if>
<if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc like concat('%',#{cpmctymc},'%')
</if>
<if test="thirdName != '' and thirdName != null">
AND thirdName like concat('%',#{thirdName},'%')
</if>
<if test="thirdId != '' and thirdId != null">
AND thirdId = #{thirdId}
</if>
</where>
</select>
<select id="findByNameCode" parameterType="java.lang.String"
resultType="com.glxp.api.admin.entity.basic.StockPrintEntity">
SELECT * FROM stockprint WHERE (
nameCode = #{nameCode} ) limit 1
</select>
<select id="findByRlId" parameterType="com.glxp.api.admin.req.basic.FilterStockprintRequest"
resultType="com.glxp.api.admin.entity.basic.StockPrintEntity">
SELECT * FROM stockprint WHERE
udiRlIdFk = #{udiRlIdFk} and batchNo = #{batchNo} and warehouseCode=#{warehouseCode} limit 1
</select>
<insert id="insertStockPrint" keyProperty="id" parameterType="com.glxp.api.admin.entity.basic.StockPrintEntity">
replace INTO stockprint
(
udiCode,udiRlIdFk,nameCode,cpmctymc,batchNo,
produceDate,expireDate,serialNo,codeType,thirdId,thirdName,
ggxh,ylqxzcrbarmc,zczbhhzbapzbh,warehouseName,warehouseCode
)
values
(
#{udiCode},
#{udiRlIdFk},
#{nameCode},
#{cpmctymc},
#{batchNo},
#{produceDate},
#{expireDate},
#{serialNo},
#{codeType},
#{thirdId},
#{thirdName},
#{ggxh},
#{ylqxzcrbarmc},
#{zczbhhzbapzbh},
#{warehouseName},
#{warehouseCode}
)
</insert>
<insert id="insertStockPrints" keyProperty="id" parameterType="java.util.List">
replace INTO stockprint
(
udiCode,udiRlIdFk,nameCode,cpmctymc,batchNo,
produceDate,expireDate,serialNo,codeType,thirdId,thirdName,
ggxh,ylqxzcrbarmc,zczbhhzbapzbh,warehouseName,warehouseCode
)
values
<foreach collection="stockPrintEntities" item="item" index="index"
separator=",">
(
#{item.udiCode},
#{item.udiRlIdFk},
#{item.nameCode},
#{item.cpmctymc},
#{item.batchNo},
#{item.produceDate},
#{item.expireDate},
#{item.serialNo},
#{item.codeType},
#{item.thirdId},
#{item.thirdName},
#{item.ggxh},
#{item.ylqxzcrbarmc},
#{item.zczbhhzbapzbh},
#{item.warehouseName},
#{item.warehouseCode}
)
</foreach>
</insert>
<delete id="deleteById" parameterType="Map">
DELETE FROM stockprint WHERE id = #{id}
</delete>
<update id="updateStockPrint" parameterType="com.glxp.api.admin.entity.basic.StockPrintEntity">
UPDATE stockprint
<set>
<if test="udiCode != null">udiCode=#{udiCode},</if>
<if test="udiRlIdFk != null">udiRlIdFk=#{udiRlIdFk},</if>
<if test="nameCode != null">nameCode=#{nameCode},</if>
<if test="cpmctymc != null">cpmctymc=#{cpmctymc},</if>
<if test="batchNo != null">batchNo=#{batchNo},</if>
<if test="produceDate != null">produceDate=#{produceDate},</if>
<if test="expireDate != null">expireDate=#{expireDate},</if>
<if test="serialNo != null">serialNo=#{serialNo},</if>
<if test="codeType != null">codeType=#{codeType},</if>
<if test="thirdId != null">thirdId=#{thirdId},</if>
<if test="thirdName != null">thirdName=#{thirdName},</if>
<if test="printStatus != null">printStatus=#{printStatus},</if>
<if test="ggxh != null">ggxh=#{ggxh},</if>
<if test="ylqxzcrbarmc != null">ylqxzcrbarmc=#{ylqxzcrbarmc},</if>
<if test="zczbhhzbapzbh != null">zczbhhzbapzbh=#{zczbhhzbapzbh},</if>
<if test="warehouseName != null">warehouseName=#{warehouseName},</if>
<if test="warehouseCode != null">warehouseCode=#{warehouseCode},</if>
</set>
WHERE id = #{id}
</update>
<update id="updatePrintStatus" parameterType="java.util.List">
update stockprint
set printStatus = 1
WHERE id in
<foreach collection="ids" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</update>
</mapper>