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
2957b512
Commit
2957b512
authored
Jul 17, 2024
by
王果
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
21080 添加设备时,设备品种可以为空进行提交,导致设备原本有品种提交了无品种数据的设备。
parent
3035bd99
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
EquipmentCategoryController.java
...odule/ymt/biz/controller/EquipmentCategoryController.java
+6
-3
No files found.
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/controller/EquipmentCategoryController.java
View file @
2957b512
...
...
@@ -175,14 +175,17 @@ public class EquipmentCategoryController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备类别下是否有设备品种"
,
notes
=
"设备类别下是否有设备品种"
)
@GetMapping
(
value
=
"/haveTree"
)
public
ResponseModel
<
String
>
haveTree
(
@RequestParam
(
value
=
"code"
,
required
=
false
)
String
code
)
{
public
ResponseModel
<
Object
>
haveTree
(
@RequestParam
(
value
=
"code"
,
required
=
false
)
String
code
)
{
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"count"
,
"0"
);
if
(
ObjectUtils
.
isEmpty
(
code
))
{
return
ResponseHelper
.
buildResponse
(
"0"
);
return
ResponseHelper
.
buildResponse
(
jsonObject
);
}
QueryWrapper
<
EquipmentCategory
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
likeRight
(
"code"
,
code
.
replaceAll
(
"0+$"
,
""
));
int
count
=
equipmentCategoryServiceImpl
.
count
(
queryWrapper
);
return
ResponseHelper
.
buildResponse
(
count
+
""
);
jsonObject
.
put
(
"count"
,
(
count
-
1
)
+
""
);
return
ResponseHelper
.
buildResponse
(
jsonObject
);
}
/**
...
...
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