Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
queryPlatform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
唐仲阳
queryPlatform
Commits
af0984c3
Commit
af0984c3
authored
May 26, 2023
by
tangzhongyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
c4534545
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
12 deletions
+15
-12
api/queryPlaform.Api/Controllers/DrugqueryController.cs
+11
-9
api/queryPlaform.Api/Controllers/HomeController.cs
+1
-1
api/queryPlaform.Api/Infrastructure/Queries/AnalysisQueries.cs
+0
-0
api/queryPlaform.Api/Infrastructure/Queries/DrugqueryQueries.cs
+0
-0
api/queryPlaform.Api/Infrastructure/Queries/ResourceQueries.cs
+3
-2
No files found.
api/queryPlaform.Api/Controllers/DrugqueryController.cs
View file @
af0984c3
...
...
@@ -30,6 +30,7 @@ public DrugqueryController(DrugqueryQueries drugqueryQueries, HomeQueries homeQu
public
async
Task
Drugquery
([
FromBody
]
SYS_Drugquery
sYS_Drugquery
,
string
zxr
)
{
var
icd_or_diseaseCondition
=
""
;
var
notdisease
=
""
;
long
type
=
0
;
long
num
=
0
;
var
drugs
=
""
;
...
...
@@ -46,13 +47,19 @@ public DrugqueryController(DrugqueryQueries drugqueryQueries, HomeQueries homeQu
{
foreach
(
var
disease
in
sYS_Drugquery
.
diseaseName
)
{
if
(!
string
.
IsNullOrEmpty
(
disease
))
if
(!
string
.
IsNullOrEmpty
(
disease
)
&
!
disease
.
Contains
(
"!"
)
)
icd_or_diseaseCondition
=
icd_or_diseaseCondition
+
$"or DISEASE_NAME like '%
{
disease
}
%'"
;
if
(!
string
.
IsNullOrEmpty
(
disease
)
&
disease
.
Contains
(
"!"
))
notdisease
=
notdisease
+
$"and DISEASE_NAME not like '%
{
disease
.
Replace
(
"!"
,
""
).
Replace
(
"!"
,
""
)}
%'"
;
}
}
if
(
icd_or_diseaseCondition
.
Length
>
0
)
{
icd_or_diseaseCondition
=
icd_or_diseaseCondition
.
Substring
(
2
,
icd_or_diseaseCondition
.
Length
-
2
);
if
(
notdisease
.
Length
>
0
)
icd_or_diseaseCondition
=
"("
+
icd_or_diseaseCondition
+
")"
+
notdisease
;
}
if
(
sYS_Drugquery
.
drugName
!=
null
)
{
...
...
@@ -104,6 +111,7 @@ public DrugqueryController(DrugqueryQueries drugqueryQueries, HomeQueries homeQu
semaphore
.
Release
();
}
}
private
void
asynsDrugquery
(
SYS_Drugquery
sYS_Drugquery
,
string
icd_or_diseaseCondition
,
string
drugs
,
string
materialNames
,
long
num
,
long
type
,
string
zxr
)
{
_drugqueryQueries
.
updateCOMPLETE_MARK
(
num
,
21
);
...
...
@@ -112,14 +120,11 @@ private void asynsDrugquery(SYS_Drugquery sYS_Drugquery, string icd_or_diseaseCo
if
(
type
==
1
)
{
var
tasks
=
new
List
<
Task
>();
//_drugqueryQueries.Diseasequery(sYS_Drugquery.type1_2, icd_or_diseaseCondition, num, 1, zxr);
tasks
.
Add
(
Task
.
Factory
.
StartNew
(()
=>
_drugqueryQueries
.
Diseasequery
(
sYS_Drugquery
.
type1_2
,
icd_or_diseaseCondition
,
num
,
1
,
zxr
)));
tasks
.
Add
(
Task
.
Factory
.
StartNew
(()
=>
_drugqueryQueries
.
Diseasequery
(
sYS_Drugquery
.
type1_2
,
icd_or_diseaseCondition
,
num
,
2
,
zxr
)));
tasks
.
Add
(
Task
.
Factory
.
StartNew
(()
=>
_drugqueryQueries
.
Diseasequery
(
sYS_Drugquery
.
type1_2
,
icd_or_diseaseCondition
,
num
,
3
,
zxr
)));
tasks
.
Add
(
Task
.
Factory
.
StartNew
(()
=>
_drugqueryQueries
.
Diseasequery
(
sYS_Drugquery
.
type1_2
,
icd_or_diseaseCondition
,
num
,
4
,
zxr
)));
Task
.
WaitAll
(
tasks
.
ToArray
());
_drugqueryQueries
.
updateCOMPLETE_MARK
(
num
,
22
);
_homeQueries
.
SendMail
(
@
$"药品/疾病/材料平台提醒"
,
@
$"
{
"疾病"
}
:
{
sYS_Drugquery
.
peojectName
}
拉取结束!"
,
zxr
);
}
else
if
(
type
==
2
)
{
...
...
@@ -129,8 +134,6 @@ private void asynsDrugquery(SYS_Drugquery sYS_Drugquery, string icd_or_diseaseCo
tasks
.
Add
(
Task
.
Factory
.
StartNew
(()
=>
_drugqueryQueries
.
Drugquery
(
sYS_Drugquery
.
typefee
,
sYS_Drugquery
.
type1_2
,
drugs
,
sYS_Drugquery
.
drugName
,
num
,
3
,
zxr
)));
tasks
.
Add
(
Task
.
Factory
.
StartNew
(()
=>
_drugqueryQueries
.
Drugquery
(
sYS_Drugquery
.
typefee
,
sYS_Drugquery
.
type1_2
,
drugs
,
sYS_Drugquery
.
drugName
,
num
,
4
,
zxr
)));
Task
.
WaitAll
(
tasks
.
ToArray
());
_drugqueryQueries
.
updateCOMPLETE_MARK
(
num
,
22
);
_homeQueries
.
SendMail
(
@
$"药品/疾病/材料平台提醒"
,
@
$"
{
"药品"
}
:
{
sYS_Drugquery
.
peojectName
}
拉取结束!"
,
zxr
);
}
else
if
(
type
==
3
)
{
...
...
@@ -140,17 +143,16 @@ private void asynsDrugquery(SYS_Drugquery sYS_Drugquery, string icd_or_diseaseCo
tasks
.
Add
(
Task
.
Factory
.
StartNew
(()
=>
_drugqueryQueries
.
材料
query
(
sYS_Drugquery
.
type1_2
,
materialNames
,
sYS_Drugquery
.
materialName
,
num
,
3
,
zxr
)));
tasks
.
Add
(
Task
.
Factory
.
StartNew
(()
=>
_drugqueryQueries
.
材料
query
(
sYS_Drugquery
.
type1_2
,
materialNames
,
sYS_Drugquery
.
materialName
,
num
,
4
,
zxr
)));
Task
.
WaitAll
(
tasks
.
ToArray
());
_drugqueryQueries
.
updateCOMPLETE_MARK
(
num
,
22
);
_homeQueries
.
SendMail
(
@
$"药品/疾病/材料平台提醒"
,
@
$"
{
"材料"
}
:
{
sYS_Drugquery
.
peojectName
}
拉取结束!"
,
zxr
);
}
else
{
throw
new
DomainException
(
"只能单类型查询!!"
);
}
_drugqueryQueries
.
updateCOMPLETE_MARK
(
num
,
22
);
_homeQueries
.
SendMail
(
@
$"药品/疾病/材料平台提醒"
,
@
$"
{(
type
==
1
?
"疾病"
:
type
==
2
?
"药品"
:
"材料"
)}
:
{
sYS_Drugquery
.
peojectName
}
拉取结束!"
,
zxr
);
}
catch
(
Exception
e
)
{
throw
e
;
}
}
...
...
api/queryPlaform.Api/Controllers/HomeController.cs
View file @
af0984c3
...
...
@@ -14,7 +14,7 @@
namespace
QueryPlatform.Api.Controllers
{
[
Authorize
]
[
Route
(
"api/
hom
e"
)]
[
Route
(
"api/
resourc
e"
)]
[
ApiController
]
public
class
HomeController
:
Controller
{
...
...
api/queryPlaform.Api/Infrastructure/Queries/AnalysisQueries.cs
View file @
af0984c3
This diff is collapsed.
Click to expand it.
api/queryPlaform.Api/Infrastructure/Queries/DrugqueryQueries.cs
View file @
af0984c3
This diff is collapsed.
Click to expand it.
api/queryPlaform.Api/Infrastructure/Queries/ResourceQueries.cs
View file @
af0984c3
...
...
@@ -1394,7 +1394,7 @@ public void PullData(long indexs, string DatabaseName, string tableName)
}
finally
{
Connection
(
181
).
Execute
(
@
$"UPDATE @DBName.dbo.PUB_PATIENT
var
sql
=
@
$"UPDATE @DBName.dbo.PUB_PATIENT
SET
MASTER_INDEX
=
CONCAT
(
MASTER_INDEX
,
'_'
,
ORG_CODE
),
PERSON_CODE
=
CONCAT
(
PERSON_CODE
,
'_'
,
ORG_CODE
)
FROM
@DBName
.
dbo
.
PUB_PATIENT
;
...
...
@@ -1481,7 +1481,8 @@ UPDATE @DBName.dbo.ASSAY_REPORT
UPDATE
@DBName
.
dbo
.
ASSAY_REPORT
SET
REG_ID
=
B
.
REG_ID
FROM
@DBName
.
dbo
.
INPAT_REG_INFO
B
WHERE
@DBName
.
dbo
.
ASSAY_REPORT
.
REG_CODE
=
B
.
REG_CODE
AND
@DBName
.
dbo
.
ASSAY_REPORT
.
ORG_CODE
=
B
.
ORG_CODE
AND
REG_SOURCE
=
2
;
".Replace("
@DBName
", DatabaseName));//拉取完成
WHERE
@DBName
.
dbo
.
ASSAY_REPORT
.
REG_CODE
=
B
.
REG_CODE
AND
@DBName
.
dbo
.
ASSAY_REPORT
.
ORG_CODE
=
B
.
ORG_CODE
AND
REG_SOURCE
=
2
;
".Replace("
@DBName
", DatabaseName);
Connection
(
181
).
Execute
(
sql
,
commandTimeout
:
60
*
60
*
60
*
5
);
//拉取完成
}
Connection
(
181
).
Execute
(
$"UPDATE [SV_QueryPlatform].[dbo].[FlowReservoirStatus] SET state =5 WHERE indexs=
{
indexs
}
and tableName='
{
tableName
.
Replace
(
" "
,
""
)}
'"
);
//拉取完成
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment