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
bca53ce4
Commit
bca53ce4
authored
May 07, 2022
by
1391696987
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复手工录入无权限报错
parent
505217c5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
performance/Performance.Api/Properties/PublishProfiles/FolderProfile.pubxml
+1
-1
performance/Performance.Services/EmployeeService.cs
+12
-3
No files found.
performance/Performance.Api/Properties/PublishProfiles/FolderProfile.pubxml
View file @
bca53ce4
...
@@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
...
@@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PropertyGroup>
<DeleteExistingFiles>
Tru
e</DeleteExistingFiles>
<DeleteExistingFiles>
Fals
e</DeleteExistingFiles>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ExcludeApp_Data>False</ExcludeApp_Data>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
...
...
performance/Performance.Services/EmployeeService.cs
View file @
bca53ce4
...
@@ -1414,18 +1414,27 @@ public GatherResponse GetGatherTotal(Gather gather)
...
@@ -1414,18 +1414,27 @@ public GatherResponse GetGatherTotal(Gather gather)
}
}
var
user
=
userRepository
.
GetEntities
();
var
user
=
userRepository
.
GetEntities
();
var
userLogin
=
user
.
FirstOrDefault
(
t
=>
t
.
ID
==
gather
.
UserId
);
var
userLogin
=
user
.
FirstOrDefault
(
t
=>
t
.
ID
==
gather
.
UserId
);
if
(
userLogin
.
Login
!=
"admin"
)
{
var
userSource
=
perforcollectpermissionRepository
.
GetEntities
(
t
=>
t
.
UserId
==
gather
.
UserId
)
var
userSource
=
perforcollectpermissionRepository
.
GetEntities
(
t
=>
t
.
UserId
==
gather
.
UserId
)
.
Select
(
s
=>
Regex
.
Replace
(
s
.
SheetName
.
Replace
(
" "
,
""
).
Replace
(
"."
,
""
),
"[0-9]"
,
""
))
.
Select
(
s
=>
Regex
.
Replace
(
s
.
SheetName
.
Replace
(
" "
,
""
).
Replace
(
"."
,
""
),
"[0-9]"
,
""
))
.
Distinct
().
ToList
();
.
Distinct
().
ToList
();
if
(
userLogin
.
Login
!=
"admin"
)
{
if
(
userSource
.
Count
()
!=
0
)
{
exp
=
exp
.
And
(
t
=>
userSource
.
Contains
(
t
.
Source
));
exp
=
exp
.
And
(
t
=>
userSource
.
Contains
(
t
.
Source
));
var
hasDepartment
=
perdeptdicRepository
.
GetEntities
(
p
=>
p
.
AccountingUnit
.
Contains
(
userLogin
.
Department
)).
Select
(
s
=>
s
.
HISDeptName
).
Distinct
().
ToList
();
var
hasDepartment
=
perdeptdicRepository
.
GetEntities
(
p
=>
p
.
AccountingUnit
.
Contains
(
userLogin
.
Department
)).
Select
(
s
=>
s
.
HISDeptName
).
Distinct
().
ToList
();
exp
=
exp
.
And
(
t
=>
hasDepartment
.
Contains
(
t
.
Department
));
exp
=
exp
.
And
(
t
=>
hasDepartment
.
Contains
(
t
.
Department
));
}
}
}
List
<
ex_result_gather
>
exresultgather
=
new
List
<
ex_result_gather
>();
if
(
userSource
.
Count
()
!=
0
)
{
exresultgather
=
exresultgatherRepository
.
GetEntities
(
exp
);
}
var
datas
=
exresultgather
Repository
.
GetEntities
(
exp
)
var
datas
=
exresultgather
.
GroupBy
(
t
=>
new
{
t
.
Department
,
t
.
Source
,
t
.
Category
,
t
.
Submitter
})
.
GroupBy
(
t
=>
new
{
t
.
Department
,
t
.
Source
,
t
.
Category
,
t
.
Submitter
})
.
Select
(
s
=>
new
.
Select
(
s
=>
new
{
{
...
...
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