1.ops开启任务

2.openApi开启接口权限

3.表中添加时间节点

在data_dictanory表中插入一条sql(GROUP_NAME: SYNCPDFEXAMREPORTSYNCTIME, KEY_NAME: LASTPDFEXAMREPORTSYNCTIME),初始时间需要设置一下

  1. insert into data_dictionary(group_name,key_name,key_value) values ('SYNCPDFEXAMREPORTSYNCTIME','LASTPDFEXAMREPORTSYNCTIME','2024-01-01 14:33:07')
4.创建数据视图,根据实际情况修改
  1. CREATE VIEW SYNC_REPORT_PDF AS
  2. SELECT
  3. a.id_patient,
  4. '' hospitalId,
  5. a.id_patient reportNo,
  6. b.ORDER_NUM orderNum,
  7. b.NAME,
  8. b.IDCARD idCard,
  9. b.GENDER ,
  10. b.AGE,
  11. b.MARRIAGE_STATUS marriageStatus,
  12. b.EXAM_COMPANY examCompany,
  13. '' department,
  14. '' workNo,
  15. b.MOBILE mobile,
  16. '' docName,
  17. '' auditDoc,
  18. '' detail,
  19. '' advice,
  20. '' attention,
  21. b.EXAM_DATE examDate,
  22. a.printTime reportTime,
  23. '' auditTime,
  24. '' state,
  25. '' detailType,
  26. '' adviceType,
  27. b.BIRTHDAY birthday,
  28. '' examineResult,
  29. 4 storageType,
  30. a.reportUrl pdfUrl
  31. from HerPeisSZSY.dbo.PatientpdfReportInfo a left join REPORT_BASEINFO b on a.id_patient = b.REPORT_ID
  32. WHERE b.REPORT_ID is not null and a.reportUrl !=''
  1. --sqlserver脚本
  2. CREATE TABLE [dbo].[tbl_sync_base_examreport](
  3. id int IDENTITY(1,1) not null ,
  4. hospital_id [varchar](20) NULL,
  5. report_id [varchar](50) NULL,
  6. report_no [varchar](50) NULL,
  7. [flag] [int] NULL,
  8. gmt_created [datetime] NULL,
  9. gmt_modified [datetime] NULL
  10. ) ON [PRIMARY];
  11. CREATE NONCLUSTERED INDEX [NonClusteredIndex] ON [dbo].[tbl_sync_base_examreport]
  12. (
  13. [hospital_id] ASC,
  14. [report_no] ASC
  15. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  16. GO
5.修改打包配置

pdfService=UrlDealReportPathServiceImpl
appKey=ap437b91ad5b514c25a04da7d38def4171
appSecret=263de32479164c40bbd393b8607bc7b8
accessTokenUrl=https://api.mytijian.com/open-api/V2/accesstoken?appKey=
sendPdfRequestUrl=https://api.mytijian.com/open-api/V2/ws/examreport/batchInsertAllExamReportPdf?accessToken=

文档更新时间: 2024-02-26 14:54