From 1772fc5e211f9e9e0ab4cdc6c29b436aac178c2a Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期五, 23 二月 2024 12:19:55 +0800
Subject: [PATCH] 修改
---
modules/mainPart/src/main/resources/mapper/configItemWarehouse/WarehouseConfigItemDao.xml | 59 ++++++++++++++++++++++++++++++++++-------------------------
1 files changed, 34 insertions(+), 25 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..f47f0b6 100644
--- a/modules/mainPart/src/main/resources/mapper/configItemWarehouse/WarehouseConfigItemDao.xml
+++ b/modules/mainPart/src/main/resources/mapper/configItemWarehouse/WarehouseConfigItemDao.xml
@@ -2,50 +2,52 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zt.life.modules.configItemWarehouse.dao.WarehouseConfigItemDao">
-
<select id="getList" resultType="com.zt.life.modules.configItemWarehouse.model.WarehouseConfigItem">
- select a.*
- from config_item_warehouse_detail a
+ select *
+ from config_item_warehouse_detail
<where>
- a.is_delete = 0
+ is_delete = 0
<if test="warehouseId!=null">
and warehouse_id = ${warehouseId}
</if>
</where>
- <if test="orderBySql!=null">
- ORDER BY ${orderBySql}
- </if>
+ ORDER BY `no`
</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
UNION
SELECT (@row_number := @row_number + 1) AS no,
- NULL AS secretClass,
- '杞欢娴嬭瘯濮旀墭鍗�' AS itemName,
- NULL AS version,
- s.code AS itemIdentify
+ p.secret_class,
+ '杞欢娴嬭瘯濮旀墭鍗�' AS itemName,
+ NULL AS version,
+ s.code AS itemIdentify,
+ s.id as src_id
FROM software_test_order s
+ JOIN project p ON p.id = ${projectId}
WHERE s.is_delete = 0
- AND s.project_id = ${projectId}
+ AND s.project_id = ${projectId}
UNION
SELECT (@row_number := @row_number + 1) AS no,
- NULL AS secretClass,
- '鐗╁搧娴佽浆鍗�' AS itemName,
- NULL AS version,
- i.code AS itemIdentify
+ p.secret_class,
+ '鐗╁搧娴佽浆鍗�' AS itemName,
+ NULL AS version,
+ i.code AS itemIdentify,
+ i.id as src_id
FROM item_circulat_order i
+ JOIN project p ON p.id = ${projectId}
WHERE i.is_delete = 0
- AND i.project_id = ${projectId}
+ AND i.project_id = ${projectId}
</select>
<select id="selectList" resultType="com.zt.life.modules.configItemWarehouse.model.WarehouseConfigItem">
SET @row_number = 0;
@@ -64,4 +66,11 @@
and a.library_type=${type}
</if>
</select>
+ <select id="getBySrc" resultType="com.zt.life.modules.configItemWarehouse.model.WarehouseConfigItem">
+ select *
+ from config_item_warehouse_detail
+ where project_id =${projectId} and is_delete =0 and src_id =${srcId}
+ ORDER BY UPDATE_DATE DESC
+ LIMIT 1
+ </select>
</mapper>
--
Gitblit v1.9.1