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
6d7089ad
Commit
6d7089ad
authored
Mar 07, 2022
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加核算单元及组别时,进行重复校验
parent
033dbf29
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
performance/Performance.Api/Controllers/ConfigController.cs
+3
-3
performance/Performance.Services/ConfigService.cs
+6
-0
No files found.
performance/Performance.Api/Controllers/ConfigController.cs
View file @
6d7089ad
...
...
@@ -626,8 +626,8 @@ public ApiResponse GetAccountingList([FromBody] AccoungingRequest request)
[
HttpPost
]
public
ApiResponse
AccountingInsert
([
FromBody
]
cof_accounting
request
)
{
if
(
request
.
AllotId
==
0
||
string
.
IsNullOrEmpty
(
request
.
UnitType
)
||
string
.
IsNullOrEmpty
(
request
.
AccountingUnit
))
return
new
ApiResponse
(
ResponseType
.
ParameterError
);
if
(
request
.
AllotId
==
0
||
string
.
IsNullOrEmpty
(
request
.
Code
)
||
string
.
IsNullOrEmpty
(
request
.
UnitType
)
||
string
.
IsNullOrEmpty
(
request
.
AccountingUnit
))
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数不允许为空"
);
var
drugprop
=
_configService
.
AccountingInsert
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
drugprop
);
...
...
@@ -678,7 +678,7 @@ public ApiResponse BatchAccountingStructrue([FromRoute] int allotId)
}
/// <summary>
/// 核算单元及组别
批量添加
/// 核算单元及组别
检验
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
...
...
performance/Performance.Services/ConfigService.cs
View file @
6d7089ad
...
...
@@ -796,6 +796,12 @@ public List<cof_accounting> GetAccountingList(AccoungingRequest request)
/// <returns></returns>
public
cof_accounting
AccountingInsert
(
cof_accounting
request
)
{
var
existed
=
cofaccountingRepository
.
GetEntity
(
w
=>
w
.
Code
==
request
.
Code
);
if
(
existed
!=
null
)
throw
new
PerformanceException
(
"核算单元编码重复"
);
existed
=
cofaccountingRepository
.
GetEntity
(
w
=>
w
.
UnitType
==
request
.
UnitType
&&
w
.
AccountingUnit
==
request
.
AccountingUnit
);
if
(
existed
!=
null
)
throw
new
PerformanceException
(
"核算单元、核算组别已存在"
);
var
entity
=
new
cof_accounting
{
AllotId
=
request
.
AllotId
,
...
...
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