单项
单位
select
a.RWID00 as hisCompanyCode,
b.TTqC00||'('||a.RWID00||')' as hisCompanyName,
b.YYBH00 as hishospitalcode,
a.TTID00 as groupId,
a.RWYDRQ as examStart,
a.YDZZRQ as examEnd,
sysdate as insertTime,
1 as operateType,
1 as busiType,
0 as upload
from HM_YW_TTRW00 a inner join HM_YW_TJTT00 b on a.TTID00=b.TTID00
套餐
select c.yybh00,a.* 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 where a.RWFZID=19590
---
select
a.RWFZID as hisGroupCode,
a.SQXMID as hisItemId,c.yybh00,
c.*
from HM_YW_TTFZXM a,hm_zd_tjsqxm b , HM_ZD_TJSQXM c
where a.sqxmid=b.sqxmid and a.SQXMID = c.SQXMID
and b.sfjcxm='1' and b.sfjy00='0' and a.RWFZID=6512
查看分组视图数据
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,
0 as allowChangeItem,
'order_price' as vip_strategy,
'vip' as vip,
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 where a.RWFZID ='21667'
订单
查看订单及关联套餐单位
select a.upload,b.hisgroupcode,b.upload,a.* from tbl_inv_group_person a left join tbl_inv_meal b on a.hisgroupcode = b.hisgroupcode where a.hisexanineenum =''
处理套餐不允许改项目下单
--处理套餐
update tbl_inv_meal set allowchangeitem = 1 where hisgroupcode in (
select c.hisgroupcode from tbl_errorlog a
left join tbl_inv_group_person b on a.relatedid = b.hisexamineenum
left join tbl_inv_meal c on b.hisgroupcode = c.hisgroupcode
where methodcode ='SynGroupPerson' and errormsg like '%此套餐不允许改项下单%');
--处理订单日期重新上传
update tbl_inv_group_person set inserttime = sysdate where hisexamineenum in (select a.relatedid from tbl_errorlog a
where methodcode ='SynGroupPerson' and errormsg like '%此套餐不允许改项下单%');
--删除订单错误日志
delete from tbl_errorlog where methodcode ='SynGroupPerson' and errormsg like '%此套餐不允许改项下单%';
报告
select * from mtjk_report_info where tjh000='2312270085'
select * from tbl_report_record where hisexamineenum ='2402220066' order by createtime desc;
select * from tbl_report_record where createtime >'2024/03/08';
--delete from tbl_report_record where createtime >'2024/03/08'
文档更新时间: 2024-03-12 09:54