1.ops开启任务
2.openApi开启接口权限
3.表中添加时间节点
在data_dictanory表中插入一条sql(GROUP_NAME: SYNCPDFEXAMREPORTSYNCTIME, KEY_NAME: LASTPDFEXAMREPORTSYNCTIME),初始时间需要设置一下
insert into data_dictionary(group_name,key_name,key_value) values ('SYNCPDFEXAMREPORTSYNCTIME','LASTPDFEXAMREPORTSYNCTIME','2024-01-01 14:33:07')
4.创建数据视图,根据实际情况修改
CREATE VIEW SYNC_REPORT_PDF AS
SELECT
a.id_patient,
'' hospitalId,
a.id_patient reportNo,
b.ORDER_NUM orderNum,
b.NAME,
b.IDCARD idCard,
b.GENDER ,
b.AGE,
b.MARRIAGE_STATUS marriageStatus,
b.EXAM_COMPANY examCompany,
'' department,
'' workNo,
b.MOBILE mobile,
'' docName,
'' auditDoc,
'' detail,
'' advice,
'' attention,
b.EXAM_DATE examDate,
a.printTime reportTime,
'' auditTime,
'' state,
'' detailType,
'' adviceType,
b.BIRTHDAY birthday,
'' examineResult,
4 storageType,
a.reportUrl pdfUrl
from HerPeisSZSY.dbo.PatientpdfReportInfo a left join REPORT_BASEINFO b on a.id_patient = b.REPORT_ID
WHERE b.REPORT_ID is not null and a.reportUrl !=''
--sqlserver脚本
CREATE TABLE [dbo].[tbl_sync_base_examreport](
id int IDENTITY(1,1) not null ,
hospital_id [varchar](20) NULL,
report_id [varchar](50) NULL,
report_no [varchar](50) NULL,
[flag] [int] NULL,
gmt_created [datetime] NULL,
gmt_modified [datetime] NULL
) ON [PRIMARY];
CREATE NONCLUSTERED INDEX [NonClusteredIndex] ON [dbo].[tbl_sync_base_examreport]
(
[hospital_id] ASC,
[report_no] ASC
)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]
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