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
0ae84bc2
Commit
0ae84bc2
authored
May 21, 2021
by
钟博
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/核算单元组别批量添加' into develop
parents
f4d3abf2
c77c6ef7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
98 additions
and
6 deletions
+98
-6
performance/Performance.Api/Controllers/ConfigController.cs
+30
-0
performance/Performance.Services/ConfigService.cs
+57
-0
performance/Performance.Services/PersonService.cs
+2
-2
performance/Performance.Services/UserService.cs
+9
-4
No files found.
performance/Performance.Api/Controllers/ConfigController.cs
View file @
0ae84bc2
...
@@ -607,6 +607,36 @@ public ApiResponse AccountingVerify([FromRoute] int allotId)
...
@@ -607,6 +607,36 @@ public ApiResponse AccountingVerify([FromRoute] int allotId)
_configService
.
AccoungtingVerify
(
allotId
);
_configService
.
AccoungtingVerify
(
allotId
);
return
new
ApiResponse
(
ResponseType
.
OK
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
}
/// <summary>
/// 核算单元及组别批量表头
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
[
Route
(
"BatchAccountingStructrue/{allotId}"
)]
[
HttpPost
]
public
ApiResponse
BatchAccountingStructrue
([
FromRoute
]
int
allotId
)
{
var
request
=
_configService
.
GetBatchAccountingStructrue
(
allotId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
request
);
}
/// <summary>
/// 核算单元及组别批量添加
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
[
Route
(
"BatchSaveAccounting/{allotId}"
)]
[
HttpPost
]
public
ApiResponse
BatchSaveAccounting
(
int
allotId
,[
FromBody
]
SaveCollectData
request
)
{
var
result
=
_configService
.
BatchSaveAccounting
(
allotId
,
request
);
if
(
result
)
return
new
ApiResponse
(
ResponseType
.
OK
);
else
return
new
ApiResponse
(
ResponseType
.
Error
,
"请选则正确的核算组别"
);
}
#
endregion
#
endregion
/// <summary>
/// <summary>
...
...
performance/Performance.Services/ConfigService.cs
View file @
0ae84bc2
...
@@ -717,6 +717,63 @@ public void AccoungtingVerify(int allotId)
...
@@ -717,6 +717,63 @@ public void AccoungtingVerify(int allotId)
_directorRepository
.
VerifyAccountingAndUnittype
(
allotId
);
_directorRepository
.
VerifyAccountingAndUnittype
(
allotId
);
}
}
public
HandsonTable
GetBatchAccountingStructrue
(
int
AllotId
)
{
var
result
=
new
HandsonTable
((
int
)
SheetType
.
Unidentifiable
,
Accounting
.
Select
(
t
=>
t
.
Value
).
ToArray
(),
Accounting
.
Select
(
t
=>
new
collect_permission
{
HeadName
=
t
.
Value
,
Visible
=
1
}).
ToList
());
if
(
result
.
Columns
!=
null
&&
result
.
Columns
.
Any
())
{
foreach
(
var
column
in
result
.
Columns
)
{
if
(
column
.
Data
==
"核算组别"
)
{
column
.
Type
=
"autocomplete"
;
column
.
Source
=
new
[]
{
"医生组"
,
"护理组"
,
"医技组"
,
"特殊核算组"
,
"其他医生组"
,
"其他护理组"
,
"其他医技组"
,
"行政高层"
,
"行政中层"
,
"行政后勤"
};
column
.
Strict
=
true
;
}
}
}
return
result
;
}
public
bool
BatchSaveAccounting
(
int
allotId
,
SaveCollectData
request
)
{
var
dicData
=
CreateDataRow
(
0
,
allotId
,
request
,
Accounting
);
var
getAccounts
=
cofaccountingRepository
.
GetEntities
();
var
unitType
=
new
[]
{
"医生组"
,
"护理组"
,
"医技组"
,
"特殊核算组"
,
"其他医生组"
,
"其他护理组"
,
"其他医技组"
,
"行政高层"
,
"行政中层"
,
"行政后勤"
};
List
<
cof_accounting
>
accounts
=
new
List
<
cof_accounting
>();
foreach
(
var
item
in
dicData
)
{
var
json
=
JsonHelper
.
Serialize
(
item
);
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
(!
string
.
IsNullOrEmpty
(
data
?.
AccountingUnit
)
&&
!
string
.
IsNullOrEmpty
(
data
?.
UnitType
))
{
accounts
.
Add
(
data
);
}
}
if
(
accounts
.
Any
())
cofaccountingRepository
.
AddRange
(
accounts
.
ToArray
());
return
true
;
}
public
static
Dictionary
<
string
,
string
>
Accounting
{
get
;
}
=
new
Dictionary
<
string
,
string
>
{
{
nameof
(
cof_accounting
.
AccountingUnit
),
"核算单元"
},
{
nameof
(
cof_accounting
.
UnitType
),
"核算组别"
},
};
#
endregion
#
endregion
#
region
Copy
#
region
Copy
...
...
performance/Performance.Services/PersonService.cs
View file @
0ae84bc2
...
@@ -690,7 +690,7 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request)
...
@@ -690,7 +690,7 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request)
if
(
persons
.
Any
(
t
=>
t
.
PersonnelNumber
?.
Trim
()
==
data
.
PersonnelNumber
?.
Trim
()
&&
t
.
DoctorName
?.
Trim
()
==
data
.
DoctorName
?.
Trim
())
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
;
||
employees
.
Any
(
w
=>
w
.
Department
?.
Trim
()
==
data
.
Department
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
data
.
DoctorName
?.
Trim
()))
continue
;
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
()))
{
{
data
.
HospitalId
=
HospitalId
;
data
.
HospitalId
=
HospitalId
;
data
.
AllotId
=
AllotId
;
data
.
AllotId
=
AllotId
;
...
@@ -718,7 +718,7 @@ public void SaveDeptDicHands(int HospitalId, SaveCollectData request)
...
@@ -718,7 +718,7 @@ public void SaveDeptDicHands(int HospitalId, SaveCollectData request)
if
(
depts
.
Any
(
t
=>
t
.
Department
?.
Trim
()
==
data
.
Department
?.
Trim
()
&&
t
.
HISDeptName
?.
Trim
()
==
data
.
HISDeptName
?.
Trim
())
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
;
||
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
(!
string
.
IsNullOrEmpty
(
data
.
Department
?.
Trim
())
&&
!
string
.
IsNullOrEmpty
(
data
.
HISDeptName
?.
Trim
()))
{
{
DeptDicList
(
HospitalId
,
deptDics
,
data
);
DeptDicList
(
HospitalId
,
deptDics
,
data
);
}
}
...
...
performance/Performance.Services/UserService.cs
View file @
0ae84bc2
...
@@ -30,6 +30,7 @@ public class UserService : IAutoInjection
...
@@ -30,6 +30,7 @@ public class UserService : IAutoInjection
private
PerforResaccountRepository
_resaccountRepository
;
private
PerforResaccountRepository
_resaccountRepository
;
private
PerforPerallotRepository
_perallotRepository
;
private
PerforPerallotRepository
_perallotRepository
;
private
PerforPerdeptdicRepository
_perdeptdicRepository
;
private
PerforPerdeptdicRepository
_perdeptdicRepository
;
private
readonly
PerforCofaccountingRepository
perforCofaccountingRepository
;
public
UserService
(
IOptions
<
Application
>
application
,
public
UserService
(
IOptions
<
Application
>
application
,
PerforSmsRepository
smsRepository
,
PerforSmsRepository
smsRepository
,
...
@@ -44,7 +45,8 @@ public class UserService : IAutoInjection
...
@@ -44,7 +45,8 @@ public class UserService : IAutoInjection
PerforImspecialunitRepository
imspecialunitRepository
,
PerforImspecialunitRepository
imspecialunitRepository
,
PerforResaccountRepository
resaccountRepository
,
PerforResaccountRepository
resaccountRepository
,
PerforPerallotRepository
perallotRepository
,
PerforPerallotRepository
perallotRepository
,
PerforPerdeptdicRepository
perdeptdicRepository
)
PerforPerdeptdicRepository
perdeptdicRepository
,
PerforCofaccountingRepository
perforCofaccountingRepository
)
{
{
this
.
application
=
application
.
Value
;
this
.
application
=
application
.
Value
;
this
.
_userRepository
=
userRepository
;
this
.
_userRepository
=
userRepository
;
...
@@ -60,6 +62,7 @@ public class UserService : IAutoInjection
...
@@ -60,6 +62,7 @@ public class UserService : IAutoInjection
this
.
_resaccountRepository
=
resaccountRepository
;
this
.
_resaccountRepository
=
resaccountRepository
;
this
.
_perallotRepository
=
perallotRepository
;
this
.
_perallotRepository
=
perallotRepository
;
this
.
_perdeptdicRepository
=
perdeptdicRepository
;
this
.
_perdeptdicRepository
=
perdeptdicRepository
;
this
.
perforCofaccountingRepository
=
perforCofaccountingRepository
;
}
}
/// <summary>
/// <summary>
...
@@ -733,7 +736,9 @@ public int SaveUserHandsFlat(UserCollectData request)
...
@@ -733,7 +736,9 @@ public int SaveUserHandsFlat(UserCollectData request)
var
roles
=
_roleRepository
.
GetEntities
();
var
roles
=
_roleRepository
.
GetEntities
();
var
hospitals
=
_hospitalRepository
.
GetEntities
();
var
hospitals
=
_hospitalRepository
.
GetEntities
();
//hack:后续修改为accounting中的数据
//hack:后续修改为accounting中的数据
var
depts
=
_perdeptdicRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
)?.
Select
(
w
=>
w
.
Department
).
Distinct
();
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
();
List
<
sys_user
>
users
=
new
List
<
sys_user
>();
List
<
sys_user
>
users
=
new
List
<
sys_user
>();
List
<
sys_user_role
>
userRoles
=
new
List
<
sys_user_role
>();
List
<
sys_user_role
>
userRoles
=
new
List
<
sys_user_role
>();
...
@@ -744,9 +749,9 @@ public int SaveUserHandsFlat(UserCollectData request)
...
@@ -744,9 +749,9 @@ public int SaveUserHandsFlat(UserCollectData request)
var
json
=
JsonHelper
.
Serialize
(
item
);
var
json
=
JsonHelper
.
Serialize
(
item
);
var
data
=
JsonHelper
.
Deserialize
<
UserHandsResponse
>(
json
);
var
data
=
JsonHelper
.
Deserialize
<
UserHandsResponse
>(
json
);
if
(
roleArr
.
Contains
(
data
.
RoleName
)
&&
(
depts
==
null
||
!
dept
s
.
Any
()))
return
0
;
if
(
roleArr
.
Contains
(
data
.
RoleName
)
&&
(
res
==
null
||
!
re
s
.
Any
()))
return
0
;
if
(
users
.
Any
(
c
=>
c
.
Login
==
data
?.
Login
)
||
getUsers
.
Any
(
c
=>
c
.
Login
==
data
?.
Login
))
return
2
;
if
(
users
.
Any
(
c
=>
c
.
Login
==
data
?.
Login
)
||
getUsers
.
Any
(
c
=>
c
.
Login
==
data
?.
Login
))
return
2
;
if
(
roleArr
.
Contains
(
data
.
RoleName
)
&&
!
depts
.
Any
(
t
=>
t
==
data
.
Department
))
return
3
;
if
(
roleArr
.
Contains
(
data
.
RoleName
)
&&
!
res
.
Any
(
t
=>
t
.
AccountingUni
t
==
data
.
Department
))
return
3
;
if
(!
string
.
IsNullOrEmpty
(
data
.
Login
)
&&
!
string
.
IsNullOrEmpty
(
data
.
RealName
)
&&
!
string
.
IsNullOrEmpty
(
data
.
HosName
))
if
(!
string
.
IsNullOrEmpty
(
data
.
Login
)
&&
!
string
.
IsNullOrEmpty
(
data
.
RealName
)
&&
!
string
.
IsNullOrEmpty
(
data
.
HosName
))
{
{
...
...
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