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
103b61d0
Commit
103b61d0
authored
Jun 01, 2021
by
lcx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/抽取时添加抽取时间' into develop
parents
5cf63845
5f9204fa
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
61 additions
and
29 deletions
+61
-29
performance/Performance.Api/Controllers/ConfigController.cs
+1
-1
performance/Performance.Api/Controllers/TemplateController.cs
+2
-1
performance/Performance.Api/Properties/PublishProfiles/FolderProfile.pubxml
+8
-11
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+5
-0
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+5
-0
performance/Performance.DtoModels/Request/AccoungingRequest.cs
+5
-0
performance/Performance.EntityModels/Entity/per_allot.cs
+5
-0
performance/Performance.Services/ConfigService.cs
+9
-1
performance/Performance.Services/SecondAllot/SecondAllotDetails.cs
+1
-1
performance/Performance.Services/SecondAllot/SecondAllotService.cs
+2
-0
performance/Performance.Services/SecondAllotService.cs
+18
-14
No files found.
performance/Performance.Api/Controllers/ConfigController.cs
View file @
103b61d0
...
@@ -534,7 +534,7 @@ public ApiResponse DepttypeDelete([CustomizeValidator(RuleSet = "Delete"), FromB
...
@@ -534,7 +534,7 @@ public ApiResponse DepttypeDelete([CustomizeValidator(RuleSet = "Delete"), FromB
public
ApiResponse
GetAccountingList
([
FromBody
]
AccoungingRequest
request
)
public
ApiResponse
GetAccountingList
([
FromBody
]
AccoungingRequest
request
)
{
{
var
enumItems
=
EnumHelper
.
GetItems
<
AccountTypeEnum
>();
var
enumItems
=
EnumHelper
.
GetItems
<
AccountTypeEnum
>();
if
(
request
.
AllotId
==
0
||
!
enumItems
.
Select
(
t
=>
t
.
Value
).
Contains
(
request
.
Type
))
if
(
(
request
.
AllotId
==
0
&&
request
.
HospitalId
==
0
)
||
!
enumItems
.
Select
(
t
=>
t
.
Value
).
Contains
(
request
.
Type
))
return
new
ApiResponse
(
ResponseType
.
ParameterError
);
return
new
ApiResponse
(
ResponseType
.
ParameterError
);
var
result
=
_configService
.
GetAccountingList
(
request
);
var
result
=
_configService
.
GetAccountingList
(
request
);
...
...
performance/Performance.Api/Controllers/TemplateController.cs
View file @
103b61d0
...
@@ -221,9 +221,10 @@ public ApiResponse NewExtractData([CustomizeValidator, FromBody] ExtractRequest
...
@@ -221,9 +221,10 @@ public ApiResponse NewExtractData([CustomizeValidator, FromBody] ExtractRequest
//检验科室、费用类型是否需要补充
//检验科室、费用类型是否需要补充
allot
.
IsExtracting
=
allot
.
IsExtracting
??
0
;
allot
.
IsExtracting
=
allot
.
IsExtracting
??
0
;
if
(
allot
.
IsExtracting
==
1
)
if
(
allot
.
IsExtracting
==
1
&&
allot
.
ExtractTime
.
HasValue
&&
DateTime
.
Now
.
AddHours
(-
3
)
<
allot
.
ExtractTime
)
return
new
ApiResponse
(
ResponseType
.
OK
,
"正在提取数据,请稍等!"
,
new
{
IsExtracting
=
true
});
return
new
ApiResponse
(
ResponseType
.
OK
,
"正在提取数据,请稍等!"
,
new
{
IsExtracting
=
true
});
allot
.
IsExtracting
=
1
;
allot
.
IsExtracting
=
1
;
allot
.
ExtractTime
=
DateTime
.
Now
;
allotService
.
Update
(
allot
);
allotService
.
Update
(
allot
);
string
email
=
claim
.
GetUserClaim
(
JwtClaimTypes
.
Mail
);
string
email
=
claim
.
GetUserClaim
(
JwtClaimTypes
.
Mail
);
...
...
performance/Performance.Api/Properties/PublishProfiles/FolderProfile.pubxml
View file @
103b61d0
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!--
<!--
此文件由 Web 项目的发布/打包过程使用。可以通过编辑此 MSBuild 文件
https://go.microsoft.com/fwlink/?LinkID=208121.
自定义此过程的行为。为了解与此相关的更多内容,请访问 https://go.microsoft.com/fwlink/?LinkID=208121。
-->
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PropertyGroup>
<WebPublishMethod>
FileSystem
</WebPublishMethod>
<DeleteExistingFiles>True</DeleteExistingFiles>
<PublishProvider>
FileSystem
</PublishProvider>
<ExcludeApp_Data>False</ExcludeApp_Data>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>bin\Release\netcoreapp2.2\publish\</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>
True
</LaunchSiteAfterPublish>
<ExcludeApp_Data>
False
</ExcludeApp_Data>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
<ProjectGuid>3ae00ff5-f0ba-4d72-a23b-770186309327</ProjectGuid>
<ProjectGuid>3ae00ff5-f0ba-4d72-a23b-770186309327</ProjectGuid>
<SelfContained>false</SelfContained>
<SelfContained>false</SelfContained>
<_IsPortable>
true
</_IsPortable>
<publishUrl>
D:\publish\jx.suvalue.com2
</publishUrl>
<DeleteExistingFiles>
True
</DeleteExistingFiles>
</PropertyGroup>
</PropertyGroup>
</Project>
</Project>
\ No newline at end of file
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
103b61d0
...
@@ -1829,6 +1829,11 @@
...
@@ -1829,6 +1829,11 @@
绩效Id
绩效Id
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.AccoungingRequest.HospitalId"
>
<summary>
绩效Id
</summary>
</member>
<member
name=
"P:Performance.DtoModels.AccoungingRequest.Type"
>
<member
name=
"P:Performance.DtoModels.AccoungingRequest.Type"
>
<summary>
<summary>
1 返回accounting列表 2 返回核算单元类型 3 返回核算单元
1 返回accounting列表 2 返回核算单元类型 3 返回核算单元
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
103b61d0
...
@@ -4306,6 +4306,11 @@
...
@@ -4306,6 +4306,11 @@
是否在抽取数据0 否、1 是、2 抽取成功、3 抽取失败
是否在抽取数据0 否、1 是、2 抽取成功、3 抽取失败
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.per_allot.ExtractTime"
>
<summary>
数据抽取起始时间
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_allot.Generate"
>
<member
name=
"P:Performance.EntityModels.per_allot.Generate"
>
<summary>
<summary>
1、人事科提交重新生成 2、生成成功 3、原始数据修改
1、人事科提交重新生成 2、生成成功 3、原始数据修改
...
...
performance/Performance.DtoModels/Request/AccoungingRequest.cs
View file @
103b61d0
...
@@ -8,6 +8,11 @@ public class AccoungingRequest
...
@@ -8,6 +8,11 @@ public class AccoungingRequest
public
int
AllotId
{
get
;
set
;
}
public
int
AllotId
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 绩效Id
/// </summary>
public
int
HospitalId
{
get
;
set
;
}
/// <summary>
/// 1 返回accounting列表 2 返回核算单元类型 3 返回核算单元
/// 1 返回accounting列表 2 返回核算单元类型 3 返回核算单元
/// </summary>
/// </summary>
public
int
Type
{
get
;
set
;
}
public
int
Type
{
get
;
set
;
}
...
...
performance/Performance.EntityModels/Entity/per_allot.cs
View file @
103b61d0
...
@@ -82,6 +82,11 @@ public class per_allot
...
@@ -82,6 +82,11 @@ public class per_allot
public
Nullable
<
int
>
IsExtracting
{
get
;
set
;
}
public
Nullable
<
int
>
IsExtracting
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 数据抽取起始时间
/// </summary>
public
Nullable
<
DateTime
>
ExtractTime
{
get
;
set
;
}
/// <summary>
/// 1、人事科提交重新生成 2、生成成功 3、原始数据修改
/// 1、人事科提交重新生成 2、生成成功 3、原始数据修改
/// </summary>
/// </summary>
public
int
Generate
{
get
;
set
;
}
public
int
Generate
{
get
;
set
;
}
...
...
performance/Performance.Services/ConfigService.cs
View file @
103b61d0
...
@@ -645,6 +645,14 @@ public bool AgainDelete(CofAgainRequest request)
...
@@ -645,6 +645,14 @@ public bool AgainDelete(CofAgainRequest request)
public
List
<
cof_accounting
>
GetAccountingList
(
AccoungingRequest
request
)
public
List
<
cof_accounting
>
GetAccountingList
(
AccoungingRequest
request
)
{
{
Expression
<
Func
<
cof_accounting
,
bool
>>
exp
=
t
=>
t
.
AllotId
==
request
.
AllotId
;
Expression
<
Func
<
cof_accounting
,
bool
>>
exp
=
t
=>
t
.
AllotId
==
request
.
AllotId
;
if
(
request
.
AllotId
==
0
)
{
var
allots
=
perforPerAllotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
);
if
(
allots
==
null
||
!
allots
.
Any
())
throw
new
PerformanceException
(
"请先配置科室信息"
);
exp
=
t
=>
allots
.
Select
(
a
=>
a
.
ID
).
Contains
(
t
.
AllotId
);
}
if
(
request
.
Type
==
(
int
)
AccountTypeEnum
.
AccountingUnit
&&
!
string
.
IsNullOrEmpty
(
request
.
UnitType
))
if
(
request
.
Type
==
(
int
)
AccountTypeEnum
.
AccountingUnit
&&
!
string
.
IsNullOrEmpty
(
request
.
UnitType
))
exp
=
exp
.
And
(
t
=>
t
.
UnitType
==
request
.
UnitType
);
exp
=
exp
.
And
(
t
=>
t
.
UnitType
==
request
.
UnitType
);
...
@@ -730,7 +738,7 @@ public HandsonTable GetBatchAccountingStructrue(int AllotId)
...
@@ -730,7 +738,7 @@ public HandsonTable GetBatchAccountingStructrue(int AllotId)
public
bool
BatchSaveAccounting
(
int
allotId
,
SaveCollectData
request
)
public
bool
BatchSaveAccounting
(
int
allotId
,
SaveCollectData
request
)
{
{
var
dicData
=
CreateDataRow
(
0
,
allotId
,
request
,
Accounting
);
var
dicData
=
CreateDataRow
(
0
,
allotId
,
request
,
Accounting
);
var
getAccounts
=
cofaccountingRepository
.
GetEntities
();
var
getAccounts
=
cofaccountingRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
);
var
unitType
=
EnumHelper
.
GetItems
<
UnitType
>().
Select
(
w
=>
w
.
Description
.
Replace
(
"行政后勤"
,
"行政工勤"
)).
ToArray
();
var
unitType
=
EnumHelper
.
GetItems
<
UnitType
>().
Select
(
w
=>
w
.
Description
.
Replace
(
"行政后勤"
,
"行政工勤"
)).
ToArray
();
List
<
cof_accounting
>
accounts
=
new
List
<
cof_accounting
>();
List
<
cof_accounting
>
accounts
=
new
List
<
cof_accounting
>();
foreach
(
var
item
in
dicData
)
foreach
(
var
item
in
dicData
)
...
...
performance/Performance.Services/SecondAllot/SecondAllotDetails.cs
View file @
103b61d0
...
@@ -824,7 +824,7 @@ private void SupplementSecondDetail(ag_secondallot second, List<per_employee> em
...
@@ -824,7 +824,7 @@ private void SupplementSecondDetail(ag_secondallot second, List<per_employee> em
}
}
// 必须是相同核算单元类型才能带出医院其他绩效
// 必须是相同核算单元类型才能带出医院其他绩效
if
(
second
.
UnitType
.
Replace
(
"其他"
,
""
).
Replace
(
"医技"
,
"医生"
)
if
(
second
.
UnitType
.
Replace
(
"其他"
,
""
).
Replace
(
"医技"
,
"医生"
)
==
empl
.
UnitType
.
Replace
(
"其他"
,
""
).
Replace
(
"医技"
,
"医生"
))
==
empl
?
.
UnitType
.
Replace
(
"其他"
,
""
).
Replace
(
"医技"
,
"医生"
))
{
{
if
(
second
.
UnitType
==
UnitType
.
行政后勤
.
ToString
())
if
(
second
.
UnitType
==
UnitType
.
行政后勤
.
ToString
())
{
{
...
...
performance/Performance.Services/SecondAllot/SecondAllotService.cs
View file @
103b61d0
...
@@ -55,6 +55,8 @@ public SecondAllotResponse GetSecondSavedData(int userId, int secondId, int empl
...
@@ -55,6 +55,8 @@ public SecondAllotResponse GetSecondSavedData(int userId, int secondId, int empl
Workload_Ratio_Default
=
0.8
m
,
Workload_Ratio_Default
=
0.8
m
,
DaysFullAttendance
=
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
)
DaysFullAttendance
=
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
)
};
};
head
.
TotalDistPerformance
=
second
.
RealGiveFee
;
head
.
PaymentOfTheMonth
=
$"
{
allot
.
Year
}
年
{
allot
.
Month
.
ToString
().
PadLeft
(
2
,
'0'
)}
月"
;
JObject
jObject
=
JObject
.
Parse
(
JsonConvert
.
SerializeObject
(
head
));
JObject
jObject
=
JObject
.
Parse
(
JsonConvert
.
SerializeObject
(
head
));
var
headDynamic
=
agworktypesourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
secondId
);
var
headDynamic
=
agworktypesourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
secondId
);
if
(
headDynamic
!=
null
&&
headDynamic
.
Any
())
if
(
headDynamic
!=
null
&&
headDynamic
.
Any
())
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
103b61d0
...
@@ -1572,14 +1572,14 @@ public bool AuditSubmit(ag_secondallot second, int userId)
...
@@ -1572,14 +1572,14 @@ public bool AuditSubmit(ag_secondallot second, int userId)
if
(
temp
==
null
)
if
(
temp
==
null
)
throw
new
PerformanceException
(
"选择模板不可用,请确定模板及数据是否存在!"
);
throw
new
PerformanceException
(
"选择模板不可用,请确定模板及数据是否存在!"
);
//bool method
(decimal? submitDataAmount, decimal? realGiveFee)
bool
VerifySubmissioAmount
(
decimal
?
submitDataAmount
,
decimal
?
realGiveFee
)
//
{
{
//
if (!submitDataAmount.HasValue || !realGiveFee.HasValue)
if
(!
submitDataAmount
.
HasValue
||
!
realGiveFee
.
HasValue
)
//
return false;
return
false
;
// decimal floatValue = 0.5
m;
decimal
floatValue
=
0.1
m
;
//
return submitDataAmount >= (realGiveFee - floatValue) && submitDataAmount <= (realGiveFee + floatValue);
return
submitDataAmount
>=
(
realGiveFee
-
floatValue
)
&&
submitDataAmount
<=
(
realGiveFee
+
floatValue
);
//
}
}
if
(
temp
.
UseTempId
==
6
)
if
(
temp
.
UseTempId
==
6
)
{
{
...
@@ -1587,9 +1587,9 @@ public bool AuditSubmit(ag_secondallot second, int userId)
...
@@ -1587,9 +1587,9 @@ public bool AuditSubmit(ag_secondallot second, int userId)
if
(
data
==
null
||
!
data
.
Any
())
if
(
data
==
null
||
!
data
.
Any
())
throw
new
PerformanceException
(
"提交时未检测到数据!"
);
throw
new
PerformanceException
(
"提交时未检测到数据!"
);
//var total = data.Sum(t => t.RealAmount);
var
total
=
data
.
Sum
(
t
=>
t
.
DistPerformance
+
t
.
NightWorkPerformance
);
// 其他模板 = 可分配绩效 + 夜班绩效
//if (!method
(total, second.RealGiveFee))
if
(!
VerifySubmissioAmount
(
total
,
second
.
RealGiveFee
))
// throw new PerformanceException("总金额与考核后金额不一致!
");
throw
new
PerformanceException
(
$"总金额与考核后金额不一致!可分配金额:
{
second
.
RealGiveFee
}
,提交金额:
{
total
}
"
);
}
}
else
if
(
new
int
[]
{
7
,
8
}.
Contains
(
temp
.
UseTempId
.
Value
))
else
if
(
new
int
[]
{
7
,
8
}.
Contains
(
temp
.
UseTempId
.
Value
))
{
{
...
@@ -1597,16 +1597,20 @@ public bool AuditSubmit(ag_secondallot second, int userId)
...
@@ -1597,16 +1597,20 @@ public bool AuditSubmit(ag_secondallot second, int userId)
if
(
data
==
null
||
!
data
.
Any
())
if
(
data
==
null
||
!
data
.
Any
())
throw
new
PerformanceException
(
"提交时未检测到数据!"
);
throw
new
PerformanceException
(
"提交时未检测到数据!"
);
//var total = data.Where(t => t.ItemName == "实发绩效工资金额"
&& t.RowNumber > -1).GroupBy(t => t.RowNumber)
var
total
=
data
.
Where
(
t
=>
new
string
[]
{
"可分配绩效"
,
"夜班工作量绩效"
}.
Contains
(
t
.
ItemName
)
&&
t
.
RowNumber
>
-
1
).
GroupBy
(
t
=>
t
.
RowNumber
)
//
.Sum(t => ConvertHelper.To<decimal>(t.OrderByDescending(o => o.ID).FirstOrDefault().ItemValue));
.
Sum
(
t
=>
ConvertHelper
.
To
<
decimal
>(
t
.
OrderByDescending
(
o
=>
o
.
ID
).
FirstOrDefault
().
ItemValue
));
//if (!method
(total, second.RealGiveFee))
if
(!
VerifySubmissioAmount
(
total
,
second
.
RealGiveFee
))
// throw new PerformanceException("总金额与考核后金额不一致!
");
throw
new
PerformanceException
(
$"总金额与考核后金额不一致!可分配金额:
{
second
.
RealGiveFee
}
,提交金额:
{
total
}
"
);
}
}
else
if
(
new
int
[]
{
9
,
10
}.
Contains
(
temp
.
UseTempId
.
Value
))
else
if
(
new
int
[]
{
9
,
10
}.
Contains
(
temp
.
UseTempId
.
Value
))
{
{
var
data
=
agbodysourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
second
.
Id
);
var
data
=
agbodysourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
second
.
Id
);
if
(
data
==
null
||
!
data
.
Any
())
if
(
data
==
null
||
!
data
.
Any
())
throw
new
PerformanceException
(
"提交时未检测到数据!"
);
throw
new
PerformanceException
(
"提交时未检测到数据!"
);
var
total
=
data
.
Sum
(
t
=>
t
.
DistPerformance
+
t
.
NightWorkPerformance
);
if
(!
VerifySubmissioAmount
(
total
,
second
.
RealGiveFee
))
throw
new
PerformanceException
(
$"总金额与考核后金额不一致!可分配金额:
{
second
.
RealGiveFee
}
,提交金额:
{
total
}
"
);
}
}
second
.
UseTempId
=
temp
.
UseTempId
;
second
.
UseTempId
=
temp
.
UseTempId
;
second
.
Status
=
2
;
second
.
Status
=
2
;
...
...
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