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
750d69b2
Commit
750d69b2
authored
May 15, 2019
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
参数调整
parent
26e20398
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
performance/Performance.Api/Controllers/AllotController.cs
+1
-1
performance/Performance.Services/AllotService.cs
+4
-4
No files found.
performance/Performance.Api/Controllers/AllotController.cs
View file @
750d69b2
...
@@ -157,7 +157,7 @@ public ApiResponse Generate([CustomizeValidator(RuleSet = "Delete"), FromBody]Al
...
@@ -157,7 +157,7 @@ public ApiResponse Generate([CustomizeValidator(RuleSet = "Delete"), FromBody]Al
throw
new
PerformanceException
(
"当前绩效记录不存在或没有上传数据文件"
);
throw
new
PerformanceException
(
"当前绩效记录不存在或没有上传数据文件"
);
var
user
=
_claim
.
At
(
request
);
var
user
=
_claim
.
At
(
request
);
//_allotService.Generate(allot, user);
//_allotService.Generate(allot, user);
BackgroundJob
.
Enqueue
(()
=>
_allotService
.
Generate
(
allot
,
user
));
BackgroundJob
.
Enqueue
(()
=>
_allotService
.
Generate
(
allot
,
user
.
Mail
));
return
new
ApiResponse
(
ResponseType
.
OK
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
}
...
...
performance/Performance.Services/AllotService.cs
View file @
750d69b2
...
@@ -186,7 +186,7 @@ public bool Update(per_allot allot)
...
@@ -186,7 +186,7 @@ public bool Update(per_allot allot)
/// </summary>
/// </summary>
/// <param name="allot"></param>
/// <param name="allot"></param>
/// <param name="user"></param>
/// <param name="user"></param>
public
void
Generate
(
per_allot
allot
,
UserIdentity
user
)
public
void
Generate
(
per_allot
allot
,
string
mail
)
{
{
DateTime
time
=
DateTime
.
Now
;
DateTime
time
=
DateTime
.
Now
;
try
try
...
@@ -199,7 +199,7 @@ public void Generate(per_allot allot, UserIdentity user)
...
@@ -199,7 +199,7 @@ public void Generate(per_allot allot, UserIdentity user)
if
(!
checkDataService
.
Check
(
excel
,
allot
))
if
(!
checkDataService
.
Check
(
excel
,
allot
))
{
{
_allotRepository
.
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
CheckFail
,
EnumHelper
.
GetDescription
(
AllotStates
.
CheckFail
));
_allotRepository
.
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
CheckFail
,
EnumHelper
.
GetDescription
(
AllotStates
.
CheckFail
));
SendEmail
(
allot
,
user
.
M
ail
,
3
,
time
);
SendEmail
(
allot
,
m
ail
,
3
,
time
);
logdbug
.
Add
(
allot
.
ID
,
"绩效数据校验失败"
,
JsonHelper
.
Serialize
(
allot
));
logdbug
.
Add
(
allot
.
ID
,
"绩效数据校验失败"
,
JsonHelper
.
Serialize
(
allot
));
return
;
return
;
}
}
...
@@ -217,13 +217,13 @@ public void Generate(per_allot allot, UserIdentity user)
...
@@ -217,13 +217,13 @@ public void Generate(per_allot allot, UserIdentity user)
_allotRepository
.
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
GenerateSucceed
,
EnumHelper
.
GetDescription
(
AllotStates
.
GenerateSucceed
));
_allotRepository
.
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
GenerateSucceed
,
EnumHelper
.
GetDescription
(
AllotStates
.
GenerateSucceed
));
//发送邮件
//发送邮件
SendEmail
(
allot
,
user
.
M
ail
,
1
,
time
);
SendEmail
(
allot
,
m
ail
,
1
,
time
);
logdbug
.
Add
(
allot
.
ID
,
"绩效开始执行"
,
"绩效生成成功"
);
logdbug
.
Add
(
allot
.
ID
,
"绩效开始执行"
,
"绩效生成成功"
);
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
_allotRepository
.
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
GenerateFail
,
EnumHelper
.
GetDescription
(
AllotStates
.
GenerateFail
));
_allotRepository
.
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
GenerateFail
,
EnumHelper
.
GetDescription
(
AllotStates
.
GenerateFail
));
SendEmail
(
allot
,
user
.
M
ail
,
2
,
time
);
SendEmail
(
allot
,
m
ail
,
2
,
time
);
logdbug
.
Add
(
allot
.
ID
,
"绩效开始执行"
,
ex
.
ToString
());
logdbug
.
Add
(
allot
.
ID
,
"绩效开始执行"
,
ex
.
ToString
());
//throw ex;
//throw ex;
}
}
...
...
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