新增配送物料字段

优化u其他逻辑
This commit is contained in:
2025-10-29 10:15:30 +08:00
parent 69d07fcdf4
commit db8e6c514c
21 changed files with 1069 additions and 206 deletions

View File

@@ -0,0 +1,115 @@
<?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.zg.project.information.mapper.DeliveryMtdMapper">
<resultMap type="DeliveryMtd" id="DeliveryMtdResult">
<result property="Id" column="Id" />
<result property="wlNo" column="wl_no" />
<result property="wlMs" column="wl_ms" />
<result property="dw" column="dw" />
<result property="weightKg" column="weight_kg" />
<result property="volumeM3" column="volume_m3" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="isDelete" column="is_delete" />
</resultMap>
<sql id="selectDeliveryMtdVo">
select Id, wl_no, wl_ms, dw, weight_kg, volume_m3, create_by, create_time, update_by, update_time, is_delete from delivery_mtd
</sql>
<select id="selectDeliveryMtdList" parameterType="DeliveryMtd" resultMap="DeliveryMtdResult">
<include refid="selectDeliveryMtdVo"/>
<where>
<if test="wlNo != null and wlNo != ''"> and wl_no = #{wlNo}</if>
<if test="wlMs != null and wlMs != ''"> and wl_ms = #{wlMs}</if>
<if test="dw != null and dw != ''"> and dw = #{dw}</if>
<if test="weightKg != null "> and weight_kg = #{weightKg}</if>
<if test="volumeM3 != null "> and volume_m3 = #{volumeM3}</if>
<if test="isDelete != null and isDelete != ''"> and is_delete = #{isDelete}</if>
</where>
</select>
<select id="selectDeliveryMtdById" parameterType="Long" resultMap="DeliveryMtdResult">
<include refid="selectDeliveryMtdVo"/>
where Id = #{Id}
</select>
<insert id="insertDeliveryMtd" parameterType="DeliveryMtd" useGeneratedKeys="true" keyProperty="Id">
insert into delivery_mtd
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="wlNo != null">wl_no,</if>
<if test="wlMs != null">wl_ms,</if>
<if test="dw != null">dw,</if>
<if test="weightKg != null">weight_kg,</if>
<if test="volumeM3 != null">volume_m3,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="isDelete != null">is_delete,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="wlNo != null">#{wlNo},</if>
<if test="wlMs != null">#{wlMs},</if>
<if test="dw != null">#{dw},</if>
<if test="weightKg != null">#{weightKg},</if>
<if test="volumeM3 != null">#{volumeM3},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="isDelete != null">#{isDelete},</if>
</trim>
</insert>
<update id="updateDeliveryMtd" parameterType="DeliveryMtd">
update delivery_mtd
<trim prefix="SET" suffixOverrides=",">
<if test="wlNo != null">wl_no = #{wlNo},</if>
<if test="wlMs != null">wl_ms = #{wlMs},</if>
<if test="dw != null">dw = #{dw},</if>
<if test="weightKg != null">weight_kg = #{weightKg},</if>
<if test="volumeM3 != null">volume_m3 = #{volumeM3},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="isDelete != null">is_delete = #{isDelete},</if>
</trim>
where Id = #{Id}
</update>
<insert id="batchUpsertDeliveryMtd" parameterType="java.util.List">
INSERT INTO delivery_mtd
(wl_no, wl_ms, dw, weight_kg, volume_m3, create_by, create_time, update_by, update_time, is_delete)
VALUES
<foreach collection="list" item="item" separator=",">
(#{item.wlNo}, #{item.wlMs}, #{item.dw}, #{item.weightKg}, #{item.volumeM3},
#{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.isDelete})
</foreach>
ON DUPLICATE KEY UPDATE
wl_ms = VALUES(wl_ms),
dw = VALUES(dw),
weight_kg = VALUES(weight_kg),
volume_m3 = VALUES(volume_m3),
update_by = VALUES(update_by),
update_time = VALUES(update_time),
is_delete = VALUES(is_delete)
</insert>
<delete id="deleteDeliveryMtdById" parameterType="Long">
delete from delivery_mtd where Id = #{Id}
</delete>
<delete id="deleteDeliveryMtdByIds" parameterType="String">
delete from delivery_mtd where Id in
<foreach item="Id" collection="array" open="(" separator="," close=")">
#{Id}
</foreach>
</delete>
</mapper>

View File

@@ -45,6 +45,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE mid = #{materialCode}
</select>
<select id="selectMtdByMid" resultMap="MtdResult">
SELECT * FROM mtd WHERE mid = #{mid} LIMIT 1
</select>
<insert id="insertMtd" parameterType="Mtd" useGeneratedKeys="true" keyProperty="Id">
insert into mtd
<trim prefix="(" suffix=")" suffixOverrides=",">