2.1初始化官方套餐GetInitSynOffialHisMealList

  1. select
  2. TCID00 as HISGROUPCODE,
  3. TCMC00 as HISGROUPNAME,
  4. yybh00 as hishospitalcode,
  5. ((case when TCJG00 is not null then TCJG00 else 0 end)*100) as price,
  6. (case when SYNA00='1' and SYNV00='0' then 0 when SYNA00='0' and SYNV00='1' then 1 else 2 end) as gender,
  7. '通用' as marriageValue,
  8. '全年龄段' as ageLevelValue,
  9. FLID00 as classify,
  10. '健康体检' as classifyName,
  11. 0 as pregnant,
  12. 0 as preparePregnant,
  13. 0 as lockPrice,
  14. 1 as allowChangeItem,
  15. 'order_price' as vip_strategy,
  16. 'vip' as vip,
  17. 0 as disable,
  18. 3 as type,
  19. 0 as marriageId,
  20. 0 as ageLevelId,
  21. sysdate as insertTime,
  22. 0 as upload
  23. from HM_ZD_TJTC00 where YXBZ00=1

获取套餐内项目,没有项目不同步

  1. select a.tcid00 as hisGroupCode,
  2. a.SQXMID as hisItemId,1 as basic,((case when b.TCJ000 is null then 0 else b.TCJ000 end)*100) as price from HM_ZD_TCSFXM a inner join hm_zd_tjsqxm b on a.sqxmid=b.sqxmid
  3. --and b.sfjcxm='1'
  4. and a.tcid00={0}

2.2初始化单位分组GetInitSynHisMealList

  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. '通用' 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. 0 as disable,
  20. 1 as type,
  21. 0 as marriageId,
  22. 0 as ageLevelId,
  23. sysdate as insertTime,
  24. 0 as upload,
  25. 1 as tag
  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
文档更新时间: 2023-06-09 15:11