删除无效合并

This commit is contained in:
2025-12-10 15:28:29 +08:00
parent b0eb9861b9
commit b1117b4157
10 changed files with 0 additions and 730 deletions

View File

@@ -4,159 +4,6 @@
<select id="selectProductReportPage"
resultType="com.openhis.web.reportmanage.dto.InventoryProductReportPageDto">
<<<<<<< HEAD
SELECT *
FROM (
SELECT T8.id, --ID
T8.bus_no, --
T8.name, --
T8.lot_number, --
T8.manufacturer_text, --
T8.item_table, --
T8.item_quantity, --
T8.unit_code, --
T8.min_package_quantity, --
T8.min_package_unit, --
T8.price, --
T8.sale_price, --
T8.price * T8.part_percent AS part_price, --
T8.sale_price * T8.part_percent AS part_sale_price, --
T8.price * T8.item_quantity AS total_price, --
T8.sale_price * T8.item_quantity AS total_sale_price, --
T8.purpose_type_enum, --
T8.location_name, --
T8.location_store_name, --
T8.purpose_location_id, --ID
T8.expiration_date, --
T8.yb_no, --
T8.tenant_id, -- ID
CAST(T8.item_table AS INTEGER) AS category_type --
FROM (SELECT T1.id, --ID
T2.bus_no, --
T2.name, --
T1.lot_number, --
T2.manufacturer_text, --
T2.category_code AS item_table, --
T1.quantity AS item_quantity, --
T2.unit_code, --
T1.quantity AS min_package_quantity, --
T2.min_unit_code AS min_package_unit, --
T1.price, --
CASE
WHEN T4.condition_code = #{lotNumber}
AND T4.condition_value = T1.lot_number
THEN T4.amount
ELSE T3.price END AS sale_price, --
T2.part_percent, --
T6.form_enum AS purpose_type_enum, --
T6.name AS location_name, --
T7.name AS location_store_name, --
T1.location_id AS purpose_location_id, --ID
T1.expiration_date, --
T2.yb_no, --
T1.tenant_id -- ID
FROM wor_inventory_item AS T1
INNER JOIN med_medication_definition AS T2
ON T2.id = T1.item_id
AND T2.delete_flag = '0'
INNER JOIN adm_charge_item_definition AS T3
ON T3.instance_id = T2.id
AND T3.delete_flag = '0'
LEFT JOIN adm_charge_item_def_detail AS T4
ON T4.definition_id = T3.id
AND T4.delete_flag = '0'
LEFT JOIN adm_location T6
ON T1.location_id = T6.id
AND T6.delete_flag = '0'
LEFT JOIN adm_location T7
ON T1.location_store_id = T7.id
AND T7.delete_flag = '0'
WHERE T1.delete_flag = '0') AS T8
UNION
SELECT T10.id, --ID
T10.bus_no, --
T10.name, --
T10.lot_number, --
T10.manufacturer_text, --
T10.item_table, --
T10.item_quantity, --
T10.unit_code, --
T10.min_package_quantity, --
T10.min_package_unit, --
T10.price, --
T10.sale_price, --
T10.price * T10.part_percent AS part_price, --
T10.sale_price * T10.part_percent AS part_sale_price, --
T10.price * T10.item_quantity AS total_price, --
T10.sale_price * T10.item_quantity AS total_sale_price, --
T10.purpose_type_enum, --
T10.location_name, --
T10.location_store_name, --
T10.purpose_location_id, --ID
T10.expiration_date, --
T10.yb_no, --
T10.tenant_id, -- ID
CAST(T10.item_table AS INTEGER) AS category_type --
FROM (SELECT T1.id, --ID
T9.bus_no, --
T9.name, --
T1.lot_number, --
T9.manufacturer_text, --
T9.category_code AS item_table, --
T1.quantity AS item_quantity, --
T9.unit_code, --
T1.quantity AS min_package_quantity, --
T9.min_unit_code AS min_package_unit, --
T1.price, --
CASE
WHEN T4.condition_code = #{lotNumber}
AND T4.condition_value = T1.lot_number
THEN T4.amount
ELSE T3.price END AS sale_price, --
T9.part_percent, --
T6.form_enum AS purpose_type_enum, --
T6.name AS location_name, --
T7.name AS location_store_name, --
T1.location_id AS purpose_location_id, --ID
T1.expiration_date, --
T9.yb_no, --
T1.tenant_id -- ID
FROM wor_inventory_item AS T1
INNER JOIN adm_device_definition AS T9
ON T9.id = T1.item_id
AND T9.delete_flag = '0'
INNER JOIN adm_charge_item_definition AS T3
ON T3.instance_id = T9.id
AND T3.delete_flag = '0'
LEFT JOIN adm_charge_item_def_detail AS T4
ON T4.definition_id = T3.id
AND T4.delete_flag = '0'
LEFT JOIN adm_location T6
ON T1.location_id = T6.id
AND T6.delete_flag = '0'
LEFT JOIN adm_location T7
ON T1.location_store_id = T7.id
AND T7.delete_flag = '0'
WHERE T1.delete_flag = '0') AS T10
) AS T
${ew.customSqlSegment}
<if test="inventoryScope != null">
<choose>
<when test="inventoryScope == 2">
AND item_quantity = 0
</when>
<when test="inventoryScope == 3">
AND item_quantity > 0
</when>
<when test="inventoryScope == 4">
AND item_quantity <![CDATA[ <= ]]> 20
</when>
<when test="inventoryScope == 5">
AND item_quantity <![CDATA[ <= ]]> 50
</when>
</choose>
</if>
=======
-- SELECT T8.id, --ID
-- T8.bus_no, --药品编码
-- T8.name, --药品名称
@@ -282,6 +129,5 @@
-- AND T7.delete_flag = '0'
-- WHERE T1.delete_flag = '0') AS T10
-- ${ew.customSqlSegment}
>>>>>>> upstream/develop
</select>
</mapper>