单项

单位

  1. select
  2. a.RWID00 as hisCompanyCode,
  3. b.TTqC00||'('||a.RWID00||')' as hisCompanyName,
  4. b.YYBH00 as hishospitalcode,
  5. a.TTID00 as groupId,
  6. a.RWYDRQ as examStart,
  7. a.YDZZRQ as examEnd,
  8. sysdate as insertTime,
  9. 1 as operateType,
  10. 1 as busiType,
  11. 0 as upload
  12. from HM_YW_TTRW00 a inner join HM_YW_TJTT00 b on a.TTID00=b.TTID00

套餐

  1. select c.yybh00,a.* from HM_YW_TTRWFZ a inner join HM_YW_TTRW00 b on a.rwid00=b.rwid00
  2. inner join HM_YW_TJTT00 c on b.TTID00=c.TTID00 where a.RWFZID=19590
  3. ---
  4. select
  5. a.RWFZID as hisGroupCode,
  6. a.SQXMID as hisItemId,c.yybh00,
  7. c.*
  8. from HM_YW_TTFZXM a,hm_zd_tjsqxm b , HM_ZD_TJSQXM c
  9. where a.sqxmid=b.sqxmid and a.SQXMID = c.SQXMID
  10. and b.sfjcxm='1' and b.sfjy00='0' and a.RWFZID=6512
查看分组视图数据
  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. 0 as allowChangeItem,
  17. 'order_price' as vip_strategy,
  18. 'vip' as vip,
  19. 0 as disable,
  20. 1 as type,
  21. ( case when a.CH0000=1 and a.WH0000=0 then 1 else 0 end) as marriageId,
  22. 0 as ageLevelId,
  23. sysdate as insertTime,
  24. 0 as upload
  25. from HM_YW_TTRWFZ a inner join HM_YW_TTRW00 b on a.rwid00=b.rwid00
  26. inner join HM_YW_TJTT00 c on b.TTID00=c.TTID00 where a.RWFZID ='21667'

订单

查看订单及关联套餐单位
  1. 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 =''
处理套餐不允许改项目下单
  1. --处理套餐
  2. update tbl_inv_meal set allowchangeitem = 1 where hisgroupcode in (
  3. select c.hisgroupcode from tbl_errorlog a
  4. left join tbl_inv_group_person b on a.relatedid = b.hisexamineenum
  5. left join tbl_inv_meal c on b.hisgroupcode = c.hisgroupcode
  6. where methodcode ='SynGroupPerson' and errormsg like '%此套餐不允许改项下单%');
  7. --处理订单日期重新上传
  8. update tbl_inv_group_person set inserttime = sysdate where hisexamineenum in (select a.relatedid from tbl_errorlog a
  9. where methodcode ='SynGroupPerson' and errormsg like '%此套餐不允许改项下单%');
  10. --删除订单错误日志
  11. delete from tbl_errorlog where methodcode ='SynGroupPerson' and errormsg like '%此套餐不允许改项下单%';

报告

  1. select * from mtjk_report_info where tjh000='2312270085'
  2. select * from tbl_report_record where hisexamineenum ='2402220066' order by createtime desc;
  3. select * from tbl_report_record where createtime >'2024/03/08';
  4. --delete from tbl_report_record where createtime >'2024/03/08'
文档更新时间: 2024-03-12 09:54