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
67426a96
Commit
67426a96
authored
Apr 23, 2021
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2020morge-job' into v2020morge-graphql
parents
01029872
e9e69be7
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
320 additions
and
204 deletions
+320
-204
performance/Performance.Api/Controllers/AccountController.cs
+10
-10
performance/Performance.Api/Controllers/ReportController.cs
+22
-22
performance/Performance.Api/Job/ExtractDataJob.cs
+22
-0
performance/Performance.Api/Job/JobRegistry.cs
+13
-0
performance/Performance.Api/Performance.Api.csproj
+1
-0
performance/Performance.Api/Startup.cs
+3
-0
performance/Performance.Api/wwwroot/Performance.Api.xml
+0
-12
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+2
-27
performance/Performance.EntityModels/Entity/sys_hospital.cs
+27
-22
performance/Performance.Repository/PerforPerAllotRepository.cs
+1
-1
performance/Performance.Repository/PerforReportRepository .cs
+26
-26
performance/Performance.Services/AllotCompute/ProcessComputService.cs
+4
-4
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+3
-2
performance/Performance.Services/ComputeService.cs
+20
-5
performance/Performance.Services/ConfigService.cs
+15
-15
performance/Performance.Services/DFExtractService.cs
+0
-0
performance/Performance.Services/ExConfigService.cs
+5
-5
performance/Performance.Services/ExtractExcelService/ExtractHelper/ExtractHelper.cs
+1
-1
performance/Performance.Services/ExtractExcelService/ExtractJobService.cs
+82
-0
performance/Performance.Services/HospitalService.cs
+2
-2
performance/Performance.Services/ReportService.cs
+47
-47
performance/Performance.Services/RoleService.cs
+1
-1
performance/Performance.Services/ServiceLocator.cs
+11
-0
performance/Performance.Services/UserService.cs
+2
-2
No files found.
performance/Performance.Api/Controllers/AccountController.cs
View file @
67426a96
...
@@ -92,13 +92,13 @@ public ApiResponse<JwtToken> Refresh()
...
@@ -92,13 +92,13 @@ public ApiResponse<JwtToken> Refresh()
var
userClaim
=
_claim
.
GetUserClaim
();
var
userClaim
=
_claim
.
GetUserClaim
();
var
claims
=
new
Claim
[]
var
claims
=
new
Claim
[]
{
{
new
Claim
(
JwtClaimTypes
.
Id
,
userClaim
.
FirstOrDefault
(
t
=>
t
.
Type
==
JwtClaimTypes
.
Id
)
.
Value
),
new
Claim
(
JwtClaimTypes
.
Id
,
userClaim
.
FirstOrDefault
(
t
=>
t
.
Type
==
JwtClaimTypes
.
Id
)
?.
Value
??
""
),
new
Claim
(
JwtClaimTypes
.
Login
,
userClaim
.
FirstOrDefault
(
t
=>
t
.
Type
==
JwtClaimTypes
.
Login
)
.
Value
),
new
Claim
(
JwtClaimTypes
.
Login
,
userClaim
.
FirstOrDefault
(
t
=>
t
.
Type
==
JwtClaimTypes
.
Login
)
?.
Value
??
""
),
new
Claim
(
JwtClaimTypes
.
RealName
,
userClaim
.
FirstOrDefault
(
t
=>
t
.
Type
==
JwtClaimTypes
.
RealName
)
.
Value
),
new
Claim
(
JwtClaimTypes
.
RealName
,
userClaim
.
FirstOrDefault
(
t
=>
t
.
Type
==
JwtClaimTypes
.
RealName
)
?.
Value
??
""
),
new
Claim
(
JwtClaimTypes
.
Mail
,
userClaim
.
FirstOrDefault
(
t
=>
t
.
Type
==
JwtClaimTypes
.
Mail
)
.
Value
),
new
Claim
(
JwtClaimTypes
.
Mail
,
userClaim
.
FirstOrDefault
(
t
=>
t
.
Type
==
JwtClaimTypes
.
Mail
)
?.
Value
??
""
),
new
Claim
(
JwtClaimTypes
.
AppName
,
userClaim
.
FirstOrDefault
(
t
=>
t
.
Type
==
JwtClaimTypes
.
AppName
)
.
Value
),
new
Claim
(
JwtClaimTypes
.
AppName
,
userClaim
.
FirstOrDefault
(
t
=>
t
.
Type
==
JwtClaimTypes
.
AppName
)
?.
Value
??
""
),
new
Claim
(
JwtClaimTypes
.
Device
,
userClaim
.
FirstOrDefault
(
t
=>
t
.
Type
==
JwtClaimTypes
.
Device
)
.
Value
),
new
Claim
(
JwtClaimTypes
.
Device
,
userClaim
.
FirstOrDefault
(
t
=>
t
.
Type
==
JwtClaimTypes
.
Device
)
?.
Value
??
""
),
new
Claim
(
JwtClaimTypes
.
Department
,
userClaim
.
FirstOrDefault
(
t
=>
t
.
Type
==
JwtClaimTypes
.
Department
)
.
Value
),
new
Claim
(
JwtClaimTypes
.
Department
,
userClaim
.
FirstOrDefault
(
t
=>
t
.
Type
==
JwtClaimTypes
.
Department
)
?.
Value
??
""
),
};
};
var
jwtToken
=
JwtTokenHelper
.
GenerateToken
(
claims
,
_options
.
ExpirationMinutes
);
var
jwtToken
=
JwtTokenHelper
.
GenerateToken
(
claims
,
_options
.
ExpirationMinutes
);
...
@@ -271,9 +271,9 @@ public ApiResponse<JwtToken> DemoUsers(int userId)
...
@@ -271,9 +271,9 @@ public ApiResponse<JwtToken> DemoUsers(int userId)
new
Claim
(
JwtClaimTypes
.
Id
,
user
.
UserID
.
ToString
()),
new
Claim
(
JwtClaimTypes
.
Id
,
user
.
UserID
.
ToString
()),
new
Claim
(
JwtClaimTypes
.
Login
,
user
.
Login
),
new
Claim
(
JwtClaimTypes
.
Login
,
user
.
Login
),
new
Claim
(
JwtClaimTypes
.
RealName
,
user
.
RealName
),
new
Claim
(
JwtClaimTypes
.
RealName
,
user
.
RealName
),
new
Claim
(
JwtClaimTypes
.
Mail
,
user
.
Mail
),
new
Claim
(
JwtClaimTypes
.
Mail
,
user
.
Mail
??
""
),
new
Claim
(
JwtClaimTypes
.
AppName
,
userClaim
.
FirstOrDefault
(
t
=>
t
.
Type
==
JwtClaimTypes
.
AppName
)
.
Value
),
new
Claim
(
JwtClaimTypes
.
AppName
,
userClaim
.
FirstOrDefault
(
t
=>
t
.
Type
==
JwtClaimTypes
.
AppName
)
?.
Value
??
""
),
new
Claim
(
JwtClaimTypes
.
Device
,
userClaim
.
FirstOrDefault
(
t
=>
t
.
Type
==
JwtClaimTypes
.
Device
)
.
Value
),
new
Claim
(
JwtClaimTypes
.
Device
,
userClaim
.
FirstOrDefault
(
t
=>
t
.
Type
==
JwtClaimTypes
.
Device
)
?.
Value
??
""
),
new
Claim
(
JwtClaimTypes
.
Department
,
user
.
Department
??
""
),
new
Claim
(
JwtClaimTypes
.
Department
,
user
.
Department
??
""
),
};
};
...
...
performance/Performance.Api/Controllers/ReportController.cs
View file @
67426a96
...
@@ -142,29 +142,29 @@ public ApiResponse InpatFeeAvg([CustomizeValidator(RuleSet = "Query"), FromBody]
...
@@ -142,29 +142,29 @@ public ApiResponse InpatFeeAvg([CustomizeValidator(RuleSet = "Query"), FromBody]
return
new
ApiResponse
(
ResponseType
.
OK
,
""
,
list
);
return
new
ApiResponse
(
ResponseType
.
OK
,
""
,
list
);
}
}
/// <summary>
///
//
<summary>
/// 科室药占比
///
//
科室药占比
/// </summary>
///
//
</summary>
/// <returns></returns>
///
//
<returns></returns>
[
Route
(
"medicine"
)]
//
[Route("medicine")]
[
HttpPost
]
//
[HttpPost]
public
ApiResponse
Medicine
([
CustomizeValidator
(
RuleSet
=
"Query"
),
FromBody
]
ReportRequest
request
)
//
public ApiResponse Medicine([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
{
//
{
var
list
=
reportService
.
Medicine
(
request
.
HospitalId
,
request
.
IsIndex
);
//
var list = reportService.Medicine(request.HospitalId, request.IsIndex);
return
new
ApiResponse
(
ResponseType
.
OK
,
""
,
list
);
//
return new ApiResponse(ResponseType.OK, "", list);
}
//
}
/// <summary>
///
//
<summary>
/// 科室有效收入占比
///
//
科室有效收入占比
/// </summary>
///
//
</summary>
/// <returns></returns>
///
//
<returns></returns>
[
Route
(
"income"
)]
//
[Route("income")]
[
HttpPost
]
//
[HttpPost]
public
ApiResponse
Income
([
CustomizeValidator
(
RuleSet
=
"Query"
),
FromBody
]
ReportRequest
request
)
//
public ApiResponse Income([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
{
//
{
var
list
=
reportService
.
Income
(
request
.
HospitalId
,
request
.
IsIndex
);
//
var list = reportService.Income(request.HospitalId, request.IsIndex);
return
new
ApiResponse
(
ResponseType
.
OK
,
""
,
list
);
//
return new ApiResponse(ResponseType.OK, "", list);
}
//
}
/// <summary>
/// <summary>
/// 月群体人均绩效
/// 月群体人均绩效
...
...
performance/Performance.Api/Job/ExtractDataJob.cs
0 → 100644
View file @
67426a96
using
FluentScheduler
;
using
Microsoft.Extensions.DependencyInjection
;
using
Performance.Services
;
using
Performance.Services.ExtractExcelService
;
namespace
Performance.Api
{
public
class
ExtractDataJob
:
IJob
{
private
readonly
ExtractJobService
extractJobService
;
public
ExtractDataJob
()
{
this
.
extractJobService
=
ServiceLocator
.
Instance
.
GetService
<
ExtractJobService
>();
}
public
void
Execute
()
{
extractJobService
.
Execute
();
}
}
}
performance/Performance.Api/Job/JobRegistry.cs
0 → 100644
View file @
67426a96
using
FluentScheduler
;
namespace
Performance.Api
{
public
class
JobRegistry
:
Registry
{
public
JobRegistry
()
{
Schedule
<
ExtractDataJob
>().
ToRunNow
().
AndEvery
(
1
).
Days
().
At
(
23
,
0
);
//Schedule<ExtractDataJob>().ToRunEvery(1).Days().At(23, 0);
}
}
}
performance/Performance.Api/Performance.Api.csproj
View file @
67426a96
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
<PackageReference Include="AutoMapper" Version="8.0.0" />
<PackageReference Include="AutoMapper" Version="8.0.0" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="6.0.0" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="6.0.0" />
<PackageReference Include="CSRedisCore" Version="3.0.45" />
<PackageReference Include="CSRedisCore" Version="3.0.45" />
<PackageReference Include="FluentScheduler" Version="5.5.1" />
<PackageReference Include="FluentValidation.AspNetCore" Version="8.1.3" />
<PackageReference Include="FluentValidation.AspNetCore" Version="8.1.3" />
<PackageReference Include="GraphQL" Version="2.4.0" />
<PackageReference Include="GraphQL" Version="2.4.0" />
<PackageReference Include="Hangfire" Version="1.6.22" />
<PackageReference Include="Hangfire" Version="1.6.22" />
...
...
performance/Performance.Api/Startup.cs
View file @
67426a96
...
@@ -209,6 +209,9 @@ public void ConfigureServices(IServiceCollection services)
...
@@ -209,6 +209,9 @@ public void ConfigureServices(IServiceCollection services)
});
});
#
endregion
swagger
#
endregion
swagger
ServiceLocator
.
Instance
=
services
.
BuildServiceProvider
();
FluentScheduler
.
JobManager
.
Initialize
(
new
JobRegistry
());
}
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
67426a96
...
@@ -1142,18 +1142,6 @@
...
@@ -1142,18 +1142,6 @@
</summary>
</summary>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.ReportController.Medicine(Performance.DtoModels.ReportRequest)"
>
<summary>
科室药占比
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ReportController.Income(Performance.DtoModels.ReportRequest)"
>
<summary>
科室有效收入占比
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ReportController.AvgPerfor(Performance.DtoModels.ReportRequest)"
>
<member
name=
"M:Performance.Api.Controllers.ReportController.AvgPerfor(Performance.DtoModels.ReportRequest)"
>
<summary>
<summary>
月群体人均绩效
月群体人均绩效
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
67426a96
...
@@ -6838,36 +6838,11 @@
...
@@ -6838,36 +6838,11 @@
医院状态 1 启用 2 禁用
医院状态 1 启用 2 禁用
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.sys_hospital.IsOpenWorkYear"
>
<summary>
是否开启年资系数 1 启用 2 禁用
</summary>
</member>
<member
name=
"P:Performance.EntityModels.sys_hospital.IsOpenDrugprop"
>
<summary>
是否开启药占比系数 1 启用 2 禁用
</summary>
</member>
<member
name=
"P:Performance.EntityModels.sys_hospital.IsOpenIncome"
>
<summary>
是否开启ICU有效收入系数 1 启用 2 禁用
</summary>
</member>
<member
name=
"P:Performance.EntityModels.sys_hospital.IsOpenDirector"
>
<summary>
是否开启规模/效率绩效 1 启用 2 禁用
</summary>
</member>
<member
name=
"P:Performance.EntityModels.sys_hospital.IsShowManage"
>
<member
name=
"P:Performance.EntityModels.sys_hospital.IsShowManage"
>
<summary>
<summary>
是否显示绩效合计 1 显示绩效合计 2 显示管理绩效
是否显示绩效合计 1 显示绩效合计 2 显示管理绩效
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.sys_hospital.IsOpenCMIPercent"
>
<summary>
是否开启科室CMI占比 1 启用 2 禁用
</summary>
</member>
<member
name=
"P:Performance.EntityModels.sys_hospital.IsOpenNursingDeptAudit"
>
<member
name=
"P:Performance.EntityModels.sys_hospital.IsOpenNursingDeptAudit"
>
<summary>
<summary>
是否开启护理部审核 1 启用 2 禁用
是否开启护理部审核 1 启用 2 禁用
...
@@ -6878,9 +6853,9 @@
...
@@ -6878,9 +6853,9 @@
是否显示二次绩效科主任1 启用 2 禁用
是否显示二次绩效科主任1 启用 2 禁用
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.sys_hospital.IsOpen
LogisticsSecondAllot
"
>
<member
name=
"P:Performance.EntityModels.sys_hospital.IsOpen
TimedTasks
"
>
<summary>
<summary>
是否开启
行政后勤二次绩效分配 1 启用 2 禁用
是否开启
定时抽取任务 1 是 2 否
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.sys_hospital.IsSingleProject"
>
<member
name=
"P:Performance.EntityModels.sys_hospital.IsSingleProject"
>
...
...
performance/Performance.EntityModels/Entity/sys_hospital.cs
View file @
67426a96
...
@@ -61,35 +61,35 @@ public class sys_hospital
...
@@ -61,35 +61,35 @@ public class sys_hospital
/// </summary>
/// </summary>
public
Nullable
<
int
>
States
{
get
;
set
;
}
public
Nullable
<
int
>
States
{
get
;
set
;
}
/// <summary>
///
//
<summary>
/// 是否开启年资系数 1 启用 2 禁用
///
//
是否开启年资系数 1 启用 2 禁用
/// </summary>
///
//
</summary>
public
Nullable
<
int
>
IsOpenWorkYear
{
get
;
set
;
}
//
public Nullable<int> IsOpenWorkYear { get; set; }
/// <summary>
///
//
<summary>
/// 是否开启药占比系数 1 启用 2 禁用
///
//
是否开启药占比系数 1 启用 2 禁用
/// </summary>
///
//
</summary>
public
Nullable
<
int
>
IsOpenDrugprop
{
get
;
set
;
}
//
public Nullable<int> IsOpenDrugprop { get; set; }
/// <summary>
///
//
<summary>
/// 是否开启ICU有效收入系数 1 启用 2 禁用
///
//
是否开启ICU有效收入系数 1 启用 2 禁用
/// </summary>
///
//
</summary>
public
Nullable
<
int
>
IsOpenIncome
{
get
;
set
;
}
//
public Nullable<int> IsOpenIncome { get; set; }
/// <summary>
///
//
<summary>
/// 是否开启规模/效率绩效 1 启用 2 禁用
///
//
是否开启规模/效率绩效 1 启用 2 禁用
/// </summary>
///
//
</summary>
public
Nullable
<
int
>
IsOpenDirector
{
get
;
set
;
}
//
public Nullable<int> IsOpenDirector { get; set; }
/// <summary>
/// <summary>
/// 是否显示绩效合计 1 显示绩效合计 2 显示管理绩效
/// 是否显示绩效合计 1 显示绩效合计 2 显示管理绩效
/// </summary>
/// </summary>
public
Nullable
<
int
>
IsShowManage
{
get
;
set
;
}
public
Nullable
<
int
>
IsShowManage
{
get
;
set
;
}
/// <summary>
///
//
<summary>
/// 是否开启科室CMI占比 1 启用 2 禁用
///
//
是否开启科室CMI占比 1 启用 2 禁用
/// </summary>
///
//
</summary>
public
Nullable
<
int
>
IsOpenCMIPercent
{
get
;
set
;
}
//
public Nullable<int> IsOpenCMIPercent { get; set; }
/// <summary>
/// <summary>
/// 是否开启护理部审核 1 启用 2 禁用
/// 是否开启护理部审核 1 启用 2 禁用
...
@@ -101,10 +101,15 @@ public class sys_hospital
...
@@ -101,10 +101,15 @@ public class sys_hospital
/// </summary>
/// </summary>
public
Nullable
<
int
>
IsShowSecondDirector
{
get
;
set
;
}
public
Nullable
<
int
>
IsShowSecondDirector
{
get
;
set
;
}
///// <summary>
///// 是否开启行政后勤二次绩效分配 1 启用 2 禁用
///// </summary>
//public Nullable<int> IsOpenLogisticsSecondAllot { get; set; }
/// <summary>
/// <summary>
/// 是否开启
行政后勤二次绩效分配 1 启用 2 禁用
/// 是否开启
定时抽取任务 1 是 2 否
/// </summary>
/// </summary>
public
Nullable
<
int
>
IsOpen
LogisticsSecondAllot
{
get
;
set
;
}
public
Nullable
<
int
>
IsOpen
TimedTasks
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 抽取项目是否在同一环境 1 是 2 否
/// 抽取项目是否在同一环境 1 是 2 否
...
...
performance/Performance.Repository/PerforPerAllotRepository.cs
View file @
67426a96
...
@@ -213,7 +213,7 @@ public IEnumerable<ex_result> QueryIncomeData(int allotid, string source, string
...
@@ -213,7 +213,7 @@ public IEnumerable<ex_result> QueryIncomeData(int allotid, string source, string
WHERE t1.allotid = @allotid
WHERE t1.allotid = @allotid
AND t3.unittype = @unittype
AND t3.unittype = @unittype
AND t3.accountingunit = @accountingunit
AND t3.accountingunit = @accountingunit
AND
t1.Source like '%
{
source
}
开单%'
AND
(t1.Source like '%
{
source
}
开单%' OR t1.Source like '%
{
source
}
就诊%')
AND T1.IsDelete = 0
AND T1.IsDelete = 0
ORDER BY t1.doctorname,t1.Category;"
;
ORDER BY t1.doctorname,t1.Category;"
;
return
connection
.
Query
<
ex_result
>(
clear
,
new
{
allotid
,
accountingunit
,
unittype
,
hospitalid
},
commandTimeout
:
60
*
60
);
return
connection
.
Query
<
ex_result
>(
clear
,
new
{
allotid
,
accountingunit
,
unittype
,
hospitalid
},
commandTimeout
:
60
*
60
);
...
...
performance/Performance.Repository/PerforReportRepository .cs
View file @
67426a96
...
@@ -59,33 +59,33 @@ public List<PerReport> InpatFeeAvg(int hospitalId, List<string> date)
...
@@ -59,33 +59,33 @@ public List<PerReport> InpatFeeAvg(int hospitalId, List<string> date)
return
DapperQuery
(
sql
,
new
{
date
,
hospitalId
}).
ToList
();
return
DapperQuery
(
sql
,
new
{
date
,
hospitalId
}).
ToList
();
}
}
/// <summary>
//
/// <summary>
/// 科室药占比
//
/// 科室药占比
/// </summary>
//
/// </summary>
/// <returns></returns>
//
/// <returns></returns>
public
List
<
PerReport
>
Medicine
(
int
hospitalId
,
List
<
string
>
date
)
//
public List<PerReport> Medicine(int hospitalId, List<string> date)
{
//
{
string
sql
=
@"select accountingunit x,concat(year,'-',lpad(month,2,'0')) y,round((sum(if(cd.id is null,0,cellvalue)) / sum(cellvalue))*100,2) value
//
string sql = @"select accountingunit x,concat(year,'-',lpad(month,2,'0')) y,round((sum(if(cd.id is null,0,cellvalue)) / sum(cellvalue))*100,2) value
from per_allot aot join per_sheet sht on aot.id=sht.allotid join im_data dt on dt.sheetid=sht.id
//
from per_allot aot join per_sheet sht on aot.id=sht.allotid join im_data dt on dt.sheetid=sht.id
left join cof_drugtype cd on cd.allotid=dt.allotid and cd.charge=dt.TypeName and cd.chargetype in ('药费') where unittype=1 and sheettype=3
//
left join cof_drugtype cd on cd.allotid=dt.allotid and cd.charge=dt.TypeName and cd.chargetype in ('药费') where unittype=1 and sheettype=3
and sheetname like '%开单收入' and ifnull(accountingunit,'') not in ('') and concat(year,'-',lpad(month,2,'0'))
//
and sheetname like '%开单收入' and ifnull(accountingunit,'') not in ('') and concat(year,'-',lpad(month,2,'0'))
in @date and hospitalid = @hospitalId group by year,month,accountingunit order by y asc,value desc;"
;
//
in @date and hospitalid = @hospitalId group by year,month,accountingunit order by y asc,value desc;";
return
DapperQuery
(
sql
,
new
{
hospitalId
,
date
}).
ToList
();
//
return DapperQuery(sql, new { hospitalId, date }).ToList();
}
//
}
/// <summary>
//
/// <summary>
/// 科室有效收入占比
//
/// 科室有效收入占比
/// </summary>
//
/// </summary>
/// <returns></returns>
//
/// <returns></returns>
public
List
<
PerReport
>
Income
(
int
hospitalId
,
List
<
string
>
date
)
//
public List<PerReport> Income(int hospitalId, List<string> date)
{
//
{
string
sql
=
@"select accountingunit x,concat(year,'-',lpad(month,2,'0')) y,round((sum(if(cd.id is null,cellvalue,0)) / sum(cellvalue))*100,2) value
//
string sql = @"select accountingunit x,concat(year,'-',lpad(month,2,'0')) y,round((sum(if(cd.id is null,cellvalue,0)) / sum(cellvalue))*100,2) value
from per_allot aot join per_sheet sht on aot.id=sht.allotid join im_data dt on dt.sheetid=sht.id
//
from per_allot aot join per_sheet sht on aot.id=sht.allotid join im_data dt on dt.sheetid=sht.id
left join cof_drugtype cd on cd.allotid=dt.allotid and cd.charge=dt.TypeName and cd.chargetype in ('药费','材料费')
//
left join cof_drugtype cd on cd.allotid=dt.allotid and cd.charge=dt.TypeName and cd.chargetype in ('药费','材料费')
where unittype=1 and sheettype=3 and sheetname like '%开单收入' and ifnull(accountingunit,'') not in ('') and concat(year,'-',lpad(month,2,'0'))
//
where unittype=1 and sheettype=3 and sheetname like '%开单收入' and ifnull(accountingunit,'') not in ('') and concat(year,'-',lpad(month,2,'0'))
in @date and hospitalid = @hospitalId group by year,month,accountingunit order by y asc,value desc;"
;
//
in @date and hospitalid = @hospitalId group by year,month,accountingunit order by y asc,value desc;";
return
DapperQuery
(
sql
,
new
{
hospitalId
,
date
}).
ToList
();
//
return DapperQuery(sql, new { hospitalId, date }).ToList();
}
//
}
#
region
首页报表
#
region
首页报表
/// <summary>
/// <summary>
...
...
performance/Performance.Services/AllotCompute/ProcessComputService.cs
View file @
67426a96
...
@@ -268,7 +268,7 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, per_allot
...
@@ -268,7 +268,7 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, per_allot
var
economicData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeEconomic
)?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
var
economicData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeEconomic
)?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
var
doctorWorkloadData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeDoctorWorkload
)?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
var
doctorWorkloadData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeDoctorWorkload
)?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
var
nurseWorkloadData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeNurseWorkload
)?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
var
nurseWorkloadData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeNurseWorkload
)?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
var
a
ccountExtraData
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountExtra
)?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
var
a
djustLaterOtherFee
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountAdjustLaterOtherFee
)?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
var
pairs
=
new
[]
var
pairs
=
new
[]
{
{
...
@@ -303,7 +303,7 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, per_allot
...
@@ -303,7 +303,7 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, per_allot
if
(
UnitType
.
医技组
==
unitType
&&
workDoctor
==
null
)
if
(
UnitType
.
医技组
==
unitType
&&
workDoctor
==
null
)
workDoctor
=
info
.
Data
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
UnitType
.
医生组
.
ToString
()
&&
t
.
AccountingUnit
==
dept
.
AccountingUnit
);
workDoctor
=
info
.
Data
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
UnitType
.
医生组
.
ToString
()
&&
t
.
AccountingUnit
==
dept
.
AccountingUnit
);
// 夜班绩效 从医院奖罚的明细项中获取
// 夜班绩效 从医院奖罚的明细项中获取
var
nightShift
=
a
ccountExtraData
?.
FirstOrDefault
(
w
=>
w
.
UnitType
==
dept
.
UnitType
&&
w
.
AccountingUnit
==
dept
.
AccountingUnit
&&
w
.
TypeName
?.
Trim
()
==
"夜班绩效"
)?.
CellValue
??
0
;
var
nightShift
=
a
djustLaterOtherFee
?.
FirstOrDefault
(
w
=>
w
.
UnitType
==
dept
.
UnitType
&&
w
.
AccountingUnit
==
dept
.
AccountingUnit
&&
w
.
TypeName
?.
Trim
()
==
"夜班绩效"
)?.
CellValue
??
0
;
dept
.
NightShiftWorkPerforFee
=
nightShift
;
dept
.
NightShiftWorkPerforFee
=
nightShift
;
//dept.MedicineFactor = workDoctor?.MedicineFactor;
//dept.MedicineFactor = workDoctor?.MedicineFactor;
...
@@ -349,7 +349,7 @@ public void ComputeOffice(per_allot allot, PerExcel excel)
...
@@ -349,7 +349,7 @@ public void ComputeOffice(per_allot allot, PerExcel excel)
{
{
//取出科室
//取出科室
var
accountList
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountBasic
)?.
PerData
?.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
);
var
accountList
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountBasic
)?.
PerData
?.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
);
var
a
ccountExtraData
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountExtra
)?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
var
a
djustLaterOtherFee
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountAdjustLaterOtherFee
)?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
List
<
string
>
involves
=
new
List
<
string
>
List
<
string
>
involves
=
new
List
<
string
>
{
{
...
@@ -385,7 +385,7 @@ public void ComputeOffice(per_allot allot, PerExcel excel)
...
@@ -385,7 +385,7 @@ public void ComputeOffice(per_allot allot, PerExcel excel)
if
(
UnitTypeUtil
.
IsOffice
(
resAccount
?.
UnitType
)
&&
dept
.
NeedSecondAllot
==
"是"
)
if
(
UnitTypeUtil
.
IsOffice
(
resAccount
?.
UnitType
)
&&
dept
.
NeedSecondAllot
==
"是"
)
{
{
// 夜班绩效 从医院奖罚的明细项中获取
// 夜班绩效 从医院奖罚的明细项中获取
var
nightShift
=
a
ccountExtraData
?.
FirstOrDefault
(
w
=>
w
.
UnitType
==
resAccount
?.
UnitType
&&
w
.
AccountingUnit
==
dept
.
AccountingUnit
&&
w
.
TypeName
?.
Trim
()
==
"夜班绩效"
)?.
CellValue
??
0
;
var
nightShift
=
a
djustLaterOtherFee
?.
FirstOrDefault
(
w
=>
w
.
UnitType
==
resAccount
?.
UnitType
&&
w
.
AccountingUnit
==
dept
.
AccountingUnit
&&
w
.
TypeName
?.
Trim
()
==
"夜班绩效"
)?.
CellValue
??
0
;
dept
.
NightShiftWorkPerforFee
=
0
;
dept
.
NightShiftWorkPerforFee
=
0
;
dept
.
ScoringAverage
=
resAccount
?.
ScoringAverage
==
null
?
0
:
resAccount
.
ScoringAverage
;
dept
.
ScoringAverage
=
resAccount
?.
ScoringAverage
==
null
?
0
:
resAccount
.
ScoringAverage
;
...
...
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
67426a96
...
@@ -140,7 +140,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
...
@@ -140,7 +140,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
//取出科室
//取出科室
var
accountList
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountBasic
)?.
PerData
?.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
);
var
accountList
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountBasic
)?.
PerData
?.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
);
var
a
ccountExtraData
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountExtra
)?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
var
a
djustLaterOtherFee
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountAdjustLaterOtherFee
)?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
List
<
res_specialunit
>
resDataList
=
new
List
<
res_specialunit
>();
List
<
res_specialunit
>
resDataList
=
new
List
<
res_specialunit
>();
...
@@ -179,7 +179,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
...
@@ -179,7 +179,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
//var scoreAverage = accountScoreAverages?.FirstOrDefault(w => w.UnitType == UnitType.特殊核算组.ToString() && w.AccountingUnit == dept?.AccountingUnit)?.TotelValue;
//var scoreAverage = accountScoreAverages?.FirstOrDefault(w => w.UnitType == UnitType.特殊核算组.ToString() && w.AccountingUnit == dept?.AccountingUnit)?.TotelValue;
// 夜班绩效 从医院奖罚的明细项中获取
// 夜班绩效 从医院奖罚的明细项中获取
var
nightShift
=
a
ccountExtraData
?.
FirstOrDefault
(
w
=>
w
.
UnitType
==
dept
.
UnitType
&&
w
.
AccountingUnit
==
dept
.
AccountingUnit
&&
w
.
TypeName
?.
Trim
()
==
"夜班绩效"
)?.
CellValue
??
0
;
var
nightShift
=
a
djustLaterOtherFee
?.
FirstOrDefault
(
w
=>
w
.
UnitType
==
dept
.
UnitType
&&
w
.
AccountingUnit
==
dept
.
AccountingUnit
&&
w
.
TypeName
?.
Trim
()
==
"夜班绩效"
)?.
CellValue
??
0
;
decimal
?
headcount
=
null
;
decimal
?
headcount
=
null
;
if
(
typeList
.
Any
(
o
=>
o
.
Description
==
item
.
QuantitativeIndicators
))
if
(
typeList
.
Any
(
o
=>
o
.
Description
==
item
.
QuantitativeIndicators
))
...
@@ -609,6 +609,7 @@ public void GenerateSecondAllot(per_allot allot)
...
@@ -609,6 +609,7 @@ public void GenerateSecondAllot(per_allot allot)
second
.
NursingDeptRemark
=
"科室绩效结果发生变更,需要重新提交"
;
second
.
NursingDeptRemark
=
"科室绩效结果发生变更,需要重新提交"
;
}
}
second
.
RealGiveFee
=
item
.
RealGiveFee
;
second
.
RealGiveFee
=
item
.
RealGiveFee
;
second
.
NightShiftWorkPerforFee
=
item
.
NightShiftWorkPerforFee
;
updSecond
.
Add
(
second
);
updSecond
.
Add
(
second
);
}
}
}
}
...
...
performance/Performance.Services/ComputeService.cs
View file @
67426a96
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
using
System.Text.RegularExpressions
;
using
System.Text.RegularExpressions
;
using
Performance.DtoModels.Request
;
using
Performance.DtoModels.Request
;
using
Performance.DtoModels.Response
;
using
Performance.DtoModels.Response
;
using
Performance.Services.ExtractExcelService
;
namespace
Performance.Services
namespace
Performance.Services
{
{
...
@@ -1043,6 +1044,20 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
...
@@ -1043,6 +1044,20 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
var
headers
=
_perforImheaderRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
account
.
AllotID
);
var
headers
=
_perforImheaderRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
account
.
AllotID
);
var
basicData
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
account
.
AllotID
&&
t
.
AccountingUnit
==
account
.
AccountingUnit
);
var
basicData
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
account
.
AllotID
&&
t
.
AccountingUnit
==
account
.
AccountingUnit
);
Func
<
string
,
string
>
getShowKey
=
(
name
)
=>
{
string
_key
=
"开单"
;
if
(
string
.
IsNullOrEmpty
(
name
))
return
_key
;
if
(
name
.
IndexOf
(
"就诊"
)
>
-
1
)
_key
=
"就诊"
;
return
_key
;
};
string
key
=
getShowKey
.
Invoke
(
persheet
.
FirstOrDefault
(
t
=>
t
.
SheetName
.
NoBlank
().
StartsWith
(
"1.1.1"
))?.
SheetName
);
DeptDataDetails
deptDetails
=
new
DeptDataDetails
DeptDataDetails
deptDetails
=
new
DeptDataDetails
{
{
ShowFormula
=
allot
.
ShowFormula
,
ShowFormula
=
allot
.
ShowFormula
,
...
@@ -1050,7 +1065,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
...
@@ -1050,7 +1065,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
Detail
=
new
List
<
DetailDtos
>()
Detail
=
new
List
<
DetailDtos
>()
};
};
if
(
basicData
==
null
||
!
basicData
.
Any
())
return
MergeDetails
(
deptDetails
);
if
(
basicData
==
null
||
!
basicData
.
Any
())
return
MergeDetails
(
deptDetails
,
key
);
var
sheetType
=
new
List
<
int
>
var
sheetType
=
new
List
<
int
>
{
{
...
@@ -1118,7 +1133,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
...
@@ -1118,7 +1133,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
deptDetails
.
Pandect
.
MaterialsExtra
=
deptDetails
.
Detail
?.
FirstOrDefault
(
w
=>
w
.
OriginalType
==
(
int
)
SheetType
.
AccountMaterialsAssess
)?.
Amount
??
deptDetails
.
Pandect
.
MaterialsExtra
;
deptDetails
.
Pandect
.
MaterialsExtra
=
deptDetails
.
Detail
?.
FirstOrDefault
(
w
=>
w
.
OriginalType
==
(
int
)
SheetType
.
AccountMaterialsAssess
)?.
Amount
??
deptDetails
.
Pandect
.
MaterialsExtra
;
deptDetails
.
Pandect
.
MedicineExtra
=
deptDetails
.
Detail
?.
FirstOrDefault
(
w
=>
w
.
OriginalType
==
(
int
)
SheetType
.
AccountDrugAssess
)?.
Amount
??
deptDetails
.
Pandect
.
MedicineExtra
;
deptDetails
.
Pandect
.
MedicineExtra
=
deptDetails
.
Detail
?.
FirstOrDefault
(
w
=>
w
.
OriginalType
==
(
int
)
SheetType
.
AccountDrugAssess
)?.
Amount
??
deptDetails
.
Pandect
.
MedicineExtra
;
return
MergeDetails
(
deptDetails
);
return
MergeDetails
(
deptDetails
,
key
);
//return deptDetails;
//return deptDetails;
}
}
...
@@ -1243,7 +1258,7 @@ private List<DetailModule> CommonDetailItems(List<im_data> basicData, List<im_he
...
@@ -1243,7 +1258,7 @@ private List<DetailModule> CommonDetailItems(List<im_data> basicData, List<im_he
return
items
;
return
items
;
}
}
private
DeptDataDetails
<
DetailModuleExtend
>
MergeDetails
(
DeptDataDetails
details
)
private
DeptDataDetails
<
DetailModuleExtend
>
MergeDetails
(
DeptDataDetails
details
,
string
key
)
{
{
if
(
details
==
null
)
return
new
DeptDataDetails
<
DetailModuleExtend
>();
if
(
details
==
null
)
return
new
DeptDataDetails
<
DetailModuleExtend
>();
...
@@ -1267,7 +1282,7 @@ private DeptDataDetails<DetailModuleExtend> MergeDetails(DeptDataDetails details
...
@@ -1267,7 +1282,7 @@ private DeptDataDetails<DetailModuleExtend> MergeDetails(DeptDataDetails details
{
{
depts
.
AddRange
(
t
.
Items
.
Select
(
o
=>
o
.
ItemName
));
depts
.
AddRange
(
t
.
Items
.
Select
(
o
=>
o
.
ItemName
));
});
});
var
billing
=
data
.
FirstOrDefault
(
t
=>
t
.
ItemName
.
Replace
(
"就诊"
,
"开单"
).
IndexOf
(
"开单"
)
>
-
1
);
var
billing
=
data
.
FirstOrDefault
(
t
=>
t
.
ItemName
.
IndexOf
(
key
)
>
-
1
);
var
execute
=
data
.
FirstOrDefault
(
t
=>
t
.
ItemName
.
IndexOf
(
"执行"
)
>
-
1
);
var
execute
=
data
.
FirstOrDefault
(
t
=>
t
.
ItemName
.
IndexOf
(
"执行"
)
>
-
1
);
foreach
(
var
dept
in
depts
.
Distinct
().
OrderBy
(
t
=>
t
))
foreach
(
var
dept
in
depts
.
Distinct
().
OrderBy
(
t
=>
t
))
{
{
...
@@ -1316,7 +1331,7 @@ private DeptDataDetails<DetailModuleExtend> MergeDetails(DeptDataDetails details
...
@@ -1316,7 +1331,7 @@ private DeptDataDetails<DetailModuleExtend> MergeDetails(DeptDataDetails details
result
.
Detail
.
Add
(
new
DetailDtos
<
DetailModuleExtend
>
result
.
Detail
.
Add
(
new
DetailDtos
<
DetailModuleExtend
>
{
{
ItemName
=
data
.
FirstOrDefault
(
t
=>
t
.
ItemName
.
IndexOf
(
"执行"
)
>
-
1
)
is
null
?
data
.
First
().
ItemName
:
ItemName
=
data
.
FirstOrDefault
(
t
=>
t
.
ItemName
.
IndexOf
(
"执行"
)
>
-
1
)
is
null
?
data
.
First
().
ItemName
:
data
.
FirstOrDefault
(
t
=>
t
.
ItemName
.
IndexOf
(
"执行"
)
>
-
1
).
ItemName
?.
Replace
(
"执行"
,
"开单
/执行"
),
data
.
FirstOrDefault
(
t
=>
t
.
ItemName
.
IndexOf
(
"执行"
)
>
-
1
).
ItemName
?.
Replace
(
"执行"
,
$"
{
key
}
/执行"
),
IncomeType
=
data
.
First
()?.
IncomeType
??
0
,
IncomeType
=
data
.
First
()?.
IncomeType
??
0
,
OriginalType
=
data
.
First
()?.
OriginalType
??
0
,
OriginalType
=
data
.
First
()?.
OriginalType
??
0
,
Amount
=
data
.
Sum
(
w
=>
w
.
Amount
),
Amount
=
data
.
Sum
(
w
=>
w
.
Amount
),
...
...
performance/Performance.Services/ConfigService.cs
View file @
67426a96
...
@@ -324,7 +324,7 @@ public class ConfigService : IAutoInjection
...
@@ -324,7 +324,7 @@ public class ConfigService : IAutoInjection
/// <returns></returns>
/// <returns></returns>
public
List
<
cof_drugtype
>
GetDrugtypeList
(
int
HospitalId
,
int
allotId
)
public
List
<
cof_drugtype
>
GetDrugtypeList
(
int
HospitalId
,
int
allotId
)
{
{
var
list
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
t
.
HospitalId
==
HospitalId
);
var
list
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
t
.
HospitalId
==
HospitalId
);
return
list
;
return
list
;
}
}
...
@@ -705,9 +705,9 @@ public void Copy(per_allot allot)
...
@@ -705,9 +705,9 @@ public void Copy(per_allot allot)
logger
.
LogInformation
(
$"workItem"
);
logger
.
LogInformation
(
$"workItem"
);
var
workItem
=
_workitemRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
var
workItem
=
_workitemRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
hospital
!=
null
&&
hospital
?.
IsOpenDrugprop
==
1
&&
(
workItem
==
null
||
workItem
.
Count
==
0
)
)
if
(
workItem
==
null
||
workItem
.
Count
==
0
)
{
{
workItem
=
_workitemRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
workItem
=
_workitemRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_workitemRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
)
;
if
(
workItem
!=
null
&&
workItem
.
Count
>
0
)
if
(
workItem
!=
null
&&
workItem
.
Count
>
0
)
{
{
var
newWorkItem
=
workItem
.
Select
(
t
=>
new
cof_workitem
{
AllotID
=
allot
.
ID
,
Type
=
t
.
Type
,
Item
=
t
.
Item
});
var
newWorkItem
=
workItem
.
Select
(
t
=>
new
cof_workitem
{
AllotID
=
allot
.
ID
,
Type
=
t
.
Type
,
Item
=
t
.
Item
});
...
@@ -720,7 +720,7 @@ public void Copy(per_allot allot)
...
@@ -720,7 +720,7 @@ public void Copy(per_allot allot)
if
(
cofDrugtype
==
null
||
cofDrugtype
.
Count
==
0
)
if
(
cofDrugtype
==
null
||
cofDrugtype
.
Count
==
0
)
{
{
var
drugtype
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
var
drugtype
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
var
newAgains
=
drugtype
.
Select
(
t
=>
new
cof_drugtype
{
HospitalId
=
allot
.
HospitalId
,
AllotID
=
allot
.
ID
,
Charge
=
t
.
Charge
,
ChargeType
=
t
.
ChargeType
});
var
newAgains
=
drugtype
.
Select
(
t
=>
new
cof_drugtype
{
HospitalId
=
allot
.
HospitalId
,
AllotID
=
allot
.
ID
,
Charge
=
t
.
Charge
,
ChargeType
=
t
.
ChargeType
});
_drugtypeRepository
.
AddRange
(
newAgains
.
ToArray
());
_drugtypeRepository
.
AddRange
(
newAgains
.
ToArray
());
}
}
...
@@ -846,7 +846,7 @@ private void CopyAprData(int prevAllotId, int allotId)
...
@@ -846,7 +846,7 @@ private void CopyAprData(int prevAllotId, int allotId)
#
region
HRP
人员科室
#
region
HRP
人员科室
public
HandsonTable
GetHrpDeptHands
(
int
HospitalId
,
int
AllotId
)
public
HandsonTable
GetHrpDeptHands
(
int
HospitalId
,
int
AllotId
)
{
{
var
result
=
new
HandsonTable
((
int
)
SheetType
.
Unidentifiable
,
HrpDept
.
Select
(
t
=>
t
.
Value
).
ToArray
(),
HrpDept
.
Select
(
t
=>
new
collect_permission
var
result
=
new
HandsonTable
((
int
)
SheetType
.
Unidentifiable
,
HrpDept
.
Select
(
t
=>
t
.
Value
).
ToArray
(),
HrpDept
.
Select
(
t
=>
new
collect_permission
{
{
...
@@ -921,13 +921,13 @@ public HandsonTable GetSecondaryAlias()
...
@@ -921,13 +921,13 @@ public HandsonTable GetSecondaryAlias()
if
(
column
.
Data
==
"状态"
)
if
(
column
.
Data
==
"状态"
)
{
{
column
.
Type
=
"autocomplete"
;
column
.
Type
=
"autocomplete"
;
column
.
Source
=
new
[]
{
"可用"
,
"禁用"
};
column
.
Source
=
new
[]
{
"可用"
,
"禁用"
};
column
.
Strict
=
true
;
column
.
Strict
=
true
;
}
}
}
}
}
}
var
data
=
perforCofaliasRepository
.
GetEntities
()?.
OrderBy
(
t
=>
t
.
Route
);
var
data
=
perforCofaliasRepository
.
GetEntities
()?.
OrderBy
(
t
=>
t
.
Route
);
if
(
data
==
null
)
return
result
;
if
(
data
==
null
)
return
result
;
List
<
HandsonRowData
>
rowDatas
=
new
List
<
HandsonRowData
>();
List
<
HandsonRowData
>
rowDatas
=
new
List
<
HandsonRowData
>();
int
i
=
0
;
int
i
=
0
;
...
@@ -935,13 +935,13 @@ public HandsonTable GetSecondaryAlias()
...
@@ -935,13 +935,13 @@ public HandsonTable GetSecondaryAlias()
{
{
var
json
=
JsonHelper
.
Serialize
(
item
);
var
json
=
JsonHelper
.
Serialize
(
item
);
var
firstDic
=
JsonHelper
.
Deserialize
<
Dictionary
<
string
,
string
>>(
json
);
var
firstDic
=
JsonHelper
.
Deserialize
<
Dictionary
<
string
,
string
>>(
json
);
firstDic
[
"states"
]
=
firstDic
[
"states"
]
==
"1"
?
"可用"
:
"禁用"
;
firstDic
[
"states"
]
=
firstDic
[
"states"
]
==
"1"
?
"可用"
:
"禁用"
;
var
cells
=
(
from
conf
in
Alias
join
fst
in
firstDic
on
conf
.
Key
.
ToUpper
()
equals
fst
.
Key
.
ToUpper
()
select
new
HandsonCellData
(
conf
.
Value
,
fst
.
Value
)).
ToList
();
var
cells
=
(
from
conf
in
Alias
join
fst
in
firstDic
on
conf
.
Key
.
ToUpper
()
equals
fst
.
Key
.
ToUpper
()
select
new
HandsonCellData
(
conf
.
Value
,
fst
.
Value
)).
ToList
();
rowDatas
.
Add
(
new
HandsonRowData
(
i
,
cells
));
rowDatas
.
Add
(
new
HandsonRowData
(
i
,
cells
));
i
++;
i
++;
}
}
result
.
SetRowData
(
rowDatas
,
rowDatas
!=
null
);
result
.
SetRowData
(
rowDatas
,
rowDatas
!=
null
);
return
result
;
return
result
;
}
}
...
@@ -952,8 +952,8 @@ public void SaveSecondaryAlias(SaveCollectData request)
...
@@ -952,8 +952,8 @@ public void SaveSecondaryAlias(SaveCollectData request)
List
<
cof_alias
>
aliases
=
new
List
<
cof_alias
>();
List
<
cof_alias
>
aliases
=
new
List
<
cof_alias
>();
foreach
(
var
item
in
dicData
)
foreach
(
var
item
in
dicData
)
{
{
var
states
=
new
[]
{
"可用"
,
"禁用"
};
var
states
=
new
[]
{
"可用"
,
"禁用"
};
if
(
item
[
"States"
]
!=
null
&&
states
.
Contains
(
item
[
"States"
]))
if
(
item
[
"States"
]
!=
null
&&
states
.
Contains
(
item
[
"States"
]))
{
{
item
[
"States"
]
=
item
[
"States"
]
==
"可用"
?
"1"
:
"0"
;
item
[
"States"
]
=
item
[
"States"
]
==
"可用"
?
"1"
:
"0"
;
}
}
...
@@ -961,13 +961,13 @@ public void SaveSecondaryAlias(SaveCollectData request)
...
@@ -961,13 +961,13 @@ public void SaveSecondaryAlias(SaveCollectData request)
var
json
=
JsonHelper
.
Serialize
(
item
);
var
json
=
JsonHelper
.
Serialize
(
item
);
var
data
=
JsonHelper
.
Deserialize
<
cof_alias
>(
json
);
var
data
=
JsonHelper
.
Deserialize
<
cof_alias
>(
json
);
if
(!
string
.
IsNullOrEmpty
(
data
.
Name
)
&&
!
string
.
IsNullOrEmpty
(
data
.
OriginalName
)&&
!
string
.
IsNullOrEmpty
(
data
.
Route
)
&&
!
string
.
IsNullOrEmpty
(
data
.
Alias
))
if
(!
string
.
IsNullOrEmpty
(
data
.
Name
)
&&
!
string
.
IsNullOrEmpty
(
data
.
OriginalName
)
&&
!
string
.
IsNullOrEmpty
(
data
.
Route
)
&&
!
string
.
IsNullOrEmpty
(
data
.
Alias
))
{
{
aliases
.
Add
(
data
);
aliases
.
Add
(
data
);
}
}
}
}
perforCofaliasRepository
.
Execute
(
"delete from cof_alias"
,
null
);
perforCofaliasRepository
.
Execute
(
"delete from cof_alias"
,
null
);
perforCofaliasRepository
.
AddRange
(
aliases
.
ToArray
());
perforCofaliasRepository
.
AddRange
(
aliases
.
ToArray
());
}
}
...
...
performance/Performance.Services/DFExtractService.cs
View file @
67426a96
This source diff could not be displayed because it is too large. You can
view the blob
instead.
performance/Performance.Services/ExConfigService.cs
View file @
67426a96
...
@@ -72,6 +72,7 @@ public List<ex_module> QueryModule(int hospitalId)
...
@@ -72,6 +72,7 @@ public List<ex_module> QueryModule(int hospitalId)
DefaultModules
(
hospitalId
);
DefaultModules
(
hospitalId
);
var
list
=
exmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
).
OrderBy
(
t
=>
t
.
ModuleName
).
ToList
();
var
list
=
exmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
).
OrderBy
(
t
=>
t
.
ModuleName
).
ToList
();
list
?.
ForEach
(
t
=>
t
.
ReadOnly
=
t
.
SheetType
==
(
int
)
SheetType
.
Income
?
0
:
1
);
return
list
;
return
list
;
}
}
...
@@ -90,7 +91,7 @@ private void DefaultModules(int hospitalId)
...
@@ -90,7 +91,7 @@ private void DefaultModules(int hospitalId)
};
};
var
data
=
exmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
);
var
data
=
exmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
);
var
inexistence
=
data
==
null
?
moduleList
:
moduleList
.
Where
(
t
=>
!
data
.
Select
(
p
=>
p
.
ModuleName
).
ToArray
().
Contains
(
t
.
ModuleName
));
var
inexistence
=
data
==
null
?
moduleList
:
moduleList
.
Where
(
t
=>
!
data
.
Any
(
w
=>
w
.
ModuleName
.
StartsWith
(
t
.
ModuleName
.
Split
(
' '
)[
0
])
));
if
(
inexistence
!=
null
&&
inexistence
.
Any
())
if
(
inexistence
!=
null
&&
inexistence
.
Any
())
{
{
...
@@ -102,7 +103,7 @@ private void DefaultModules(int hospitalId)
...
@@ -102,7 +103,7 @@ private void DefaultModules(int hospitalId)
HospitalId
=
hospitalId
,
HospitalId
=
hospitalId
,
ModuleName
=
item
.
ModuleName
,
ModuleName
=
item
.
ModuleName
,
SheetType
=
(
int
)
item
.
SheetType
,
SheetType
=
(
int
)
item
.
SheetType
,
ReadOnly
=
1
,
ReadOnly
=
item
.
SheetType
==
(
int
)
SheetType
.
Income
?
0
:
1
,
TypeId
=
null
,
TypeId
=
null
,
};
};
modules
.
Add
(
module
);
modules
.
Add
(
module
);
...
@@ -120,8 +121,7 @@ public ex_module AddModule(ModModuleRequest request)
...
@@ -120,8 +121,7 @@ public ex_module AddModule(ModModuleRequest request)
string
addname
=
""
;
string
addname
=
""
;
if
(
request
.
SheetType
==
(
int
)
SheetType
.
Income
)
if
(
request
.
SheetType
==
(
int
)
SheetType
.
Income
)
{
{
string
[]
array
=
new
string
[]
{
"开单收入"
,
"执行收入"
};
if
(
request
.
ModuleName
.
IndexOf
(
"开单收入"
)
==
-
1
&&
request
.
ModuleName
.
IndexOf
(
"就诊收入"
)
==
-
1
&&
request
.
ModuleName
.
IndexOf
(
"执行收入"
)
==
-
1
)
if
(
request
.
ModuleName
.
IndexOf
(
"开单收入"
)
==
-
1
&&
request
.
ModuleName
.
IndexOf
(
"执行收入"
)
==
-
1
)
throw
new
PerformanceException
(
"模块名称规则错误"
);
throw
new
PerformanceException
(
"模块名称规则错误"
);
//if (!Regex.IsMatch(request.ModuleName, @"^[\u4e00-\u9fa5]+$"))
//if (!Regex.IsMatch(request.ModuleName, @"^[\u4e00-\u9fa5]+$"))
// throw new PerformanceException("模块名称规则错误,请使用全中文命名");
// throw new PerformanceException("模块名称规则错误,请使用全中文命名");
...
@@ -132,7 +132,7 @@ public ex_module AddModule(ModModuleRequest request)
...
@@ -132,7 +132,7 @@ public ex_module AddModule(ModModuleRequest request)
throw
new
PerformanceException
(
"绩效模板已存在!"
);
throw
new
PerformanceException
(
"绩效模板已存在!"
);
var
moduleList
=
exmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
ModuleName
.
IndexOf
(
"1."
)
!=
-
1
);
var
moduleList
=
exmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
ModuleName
.
IndexOf
(
"1."
)
!=
-
1
);
string
name
=
request
.
ModuleName
.
Replace
(
"开单收入"
,
""
).
Replace
(
"执行收入"
,
""
);
string
name
=
request
.
ModuleName
.
Replace
(
"开单收入"
,
""
).
Replace
(
"
就诊收入"
,
""
).
Replace
(
"
执行收入"
,
""
);
var
exist
=
moduleList
.
Where
(
t
=>
t
.
ModuleName
.
Contains
(
name
));
var
exist
=
moduleList
.
Where
(
t
=>
t
.
ModuleName
.
Contains
(
name
));
if
(
exist
!=
null
&&
exist
.
Any
())
if
(
exist
!=
null
&&
exist
.
Any
())
{
{
...
...
performance/Performance.Services/ExtractExcelService/ExtractHelper/ExtractHelper.cs
View file @
67426a96
...
@@ -57,7 +57,7 @@ public static void CreateNotExistSheet(List<ex_module> modulesList, IWorkbook wo
...
@@ -57,7 +57,7 @@ public static void CreateNotExistSheet(List<ex_module> modulesList, IWorkbook wo
var
sheet
=
workbook
.
GetSheet
(
module
.
ModuleName
)
??
workbook
.
GetSheet
(
module
.
ModuleName
.
NoBlank
());
var
sheet
=
workbook
.
GetSheet
(
module
.
ModuleName
)
??
workbook
.
GetSheet
(
module
.
ModuleName
.
NoBlank
());
if
(
sheet
==
null
)
if
(
sheet
==
null
)
{
{
string
[]
keyArray
=
new
string
[]
{
"开单"
,
"执行"
};
string
[]
keyArray
=
new
string
[]
{
"开单"
,
"
就诊"
,
"
执行"
};
if
(
keyArray
.
Any
(
key
=>
module
.
ModuleName
.
Contains
(
key
)))
if
(
keyArray
.
Any
(
key
=>
module
.
ModuleName
.
Contains
(
key
)))
{
{
var
item
=
pairs
.
Where
(
t
=>
t
.
Key
.
StartsWith
(
"1."
)).
OrderByDescending
(
t
=>
t
.
Key
).
First
();
var
item
=
pairs
.
Where
(
t
=>
t
.
Key
.
StartsWith
(
"1."
)).
OrderByDescending
(
t
=>
t
.
Key
).
First
();
...
...
performance/Performance.Services/ExtractExcelService/ExtractJobService.cs
0 → 100644
View file @
67426a96
using
Microsoft.Extensions.Logging
;
using
Performance.DtoModels
;
using
Performance.Repository
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
namespace
Performance.Services.ExtractExcelService
{
public
class
ExtractJobService
:
IAutoInjection
{
private
readonly
ILogger
logger
;
private
readonly
AllotService
allotService
;
private
readonly
ConfigService
configService
;
private
readonly
DictionaryService
dictionaryService
;
private
readonly
QueryService
queryService
;
private
readonly
PerforUserRepository
userRepository
;
private
readonly
PerforHospitalRepository
hospitalRepository
;
private
readonly
PerforPerallotRepository
perallotRepository
;
public
ExtractJobService
(
ILogger
<
ExtractJobService
>
logger
,
AllotService
allotService
,
ConfigService
configService
,
DictionaryService
dictionaryService
,
QueryService
queryService
,
PerforUserRepository
userRepository
,
PerforHospitalRepository
hospitalRepository
,
PerforPerallotRepository
perallotRepository
)
{
this
.
logger
=
logger
;
this
.
allotService
=
allotService
;
this
.
configService
=
configService
;
this
.
dictionaryService
=
dictionaryService
;
this
.
queryService
=
queryService
;
this
.
userRepository
=
userRepository
;
this
.
hospitalRepository
=
hospitalRepository
;
this
.
perallotRepository
=
perallotRepository
;
}
public
void
Execute
()
{
var
hospitals
=
hospitalRepository
.
GetEntities
(
w
=>
w
.
IsOpenTimedTasks
==
1
);
if
(
hospitals
==
null
||
!
hospitals
.
Any
())
return
;
var
userId
=
userRepository
.
GetEntity
(
t
=>
t
.
Login
.
ToLower
()
==
"admin"
&&
t
.
States
==
1
&&
t
.
IsDelete
==
1
)?.
ID
??
1
;
var
date
=
DateTime
.
Now
;
var
allots
=
perallotRepository
.
GetEntities
(
t
=>
hospitals
.
Select
(
w
=>
w
.
ID
).
Contains
(
t
.
HospitalId
)
&&
t
.
Year
==
date
.
Year
&&
t
.
Month
==
date
.
Month
);
foreach
(
var
hospital
in
hospitals
)
{
try
{
var
allot
=
allots
?.
FirstOrDefault
(
t
=>
t
.
HospitalId
==
hospital
.
ID
);
if
(
allot
==
null
)
{
allot
=
allotService
.
InsertAllot
(
new
AllotRequest
{
HospitalId
=
hospital
.
ID
,
Year
=
date
.
Year
,
Month
=
date
.
Month
},
userId
);
configService
.
Copy
(
allot
);
}
if
(
allot
==
null
||
allot
.
ID
==
0
)
continue
;
var
dict
=
new
Dictionary
<
ExDataDict
,
object
>();
var
isSingle
=
hospital
.
IsSingleProject
==
1
;
dictionaryService
.
Handler
(
hospital
.
ID
,
allot
,
""
,
isSingle
);
var
data
=
queryService
.
Handler
(
hospital
.
ID
,
allot
,
""
,
isSingle
,
ref
dict
);
}
catch
(
Exception
ex
)
{
logger
.
LogError
(
ex
.
ToString
());
}
}
}
}
}
performance/Performance.Services/HospitalService.cs
View file @
67426a96
...
@@ -131,9 +131,9 @@ public HospitalResponse Update(HospitalRequest request)
...
@@ -131,9 +131,9 @@ public HospitalResponse Update(HospitalRequest request)
hospital
.
States
=
request
.
States
;
hospital
.
States
=
request
.
States
;
//hospital.IsOpenWorkYear = request.IsOpenWorkYear;
//hospital.IsOpenWorkYear = request.IsOpenWorkYear;
//hospital.IsOpenDirector = request.IsOpenDirector;
//hospital.IsOpenDirector = request.IsOpenDirector;
hospital
.
IsOpenDrugprop
=
request
.
IsOpenDrugprop
;
//
hospital.IsOpenDrugprop = request.IsOpenDrugprop;
hospital
.
IsShowManage
=
request
.
IsShowManage
;
hospital
.
IsShowManage
=
request
.
IsShowManage
;
hospital
.
IsOpenCMIPercent
=
request
.
IsOpenCMIPercent
;
//
hospital.IsOpenCMIPercent = request.IsOpenCMIPercent;
//hospital.IsOpenLogisticsSecondAllot = request.IsOpenLogisticsSecondAllot;
//hospital.IsOpenLogisticsSecondAllot = request.IsOpenLogisticsSecondAllot;
//hospital.IsOpenIncome = request.IsOpenIncome;
//hospital.IsOpenIncome = request.IsOpenIncome;
...
...
performance/Performance.Services/ReportService.cs
View file @
67426a96
...
@@ -182,53 +182,53 @@ public List<PerReport> InpatFeeAvg(int hospitalId)
...
@@ -182,53 +182,53 @@ public List<PerReport> InpatFeeAvg(int hospitalId)
return
perforReportRepository
.
InpatFeeAvg
(
hospitalId
,
date
);
return
perforReportRepository
.
InpatFeeAvg
(
hospitalId
,
date
);
}
}
/// <summary>
///
//
<summary>
/// 科室药占比
///
//
科室药占比
/// </summary>
///
//
</summary>
/// <returns></returns>
///
//
<returns></returns>
public
List
<
PerReport
>
Medicine
(
int
hospitalId
,
int
isIndex
)
//
public List<PerReport> Medicine(int hospitalId, int isIndex)
{
//
{
var
states
=
new
List
<
int
>()
{
6
,
8
};
//
var states = new List<int>() { 6, 8 };
var
allotList
=
perforPerallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
states
.
Contains
(
t
.
States
));
//
var allotList = perforPerallotRepository.GetEntities(t => t.HospitalId == hospitalId && states.Contains(t.States));
if
(
allotList
==
null
||
!
allotList
.
Any
())
//
if (allotList == null || !allotList.Any())
throw
new
PerformanceException
(
"用户未创建绩效!"
);
//
throw new PerformanceException("用户未创建绩效!");
var
date
=
new
List
<
string
>();
//
var date = new List<string>();
if
(
isIndex
==
1
)
//
if (isIndex == 1)
{
//
{
var
allot
=
allotList
.
OrderByDescending
(
t
=>
t
.
Year
).
ThenByDescending
(
t
=>
t
.
Month
).
FirstOrDefault
();
//
var allot = allotList.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).FirstOrDefault();
date
.
Add
(
allot
.
Year
+
"-"
+
allot
.
Month
.
ToString
().
PadLeft
(
2
,
'0'
));
//
date.Add(allot.Year + "-" + allot.Month.ToString().PadLeft(2, '0'));
}
//
}
else
//
else
{
//
{
date
=
allotList
.
OrderByDescending
(
t
=>
t
.
Year
).
ThenByDescending
(
t
=>
t
.
Month
).
Take
(
6
).
Select
(
t
=>
t
.
Year
+
"-"
+
t
.
Month
.
ToString
().
PadLeft
(
2
,
'0'
)).
ToList
();
//
date = allotList.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).Take(6).Select(t => t.Year + "-" + t.Month.ToString().PadLeft(2, '0')).ToList();
}
//
}
return
perforReportRepository
.
Medicine
(
hospitalId
,
date
);
//
return perforReportRepository.Medicine(hospitalId, date);
}
//
}
/// <summary>
///
//
<summary>
/// 科室有效收入占比
///
//
科室有效收入占比
/// </summary>
///
//
</summary>
/// <returns></returns>
///
//
<returns></returns>
public
List
<
PerReport
>
Income
(
int
hospitalId
,
int
isIndex
)
//
public List<PerReport> Income(int hospitalId, int isIndex)
{
//
{
var
states
=
new
List
<
int
>()
{
6
,
8
};
//
var states = new List<int>() { 6, 8 };
var
allotList
=
perforPerallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
states
.
Contains
(
t
.
States
));
//
var allotList = perforPerallotRepository.GetEntities(t => t.HospitalId == hospitalId && states.Contains(t.States));
if
(
allotList
==
null
||
!
allotList
.
Any
())
//
if (allotList == null || !allotList.Any())
throw
new
PerformanceException
(
"用户未创建绩效!"
);
//
throw new PerformanceException("用户未创建绩效!");
var
date
=
new
List
<
string
>();
//
var date = new List<string>();
if
(
isIndex
==
1
)
//
if (isIndex == 1)
{
//
{
var
allot
=
allotList
.
OrderByDescending
(
t
=>
t
.
Year
).
ThenByDescending
(
t
=>
t
.
Month
).
FirstOrDefault
();
//
var allot = allotList.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).FirstOrDefault();
date
.
Add
(
allot
.
Year
+
"-"
+
allot
.
Month
.
ToString
().
PadLeft
(
2
,
'0'
));
//
date.Add(allot.Year + "-" + allot.Month.ToString().PadLeft(2, '0'));
}
//
}
else
//
else
{
//
{
date
=
allotList
.
OrderByDescending
(
t
=>
t
.
Year
).
ThenByDescending
(
t
=>
t
.
Month
).
Take
(
6
).
Select
(
t
=>
t
.
Year
+
"-"
+
t
.
Month
.
ToString
().
PadLeft
(
2
,
'0'
)).
ToList
();
//
date = allotList.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).Take(6).Select(t => t.Year + "-" + t.Month.ToString().PadLeft(2, '0')).ToList();
}
//
}
return
perforReportRepository
.
Income
(
hospitalId
,
date
);
//
return perforReportRepository.Income(hospitalId, date);
}
//
}
/// <summary>
/// <summary>
/// 只支持EXCEL抽取报表数据
/// 只支持EXCEL抽取报表数据
...
...
performance/Performance.Services/RoleService.cs
View file @
67426a96
...
@@ -60,7 +60,7 @@ public List<RoleResponse> GetUsersRole(int userid)
...
@@ -60,7 +60,7 @@ public List<RoleResponse> GetUsersRole(int userid)
List
<
RoleResponse
>
roleResponses
=
new
List
<
RoleResponse
>();
List
<
RoleResponse
>
roleResponses
=
new
List
<
RoleResponse
>();
var
user
=
_userRepository
.
GetEntity
(
c
=>
c
.
ID
==
userid
);
var
user
=
_userRepository
.
GetEntity
(
c
=>
c
.
ID
==
userid
);
var
ParentUser
=
_userRepository
.
GetEntities
(
c
=>
c
.
ParentID
==
userid
);
var
ParentUser
=
_userRepository
.
GetEntities
(
c
=>
c
.
ParentID
==
userid
);
if
(
user
.
ParentID
!=
null
||
user
.
ParentID
=
=
0
)
if
(
user
.
ParentID
!=
null
&&
user
.
ParentID
!
=
0
)
{
{
ParentUser
=
_userRepository
.
GetEntities
(
c
=>
c
.
ParentID
==
user
.
ParentID
);
ParentUser
=
_userRepository
.
GetEntities
(
c
=>
c
.
ParentID
==
user
.
ParentID
);
}
}
...
...
performance/Performance.Services/ServiceLocator.cs
0 → 100644
View file @
67426a96
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.Services
{
public
static
class
ServiceLocator
{
public
static
IServiceProvider
Instance
{
get
;
set
;
}
}
}
performance/Performance.Services/UserService.cs
View file @
67426a96
...
@@ -526,8 +526,8 @@ public UserResponse ResetPwd(int userId, int loginUserId)
...
@@ -526,8 +526,8 @@ public UserResponse ResetPwd(int userId, int loginUserId)
if
(
user
==
null
)
if
(
user
==
null
)
throw
new
PerformanceException
(
$"用户不存在 UserId:
{
userId
}
"
);
throw
new
PerformanceException
(
$"用户不存在 UserId:
{
userId
}
"
);
if
(
user
.
CreateUser
!=
loginUserId
)
//
if (user.CreateUser != loginUserId)
throw
new
PerformanceException
(
$"当前用户无权限重置用户密码"
);
//
throw new PerformanceException($"当前用户无权限重置用户密码");
user
.
Password
=
"123456"
;
user
.
Password
=
"123456"
;
if
(!
_userRepository
.
Update
(
user
))
if
(!
_userRepository
.
Update
(
user
))
...
...
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