2.1初始化官方套餐GetInitSynOffialHisMealList
selectTCID00 as HISGROUPCODE,TCMC00 as HISGROUPNAME,yybh00 as hishospitalcode,((case when TCJG00 is not null then TCJG00 else 0 end)*100) as price,(case when SYNA00='1' and SYNV00='0' then 0 when SYNA00='0' and SYNV00='1' then 1 else 2 end) as gender,'通用' as marriageValue,'全年龄段' as ageLevelValue,FLID00 as classify,'健康体检' as classifyName,0 as pregnant,0 as preparePregnant,0 as lockPrice,1 as allowChangeItem,'order_price' as vip_strategy,'vip' as vip,0 as disable,3 as type,0 as marriageId,0 as ageLevelId,sysdate as insertTime,0 as uploadfrom HM_ZD_TJTC00 where YXBZ00=1
获取套餐内项目,没有项目不同步
select a.tcid00 as hisGroupCode,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--and b.sfjcxm='1'and a.tcid00={0}
2.2初始化单位分组GetInitSynHisMealList
selecta.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,'通用' 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,0 as disable,1 as type,0 as marriageId,0 as ageLevelId,sysdate as insertTime,0 as upload,1 as tagfrom HM_YW_TTRWFZ a inner join HM_YW_TTRW00 b on a.rwid00=b.rwid00inner join HM_YW_TJTT00 c on b.TTID00=c.TTID00
文档更新时间: 2023-06-09 15:11