CREATE TABLE DockingHospital_Setting (
HospitalId int generated by default as identity,
OpenApiAppKey varchar(200) DEFAULT ‘0’ NOT NULL,
OpenApiAppSecret varchar(200) DEFAULT ‘0’ NOT NULL,
OpenApiSignature varchar(200) DEFAULT ‘0’ NOT NULL,
OpenApiEntryptKey varchar(200) DEFAULT ‘0’ NOT NULL,
SexRule varchar(50) DEFAULT ‘0’ NOT NULL,
RequestFailTag varchar(100) DEFAULT ‘0’ NOT NULL
)

CREATE TABLE PerformTask (
Id int generated by default as identity,
Name varchar(100) DEFAULT ‘0’ NOT NULL,
Status int DEFAULT ‘0’ NOT NULL
)

CREATE TABLE TaskField_Relationship (
Id int generated by default as identity,
MapTableId int NULL,
FieldName varchar(50) NOT NULL,
FieldNameMeaning varchar(100) NOT NULL,
InterfaceFieldName varchar(50) NULL,
PrimarykeyType int DEFAULT ‘0’ NOT NULL,
MapType int DEFAULT ‘1’ NOT NULL,
MapValue varchar(100) NULL
)

CREATE TABLE TaskTable_MapDockingTable (
Id int generated by default as identity,
MyTableId int NOT NULL,
DockingName varchar(100) NULL,
Url varchar(500) NULL,
Method varchar(20) NULL,
Parameter varchar(500) NULL,
Sort int NULL,
IntervalMonth int DEFAULT ‘6’ NULL,
TimeFormat int DEFAULT ‘1’ NULL,
RootName varchar(50) NULL,
ParentRootDepth int DEFAULT ‘1’ NULL,
DefaultParameters varchar(1000) NULL,
ResponseNeedRootName varchar(1000) NULL,
ResponseNeedField varchar(1000) NULL
)

CREATE TABLE TaskTable_Relationship (
Id int generated by default as identity,
TaskId int NOT NULL,
MyTableName varchar(100) NOT NULL
)


insert into DockingHospital_Setting(hospitalid)
values (‘0’)

insert into performtask(name)
values
(‘查档’)

insert into tasktable_relationship(taskid,mytablename)
select performtask.id ,’1’ from performtask where name =’查档’

insert into TaskTable_mapdockingtable
(MYTABLEID,dockingname,url,method)
select id ,’1’,’http://192.168.100.78:9080/api/dacx','POST‘ from tasktable_relationship where taskid in
(select performtask.id from performtask where name =’查档’)

insert into TaskTable_mapdockingtable
(MYTABLEID,dockingname,url,method)
select id ,’1’,’http://192.168.100.78:9080/api/brjd','POST‘ from tasktable_relationship where taskid in

(select performtask.id from performtask where name =’查档’)

insert into performtask(Id,name)
values
(0,’查档’)

insert into tasktable_relationship(Id,taskid,mytablename)
values
(0,’1’,’1’)

insert into TaskTable_mapdockingtable
(id,MYTABLEID,dockingname,url,method)
values
(0,’1’,’1’,’http://192.168.100.78:9080/api/dacx','POST‘)

insert into TaskTable_mapdockingtable
(id,MYTABLEID,dockingname,url,method)
values
(1,’2’,’2’,’http://192.168.100.78:9080/api/brjd','POST‘)


select from DockingHospital_Setting;
select
from performtask;
select from tasktable_relationship;
select
from TaskTable_mapdockingtable;

—delete from DockingHospital_Setting;
—delete from performtask;
—delete from tasktable_relationship;
—delete from TaskTable_mapdockingtable;

文档更新时间: 2023-05-25 15:50