套餐分类
select bh0000 as classify,mc0000 as classifyName from PT_TYZD00 where zdmc00='体检类型'
2.3 同步官方套餐 SynOfficialMeal
2.1确认是否所有的套餐都可以被同步,如有限制,修改视图逻辑 TBL_Offial_MEAL_V
2.2套餐金额,price字段,实际使用哪个字段,线上金额单位为分,视图中默认会*100
select * from TBL_Offial_MEAL_V
2.4.同步单位套餐 SynMeal
select
a.RWFZID as hisGroupCode,
a.FZMC00 as hisGroupName,
a.RWID00 as hisCompanyCode,
c.yybh00 as hishospitalcode,
b.TTID00 as groupId,
((case when a.zdscje is not null then a.zdscje else tsxe00 end)*100) as price,
(case when NA0000='1' and NV0000='0' then 0 when NA0000='0' and NV0000='1' then 1 else 2 end) as gender,
( case when a.CH0000=1 and a.WH0000=0 then '已婚' else '通用' end) as marriageValue,
'全年龄段' as ageLevelValue,
a.TJLXID as classify,
'' as classifyName,
0 as pregnant,
0 as preparePregnant,
0 as lockPrice,
1 as allowChangeItem,
'order_price' as vip_strategy,
'vip' as vip,
c.handletype as tag,
0 as disable,
1 as type,
( case when a.CH0000=1 and a.WH0000=0 then 1 else 0 end) as marriageId,
0 as ageLevelId,
sysdate as insertTime,
0 as upload
from HM_YW_TTRWFZ a inner join HM_YW_TTRW00 b on a.rwid00=b.rwid00
inner join HM_YW_TJTT00 c on b.TTID00=c.TTID00
inner join TBL_HANDLELOG c on a.RWFZID=c.KEYID and c.BUSCODE='MEALCHANGE' and c.status=0
文档更新时间: 2023-05-25 15:37