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
273c46eb
Commit
273c46eb
authored
Feb 08, 2025
by
朱晨阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加根据设备种类code获取设备类别接口
parent
1af30530
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
0 deletions
+46
-0
CommonController.java
.../amos/boot/module/jg/biz/controller/CommonController.java
+12
-0
ICommonService.java
...ejoin/amos/boot/module/jg/biz/service/ICommonService.java
+2
-0
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+18
-0
EquipmentCategoryMapper.java
...s/boot/module/ymt/api/mapper/EquipmentCategoryMapper.java
+3
-0
EquipmentCategoryMapper.xml
...api/src/main/resources/mapper/EquipmentCategoryMapper.xml
+11
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/CommonController.java
View file @
273c46eb
...
...
@@ -211,6 +211,18 @@ public class CommonController extends BaseController {
}
/**
* 根据设备种类code获取设备类别
* @param type 1,设备种类 2,设备类别 3,设备品种
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/equipmentClassificationByParentCode"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备分类"
,
notes
=
"1,设备种类 2,设备类别 3,设备品种"
)
public
ResponseModel
<
List
<
EquipmentCategoryDto
>>
equipmentClassificationByParentCode
(
@RequestParam
(
value
=
"type"
)
String
type
,
@RequestParam
(
value
=
"parentCode"
,
required
=
false
)
String
parentCode
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
equipmentClassificationByParentCode
(
type
,
parentCode
));
}
/**
* 设备品种
*
* @param parentId 父级ID
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/ICommonService.java
View file @
273c46eb
...
...
@@ -241,6 +241,8 @@ public interface ICommonService {
List
<
EquipmentCategoryDto
>
equipmentClassificationNoPipeline
(
String
type
);
List
<
EquipmentCategoryDto
>
equipmentClassificationByParentCode
(
String
type
,
String
parentCode
);
List
<
EquipmentCategoryDto
>
getEquDefineByParentId
(
String
parentId
);
List
<
EquipmentClassifyDto
>
getEquClassifyByCode
(
String
parentCode
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/CommonServiceImpl.java
View file @
273c46eb
...
...
@@ -2118,6 +2118,24 @@ public class CommonServiceImpl implements ICommonService {
}
@Override
public
List
<
EquipmentCategoryDto
>
equipmentClassificationByParentCode
(
String
type
,
String
parentCode
)
{
List
<
EquipmentCategoryDto
>
categoryList
=
equipmentCategoryMapper
.
selectClassifyByParentCode
(
parentCode
);
List
<
EquipmentCategoryDto
>
result
=
Collections
.
emptyList
();
switch
(
type
)
{
case
"1"
:
result
=
categoryList
.
stream
().
filter
(
category
->
Pattern
.
compile
(
"^[^\\D0]*000$"
).
matcher
(
category
.
getCode
()).
matches
()).
collect
(
Collectors
.
toList
());
break
;
case
"2"
:
result
=
categoryList
.
stream
().
filter
(
category
->
Pattern
.
compile
(
"^[^\\D0]*00$"
).
matcher
(
category
.
getCode
()).
matches
()).
collect
(
Collectors
.
toList
());
break
;
case
"3"
:
result
=
categoryList
.
stream
().
filter
(
category
->
Pattern
.
compile
(
"^[^\\D0A-Za-z]*[A-Za-z0-9]*[^0]0$"
).
matcher
(
category
.
getCode
()).
matches
()).
collect
(
Collectors
.
toList
());
break
;
}
return
result
;
}
@Override
public
List
<
EquipmentCategoryDto
>
getEquDefineByParentId
(
String
parentId
)
{
return
equipmentCategoryMapper
.
getEquDefineByParentId
(
parentId
);
}
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/mapper/EquipmentCategoryMapper.java
View file @
273c46eb
...
...
@@ -29,6 +29,9 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
@Select
(
"SELECT * FROM tz_equipment_category WHERE code NOT LIKE '7%' AND code NOT LIKE '8%' ORDER BY parent_id"
)
List
<
EquipmentCategoryDto
>
selectClassifyNoStart7And8
();
List
<
EquipmentCategoryDto
>
selectClassifyByParentCode
(
@Param
(
"parentCode"
)
String
parentCode
);
@Select
(
"select * from tz_equipment_category where code in('1000','2000','3000','4000','5000','6000','8000','9000')"
)
List
<
EquipmentCategoryDto
>
selectClassify
();
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/EquipmentCategoryMapper.xml
View file @
273c46eb
...
...
@@ -682,4 +682,15 @@
AND ( ibjoi."CODE96333" NOT LIKE'31%' OR ibjoi."CODE96333" IS NULL )
AND "CLAIM_STATUS" = '已认领';
</select>
<select
id=
"selectClassifyByParentCode"
resultType=
"com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto"
>
select * from tz_equipment_category
<where>
code NOT LIKE '7%' AND code NOT LIKE '8%'
<if
test=
"parentCode != null and parentCode != ''"
>
and parent_id = (SELECT id FROM tz_equipment_category WHERE code = #{parentCode} )
</if>
</where>
ORDER BY parent_id
</select>
</mapper>
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