From 804c80b0fd284c7464066efbd5e5833ddacfb635 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期五, 11 四月 2025 13:11:16 +0800
Subject: [PATCH] 原辅材下单优化
---
basic-server/src/main/resources/mapper/StandardProductListMapper.xml | 35 +++++++++++++++++++++++++++++++----
1 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/basic-server/src/main/resources/mapper/StandardProductListMapper.xml b/basic-server/src/main/resources/mapper/StandardProductListMapper.xml
index 6584dfb..c375e2d 100644
--- a/basic-server/src/main/resources/mapper/StandardProductListMapper.xml
+++ b/basic-server/src/main/resources/mapper/StandardProductListMapper.xml
@@ -30,11 +30,11 @@
<!-- 鎵归噺娣诲姞妫�娴嬫爣鍑� -->
<insert id="saveBatchProductLists">
- INSERT INTO standard_product_list (id, inspection_item, inspection_item_en, inspection_item_subclass, inspection_item_subclass_en, factory, laboratory, sample_type, sample, model, son_laboratory, unit, price, man_hour, man_hour_group, inspection_item_type, inspection_value_type, checkout_number, section, cores, method, method_s, man_day, bsm, ask, tell, standard_method_list_id, template_id, state, dic, tree, structure_item_parameter_id, inspection_item_class, inspection_item_class_en, radius, radius_list, rates, sort, conductor_material, conductor_type)
+ INSERT INTO standard_product_list (id, inspection_item, inspection_item_en, inspection_item_subclass, inspection_item_subclass_en, factory, laboratory, sample_type, sample, model, son_laboratory, unit, price, man_hour, man_hour_group, inspection_item_type, inspection_value_type, checkout_number, section, cores, method, method_s, man_day, bsm, ask, tell, standard_method_list_id, template_id, state, dic, tree, structure_item_parameter_id, inspection_item_class, inspection_item_class_en, radius, radius_list, rates, sort, conductor_material, conductor_type, check_status)
VALUES
<foreach item="item" collection="productLists" open="(" separator="),(" close=")">
#{item.id}, #{item.inspectionItem}, #{item.inspectionItemEn}, #{item.inspectionItemSubclass}, #{item.inspectionItemSubclassEn}, #{item.factory}, #{item.sonLaboratory}, #{item.sampleType}, #{item.sample}, #{item.model}, #{item.sonLaboratory}, #{item.unit}, #{item.price}, #{item.manHour}, #{item.manHourGroup}, #{item.inspectionItemType}, #{item.inspectionValueType}, #{item.checkoutNumber}, #{item.section}, #{item.cores}, #{item.method}, #{item.methodS}, #{item.manDay}, #{item.bsm}, #{item.ask}, #{item.tell}, #{item.standardMethodListId}, #{item.templateId}, #{item.state}, #{item.dic}, #{item.tree}, #{item.structureItemParameterId},
- #{item.inspectionItemClass}, #{item.inspectionItemClassEn}, #{item.radius}, #{item.radiusList}, #{item.rates}, #{item.sort}, #{item.conductorMaterial}, #{item.conductorType}
+ #{item.inspectionItemClass}, #{item.inspectionItemClassEn}, #{item.radius}, #{item.radiusList}, #{item.rates}, #{item.sort}, #{item.conductorMaterial}, #{item.conductorType}, #{item.checkStatus}
</foreach>
</insert>
@@ -51,7 +51,8 @@
ask=#{productList.ask},
tell=#{productList.tell},
update_user=#{productList.updateUser},
- update_time=#{productList.updateTime}
+ update_time=#{productList.updateTime},
+ check_status=#{productList.checkStatus}
WHERE id = #{productList.id}
</update>
<update id="updateSortUp">
@@ -158,8 +159,34 @@
<update id="updateProductListCheckStatus">
UPDATE standard_product_list SET check_status = #{checkStatus}
WHERE ID IN
- <foreach collection="ids" open="(" close=")" item="item">
+ <foreach collection="ids" open="(" close=")" item="item" separator=",">
#{item}
</foreach>
</update>
+
+ <select id="standardProductListNoPage" resultType="com.ruoyi.basic.pojo.StandardProductList">
+ SELECT
+ spl.*,
+ sm.code as methodS
+ FROM
+ standard_product_list spl
+ LEFT JOIN
+ standard_method sm ON sm.id = spl.standard_method_list_id
+ <where>
+ <if test="standardProductListDto.standardMethodListIds != null and standardProductListDto.standardMethodListIds.size() > 0">
+ spl.standard_method_list_id IN
+ <foreach collection="standardProductListDto.standardMethodListIds" open="(" close=")" separator="," item="item">
+ #{item}
+ </foreach>
+ </if>
+ <if test="standardProductListDto.tree != null and standardProductListDto.tree != ''">
+ AND spl.tree = #{standardProductListDto.tree}
+ </if>
+ <if test="standardProductListDto.state != null">
+ AND spl.state = #{standardProductListDto.state}
+ </if>
+ </where>
+ ORDER BY
+ spl.standard_method_list_id ASC
+ </select>
</mapper>
--
Gitblit v1.9.3