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
6839df8f
Commit
6839df8f
authored
Feb 08, 2025
by
朱晨阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加根据设备种类code获取设备类别接口修改
parent
00456dda
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
8 deletions
+64
-8
CommonController.java
.../amos/boot/module/jg/biz/controller/CommonController.java
+19
-3
ICommonService.java
...ejoin/amos/boot/module/jg/biz/service/ICommonService.java
+3
-1
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+26
-2
EquipmentCategoryMapper.java
...s/boot/module/ymt/api/mapper/EquipmentCategoryMapper.java
+4
-1
EquipmentCategoryMapper.xml
...api/src/main/resources/mapper/EquipmentCategoryMapper.xml
+12
-1
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 @
6839df8f
...
@@ -197,6 +197,22 @@ public class CommonController extends BaseController {
...
@@ -197,6 +197,22 @@ public class CommonController extends BaseController {
return
ResponseHelper
.
buildResponse
(
commonService
.
equipmentClassification
(
type
));
return
ResponseHelper
.
buildResponse
(
commonService
.
equipmentClassification
(
type
));
}
}
/**
* 设备分类
*
* @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
));
}
/**
/**
* 设备分类 去掉管道分类
* 设备分类 去掉管道分类
*
*
...
@@ -216,10 +232,10 @@ public class CommonController extends BaseController {
...
@@ -216,10 +232,10 @@ public class CommonController extends BaseController {
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/equipmentClassificationByParentCode"
)
@GetMapping
(
value
=
"/equipmentClassification
NoPipeline
ByParentCode"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备分类"
,
notes
=
"1,设备种类 2,设备类别 3,设备品种"
)
@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
)
{
public
ResponseModel
<
List
<
EquipmentCategoryDto
>>
equipmentClassification
NoPipeline
ByParentCode
(
@RequestParam
(
value
=
"type"
)
String
type
,
@RequestParam
(
value
=
"parentCode"
,
required
=
false
)
String
parentCode
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
equipmentClassificationByParentCode
(
type
,
parentCode
));
return
ResponseHelper
.
buildResponse
(
commonService
.
equipmentClassification
NoPipeline
ByParentCode
(
type
,
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/ICommonService.java
View file @
6839df8f
...
@@ -188,6 +188,8 @@ public interface ICommonService {
...
@@ -188,6 +188,8 @@ public interface ICommonService {
*/
*/
List
<
EquipmentCategoryDto
>
equipmentClassification
(
String
type
);
List
<
EquipmentCategoryDto
>
equipmentClassification
(
String
type
);
List
<
EquipmentCategoryDto
>
equipmentClassificationByParentCode
(
String
type
,
String
parentCode
);
/**
/**
* 套打使用标志生成
* 套打使用标志生成
*
*
...
@@ -241,7 +243,7 @@ public interface ICommonService {
...
@@ -241,7 +243,7 @@ public interface ICommonService {
List
<
EquipmentCategoryDto
>
equipmentClassificationNoPipeline
(
String
type
);
List
<
EquipmentCategoryDto
>
equipmentClassificationNoPipeline
(
String
type
);
List
<
EquipmentCategoryDto
>
equipmentClassificationByParentCode
(
String
type
,
String
parentCode
);
List
<
EquipmentCategoryDto
>
equipmentClassification
NoPipeline
ByParentCode
(
String
type
,
String
parentCode
);
List
<
EquipmentCategoryDto
>
getEquDefineByParentId
(
String
parentId
);
List
<
EquipmentCategoryDto
>
getEquDefineByParentId
(
String
parentId
);
...
...
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 @
6839df8f
...
@@ -2099,6 +2099,30 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -2099,6 +2099,30 @@ public class CommonServiceImpl implements ICommonService {
return
result
;
return
result
;
}
}
/**
* 设备分类
*
* @param type 1,设备种类 2,设备类别 3,设备品种
* .c@return
*/
@Override
public
List
<
EquipmentCategoryDto
>
equipmentClassificationByParentCode
(
String
type
,
String
parentCode
)
{
List
<
EquipmentCategoryDto
>
categoryList
=
equipmentCategoryMapper
.
selectClassifyNoStart7ByParentCode
(
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
@Override
public
List
<
EquipmentCategoryDto
>
equipmentClassificationNoPipeline
(
String
type
)
{
public
List
<
EquipmentCategoryDto
>
equipmentClassificationNoPipeline
(
String
type
)
{
List
<
EquipmentCategoryDto
>
categoryList
=
equipmentCategoryMapper
.
selectClassifyNoStart7And8
();
List
<
EquipmentCategoryDto
>
categoryList
=
equipmentCategoryMapper
.
selectClassifyNoStart7And8
();
...
@@ -2118,8 +2142,8 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -2118,8 +2142,8 @@ public class CommonServiceImpl implements ICommonService {
}
}
@Override
@Override
public
List
<
EquipmentCategoryDto
>
equipmentClassificationByParentCode
(
String
type
,
String
parentCode
)
{
public
List
<
EquipmentCategoryDto
>
equipmentClassification
NoPipeline
ByParentCode
(
String
type
,
String
parentCode
)
{
List
<
EquipmentCategoryDto
>
categoryList
=
equipmentCategoryMapper
.
selectClassifyByParentCode
(
parentCode
);
List
<
EquipmentCategoryDto
>
categoryList
=
equipmentCategoryMapper
.
selectClassify
NoStart7And8
ByParentCode
(
parentCode
);
List
<
EquipmentCategoryDto
>
result
=
Collections
.
emptyList
();
List
<
EquipmentCategoryDto
>
result
=
Collections
.
emptyList
();
switch
(
type
)
{
switch
(
type
)
{
case
"1"
:
case
"1"
:
...
...
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 @
6839df8f
...
@@ -26,11 +26,14 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
...
@@ -26,11 +26,14 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
@Select
(
"SELECT * FROM tz_equipment_category WHERE code NOT LIKE '7%' ORDER BY parent_id"
)
@Select
(
"SELECT * FROM tz_equipment_category WHERE code NOT LIKE '7%' ORDER BY parent_id"
)
List
<
EquipmentCategoryDto
>
selectClassifyNoStart7
();
List
<
EquipmentCategoryDto
>
selectClassifyNoStart7
();
List
<
EquipmentCategoryDto
>
selectClassifyNoStart7ByParentCode
(
@Param
(
"parentCode"
)
String
parentCode
);
@Select
(
"SELECT * FROM tz_equipment_category WHERE code NOT LIKE '7%' AND code NOT LIKE '8%' ORDER BY parent_id"
)
@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
>
selectClassifyNoStart7And8
();
List
<
EquipmentCategoryDto
>
selectClassifyByParentCode
(
@Param
(
"parentCode"
)
String
parentCode
);
List
<
EquipmentCategoryDto
>
selectClassify
NoStart7And8
ByParentCode
(
@Param
(
"parentCode"
)
String
parentCode
);
@Select
(
"select * from tz_equipment_category where code in('1000','2000','3000','4000','5000','6000','8000','9000')"
)
@Select
(
"select * from tz_equipment_category where code in('1000','2000','3000','4000','5000','6000','8000','9000')"
)
List
<
EquipmentCategoryDto
>
selectClassify
();
List
<
EquipmentCategoryDto
>
selectClassify
();
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/EquipmentCategoryMapper.xml
View file @
6839df8f
...
@@ -683,7 +683,18 @@
...
@@ -683,7 +683,18 @@
AND "CLAIM_STATUS" = '已认领';
AND "CLAIM_STATUS" = '已认领';
</select>
</select>
<select
id=
"selectClassifyByParentCode"
resultType=
"com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto"
>
<select
id=
"selectClassifyNoStart7ByParentCode"
resultType=
"com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto"
>
select * from tz_equipment_category
<where>
code NOT LIKE '7%'
<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>
<select
id=
"selectClassifyNoStart7And8ByParentCode"
resultType=
"com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto"
>
select * from tz_equipment_category
select * from tz_equipment_category
<where>
<where>
code NOT LIKE '7%' AND code NOT LIKE '8%'
code NOT LIKE '7%' AND code NOT LIKE '8%'
...
...
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