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
5ee5ce56
Commit
5ee5ce56
authored
Feb 25, 2022
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
核算单元及组别添加校验结果
parent
a9fa3be3
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
229 additions
and
9 deletions
+229
-9
performance/Performance.Api/Controllers/ConfigController.cs
+2
-3
performance/Performance.Api/wwwroot/Performance.Api.xml
+140
-0
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+10
-0
performance/Performance.EntityModels/Entity/cof_accounting.cs
+10
-0
performance/Performance.Services/ConfigService.cs
+67
-6
No files found.
performance/Performance.Api/Controllers/ConfigController.cs
View file @
5ee5ce56
...
@@ -681,13 +681,12 @@ public ApiResponse BatchAccountingStructrue([FromRoute] int allotId)
...
@@ -681,13 +681,12 @@ public ApiResponse BatchAccountingStructrue([FromRoute] int allotId)
/// 核算单元及组别批量添加
/// 核算单元及组别批量添加
/// </summary>
/// </summary>
/// <param name="allotId"></param>
/// <param name="allotId"></param>
/// <param name="request"></param>
/// <returns></returns>
/// <returns></returns>
[
Route
(
"BatchCheckAccounting/{allotId}"
)]
[
Route
(
"BatchCheckAccounting/{allotId}"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
BatchCheckAccounting
(
int
allotId
,
[
FromBody
]
SaveCollectData
request
)
public
ApiResponse
BatchCheckAccounting
(
int
allotId
)
{
{
var
result
=
_configService
.
BatchSaveAccounting
(
allotId
,
request
,
false
);
_configService
.
BatchCheckAccounting
(
allotId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"校验通过"
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"校验通过"
);
}
}
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
5ee5ce56
...
@@ -804,6 +804,13 @@
...
@@ -804,6 +804,13 @@
<param
name=
"allotId"
></param>
<param
name=
"allotId"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.ConfigController.BatchCheckAccounting(System.Int32)"
>
<summary>
核算单元及组别批量添加
</summary>
<param
name=
"allotId"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ConfigController.BatchSaveAccounting(System.Int32,Performance.DtoModels.SaveCollectData)"
>
<member
name=
"M:Performance.Api.Controllers.ConfigController.BatchSaveAccounting(System.Int32,Performance.DtoModels.SaveCollectData)"
>
<summary>
<summary>
核算单元及组别批量添加
核算单元及组别批量添加
...
@@ -1448,6 +1455,98 @@
...
@@ -1448,6 +1455,98 @@
</summary>
</summary>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.ModExtractController.GetHospitalConfig(System.Int32)"
>
<summary>
医院数据库配置列表
</summary>
<param
name=
"hospitalId"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ModExtractController.CreateHospitalConfig(Performance.EntityModels.sys_hospitalconfig)"
>
<summary>
创建医院数据库配置
</summary>
<param
name=
"hospitalconfig"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ModExtractController.UpdateHospitalConfig(Performance.EntityModels.sys_hospitalconfig)"
>
<summary>
修改医院数据库配置
</summary>
<param
name=
"hospitalconfig"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ModExtractController.DeleteHospitalConfig(System.Int32)"
>
<summary>
删除医院数据库配置
</summary>
<param
name=
"hospitalconfigId"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ModExtractController.TestConnectionCleared(System.Int32)"
>
<summary>
测试连接
</summary>
<param
name=
"hospitalconfigId"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ModExtractController.GetExtractTypeAndScript(System.Int32)"
>
<summary>
数据提取信息列表
</summary>
<param
name=
"hospitalId"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ModExtractController.GetExtractTypeAndScriptById(System.Int32,System.Int32)"
>
<summary>
数据提取详情
</summary>
<param
name=
"typeId"
></param>
<param
name=
"scriptId"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ModExtractController.DeleteExtractTypeAndScript(System.Int32,System.Int32)"
>
<summary>
删除提取Sql
</summary>
<param
name=
"typeId"
></param>
<param
name=
"scriptId"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ModExtractController.EditExtractTypeAndScript(System.Int32,Performance.DtoModels.ExtractConfigResponse)"
>
<summary>
保存数据
</summary>
<param
name=
"hospitalId"
></param>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ModExtractController.ExecsqlAndGetResult(Performance.DtoModels.ConsumeTimeRequest)"
>
<summary>
执行Sql
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ModExtractController.GetDatatypes"
>
<summary>
数据库类型
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ModExtractController.GetSheettypes"
>
<summary>
来源类型
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ModExtractController.GetConfigs(System.Int32)"
>
<summary>
医院数据库连接配置
</summary>
<param
name=
"hospitalId"
></param>
<returns></returns>
</member>
<member
name=
"T:Performance.Api.Controllers.OriginalController"
>
<member
name=
"T:Performance.Api.Controllers.OriginalController"
>
<summary>
<summary>
原始数据修改
原始数据修改
...
@@ -2065,6 +2164,12 @@
...
@@ -2065,6 +2164,12 @@
<param
name=
"request"
></param>
<param
name=
"request"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.RedistributionRollback(System.Int32)"
>
<summary>
二次绩效撤回提交
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.RedistributionEmployee(Performance.DtoModels.SecondEmployeeDto)"
>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.RedistributionEmployee(Performance.DtoModels.SecondEmployeeDto)"
>
<summary>
<summary>
二次分配人员字典带出
二次分配人员字典带出
...
@@ -2174,6 +2279,41 @@
...
@@ -2174,6 +2279,41 @@
<param
name=
"query"
></param>
<param
name=
"query"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.BackgroundJob.Execute_Allot_Generate(Performance.Services.TaskService,Performance.EntityModels.bg_task)"
>
<summary>
生成测算表
</summary>
<param
name=
"service"
></param>
<param
name=
"task"
></param>
</member>
<member
name=
"M:Performance.Api.BackgroundJob.Execute_Allot_Generate_Report(Performance.Services.TaskService,Performance.EntityModels.bg_task)"
>
<summary>
生成报表
</summary>
<param
name=
"service"
></param>
<param
name=
"task"
></param>
</member>
<member
name=
"M:Performance.Api.BackgroundJob.Execute_Allot_CustomExtract(Performance.Services.TaskService,Performance.EntityModels.bg_task)"
>
<summary>
提取绩效数据
</summary>
<param
name=
"service"
></param>
<param
name=
"task"
></param>
</member>
<member
name=
"M:Performance.Api.BackgroundJob.Timeout(Performance.Services.TaskService,System.Collections.Generic.List{Performance.EntityModels.bg_task})"
>
<summary>
超时关闭
</summary>
<param
name=
"service"
></param>
<param
name=
"tasks"
></param>
</member>
<member
name=
"M:Performance.Api.BackgroundJob.Repeat(Performance.Services.TaskService,System.Collections.Generic.List{Performance.EntityModels.bg_task})"
>
<summary>
重复任务仅执行最后异常
</summary>
<param
name=
"service"
></param>
<param
name=
"tasks"
></param>
</member>
<member
name=
"T:Performance.Api.ClearLoggerJob"
>
<member
name=
"T:Performance.Api.ClearLoggerJob"
>
<summary>
<summary>
删除历史日志
删除历史日志
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
5ee5ce56
...
@@ -1635,6 +1635,16 @@
...
@@ -1635,6 +1635,16 @@
核算单元编码
核算单元编码
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.cof_accounting.IsVerify"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.cof_accounting.VerifyMessage"
>
<summary>
</summary>
</member>
<member
name=
"T:Performance.EntityModels.cof_again"
>
<member
name=
"T:Performance.EntityModels.cof_again"
>
<summary>
<summary>
...
...
performance/Performance.EntityModels/Entity/cof_accounting.cs
View file @
5ee5ce56
...
@@ -39,5 +39,15 @@ public class cof_accounting
...
@@ -39,5 +39,15 @@ public class cof_accounting
/// 核算单元编码
/// 核算单元编码
/// </summary>
/// </summary>
public
string
Code
{
get
;
set
;
}
public
string
Code
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
IsVerify
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
VerifyMessage
{
get
;
set
;
}
}
}
}
}
performance/Performance.Services/ConfigService.cs
View file @
5ee5ce56
...
@@ -786,7 +786,7 @@ public List<cof_accounting> GetAccountingList(AccoungingRequest request)
...
@@ -786,7 +786,7 @@ public List<cof_accounting> GetAccountingList(AccoungingRequest request)
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
.
Replace
(
"行政后勤"
,
"行政工勤"
)
==
request
.
UnitType
.
Replace
(
"行政后勤"
,
"行政工勤"
));
exp
=
exp
.
And
(
t
=>
t
.
UnitType
.
Replace
(
"行政后勤"
,
"行政工勤"
)
==
request
.
UnitType
.
Replace
(
"行政后勤"
,
"行政工勤"
));
return
cofaccountingRepository
.
GetEntities
(
exp
)?.
OrderBy
(
t
=>
ConvertHelper
.
To
<
int
>(
t
.
Code
)).
ToList
()
??
new
List
<
cof_accounting
>();
return
cofaccountingRepository
.
GetEntities
(
exp
)?.
OrderBy
(
t
=>
t
.
IsVerify
).
ThenBy
(
t
=>
ConvertHelper
.
To
<
int
>(
t
.
Code
)).
ToList
()
??
new
List
<
cof_accounting
>();
}
}
/// <summary>
/// <summary>
...
@@ -869,7 +869,7 @@ public HandsonTable GetBatchAccountingStructrue(int AllotId)
...
@@ -869,7 +869,7 @@ public HandsonTable GetBatchAccountingStructrue(int AllotId)
return
result
;
return
result
;
}
}
public
bool
BatchSaveAccounting
(
int
allotId
,
SaveCollectData
request
,
bool
isSave
=
true
)
public
bool
BatchSaveAccounting
(
int
allotId
,
SaveCollectData
request
)
{
{
var
dicData
=
CreateDataRow
(
0
,
allotId
,
request
,
Accounting
);
var
dicData
=
CreateDataRow
(
0
,
allotId
,
request
,
Accounting
);
if
(
dicData
==
null
||
!
dicData
.
Any
())
throw
new
PerformanceException
(
"未提交数据"
);
if
(
dicData
==
null
||
!
dicData
.
Any
())
throw
new
PerformanceException
(
"未提交数据"
);
...
@@ -892,8 +892,6 @@ public bool BatchSaveAccounting(int allotId, SaveCollectData request, bool isSav
...
@@ -892,8 +892,6 @@ public bool BatchSaveAccounting(int allotId, SaveCollectData request, bool isSav
if
(
grouped
.
Any
(
w
=>
w
.
Count
()
>
1
))
throw
new
PerformanceException
(
"核算单元、核算单元类型有重复值"
);
if
(
grouped
.
Any
(
w
=>
w
.
Count
()
>
1
))
throw
new
PerformanceException
(
"核算单元、核算单元类型有重复值"
);
if
(
isSave
)
{
var
delAccounts
=
new
List
<
cof_accounting
>();
var
delAccounts
=
new
List
<
cof_accounting
>();
foreach
(
var
item
in
accounts
)
foreach
(
var
item
in
accounts
)
...
@@ -906,11 +904,58 @@ public bool BatchSaveAccounting(int allotId, SaveCollectData request, bool isSav
...
@@ -906,11 +904,58 @@ public bool BatchSaveAccounting(int allotId, SaveCollectData request, bool isSav
cofaccountingRepository
.
RemoveRange
(
delAccounts
.
ToArray
());
cofaccountingRepository
.
RemoveRange
(
delAccounts
.
ToArray
());
if
(
accounts
!=
null
&&
accounts
.
Any
())
if
(
accounts
!=
null
&&
accounts
.
Any
())
{
accounts
.
ForEach
(
account
=>
{
account
.
AllotId
=
allotId
;
account
.
IsVerify
=
1
;
});
cofaccountingRepository
.
AddRange
(
accounts
.
ToArray
());
cofaccountingRepository
.
AddRange
(
accounts
.
ToArray
());
}
}
return
true
;
return
true
;
}
}
public
bool
BatchCheckAccounting
(
int
allotId
)
{
var
accounts
=
cofaccountingRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
);
if
(
accounts
==
null
||
!
accounts
.
Any
())
return
true
;
accounts
.
ForEach
(
t
=>
{
t
.
IsVerify
=
1
;
t
.
VerifyMessage
=
string
.
Empty
;
});
if
(
accounts
.
GroupBy
(
t
=>
t
.
Code
).
Any
(
w
=>
w
.
Count
()
>
1
))
{
var
items
=
accounts
.
GroupBy
(
t
=>
t
.
Code
).
Where
(
w
=>
w
.
Count
()
>
1
).
SelectMany
(
w
=>
w
.
Select
(
t
=>
t
.
Id
));
foreach
(
var
item
in
accounts
.
Where
(
w
=>
items
.
Contains
(
w
.
Id
)))
{
item
.
IsVerify
=
0
;
item
.
VerifyMessage
=
"核算单元编码重复"
;
}
}
var
grouped
=
accounts
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
UnitType
});
if
(
grouped
.
Any
(
w
=>
w
.
Count
()
>
1
))
{
var
items
=
grouped
.
Where
(
w
=>
w
.
Count
()
>
1
).
SelectMany
(
w
=>
w
.
Select
(
t
=>
t
.
Id
));
foreach
(
var
item
in
accounts
.
Where
(
w
=>
items
.
Contains
(
w
.
Id
)))
{
var
extend
=
string
.
IsNullOrEmpty
(
item
.
VerifyMessage
)
?
""
:
";"
;
item
.
IsVerify
=
0
;
item
.
VerifyMessage
+=
$"
{
extend
}
核算单元、核算单元类型重复"
;
}
}
return
cofaccountingRepository
.
UpdateRange
(
accounts
.
ToArray
());
}
public
static
Dictionary
<
string
,
string
>
Accounting
{
get
;
}
=
new
Dictionary
<
string
,
string
>
public
static
Dictionary
<
string
,
string
>
Accounting
{
get
;
}
=
new
Dictionary
<
string
,
string
>
{
{
{
nameof
(
cof_accounting
.
Code
),
"核算单元编码"
},
{
nameof
(
cof_accounting
.
Code
),
"核算单元编码"
},
...
@@ -1104,7 +1149,15 @@ public void CopyCommand(per_allot allot, int prevAllotId, bool delHistotyData =
...
@@ -1104,7 +1149,15 @@ public void CopyCommand(per_allot allot, int prevAllotId, bool delHistotyData =
accountings
=
cofaccountingRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
prevAllotId
)
??
cofaccountingRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
-
1
);
accountings
=
cofaccountingRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
prevAllotId
)
??
cofaccountingRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
-
1
);
if
(
accountings
!=
null
&&
accountings
.
Any
())
if
(
accountings
!=
null
&&
accountings
.
Any
())
{
{
var
newAccountings
=
accountings
.
Select
(
t
=>
new
cof_accounting
{
AllotId
=
allot
.
ID
,
UnitType
=
t
.
UnitType
,
AccountingUnit
=
t
.
AccountingUnit
});
var
newAccountings
=
accountings
.
Select
(
t
=>
new
cof_accounting
{
AllotId
=
allot
.
ID
,
UnitType
=
t
.
UnitType
,
AccountingUnit
=
t
.
AccountingUnit
,
Code
=
t
.
Code
,
IsVerify
=
t
.
IsVerify
,
VerifyMessage
=
t
.
VerifyMessage
});
cofaccountingRepository
.
AddRange
(
newAccountings
.
ToArray
());
cofaccountingRepository
.
AddRange
(
newAccountings
.
ToArray
());
}
}
}
}
...
@@ -1248,7 +1301,15 @@ public void NewCopy(CopyRequest request)
...
@@ -1248,7 +1301,15 @@ public void NewCopy(CopyRequest request)
accountings
=
cofaccountingRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
)
??
cofaccountingRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
-
1
);
accountings
=
cofaccountingRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
)
??
cofaccountingRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
-
1
);
if
(
accountings
!=
null
&&
accountings
.
Any
())
if
(
accountings
!=
null
&&
accountings
.
Any
())
{
{
var
newAccountings
=
accountings
.
Select
(
t
=>
new
cof_accounting
{
AllotId
=
allot
.
ID
,
UnitType
=
t
.
UnitType
,
AccountingUnit
=
t
.
AccountingUnit
});
var
newAccountings
=
accountings
.
Select
(
t
=>
new
cof_accounting
{
AllotId
=
allot
.
ID
,
UnitType
=
t
.
UnitType
,
AccountingUnit
=
t
.
AccountingUnit
,
Code
=
t
.
Code
,
IsVerify
=
t
.
IsVerify
,
VerifyMessage
=
t
.
VerifyMessage
});
cofaccountingRepository
.
AddRange
(
newAccountings
.
ToArray
());
cofaccountingRepository
.
AddRange
(
newAccountings
.
ToArray
());
}
}
break
;
break
;
...
...
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