Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
2258991a
Commit
2258991a
authored
Oct 24, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改权重接口
parent
659f2f77
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
17 deletions
+26
-17
IdxBizFanWeightController.java
...odule/jxiop/biz/controller/IdxBizFanWeightController.java
+13
-7
IdxBizPvWeightController.java
...module/jxiop/biz/controller/IdxBizPvWeightController.java
+13
-10
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizFanWeightController.java
View file @
2258991a
...
...
@@ -17,6 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.exception.BaseException
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -170,22 +171,24 @@ public class IdxBizFanWeightController extends BaseController {
break
;
case
"2"
:
if
(!
flagtype
.
equals
(
idxBizFanWeight
.
getArae
()))
{
throw
new
RuntimeException
(
"配置权重必须是同一个层级的数据"
);
throw
new
BaseException
(
"配置权重必须是同一个层级的数据"
,
"403"
,
"配置权重必须是同一个层级的数据"
);
}
break
;
case
"3"
:
if
(!
flagtype
.
equals
(
idxBizFanWeight
.
getArae
()
+
idxBizFanWeight
.
getStation
()))
{
throw
new
RuntimeException
(
"配置权重必须是同一个层级的数据"
);
throw
new
BaseException
(
"配置权重必须是同一个层级的数据"
,
"403"
,
"配置权重必须是同一个层级的数据"
);
}
break
;
case
"4"
:
if
(!
flagtype
.
equals
(
idxBizFanWeight
.
getArae
()
+
idxBizFanWeight
.
getStation
()
+
idxBizFanWeight
.
getEquipmentName
()))
{
throw
new
RuntimeException
(
"配置权重必须是同一个层级的数据"
);
throw
new
BaseException
(
"配置权重必须是同一个层级的数据"
,
"403"
,
"配置权重必须是同一个层级的数据"
);
}
break
;
case
"5"
:
if
(!
flagtype
.
equals
(
idxBizFanWeight
.
getArae
()
+
idxBizFanWeight
.
getStation
()
+
idxBizFanWeight
.
getEquipmentName
()
+
idxBizFanWeight
.
getSubarray
()))
{
throw
new
RuntimeException
(
"配置权重必须是同一个层级的数据"
);
throw
new
BaseException
(
"配置权重必须是同一个层级的数据"
,
"403"
,
"配置权重必须是同一个层级的数据"
);
}
break
;
}
...
...
@@ -239,17 +242,20 @@ public class IdxBizFanWeightController extends BaseController {
int
num
=
listdata
.
size
()
-
list
.
size
();
if
(
num
==
0
)
{
if
(
valued
!=
1
)
{
throw
new
RuntimeException
(
"超出权重最大值限制,层级下权重等级总和为1"
);
throw
new
BaseException
(
"超出权重最大值限制,层级下权重等级总和为1"
,
"403"
,
"超出权重最大值限制,层级下权重等级总和为1"
);
}
}
//值不能大于1
if
(
valued
>
1
)
{
throw
new
RuntimeException
(
"超出权重最大值限制,层级下权重等级总和为1"
);
throw
new
BaseException
(
"超出权重最大值限制,层级下权重等级总和为1"
,
"403"
,
"超出权重最大值限制,层级下权重等级总和为1"
);
}
if
(
valued
!=
1
&&
num
==
0
)
{
throw
new
RuntimeException
(
"超出权重最大值限制,层级下权重等级总和为1"
);
throw
new
BaseException
(
"超出权重最大值限制,层级下权重等级总和为1"
,
"403"
,
"超出权重最大值限制,层级下权重等级总和为1"
);
}
//剩余权重值
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizPvWeightController.java
View file @
2258991a
...
...
@@ -20,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.exception.BaseException
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -186,22 +187,22 @@ public class IdxBizPvWeightController extends BaseController {
break
;
case
"2"
:
if
(!
flagtype
.
equals
(
idxBizFanWeight
.
getArae
()))
{
throw
new
RuntimeException
(
"配置权重必须是同一个层级的数据"
);
throw
new
BaseException
(
"配置权重必须是同一个层级的数据"
,
"403"
,
"配置权重必须是同一个层级的数据"
);
}
break
;
case
"3"
:
if
(!
flagtype
.
equals
(
idxBizFanWeight
.
getArae
()
+
idxBizFanWeight
.
getStation
()))
{
throw
new
RuntimeException
(
"配置权重必须是同一个层级的数据"
);
if
(!
flagtype
.
equals
(
idxBizFanWeight
.
getArae
()
+
idxBizFanWeight
.
getStation
()
+
idxBizFanWeight
.
getSubarray
()
))
{
throw
new
BaseException
(
"配置权重必须是同一个层级的数据"
,
"403"
,
"配置权重必须是同一个层级的数据"
);
}
break
;
case
"4"
:
if
(!
flagtype
.
equals
(
idxBizFanWeight
.
getArae
()
+
idxBizFanWeight
.
getStation
()
+
idxBizFanWeight
.
getEquipmentName
()
))
{
throw
new
RuntimeException
(
"配置权重必须是同一个层级的数据"
);
if
(!
flagtype
.
equals
(
idxBizFanWeight
.
getArae
()
+
idxBizFanWeight
.
getStation
()
))
{
throw
new
BaseException
(
"配置权重必须是同一个层级的数据"
,
"403"
,
"配置权重必须是同一个层级的数据"
);
}
break
;
case
"5"
:
if
(!
flagtype
.
equals
(
idxBizFanWeight
.
getArae
()
+
idxBizFanWeight
.
getStation
()
+
idxBizFanWeight
.
getEquipmentName
()
+
idxBizFanWeight
.
getSubarray
()))
{
throw
new
RuntimeException
(
"配置权重必须是同一个层级的数据"
);
throw
new
BaseException
(
"配置权重必须是同一个层级的数据"
,
"403"
,
"配置权重必须是同一个层级的数据"
);
}
break
;
}
...
...
@@ -225,13 +226,13 @@ public class IdxBizPvWeightController extends BaseController {
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getType
()),
IdxBizPvWeight:
:
getType
,
reviewDto
.
getType
());
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getArae
()),
IdxBizPvWeight:
:
getArae
,
reviewDto
.
getArae
());
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getStation
()),
IdxBizPvWeight:
:
getStation
,
reviewDto
.
getStation
());
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getSubarray
()),
IdxBizPvWeight:
:
getSubarray
,
reviewDto
.
getSubarray
());
break
;
case
"4"
:
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getType
()),
IdxBizPvWeight:
:
getType
,
reviewDto
.
getType
());
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getArae
()),
IdxBizPvWeight:
:
getArae
,
reviewDto
.
getArae
());
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getStation
()),
IdxBizPvWeight:
:
getStation
,
reviewDto
.
getStation
());
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getSubarray
()),
IdxBizPvWeight:
:
getSubarray
,
reviewDto
.
getSubarray
());
break
;
case
"5"
:
...
...
@@ -255,17 +256,19 @@ public class IdxBizPvWeightController extends BaseController {
int
num
=
listdata
.
size
()
-
list
.
size
();
if
(
num
==
0
)
{
if
(
valued
!=
1
)
{
throw
new
RuntimeException
(
"超出权重最大值限制,层级下权重等级总和为1"
);
throw
new
BaseException
(
"超出权重最大值限制,层级下权重等级总和为1"
,
"403"
,
"超出权重最大值限制,层级下权重等级总和为1"
);
}
}
//值不能大于1
if
(
valued
>
1
)
{
throw
new
RuntimeException
(
"超出权重最大值限制,层级下权重等级总和为1"
);
throw
new
BaseException
(
"超出权重最大值限制,层级下权重等级总和为1"
,
"403"
,
"超出权重最大值限制,层级下权重等级总和为1"
);
}
if
(
valued
!=
1
&&
num
==
0
)
{
throw
new
RuntimeException
(
"超出权重最大值限制,层级下权重等级总和为1"
);
throw
new
BaseException
(
"超出权重最大值限制,层级下权重等级总和为1"
,
"403"
,
"超出权重最大值限制,层级下权重等级总和为1"
);
}
//剩余权重值
...
...
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