Files
his/openhis-server-new/openhis-domain/src/main/resources/mapper/administration/DeviceDefinitionMapper.xml
zhangfei 9c3e603b94 Fix Bug #443: 手术计费:点击签发耗材时异常报错
当手术计费弹窗中点击"签发"耗材时,因耗材的locationId(发放库房)为空导致后端异常。
在DoctorStationAdviceAppServiceImpl.handDevice方法中,当locationId为null时,使用登录用户的科室ID作为默认值,
与NurseBillingAppService中的处理方式保持一致。
2026-05-08 09:14:18 +08:00

33 lines
1.8 KiB
XML
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.openhis.administration.mapper.DeviceDefinitionMapper">
<!-- 根据关键字查询 如果关键字为空查询10条否则返回查询到的所有 -->
<select id="searchDeviceListByKeyWord" resultType="com.openhis.medication.dto.AdjustPriceMedListDto">
select df.id as targetId, df.name as name, df.size as volume, details.amount as
originRetailPrice,def_details.amount as originBuyingPrice,df.bus_no as busNo,df.min_unit_code as unitCode
from adm_device_definition df
inner join adm_charge_item_definition actd on actd.instance_id = df.id
left join adm_charge_item_def_detail details on actd.id = details.definition_id
and details.id = (select cidd.id from adm_charge_item_def_detail cidd where actd.id = cidd.definition_id and
cidd.condition_code = '5' and cidd.delete_flag = '0' ORDER BY create_time DESC
LIMIT 1)
left join adm_charge_item_def_detail def_details on actd.id = def_details.definition_id
and def_details.id = (select cidd.id from adm_charge_item_def_detail cidd where actd.id = cidd.definition_id and
cidd.condition_code = '1' and cidd.delete_flag = '0' ORDER BY create_time DESC
LIMIT 1)
WHERE 1 = 1 and df.id in (select inventoty.item_id FROM wor_inventory_item inventoty where
inventoty.quantity > 0 and inventoty.delete_flag = '0' )
<if test="keyWord == ''">
limit 10
</if>
<if test="keyWord !=''">
and
(df.name like concat('%',#{keyWord},'%') or df.py_str like concat('%',#{keyWord},'%') or df.wb_str like
concat('%',#{keyWord},'%'))
</if>
</select>
</mapper>