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
ee39c22e
Commit
ee39c22e
authored
Jun 06, 2022
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
个人绩效查询取消登录验证
parent
03339a8d
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
107 additions
and
62 deletions
+107
-62
performance/Performance.Api/Controllers/AllotController.cs
+4
-3
performance/Performance.Api/wwwroot/Performance.Api.xml
+2
-1
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+10
-0
performance/Performance.DtoModels/Response/OwnerPerformanceDto.cs
+7
-0
performance/Performance.EntityModels/Other/view_allot_sign_emp.cs
+7
-5
performance/Performance.EntityModels/Other/view_per_apr_amount.cs
+15
-0
performance/Performance.Repository/PerforReportRepository .cs
+28
-0
performance/Performance.Services/AllotService.cs
+34
-53
No files found.
performance/Performance.Api/Controllers/AllotController.cs
View file @
ee39c22e
...
...
@@ -560,14 +560,15 @@ public ApiResponse GetOwnerPerformance()
/// <summary>
/// H5查询个人绩效
/// </summary>
/// <param name="jobNumber">员工工号</param>
/// <param name="begin">开始月份:2021-03</param>
/// <param name="end">结束月份:2021-04</param>
/// <returns></returns>
[
Route
(
"owner/query/mobile"
)]
[
HttpGet
]
public
ApiResponse
<
List
<
OwnerMobilePerformanceDto
>>
GetOwnerMobilePerformance
(
string
begin
=
""
,
string
end
=
""
)
[
AllowAnonymous
]
public
ApiResponse
<
List
<
OwnerMobilePerformanceDto
>>
GetOwnerMobilePerformance
(
string
jobNumber
=
""
,
string
begin
=
""
,
string
end
=
""
)
{
var
userid
=
_claim
.
GetUserId
();
var
beginDate
=
begin
.
ToTryDateTime
();
var
endDate
=
end
.
ToTryDateTime
();
...
...
@@ -575,7 +576,7 @@ public ApiResponse<List<OwnerMobilePerformanceDto>> GetOwnerMobilePerformance(st
throw
new
PerformanceException
(
"您选择的时间范围无效"
);
endDate
=
endDate
.
AddMonths
(
1
);
var
dtos
=
_allotService
.
GetOwnerMobilePerformance
(
userid
,
beginDate
,
endDate
);
var
dtos
=
_allotService
.
GetOwnerMobilePerformance
(
jobNumber
,
beginDate
,
endDate
);
return
new
ApiResponse
<
List
<
OwnerMobilePerformanceDto
>>(
ResponseType
.
OK
,
dtos
);
}
}
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
ee39c22e
...
...
@@ -338,10 +338,11 @@
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.AllotController.GetOwnerMobilePerformance(System.String,System.String)"
>
<member
name=
"M:Performance.Api.Controllers.AllotController.GetOwnerMobilePerformance(System.String,System.String
,System.String
)"
>
<summary>
H5查询个人绩效
</summary>
<param
name=
"jobNumber"
>
员工工号
</param>
<param
name=
"begin"
>
开始月份:2021-03
</param>
<param
name=
"end"
>
结束月份:2021-04
</param>
<returns></returns>
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
ee39c22e
...
...
@@ -8945,6 +8945,16 @@
费用
</summary>
</member>
<member
name=
"P:Performance.EntityModels.view_other_amount.UnitType"
>
<summary>
核算单元组别
</summary>
</member>
<member
name=
"P:Performance.EntityModels.view_other_amount.AccountingUnit"
>
<summary>
核算单元
</summary>
</member>
<member
name=
"P:Performance.EntityModels.view_per_apr_amount.UnitType"
>
<summary>
核算单元组别
...
...
performance/Performance.DtoModels/Response/OwnerPerformanceDto.cs
View file @
ee39c22e
...
...
@@ -50,6 +50,13 @@ public class OwnerMobileItemDto
}
public
class
OwnerMobileItemDetailDto
{
public
OwnerMobileItemDetailDto
(
string
title
,
decimal
amount
,
string
date
)
{
Title
=
title
;
Amount
=
amount
;
Date
=
date
;
}
/// <summary>
/// 类型名称
/// </summary>
...
...
performance/Performance.EntityModels/Other/view_allot_sign_emp.cs
View file @
ee39c22e
...
...
@@ -2,10 +2,10 @@
{
public
class
view_allot_sign_emp_finance
{
public
string
HospitalID
{
get
;
set
;
}
public
string
Year
{
get
;
set
;
}
public
string
Month
{
get
;
set
;
}
public
string
AllotId
{
get
;
set
;
}
public
int
HospitalID
{
get
;
set
;
}
public
int
Year
{
get
;
set
;
}
public
int
Month
{
get
;
set
;
}
public
int
AllotId
{
get
;
set
;
}
public
string
JobNumber
{
get
;
set
;
}
public
string
EmployeeName
{
get
;
set
;
}
public
string
JobTitle
{
get
;
set
;
}
...
...
@@ -29,12 +29,14 @@ public class view_allot_sign_emp_finance
public
class
view_allot_sign_emp
:
view_allot_sign_emp_finance
{
public
int
Source
{
get
;
set
;
}
public
string
Source
{
get
;
set
;
}
public
int
SecondId
{
get
;
set
;
}
public
int
States
{
get
;
set
;
}
public
string
IsShowManage
{
get
;
set
;
}
public
string
Emp_UnitType
{
get
;
set
;
}
public
string
Emp_AccountingUnit
{
get
;
set
;
}
public
string
Batch
{
get
;
set
;
}
public
string
BatchDate
{
get
;
set
;
}
public
string
BankName
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Other/view_per_apr_amount.cs
View file @
ee39c22e
...
...
@@ -2,6 +2,21 @@
namespace
Performance.EntityModels
{
public
class
view_other_amount
{
public
int
AllotId
{
get
;
set
;
}
public
string
PersonnelNumber
{
get
;
set
;
}
/// <summary>
/// 核算单元组别
/// </summary>
public
string
UnitType
{
get
;
set
;
}
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
public
string
PerforType
{
get
;
set
;
}
public
decimal
Amount
{
get
;
set
;
}
}
public
class
view_per_apr_amount
:
per_apr_amount
{
/// <summary>
...
...
performance/Performance.Repository/PerforReportRepository .cs
View file @
ee39c22e
...
...
@@ -397,6 +397,34 @@ public List<view_allot_result> GetOwnerPerformance(List<int> hospitalId, string
return
DapperQuery
<
view_allot_result
>(
sql
,
new
{
HospitalID
=
hospitalId
,
JobNumber
=
jobNumber
})?.
ToList
();
}
public
List
<
view_allot_sign_emp
>
GetOwnerPerformance
(
string
jobNumber
)
{
string
sql
=
"SELECT * FROM freeze_allot_sign_emp WHERE (States = 8 OR IFNULL(Batch,'') != '') AND JobNumber=@JobNumber"
;
return
DapperQuery
<
view_allot_sign_emp
>(
sql
,
new
{
JobNumber
=
jobNumber
})?.
ToList
();
}
/// <summary>
/// 个人绩效查询 医院其他绩效
/// </summary>
/// <param name="jobNumber"></param>
/// <returns></returns>
public
List
<
view_other_amount
>
GetOwnerOtherAmount
(
string
jobNumber
)
{
string
sql
=
"SELECT * FROM view_other_amount WHERE Status = 3 AND PersonnelNumber = @JobNumber"
;
return
DapperQuery
<
view_other_amount
>(
sql
,
new
{
JobNumber
=
jobNumber
})?.
ToList
();
}
/// <summary>
/// 个人绩效查询 不公示其他绩效
/// </summary>
/// <param name="jobNumber"></param>
/// <returns></returns>
public
List
<
view_other_amount
>
GetOwnerOtherAmountHide
(
string
jobNumber
)
{
string
sql
=
"SELECT * FROM view_other_amount_hide WHERE Status = 3 AND PersonnelNumber = @JobNumber"
;
return
DapperQuery
<
view_other_amount
>(
sql
,
new
{
JobNumber
=
jobNumber
})?.
ToList
();
}
public
List
<
dynamic
>
QueryCompute
(
int
allotId
,
string
viewName
)
{
var
sql
=
$@"SELECT * FROM
{
viewName
}
WHERE AllotId = @AllotId; "
;
...
...
performance/Performance.Services/AllotService.cs
View file @
ee39c22e
...
...
@@ -782,16 +782,14 @@ public List<OwnerPerformanceDto> GetOwnerPerformance(int userid)
/// <param name="beginDate"></param>
/// <param name="endDate"></param>
/// <returns></returns>
public
List
<
OwnerMobilePerformanceDto
>
GetOwnerMobilePerformance
(
int
userid
,
DateTime
beginDate
,
DateTime
endDate
)
public
List
<
OwnerMobilePerformanceDto
>
GetOwnerMobilePerformance
(
string
jobNumber
,
DateTime
beginDate
,
DateTime
endDate
)
{
List
<
OwnerMobilePerformanceDto
>
dtos
=
new
List
<
OwnerMobilePerformanceDto
>();
var
datas
=
GetOwnerPerformance
(
userid
);
var
datas
=
_reportRepository
.
GetOwnerPerformance
(
jobNumber
)
??
new
List
<
view_allot_sign_emp
>();
var
otherAmounts
=
_reportRepository
.
GetOwnerOtherAmount
(
jobNumber
)
??
new
List
<
view_other_amount
>();
var
otherAmountHides
=
_reportRepository
.
GetOwnerOtherAmountHide
(
jobNumber
)
??
new
List
<
view_other_amount
>();
if
(
datas
==
null
||
datas
.
Count
==
0
)
return
dtos
;
var
filterDatas
=
datas
.
Where
(
w
=>
(
new
DateTime
(
w
.
Year
,
w
.
Month
,
1
))
>=
beginDate
&&
(
new
DateTime
(
w
.
Year
,
w
.
Month
,
1
))
<
endDate
);
var
filterDatas
=
datas
.
Where
(
w
=>
(
new
DateTime
(
w
.
Year
,
w
.
Month
,
1
))
>=
beginDate
&&
(
new
DateTime
(
w
.
Year
,
w
.
Month
,
1
))
<
endDate
);
var
groupDatas
=
filterDatas
.
GroupBy
(
w
=>
w
.
JobNumber
);
foreach
(
var
item
in
groupDatas
)
...
...
@@ -799,72 +797,55 @@ public List<OwnerMobilePerformanceDto> GetOwnerMobilePerformance(int userid, Dat
var
perforSumFee
=
new
OwnerMobileItemDto
{
Title
=
"业绩绩效"
,
Amount
=
item
.
Sum
(
w
=>
w
.
PerforSumFee
)
??
0
,
Details
=
item
.
SelectMany
(
w
=>
w
.
Detail
)
.
Where
(
w
=>
(
w
.
PerforSumFee
??
0
)
!=
0
&&
!
string
.
IsNullOrEmpty
(
w
.
IssueDate
))
.
Select
(
w
=>
new
OwnerMobileItemDetailDto
{
Title
=
w
.
AccountingUnit
,
Amount
=
w
.
PerforSumFee
??
0
,
Date
=
w
.
IssueDate
,
}).
ToList
()
Amount
=
item
.
Sum
(
w
=>
w
.
PerforSumFee
),
Details
=
item
.
Where
(
w
=>
(
w
.
PerforSumFee
)
!=
0
)
.
Select
(
w
=>
new
OwnerMobileItemDetailDto
(
w
.
AccountingUnit
,
w
.
PerforSumFee
,
w
.
BatchDate
)).
ToList
()
};
var
perforManagementFee
=
new
OwnerMobileItemDto
{
Title
=
"管理绩效"
,
Amount
=
item
.
Sum
(
w
=>
w
.
PerforManagementFee
)
??
0
,
Details
=
item
.
SelectMany
(
w
=>
w
.
Detail
)
.
Where
(
w
=>
(
w
.
PerforManagementFee
??
0
)
!=
0
&&
!
string
.
IsNullOrEmpty
(
w
.
IssueDate
))
.
Select
(
w
=>
new
OwnerMobileItemDetailDto
{
Title
=
w
.
AccountingUnit
,
Amount
=
w
.
PerforManagementFee
??
0
,
Date
=
w
.
IssueDate
,
}).
ToList
()
Amount
=
item
.
Sum
(
w
=>
w
.
PerforManagementFee
),
Details
=
item
.
Where
(
w
=>
w
.
PerforManagementFee
!=
0
)
.
Select
(
w
=>
new
OwnerMobileItemDetailDto
(
w
.
AccountingUnit
,
w
.
PerforManagementFee
,
w
.
BatchDate
)).
ToList
()
};
var
nightWorkPerfor
=
new
OwnerMobileItemDto
{
Title
=
"夜班绩效"
,
Amount
=
item
.
Sum
(
w
=>
w
.
NightWorkPerfor
)
??
0
,
Details
=
item
.
SelectMany
(
w
=>
w
.
Detail
)
.
Where
(
w
=>
(
w
.
NightWorkPerfor
??
0
)
!=
0
&&
!
string
.
IsNullOrEmpty
(
w
.
IssueDate
))
.
Select
(
w
=>
new
OwnerMobileItemDetailDto
{
Title
=
w
.
AccountingUnit
,
Amount
=
w
.
NightWorkPerfor
??
0
,
Date
=
w
.
IssueDate
,
}).
ToList
()
Amount
=
item
.
Sum
(
w
=>
w
.
NightWorkPerfor
),
Details
=
item
.
Where
(
w
=>
w
.
NightWorkPerfor
!=
0
)
.
Select
(
w
=>
new
OwnerMobileItemDetailDto
(
w
.
AccountingUnit
,
w
.
NightWorkPerfor
,
w
.
BatchDate
)).
ToList
()
};
var
otherPerfor
=
new
OwnerMobileItemDto
{
Title
=
"医院其他绩效"
,
Amount
=
item
.
Sum
(
w
=>
w
.
OtherPerfor
)
??
0
,
Details
=
item
.
SelectMany
(
w
=>
w
.
Detail
)
.
Where
(
w
=>
(
w
.
OtherPerfor
??
0
)
!=
0
&&
!
string
.
IsNullOrEmpty
(
w
.
IssueDate
))
.
Select
(
w
=>
new
OwnerMobileItemDetailDto
{
Title
=
w
.
SourceItem
,
Amount
=
w
.
OtherPerfor
??
0
,
Date
=
w
.
IssueDate
,
}).
ToList
()
Amount
=
item
.
Sum
(
w
=>
w
.
OtherPerfor
),
Details
=
new
List
<
OwnerMobileItemDetailDto
>()
};
foreach
(
var
p
in
item
)
{
var
qt
=
otherAmounts
.
Where
(
w
=>
w
.
AllotId
==
p
.
AllotId
).
Select
(
w
=>
new
OwnerMobileItemDetailDto
(
w
.
PerforType
,
w
.
Amount
,
p
.
BatchDate
));
if
(
qt
.
Any
())
otherPerfor
.
Details
.
AddRange
(
qt
);
}
var
hideOtherPerfor
=
new
OwnerMobileItemDto
{
Title
=
"不公示其他绩效"
,
Amount
=
item
.
Sum
(
w
=>
w
.
HideOtherPerfor
)
??
0
,
Details
=
item
.
SelectMany
(
w
=>
w
.
Detail
)
.
Where
(
w
=>
(
w
.
HideOtherPerfor
??
0
)
!=
0
&&
!
string
.
IsNullOrEmpty
(
w
.
IssueDate
))
.
Select
(
w
=>
new
OwnerMobileItemDetailDto
{
Title
=
w
.
SourceItem
,
Amount
=
w
.
HideOtherPerfor
??
0
,
Date
=
w
.
IssueDate
,
}).
ToList
()
Amount
=
item
.
Sum
(
w
=>
w
.
HideOtherPerfor
),
Details
=
new
List
<
OwnerMobileItemDetailDto
>()
};
foreach
(
var
p
in
item
)
{
var
qt
=
otherAmountHides
.
Where
(
w
=>
w
.
AllotId
==
p
.
AllotId
).
Select
(
w
=>
new
OwnerMobileItemDetailDto
(
w
.
PerforType
,
w
.
Amount
,
p
.
BatchDate
));
if
(
qt
.
Any
())
hideOtherPerfor
.
Details
.
AddRange
(
qt
);
}
var
reservedRatioFee
=
new
OwnerMobileItemDto
{
Title
=
"预留绩效"
,
Amount
=
item
.
Sum
(
w
=>
w
.
ReservedRatioFee
)
??
0
,
Amount
=
item
.
Sum
(
w
=>
w
.
ReservedRatioFee
),
Details
=
new
List
<
OwnerMobileItemDetailDto
>()
};
...
...
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