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
eaefefc2
Commit
eaefefc2
authored
May 21, 2021
by
钟博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补充合并丢失代码:核算单元组别
parent
8a040b68
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
90 additions
and
0 deletions
+90
-0
performance/Performance.Api/Controllers/ConfigController.cs
+32
-0
performance/Performance.Services/ConfigService.cs
+58
-0
No files found.
performance/Performance.Api/Controllers/ConfigController.cs
View file @
eaefefc2
...
...
@@ -594,6 +594,38 @@ public ApiResponse AccountingDelete([FromRoute] int accountingId)
return
new
ApiResponse
(
ResponseType
.
Fail
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
/// <summary>
/// 核算单元及组别批量表头
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
[
Route
(
"BatchAccountingStructrue/{allotId}"
)]
[
HttpPost
]
public
ApiResponse
BatchAccountingStructrue
([
FromRoute
]
int
allotId
)
{
var
request
=
_configService
.
GetBatchAccountingStructrue
(
allotId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
request
);
}
/// <summary>
/// 核算单元及组别批量添加
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
[
Route
(
"BatchSaveAccounting/{allotId}"
)]
[
HttpPost
]
public
ApiResponse
BatchSaveAccounting
(
int
allotId
,
[
FromBody
]
SaveCollectData
request
)
{
var
result
=
_configService
.
BatchSaveAccounting
(
allotId
,
request
);
if
(
result
)
return
new
ApiResponse
(
ResponseType
.
OK
);
else
return
new
ApiResponse
(
ResponseType
.
Error
,
"请选则正确的核算组别"
);
}
#
endregion
/// <summary>
...
...
performance/Performance.Services/ConfigService.cs
View file @
eaefefc2
...
...
@@ -706,6 +706,64 @@ public bool AccountingDelete(int accountingId)
return
cofaccountingRepository
.
Remove
(
entity
);
}
public
HandsonTable
GetBatchAccountingStructrue
(
int
AllotId
)
{
var
result
=
new
HandsonTable
((
int
)
SheetType
.
Unidentifiable
,
Accounting
.
Select
(
t
=>
t
.
Value
).
ToArray
(),
Accounting
.
Select
(
t
=>
new
collect_permission
{
HeadName
=
t
.
Value
,
Visible
=
1
}).
ToList
());
if
(
result
.
Columns
!=
null
&&
result
.
Columns
.
Any
())
{
foreach
(
var
column
in
result
.
Columns
)
{
if
(
column
.
Data
==
"核算组别"
)
{
column
.
Type
=
"autocomplete"
;
column
.
Source
=
new
[]
{
"医生组"
,
"护理组"
,
"医技组"
,
"特殊核算组"
,
"其他医生组"
,
"其他护理组"
,
"其他医技组"
,
"行政高层"
,
"行政中层"
,
"行政后勤"
};
column
.
Strict
=
true
;
}
}
}
return
result
;
}
public
bool
BatchSaveAccounting
(
int
allotId
,
SaveCollectData
request
)
{
var
dicData
=
CreateDataRow
(
0
,
allotId
,
request
,
Accounting
);
var
getAccounts
=
cofaccountingRepository
.
GetEntities
();
var
unitType
=
new
[]
{
"医生组"
,
"护理组"
,
"医技组"
,
"特殊核算组"
,
"其他医生组"
,
"其他护理组"
,
"其他医技组"
,
"行政高层"
,
"行政中层"
,
"行政后勤"
};
List
<
cof_accounting
>
accounts
=
new
List
<
cof_accounting
>();
foreach
(
var
item
in
dicData
)
{
var
json
=
JsonHelper
.
Serialize
(
item
);
var
data
=
JsonHelper
.
Deserialize
<
cof_accounting
>(
json
);
if
(!
unitType
.
Contains
(
data
.
UnitType
))
return
false
;
if
(
getAccounts
!=
null
||
getAccounts
.
Any
())
if
(
getAccounts
.
Any
(
t
=>
t
.
AccountingUnit
==
data
?.
AccountingUnit
&&
t
.
UnitType
==
data
.
UnitType
)
||
accounts
.
Any
(
t
=>
t
.
AccountingUnit
==
data
?.
AccountingUnit
&&
t
.
UnitType
==
data
.
UnitType
))
continue
;
if
(!
string
.
IsNullOrEmpty
(
data
?.
AccountingUnit
)
&&
!
string
.
IsNullOrEmpty
(
data
?.
UnitType
))
{
accounts
.
Add
(
data
);
}
}
if
(
accounts
.
Any
())
cofaccountingRepository
.
AddRange
(
accounts
.
ToArray
());
return
true
;
}
public
static
Dictionary
<
string
,
string
>
Accounting
{
get
;
}
=
new
Dictionary
<
string
,
string
>
{
{
nameof
(
cof_accounting
.
AccountingUnit
),
"核算单元"
},
{
nameof
(
cof_accounting
.
UnitType
),
"核算组别"
},
};
#
endregion
#
region
Copy
...
...
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