| | |
| | | </if> |
| | | </select> |
| | | <select id="itemList" resultType="com.zt.life.modules.configItemWarehouse.model.WarehouseConfigItem"> |
| | | SELECT p.secret_class, |
| | | SET @row_number = 0; |
| | | SELECT (@row_number := @row_number + 1) AS no, |
| | | p.secret_class, |
| | | SUBSTRING(m.name, LOCATE('软件', m.name), LENGTH(m.name)) AS itemName, |
| | | m.identify AS version, |
| | | m.name AS Item_identify |
| | |
| | | WHERE s.is_delete = 0 |
| | | AND s.id = m.order_id |
| | | UNION |
| | | SELECT NULL AS secretClass, |
| | | '软件测试委托单' AS itemName, |
| | | NULL AS version, |
| | | s.code AS itemIdentify |
| | | SELECT (@row_number := @row_number + 1) AS no, |
| | | NULL AS secretClass, |
| | | '软件测试委托单' AS itemName, |
| | | NULL AS version, |
| | | s.code AS itemIdentify |
| | | FROM software_test_order s |
| | | WHERE s.is_delete = 0 |
| | | AND s.project_id = ${projectId} |
| | | UNION |
| | | SELECT NULL AS secretClass, |
| | | '物品流转单' AS itemName, |
| | | NULL AS version, |
| | | i.code AS itemIdentify |
| | | SELECT (@row_number := @row_number + 1) AS no, |
| | | NULL AS secretClass, |
| | | '物品流转单' AS itemName, |
| | | NULL AS version, |
| | | i.code AS itemIdentify |
| | | FROM item_circulat_order i |
| | | WHERE i.is_delete = 0 |
| | | AND i.project_id = ${projectId} |
| | | </select> |
| | | <select id="warehouseList" resultType="com.zt.life.modules.configItemWarehouse.model.WarehouseConfigItem"> |
| | | select a.item_name,a.item_identify,a.version as retrospect_version,a.secret_class,a.project_id,a.id as select_id |
| | | SET @row_number = 0; |
| | | SELECT (@row_number := @row_number + 1) AS no, |
| | | a.item_name,a.item_identify,a.version as retrospect_version,a.secret_class,a.project_id,a.id as select_id |
| | | from config_item_warehouse_detail a |
| | | WHERE a.is_delete = 0 |
| | | and a.project_id = ${projectId} |
| | | <if test="warehouse_id!=null"> |
| | | AND id not in (select id from config_item_warehouse_detail where is_delete = 0 and warehouse_id = ${warehouseId}) |
| | | and a.project_id = ${projectId} |
| | | <if test="ids!=null and ids!=''"> |
| | | AND id not in (${ids}) |
| | | </if> |
| | | <if test="selectIds!=null"> |
| | | AND id not in (${selectIds}) |
| | | </if> |
| | | and a.id NOT IN (SELECT select_id FROM config_item_warehouse_detail WHERE (SELECT count(*) FROM |
| | | config_item_warehouse_detail WHERE id = select_id) > 0) |
| | | </select> |
| | | |
| | | </mapper> |