Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
indicators
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangkb
indicators
Commits
e7a21297
Commit
e7a21297
authored
Dec 30, 2020
by
hzc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增或者修改数据项时判断名称是否重复
parent
e828e1e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
BaseIndDefService.java
...obile/indicators/service/hytobacco/BaseIndDefService.java
+9
-0
No files found.
src/main/java/com/keymobile/indicators/service/hytobacco/BaseIndDefService.java
View file @
e7a21297
...
@@ -29,6 +29,15 @@ public class BaseIndDefService {
...
@@ -29,6 +29,15 @@ public class BaseIndDefService {
public
String
saveOrUpdate
(
BaseIndDef
baseIndDef
,
Integer
catalogId
,
public
String
saveOrUpdate
(
BaseIndDef
baseIndDef
,
Integer
catalogId
,
String
catalogIdPath
,
String
user
,
String
isUpdate
,
String
code
)
String
catalogIdPath
,
String
user
,
String
isUpdate
,
String
code
)
throws
Exception
{
throws
Exception
{
//判断名称是否重复
BaseIndDef
baseIndDefSql
=
new
BaseIndDef
();
baseIndDefSql
.
setCatalogId
(
catalogId
);
baseIndDefSql
.
setIndName
(
baseIndDef
.
getIndName
());
List
<
BaseIndDef
>
select
=
baseIndDefMapper
.
select
(
baseIndDef
);
if
(
select
!=
null
&&
select
.
size
()>
0
&&!
select
.
get
(
0
).
getIndId
().
equals
(
baseIndDef
.
getIndId
())){
throw
new
Exception
(
"数据项名称已存在,操作失败!!"
);
}
//判断公式合法性
//判断公式合法性
if
(
StringUtils
.
isNotBlank
(
baseIndDef
.
getIndFormat
())
&&
if
(
StringUtils
.
isNotBlank
(
baseIndDef
.
getIndFormat
())
&&
!
CalculateUtils
.
isValidformula
(
baseIndDef
.
getIndFormat
()))
{
!
CalculateUtils
.
isValidformula
(
baseIndDef
.
getIndFormat
()))
{
...
...
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