This commit is contained in:
zc
2026-03-20 16:25:09 +08:00
parent 2d3d4e3f56
commit 1937049b0e
19 changed files with 256 additions and 160 deletions

View File

@@ -6,22 +6,21 @@
<update id="updateByName">
<foreach collection="list" item="item" separator=";">
UPDATE sys_material_info
SET
<if test="item.encoding != null and item.encoding != ''" >
encoding = #{item.encoding},
</if>
<if test="item.unitWeight != null">
unit_weight = #{item.unitWeight},
</if>
<if test="item.materialSpec != null and item.materialSpec != ''">
material_spec = #{item.materialSpec},
</if>
<if test="item.updateTime != null">
update_time = NOW(),
</if>
<if test="item.updateUser != null and item.updateUser != ''">
update_user = #{item.updateUser}
</if>
<set>
<if test="item.encoding != null and item.encoding != ''" >
encoding = #{item.encoding},
</if>
<if test="item.unitWeight != null">
unit_weight = #{item.unitWeight},
</if>
<if test="item.materialSpec != null and item.materialSpec != ''">
material_spec = #{item.materialSpec},
</if>
<if test="item.updateUser != null">
update_user = #{item.updateUser},
</if>
update_time = NOW()
</set>
WHERE material_name = #{item.materialName}
</foreach>
</update>
@@ -29,22 +28,21 @@
<update id="updateByCode">
<foreach collection="list" item="item" separator=";">
UPDATE sys_material_info
SET
<if test="item.materialName != null and item.materialName != ''">
material_name = #{item.materialName},
</if>
<if test="item.unitWeight != null">
unit_weight = #{item.unitWeight},
</if>
<if test="item.materialSpec != null and item.materialSpec != ''">
material_spec = #{item.materialSpec},
</if>
<if test="item.updateTime != null">
update_time = NOW(),
</if>
<if test="item.updateUser != null and item.updateUser != ''">
update_user = #{item.updateUser}
</if>
<set>
<if test="item.materialName != null and item.materialName != ''">
material_name = #{item.materialName},
</if>
<if test="item.unitWeight != null">
unit_weight = #{item.unitWeight},
</if>
<if test="item.materialSpec != null and item.materialSpec != ''">
material_spec = #{item.materialSpec},
</if>
<if test="item.updateUser != null ">
update_user = #{item.updateUser},
</if>
update_time = NOW()
</set>
WHERE encoding = #{item.encoding}
</foreach>
</update>
@@ -60,5 +58,16 @@
left join sys_material_process mp on mi.material_process_id = mp.id
${ew.customSqlSegment}
</select>
<select id="selectMaterialInfoExport" resultType="top.wms.admin.material.model.resp.MaterialInfoResp">
SELECT
mi.*,
mt.type_name typeName,
mp.process_name processName
FROM
sys_material_info mi
left join sys_material_type mt on mi.material_type_id = mt.id
left join sys_material_process mp on mi.material_process_id = mp.id
${ew.customSqlSegment}
</select>
</mapper>