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
3a7f28f3
Commit
3a7f28f3
authored
Apr 10, 2019
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
丢失代码找回
parent
120f42dd
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
2 deletions
+34
-2
performance/Performance.Api/Controllers/AccountController.cs
+15
-0
performance/Performance.Repository/BaseRepository.cs
+7
-0
performance/Performance.Repository/PerforCofdirectorRepository.cs
+2
-1
performance/Performance.Services/AgainAllotService.cs
+10
-1
No files found.
performance/Performance.Api/Controllers/AccountController.cs
View file @
3a7f28f3
...
@@ -115,6 +115,21 @@ public ApiResponse<List<UserResponse>> List([FromBody]ApiRequest request)
...
@@ -115,6 +115,21 @@ public ApiResponse<List<UserResponse>> List([FromBody]ApiRequest request)
/// </summary>
/// </summary>
/// <param name="request"></param>
/// <param name="request"></param>
/// <returns></returns>
/// <returns></returns>
[
Route
(
"insert"
)]
[
HttpPost
]
public
ApiResponse
<
UserResponse
>
Insert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
UserRequest
request
)
{
var
userIdentity
=
_claim
.
At
(
request
.
Token
);
var
user
=
_userService
.
Insert
(
request
,
userIdentity
.
UserID
);
user
.
Role
=
request
.
Role
;
return
new
ApiResponse
<
UserResponse
>(
ResponseType
.
OK
,
user
);
}
/// <summary>
/// 新增用户
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"delete"
)]
[
Route
(
"delete"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
Delete
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
UserRequest
request
)
public
ApiResponse
Delete
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
UserRequest
request
)
...
...
performance/Performance.Repository/BaseRepository.cs
View file @
3a7f28f3
...
@@ -74,6 +74,13 @@ public bool Update(TEntity entity)
...
@@ -74,6 +74,13 @@ public bool Update(TEntity entity)
return
context
.
SaveChanges
()
>
0
;
return
context
.
SaveChanges
()
>
0
;
}
}
public
bool
Update
(
TEntity
entity
,
Action
<
TEntity
>
action
)
{
action
?.
Invoke
(
entity
);
context
.
Set
<
TEntity
>().
Update
(
entity
);
return
context
.
SaveChanges
()
>
0
;
}
public
List
<
TEntity
>
GetEntities
()
public
List
<
TEntity
>
GetEntities
()
{
{
return
context
.
Set
<
TEntity
>().
ToList
();
return
context
.
Set
<
TEntity
>().
ToList
();
...
...
performance/Performance.Repository/PerforCofdirectorRepository.cs
View file @
3a7f28f3
...
@@ -44,7 +44,8 @@ public int DelAgain(int againid)
...
@@ -44,7 +44,8 @@ public int DelAgain(int againid)
{
{
"ag_data"
,
"ag_data"
,
"ag_employee"
,
"ag_employee"
,
"ag_header"
"ag_header"
,
"ag_againsituation"
};
};
string
sql
=
""
;
string
sql
=
""
;
tableArray
.
ForEach
(
t
=>
sql
+=
$"delete from
{
t
}
where againallotid=@againid;"
);
tableArray
.
ForEach
(
t
=>
sql
+=
$"delete from
{
t
}
where againallotid=@againid;"
);
...
...
performance/Performance.Services/AgainAllotService.cs
View file @
3a7f28f3
...
@@ -71,9 +71,12 @@ public bool Generate(AgainAllotRequest request, UserIdentity user)
...
@@ -71,9 +71,12 @@ public bool Generate(AgainAllotRequest request, UserIdentity user)
if
(
againAllot
==
null
||
againAllot
.
ID
==
0
)
if
(
againAllot
==
null
||
againAllot
.
ID
==
0
)
throw
new
PerformanceException
(
"绩效二次分配不存在"
);
throw
new
PerformanceException
(
"绩效二次分配不存在"
);
perforPeragainallotRepository
.
Update
(
againAllot
,
p
=>
{
p
.
States
=
2
;
});
//清理二次绩效无用数据
//清理二次绩效无用数据
configService
.
ClearAgain
(
againAllot
.
ID
);
configService
.
ClearAgain
(
againAllot
.
ID
);
try
{
#
region
基础信息
#
region
基础信息
//获取基础配置信息
//获取基础配置信息
var
config
=
perforCofagainRepository
.
GetEntities
(
t
=>
t
.
AgainAllotID
==
againAllot
.
ID
);
var
config
=
perforCofagainRepository
.
GetEntities
(
t
=>
t
.
AgainAllotID
==
againAllot
.
ID
);
...
@@ -211,6 +214,12 @@ public bool Generate(AgainAllotRequest request, UserIdentity user)
...
@@ -211,6 +214,12 @@ public bool Generate(AgainAllotRequest request, UserIdentity user)
perforAgdataRepository
.
AddRange
(
dataList
.
ToArray
());
perforAgdataRepository
.
AddRange
(
dataList
.
ToArray
());
#
endregion
#
endregion
}
catch
(
Exception
ex
)
{
perforPeragainallotRepository
.
Update
(
againAllot
,
p
=>
{
p
.
States
=
4
;
p
.
Remark
=
ex
.
ToString
();
});
}
perforPeragainallotRepository
.
Update
(
againAllot
,
p
=>
{
p
.
States
=
3
;
});
return
true
;
return
true
;
//return SheetFormat(perAgainExcel, situation);
//return SheetFormat(perAgainExcel, situation);
}
}
...
...
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