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
bdfea2f8
Commit
bdfea2f8
authored
May 10, 2021
by
tangzhongyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
职称补贴
parent
b43aaf28
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
Performance.Subsidy/Performance.Subsidy.Api/Controllers/SubsidyController.cs
+6
-6
Performance.Subsidy/Performance.Subsidy.Services/SubsidyService.cs
+4
-5
No files found.
Performance.Subsidy/Performance.Subsidy.Api/Controllers/SubsidyController.cs
View file @
bdfea2f8
...
...
@@ -49,25 +49,25 @@ public class SubsidyController : ControllerBase
[
HttpPost
(
"{allotId}/jobtitle"
)]
public
ApiResponse
SaveJobTitle
(
int
allotId
,[
FromBody
]
List
<
sub_jobtitle
>
sub_Jobtitle
)
{
bool
a
=
_service
.
SaveJobTitle
(
allotId
,
sub_Jobtitle
);
return
new
ApiResponse
(
Status
.
Ok
,
a
);
bool
result
=
_service
.
SaveJobTitle
(
allotId
,
sub_Jobtitle
);
return
new
ApiResponse
(
Status
.
Ok
,
result
);
}
// 个人职称补贴结果查询
[
HttpGet
(
"{allotId}/jobtitle/subsidy"
)]
public
ApiResponse
GetJobTitleSubsidy
(
int
allotId
)
{
List
<
sub_subsidy
>
a
=
_service
.
GetJobTitleSubsidy
(
allotId
);
List
<
sub_subsidy
>
subsidies
=
_service
.
GetJobTitleSubsidy
(
allotId
);
return
new
ApiResponse
(
Status
.
Ok
,
a
);
return
new
ApiResponse
(
Status
.
Ok
,
subsidies
);
}
// 个人职称补贴结果保存
[
HttpPost
(
"{allotId}/jobtitle/subsidy"
)]
public
ApiResponse
SaveJobTitleSubsidy
(
int
allotId
,
[
FromBody
]
List
<
sub_subsidy
>
subsidys
)
{
bool
a
=
_service
.
SaveJobTitleSubsidy
(
allotId
,
subsidys
);
return
new
ApiResponse
(
Status
.
Ok
,
a
);
bool
result
=
_service
.
SaveJobTitleSubsidy
(
allotId
,
subsidys
);
return
new
ApiResponse
(
Status
.
Ok
,
result
);
}
}
}
Performance.Subsidy/Performance.Subsidy.Services/SubsidyService.cs
View file @
bdfea2f8
...
...
@@ -38,15 +38,14 @@ public bool SaveJobTitle(int allotId, List<sub_jobtitle> jobtitle)
var
CreateDefault
=
_factory
.
CreateDefault
();
var
result
=
jobtitle
.
Select
(
t
=>
new
{
AllotID
=
allotId
,
t
.
BasicPerforFee
,
t
.
JobTitle
});
var
modify
=
CreateDefault
.
Execute
(
$" update `sub_jobtitle` set BasicPerforFee =@BasicPerforFee WHERE AllotID=@allotId and JobTitle=@JobTitle; "
,
result
);
var
storedProcedure
=
CreateDefault
.
Execute
(
"call proc_performance_subsidy(@allotId) ;"
,
result
);
return
modify
>
0
&&
storedProcedure
>
0
;
CreateDefault
.
Execute
(
"call proc_performance_subsidy(@allotId) ;"
,
new
{
allotId
});
return
modify
>
0
;
}
public
List
<
sub_subsidy
>
GetJobTitleSubsidy
(
int
allotId
)
{
IEnumerable
<
sub_subsidy
>
_Subsidies
=
_factory
.
CreateDefault
().
Query
<
sub_subsidy
>(
@"
select*from sub_subsidy where RealAmount is not null and AllotID=@allotId and RealAmount is not null "
,
new
{
allotId
});
select*from sub_subsidy where RealAmount is not null and AllotID=@allotId and RealAmount is not null "
,
new
{
allotId
});
return
_Subsidies
?.
ToList
();
}
...
...
@@ -54,7 +53,7 @@ public bool SaveJobTitleSubsidy(int allotId, List<sub_subsidy> subsidys)
{
var
result
=
subsidys
.
Select
(
t
=>
new
{
t
.
RealAmount
,
AllotID
=
allotId
,
t
.
PersonnelNumber
});
return
_factory
.
CreateDefault
().
Execute
(
@
$"update sub_subsidy set
GiveAmount
=
Attendance
*
BasicPerforFee
,
RealAmount
=
@RealAmount
where
AllotID
=
@allotId
and
PersonnelNumber
=
@PersonnelNumber
;
",result)>0;
GiveAmount
=
Attendance
*
BasicPerforFee
,
RealAmount
=
@RealAmount
where
AllotID
=
@allotId
and
PersonnelNumber
=
@PersonnelNumber
;
",result)>0;
}
}
}
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