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.
udi-wms-java/src/main/resources/mybatis/mapper/inout/ReceiveDetailDao.xml

71 lines
2.5 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.dao.inout.ReceiveDetailDao">
<select id="filterList" resultType="com.glxp.api.res.inout.ReceiveDetailResponse">
select pur_receive_detail.*,
bp.cpmctymc,
bp.ggxh,
bp.zczbhhzbapzbh,
bp.ylqxzcrbarmc,
bp.manufactory,
bp.measname,
basic_corp.`name` supName
from pur_receive_detail
inner join basic_udirel on basic_udirel.id = pur_receive_detail.relIdFk
inner join basic_products bp on basic_udirel.uuid = bp.uuid
INNER JOIN basic_corp ON pur_receive_detail.supId = basic_corp.erpId
<where>
<if test="orderIdFk != null and orderIdFk != ''">
AND orderIdFk = #{orderIdFk}
</if>
</where>
GROUP BY basic_udirel.uuid
</select>
<update id="updateReceiveDetail" parameterType="com.glxp.api.req.inout.UpdateReceiveDetailRequest">
UPDATE pur_receive_detail
<trim prefix="set" suffixOverrides=",">
<if test="orderIdFk != null">
orderIdFk=#{orderIdFk},
</if>
<if test="relIdFk != null">
relIdFk=#{relIdFk},
</if>
<if test="nameCode != null">
nameCode=#{nameCode},
</if>
<if test="count != null">
count=#{count},
</if>
<if test="supId != null">
supId=#{supId},
</if>
<if test="productDate != null">
productDate=#{productDate},
</if>
<if test="batchNo != null">
batchNo=#{batchNo},
</if>
<if test="expireDate != null">
expireDate=#{expireDate},
</if>
</trim>
WHERE id = #{id}
</update>
<select id="selectIoOrderDetailBiz" parameterType="long"
resultType="com.glxp.api.entity.basic.BasicProductsEntity">
SELECT b2.*
FROM pur_receive_detail p1
LEFT JOIN basic_udirel b1 on b1.id = p1.productId
LEFT JOIN basic_products b2 on b1.uuid = b2.uuid
<where>
<if test="id != null and id != ''">
AND p1.id = #{id}
</if>
</where>
GROUP BY uuid
</select>
</mapper>