手持机部分

This commit is contained in:
张怡蓉
2025-06-12 08:39:53 +08:00
parent 9236aa7fa6
commit 51eeb3ee28
16 changed files with 655 additions and 11 deletions

View File

@@ -41,4 +41,25 @@
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
)}
</select>
<select id="bindTrayMsg" parameterType="java.util.Map" statementType="CALLABLE">
{call proc_bind_tray_msg(
#{v_tray_code,mode=IN,jdbcType=VARCHAR},
#{v_stockin_detail_id,mode=IN,jdbcType=VARCHAR},
#{v_quantity,mode=IN,jdbcType=INTEGER},
#{v_result,mode=OUT,jdbcType=INTEGER},
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
)}
</select>
<select id="addInJob" parameterType="java.util.Map" statementType="CALLABLE">
{call proc_add_in_job(
#{v_tray_code,mode=IN,jdbcType=VARCHAR},
#{v_warehouse_id,mode=IN,jdbcType=VARCHAR},
#{v_cargo_space_id,mode=IN,jdbcType=VARCHAR},
#{v_entrance_id,mode=IN,jdbcType=VARCHAR},
#{v_result,mode=OUT,jdbcType=INTEGER},
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
)}
</select>
</mapper>

View File

@@ -0,0 +1,71 @@
<?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.ruoyi.pda.trayMsg.mapper.TrayMsgMapper">
<resultMap type="TrayMsg" id="TrayMsgResult">
<result property="id" column="id" />
<result property="trayCode" column="tray_code" />
<result property="stockinDetailId" column="stockin_detail_id" />
<result property="quantity" column="quantity" />
<result property="productName" column="product_name" />
</resultMap>
<sql id="selectTrayMsgVo">
select id, tray_code, stockin_detail_id, quantity from tray_msg
</sql>
<select id="selectTrayMsgList" parameterType="TrayMsg" resultMap="TrayMsgResult">
select t.id, t.tray_code, t.stockin_detail_id, t.quantity,p.product_name from tray_msg t
left join in_stockin_detail d on t.stockin_detail_id = d.stockin_detail_id
left join bas_product p on d.product_id=p.product_id
<where>
<if test="trayCode != null and trayCode != ''"> and t.tray_code = #{trayCode}</if>
<if test="stockinDetailId != null and stockinDetailId != ''"> and t.stockin_detail_id = #{stockinDetailId}</if>
<if test="quantity != null and quantity != ''"> and t.quantity = #{quantity}</if>
</where>
</select>
<select id="selectTrayMsgById" parameterType="String" resultMap="TrayMsgResult">
<include refid="selectTrayMsgVo"/>
where id = #{id}
</select>
<insert id="insertTrayMsg" parameterType="TrayMsg">
insert into tray_msg
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="trayCode != null">tray_code,</if>
<if test="stockinDetailId != null">stockin_detail_id,</if>
<if test="quantity != null">quantity,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="trayCode != null">#{trayCode},</if>
<if test="stockinDetailId != null">#{stockinDetailId},</if>
<if test="quantity != null">#{quantity},</if>
</trim>
</insert>
<update id="updateTrayMsg" parameterType="TrayMsg">
update tray_msg
<trim prefix="SET" suffixOverrides=",">
<if test="trayCode != null">tray_code = #{trayCode},</if>
<if test="stockinDetailId != null">stockin_detail_id = #{stockinDetailId},</if>
<if test="quantity != null">quantity = #{quantity},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTrayMsgById" parameterType="String">
delete from tray_msg where id = #{id}
</delete>
<delete id="deleteTrayMsgByIds" parameterType="String">
delete from tray_msg where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>