Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
performance
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
zry
performance
Commits
731d876e
Commit
731d876e
authored
May 21, 2021
by
钟博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改用户,科室字典批量添加问题
parent
0a6ffa16
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
14 deletions
+16
-14
performance/Performance.Services/ConfigService.cs
+4
-5
performance/Performance.Services/PersonService.cs
+10
-7
performance/Performance.Services/UserService.cs
+2
-2
No files found.
performance/Performance.Services/ConfigService.cs
View file @
731d876e
...
...
@@ -742,12 +742,11 @@ public bool BatchSaveAccounting(int allotId, SaveCollectData request)
var
data
=
JsonHelper
.
Deserialize
<
cof_accounting
>(
json
);
if
(!
unitType
.
Contains
(
data
.
UnitType
))
return
false
;
if
(
getAccounts
!=
null
||
getAccounts
.
Any
())
if
(
getAccounts
.
Any
(
t
=>
t
.
AccountingUnit
==
data
?.
AccountingUnit
&&
t
.
UnitType
==
data
.
UnitType
)
||
accounts
.
Any
(
t
=>
t
.
AccountingUnit
==
data
?.
AccountingUnit
&&
t
.
UnitType
==
data
.
UnitType
))
continue
;
if
(
getAccounts
!=
null
)
if
(
getAccounts
.
Any
(
t
=>
t
.
AccountingUnit
==
data
?.
AccountingUnit
&&
t
.
UnitType
==
data
.
UnitType
))
continue
;
var
any
=
accounts
.
Any
(
t
=>
t
.
AccountingUnit
==
data
?.
AccountingUnit
&&
t
.
UnitType
==
data
.
UnitType
);
if
(!
string
.
IsNullOrEmpty
(
data
?.
AccountingUnit
)
&&
!
string
.
IsNullOrEmpty
(
data
?.
UnitType
))
if
(!
string
.
IsNullOrEmpty
(
data
?.
AccountingUnit
)
&&
!
string
.
IsNullOrEmpty
(
data
?.
UnitType
)
&&
!
any
)
{
accounts
.
Add
(
data
);
}
...
...
performance/Performance.Services/PersonService.cs
View file @
731d876e
...
...
@@ -688,10 +688,11 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request)
var
json
=
JsonHelper
.
Serialize
(
item
);
var
data
=
JsonHelper
.
Deserialize
<
per_employee
>(
json
);
if
(
persons
.
Any
(
t
=>
t
.
PersonnelNumber
?.
Trim
()
==
data
.
PersonnelNumber
?.
Trim
()
&&
t
.
DoctorName
?.
Trim
()
==
data
.
DoctorName
?.
Trim
())
||
employees
.
Any
(
w
=>
w
.
Department
?.
Trim
()
==
data
.
Department
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
data
.
DoctorName
?.
Trim
()))
continue
;
if
(
persons
!=
null
)
if
(
persons
.
Any
(
t
=>
t
.
PersonnelNumber
?.
Trim
()
==
data
.
PersonnelNumber
?.
Trim
()
&&
t
.
DoctorName
?.
Trim
()
==
data
.
DoctorName
?.
Trim
()))
continue
;
var
any
=
employees
.
Any
(
w
=>
w
.
Department
?.
Trim
()
==
data
.
Department
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
data
.
DoctorName
?.
Trim
());
if
(!
string
.
IsNullOrEmpty
(
data
.
Department
?.
Trim
())
&&
!
string
.
IsNullOrEmpty
(
data
.
AccountingUnit
?.
Trim
())
&&
!
string
.
IsNullOrEmpty
(
data
.
DoctorName
?.
Trim
()))
if
(!
string
.
IsNullOrEmpty
(
data
.
Department
?.
Trim
())
&&
!
string
.
IsNullOrEmpty
(
data
.
AccountingUnit
?.
Trim
())
&&
!
string
.
IsNullOrEmpty
(
data
.
DoctorName
?.
Trim
())
&&
!
any
)
{
data
.
HospitalId
=
HospitalId
;
data
.
AllotId
=
AllotId
;
...
...
@@ -710,16 +711,18 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request)
public
void
SaveDeptDicHands
(
int
HospitalId
,
SaveCollectData
request
)
{
var
dicData
=
CreateDataRow
(
request
,
DeptDic
);
var
depts
=
perdeptdicRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
HospitalId
).
Select
(
w
=>
new
{
w
.
Department
,
w
.
HISDeptName
}).
Distinct
();
var
depts
=
perdeptdicRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
HospitalId
)
?
.
Select
(
w
=>
new
{
w
.
Department
,
w
.
HISDeptName
}).
Distinct
();
List
<
per_dept_dic
>
deptDics
=
new
List
<
per_dept_dic
>();
foreach
(
var
dic
in
dicData
)
{
var
json
=
JsonHelper
.
Serialize
(
dic
);
var
data
=
JsonHelper
.
Deserialize
<
DeptdicHands
>(
json
);
if
(
depts
.
Any
(
t
=>
t
.
Department
?.
Trim
()
==
data
.
Department
?.
Trim
()
&&
t
.
HISDeptName
?.
Trim
()
==
data
.
HISDeptName
?.
Trim
())
||
deptDics
.
Any
(
w
=>
w
.
Department
?.
Trim
()
==
data
.
Department
?.
Trim
()
&&
w
.
HISDeptName
?.
Trim
()
==
data
.
HISDeptName
?.
Trim
()))
continue
;
if
(!
string
.
IsNullOrEmpty
(
data
.
Department
?.
Trim
())
&&
!
string
.
IsNullOrEmpty
(
data
.
HISDeptName
?.
Trim
()))
if
(
depts
!=
null
)
if
(
depts
.
Any
(
t
=>
t
.
Department
?.
Trim
()
==
data
.
Department
?.
Trim
()
&&
t
.
HISDeptName
?.
Trim
()
==
data
.
HISDeptName
?.
Trim
()))
continue
;
var
any
=
deptDics
.
Any
(
w
=>
w
.
Department
?.
Trim
()
==
data
.
Department
?.
Trim
()
&&
w
.
HISDeptName
?.
Trim
()
==
data
.
HISDeptName
?.
Trim
());
if
(!
string
.
IsNullOrEmpty
(
data
.
Department
?.
Trim
())
&&
!
string
.
IsNullOrEmpty
(
data
.
HISDeptName
?.
Trim
())
&&
!
any
)
{
DeptDicList
(
HospitalId
,
deptDics
,
data
);
}
...
...
performance/Performance.Services/UserService.cs
View file @
731d876e
...
...
@@ -738,7 +738,7 @@ public int SaveUserHandsFlat(UserCollectData request)
//hack:后续修改为accounting中的数据
var
accounts
=
perforCofaccountingRepository
.
GetEntities
();
var
allot
=
_perallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
);
var
res
=
accounts
.
Join
(
allot
,
t
=>
t
.
AllotId
,
w
=>
w
.
ID
,
(
t
,
w
)
=>
new
cof_accounting
{
AccountingUnit
=
t
.
AccountingUnit
}).
Distinct
();
var
res
=
accounts
?
.
Join
(
allot
,
t
=>
t
.
AllotId
,
w
=>
w
.
ID
,
(
t
,
w
)
=>
new
cof_accounting
{
AccountingUnit
=
t
.
AccountingUnit
}).
Distinct
();
List
<
sys_user
>
users
=
new
List
<
sys_user
>();
List
<
sys_user_role
>
userRoles
=
new
List
<
sys_user_role
>();
...
...
@@ -749,7 +749,7 @@ public int SaveUserHandsFlat(UserCollectData request)
var
json
=
JsonHelper
.
Serialize
(
item
);
var
data
=
JsonHelper
.
Deserialize
<
UserHandsResponse
>(
json
);
if
(
roleArr
.
Contains
(
data
.
RoleName
)
&&
(
res
==
null
||
!
res
.
Any
())
)
return
0
;
if
(
roleArr
.
Contains
(
data
.
RoleName
)
&&
res
==
null
)
return
0
;
if
(
users
.
Any
(
c
=>
c
.
Login
==
data
?.
Login
)
||
getUsers
.
Any
(
c
=>
c
.
Login
==
data
?.
Login
))
return
2
;
if
(
roleArr
.
Contains
(
data
.
RoleName
)
&&
!
res
.
Any
(
t
=>
t
.
AccountingUnit
==
data
.
Department
))
return
3
;
...
...
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