From 1a7af6fff5185bb257c16b0445140c93263a3331 Mon Sep 17 00:00:00 2001 From: jinlin <jinlin> Date: 星期一, 15 一月 2024 11:18:17 +0800 Subject: [PATCH] 修改 --- modules/mainPart/src/main/resources/mapper/configItemWarehouse/WarehouseConfigItemDao.xml | 48 ++++++++++++++++++++++++++++++------------------ 1 files changed, 30 insertions(+), 18 deletions(-) diff --git a/modules/mainPart/src/main/resources/mapper/configItemWarehouse/WarehouseConfigItemDao.xml b/modules/mainPart/src/main/resources/mapper/configItemWarehouse/WarehouseConfigItemDao.xml index 9f6741e..7dfea64 100644 --- a/modules/mainPart/src/main/resources/mapper/configItemWarehouse/WarehouseConfigItemDao.xml +++ b/modules/mainPart/src/main/resources/mapper/configItemWarehouse/WarehouseConfigItemDao.xml @@ -18,34 +18,46 @@ </select> <select id="itemList" resultType="com.zt.life.modules.configItemWarehouse.model.WarehouseConfigItem"> SET @row_number = 0; - SELECT (@row_number := @row_number + 1) AS no, - p.secret_class, - SUBSTRING(t.name, LOCATE('杞欢', t.name), LENGTH(t.name)) AS itemName, - t.identify AS version, - t.name AS Item_identify + SELECT (@row_number := @row_number + 1) AS no, + p.secret_class, + SUBSTRING(t.name, LOCATE('杞欢', t.name), LENGTH(t.name)) AS itemName, + t.identify AS version, + t.name AS Item_identify, + t.id as src_id FROM item_circulat_order_technical t - JOIN item_circulat_order i ON i.project_id = ${projectId} - JOIN project p ON p.id = ${projectId} + JOIN item_circulat_order i ON i.project_id = ${projectId} + JOIN project p ON p.id = ${projectId} WHERE t.is_delete = 0 - AND i.id = t.circulat_order_id + AND i.id = t.circulat_order_id + <if test="ids!=null and ids!=''"> + AND t.id not in (${ids}) + </if> UNION SELECT (@row_number := @row_number + 1) AS no, - NULL AS secretClass, - '杞欢娴嬭瘯濮旀墭鍗�' AS itemName, - NULL AS version, - s.code AS itemIdentify + NULL AS secretClass, + '杞欢娴嬭瘯濮旀墭鍗�' AS itemName, + NULL AS version, + s.code AS itemIdentify, + s.id as src_id FROM software_test_order s WHERE s.is_delete = 0 - AND s.project_id = ${projectId} + AND s.project_id = ${projectId} + <if test="ids!=null and ids!=''"> + AND s.id not in (${ids}) + </if> UNION SELECT (@row_number := @row_number + 1) AS no, - NULL AS secretClass, - '鐗╁搧娴佽浆鍗�' AS itemName, - NULL AS version, - i.code AS itemIdentify + NULL AS secretClass, + '鐗╁搧娴佽浆鍗�' AS itemName, + NULL AS version, + i.code AS itemIdentify, + i.id as src_id FROM item_circulat_order i WHERE i.is_delete = 0 - AND i.project_id = ${projectId} + AND i.project_id = ${projectId} + <if test="ids!=null and ids!=''"> + AND i.id not in (${ids}) + </if> </select> <select id="selectList" resultType="com.zt.life.modules.configItemWarehouse.model.WarehouseConfigItem"> SET @row_number = 0; -- Gitblit v1.9.1