套餐分类

  1. 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
  1. select * from TBL_Offial_MEAL_V

2.4.同步单位套餐 SynMeal

  1. select
  2. a.RWFZID as hisGroupCode,
  3. a.FZMC00 as hisGroupName,
  4. a.RWID00 as hisCompanyCode,
  5. c.yybh00 as hishospitalcode,
  6. b.TTID00 as groupId,
  7. ((case when a.zdscje is not null then a.zdscje else tsxe00 end)*100) as price,
  8. (case when NA0000='1' and NV0000='0' then 0 when NA0000='0' and NV0000='1' then 1 else 2 end) as gender,
  9. ( case when a.CH0000=1 and a.WH0000=0 then '已婚' else '通用' end) as marriageValue,
  10. '全年龄段' as ageLevelValue,
  11. a.TJLXID as classify,
  12. '' as classifyName,
  13. 0 as pregnant,
  14. 0 as preparePregnant,
  15. 0 as lockPrice,
  16. 1 as allowChangeItem,
  17. 'order_price' as vip_strategy,
  18. 'vip' as vip,
  19. c.handletype as tag,
  20. 0 as disable,
  21. 1 as type,
  22. ( case when a.CH0000=1 and a.WH0000=0 then 1 else 0 end) as marriageId,
  23. 0 as ageLevelId,
  24. sysdate as insertTime,
  25. 0 as upload
  26. from HM_YW_TTRWFZ a inner join HM_YW_TTRW00 b on a.rwid00=b.rwid00
  27. inner join HM_YW_TJTT00 c on b.TTID00=c.TTID00
  28. inner join TBL_HANDLELOG c on a.RWFZID=c.KEYID and c.BUSCODE='MEALCHANGE' and c.status=0
文档更新时间: 2023-05-25 15:37