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
f2dade06
Commit
f2dade06
authored
Jun 29, 2021
by
钟博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增划拨报表
parent
cc2b2d1f
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
108 additions
and
9 deletions
+108
-9
performance/Performance.Api/Controllers/CostTransferController.cs
+19
-0
performance/Performance.Api/wwwroot/Performance.Api.xml
+9
-0
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+0
-3
performance/Performance.DtoModels/Response/TransferReportResponse.cs
+37
-0
performance/Performance.Services/CostTransfer/CostTransferService.cs
+43
-6
No files found.
performance/Performance.Api/Controllers/CostTransferController.cs
View file @
f2dade06
...
...
@@ -144,5 +144,24 @@ public ApiResponse UpdateApplicat([FromBody] CostTransferUpdateRequest request)
costTransferService
.
UpdateApplicat
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
/// <summary>
/// 划拨报表
/// </summary>
/// <param name="allotId"></param>
/// <param name="auditType"></param>
/// <param name="detail"></param>
/// <returns></returns>
[
Route
(
"transfercontent/{allotId}/auditType/{auditType}"
)]
[
HttpPost
]
public
ApiResponse
TransferContent
(
int
allotId
,
int
auditType
,[
FromBody
]
DepartmentDetail
detail
)
{
if
(
allotId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
var
result
=
costTransferService
.
TransferContent
(
allotId
,
auditType
,
detail
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
}
}
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
f2dade06
...
...
@@ -738,6 +738,15 @@
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.CostTransferController.TransferContent(System.Int32,System.Int32,Performance.DtoModels.DepartmentDetail)"
>
<summary>
划拨报表
</summary>
<param
name=
"allotId"
></param>
<param
name=
"auditType"
></param>
<param
name=
"detail"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetEmployeeList(Performance.DtoModels.EmployeeRequest)"
>
<summary>
获取人员列表
...
...
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
f2dade06
...
...
@@ -163,9 +163,6 @@
<member
name=
"F:Performance.DtoModels.AllotStates.GenerateAccomplish"
>
<summary>
绩效结果解析成功
</summary>
</member>
<member
name=
"F:Performance.DtoModels.AllotStates.Issue"
>
<summary>
下发
</summary>
</member>
<member
name=
"F:Performance.DtoModels.AgWorkloadType.SingleAwards"
>
<summary>
单项奖励
...
...
performance/Performance.DtoModels/Response/TransferReportResponse.cs
0 → 100644
View file @
f2dade06
using
Performance.EntityModels
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
TransferReportResponse
{
public
int
Id
{
get
;
set
;
}
public
string
ApplicantUnitType
{
get
;
set
;
}
public
string
ApplicantDepartment
{
get
;
set
;
}
public
decimal
?
AmountSum
{
get
;
set
;
}
public
string
AdoptedUnitType
{
get
;
set
;
}
public
string
AdoptedDepartment
{
get
;
set
;
}
public
decimal
?
PassAmountSum
{
get
;
set
;
}
public
List
<
TransferItem
>
Items
{
get
;
set
;
}
}
public
class
TransferItem
:
cost_transfer_item
{
public
string
ApplicantUnitType
{
get
;
set
;
}
public
string
ApplicantDepartment
{
get
;
set
;
}
public
string
AdoptedUnitType
{
get
;
set
;
}
public
string
AdoptedDepartment
{
get
;
set
;
}
}
}
performance/Performance.Services/CostTransfer/CostTransferService.cs
View file @
f2dade06
...
...
@@ -129,7 +129,7 @@ public List<CostTransferResponse> GetAuditList(int allotId, int menuType, int ro
ApplicantDepartment
=
result
.
ApplicantDepartment
,
AdoptedDepartment
=
result
.
AdoptedDepartment
}).
OrderBy
(
t
=>
t
.
Status
).
ThenBy
(
t
=>
t
.
AdminStatus
).
ToList
();
}).
OrderBy
(
t
=>
t
.
Status
).
ThenBy
(
t
=>
t
.
AdminStatus
).
ToList
();
response
.
Add
(
result
);
}
...
...
@@ -648,17 +648,54 @@ public void UpdateCostTransferStatus(int transferId)
#
region
划拨报表
public
void
ApplicationContent
(
int
allotId
,
int
auditType
)
public
List
<
TransferReportResponse
>
TransferContent
(
int
allotId
,
int
auditType
,
DepartmentDetail
detail
)
{
var
transfers
=
costtransferRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Status
!=
3
&&
t
.
AdminStatus
!=
3
);
if
(
transfers
==
null
||
!
transfers
.
Any
())
return
;
if
(
transfers
==
null
||
!
transfers
.
Any
())
return
new
List
<
TransferReportResponse
>();
var
transferItems
=
costtransferitemRepository
.
GetEntities
(
t
=>
transfers
.
Select
(
w
=>
w
.
Id
).
Contains
(
t
.
TransferId
));
var
transferItems
=
costtransferitemRepository
.
GetEntities
(
t
=>
transfers
.
Select
(
w
=>
w
.
Id
).
Contains
(
t
.
TransferId
)
&&
t
.
Status
==
1
&&
t
.
AdminStatus
==
1
);
if
(
transferItems
==
null
||
!
transferItems
.
Any
())
return
;
if
(
transferItems
==
null
||
!
transferItems
.
Any
())
return
new
List
<
TransferReportResponse
>();
var
allItems
=
transferItems
.
Where
(
t
=>
t
.
Status
==
1
&&
t
.
AdminStatus
==
1
);
var
finalTransfer
=
transfers
.
Where
(
t
=>
allItems
.
Select
(
w
=>
w
.
TransferId
).
Distinct
().
Contains
(
t
.
Id
));
var
transferContent
=
finalTransfer
.
Select
(
t
=>
new
TransferReportResponse
{
ApplicantDepartment
=
t
.
ApplicantDepartment
,
ApplicantUnitType
=
t
.
ApplicantUnitType
,
AmountSum
=
transferItems
.
Where
(
w
=>
w
.
TransferId
==
t
.
Id
)?.
Sum
(
w
=>
w
.
CalculationAmount
.
Value
),
AdoptedDepartment
=
t
.
AdoptedDepartment
,
AdoptedUnitType
=
t
.
AdoptedUnitType
,
PassAmountSum
=
allItems
.
Where
(
w
=>
w
.
TransferId
==
t
.
Id
)?.
Sum
(
w
=>
w
.
CalculationAmount
.
Value
),
Items
=
allItems
.
Where
(
c
=>
c
.
TransferId
==
t
.
Id
).
Select
(
c
=>
new
TransferItem
{
ApplicantDepartment
=
t
.
ApplicantDepartment
,
ApplicantUnitType
=
t
.
ApplicantUnitType
,
AdoptedDepartment
=
t
.
AdoptedDepartment
,
AdoptedUnitType
=
t
.
AdoptedUnitType
,
IsUseRatio
=
c
.
IsUseRatio
,
Source
=
c
.
Source
,
Category
=
c
.
Category
,
Ratio
=
c
.
Ratio
,
CalculationAmount
=
c
.
CalculationAmount
}).
OrderBy
(
c
=>
c
.
TransferId
).
ToList
()
}).
ToList
();
switch
(
auditType
)
{
case
1
:
transferContent
=
transferContent
.
Where
(
t
=>
t
.
AdoptedDepartment
==
detail
.
Department
&&
t
.
AdoptedUnitType
==
detail
?.
UnitType
).
ToList
();
break
;
case
2
:
transferContent
=
transferContent
.
Where
(
t
=>
t
.
ApplicantDepartment
==
detail
.
Department
&&
t
.
ApplicantUnitType
==
detail
?.
UnitType
).
ToList
();
break
;
default
:
break
;
}
return
transferContent
;
}
#
endregion
...
...
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