食品采购出入库

This commit is contained in:
2026-07-15 15:17:50 +08:00
parent 157d2d20c4
commit a8e1379fd1
90 changed files with 1601 additions and 4282 deletions

View File

@@ -0,0 +1,38 @@
<?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.zf.foodpurchase.fdsafe.mapper.FoodRepoMapper">
<insert id="insert" parameterType="FoodRepo" useGeneratedKeys="true" keyProperty="id">
insert into food_repo(
<if test="foodProductId != null">food_product_id,</if>
<if test="repoId != null">repo_id,</if>
<if test="orderNo != null and orderNo != ''">order_no,</if>
<if test="orderItemNo != null and orderItemNo != ''">order_item_no,</if>
<if test="foodProductNum != null">food_product_num</if>
)values(
<if test="foodProductId != null">#{foodProductId},</if>
<if test="repoId != null">#{repoId},</if>
<if test="orderNo != null and orderNo != ''">#{orderNo},</if>
<if test="orderItemNo != null and orderItemNo != ''">#{orderItemNo},</if>
<if test="foodProductNum != null">#{foodProductNum}</if>)
</insert>
<update id="update">
update food_repo
<set>
<if test="foodProductId != null">food_product_id=#{foodProductId},</if>
<if test="repoId != null">repo_id=#{repoId},</if>
<if test="orderNo != null and orderNo != ''">order_no=#{orderNo},</if>
<if test="orderItemNo != null and orderItemNo != ''">order_item_no=#{orderItemNo},</if>
<if test="foodProductNum != null">food_product_num=#{foodProductNum}</if>
</set>
where id=#{id}
</update>
<select id="selectByProductIdAndRepoId" resultType="FoodRepo">
select id, food_product_id foodProductId, repo_id repoId, order_no orderNo, order_item_no orderItemNo, food_product_num foodProductNum
from food_repo where food_product_id=#{productId} and repo_id=#{repoId}
</select>
</mapper>