解决合并冲突
This commit is contained in:
@@ -42,4 +42,33 @@
|
||||
ON T1.medication_product_id = T2.id
|
||||
WHERE T1.delete_flag = 0
|
||||
</select>
|
||||
<!-- 根据关键字查询 如果关键字为空,查询10条,否则返回查询到的所有 -->
|
||||
<select id="searchMedListByKeyWord" resultType="com.openhis.medication.dto.AdjustPriceMedListDto">
|
||||
select med.id as targetId, med_def.name as name, med.total_volume as volume, details.amount as
|
||||
originRetailPrice,def_details.amount as originBuyingPrice,med_def.bus_no as busNo,med_def.min_unit_code as unitCode
|
||||
from med_medication med
|
||||
inner join med_medication_definition med_def on med.medication_def_id = med_def.id
|
||||
inner join adm_charge_item_definition actd on actd.instance_id = med_def.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 med.delete_flag = '0' and med_def.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
|
||||
(med_def.name like concat('%',#{keyWord},'%') or med_def.merchandise_name like concat('%',#{keyWord},'%') or
|
||||
med_def.py_str like concat('%',#{keyWord},'%') or
|
||||
med_def.wb_str like concat('%',#{keyWord},'%') or med_def.merchandise_py_str like concat('%',#{keyWord},'%')
|
||||
or med_def.merchandise_wb_str like concat('%',#{keyWord},'%'))
|
||||
</if>
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user