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
0c1ed10f
Commit
0c1ed10f
authored
Jun 25, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(综合搜索):实体类创建
1.人员、企业、设备 2.技术参数
parent
1f9f0b33
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
TechParamItem.java
...eejoin/amos/boot/module/common/api/dto/TechParamItem.java
+1
-1
ESEquipmentInfo.java
...n/amos/boot/module/common/api/entity/ESEquipmentInfo.java
+2
-2
TechParamUtil.java
...join/amos/boot/module/common/biz/utils/TechParamUtil.java
+11
-11
No files found.
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/TechParam
Meta
.java
→
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/TechParam
Item
.java
View file @
0c1ed10f
...
@@ -4,7 +4,7 @@ import com.yeejoin.amos.boot.biz.common.annotation.TechnicalParameter;
...
@@ -4,7 +4,7 @@ import com.yeejoin.amos.boot.biz.common.annotation.TechnicalParameter;
import
lombok.Data
;
import
lombok.Data
;
@Data
@Data
public
class
TechParam
Meta
{
public
class
TechParam
Item
{
/**
/**
* 设备种类
* 设备种类
...
...
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/entity/ESEquipmentInfo.java
View file @
0c1ed10f
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
entity
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
entity
;
import
com.yeejoin.amos.boot.biz.common.annotation.TechnicalParameter
;
import
com.yeejoin.amos.boot.biz.common.annotation.TechnicalParameter
;
import
com.yeejoin.amos.boot.module.common.api.dto.TechParam
Meta
;
import
com.yeejoin.amos.boot.module.common.api.dto.TechParam
Item
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
org.springframework.data.annotation.Id
;
import
org.springframework.data.annotation.Id
;
...
@@ -364,7 +364,7 @@ public class ESEquipmentInfo {
...
@@ -364,7 +364,7 @@ public class ESEquipmentInfo {
@Field
(
type
=
FieldType
.
Date
)
@Field
(
type
=
FieldType
.
Date
)
private
Date
dateValue
;
private
Date
dateValue
;
public
TechParam
(
TechParam
Meta
meta
,
Object
rawValue
)
{
public
TechParam
(
TechParam
Item
meta
,
Object
rawValue
)
{
this
.
paramKey
=
meta
.
getParamKey
();
this
.
paramKey
=
meta
.
getParamKey
();
this
.
paramLabel
=
meta
.
getParamLabel
();
this
.
paramLabel
=
meta
.
getParamLabel
();
setValueByType
(
meta
.
getParamType
(),
rawValue
,
meta
.
getMaxPrecision
());
setValueByType
(
meta
.
getParamType
(),
rawValue
,
meta
.
getMaxPrecision
());
...
...
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/utils/TechParamUtil.java
View file @
0c1ed10f
...
@@ -3,7 +3,7 @@ package com.yeejoin.amos.boot.module.common.biz.utils;
...
@@ -3,7 +3,7 @@ package com.yeejoin.amos.boot.module.common.biz.utils;
import
com.yeejoin.amos.boot.biz.common.annotation.Group
;
import
com.yeejoin.amos.boot.biz.common.annotation.Group
;
import
com.yeejoin.amos.boot.biz.common.annotation.TechnicalParameter
;
import
com.yeejoin.amos.boot.biz.common.annotation.TechnicalParameter
;
import
com.yeejoin.amos.boot.module.common.api.dto.ITechParamDefine
;
import
com.yeejoin.amos.boot.module.common.api.dto.ITechParamDefine
;
import
com.yeejoin.amos.boot.module.common.api.dto.TechParam
Meta
;
import
com.yeejoin.amos.boot.module.common.api.dto.TechParam
Item
;
import
org.reflections.Reflections
;
import
org.reflections.Reflections
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
...
@@ -15,7 +15,7 @@ import java.util.concurrent.ConcurrentHashMap;
...
@@ -15,7 +15,7 @@ import java.util.concurrent.ConcurrentHashMap;
public
class
TechParamUtil
{
public
class
TechParamUtil
{
private
static
final
Set
<
Class
<?
extends
ITechParamDefine
>>
subClasses
;
private
static
final
Set
<
Class
<?
extends
ITechParamDefine
>>
subClasses
;
private
static
final
Map
<
String
,
List
<
TechParam
Meta
>>
techParamsMetaMap
=
new
ConcurrentHashMap
<>();
private
static
final
Map
<
String
,
List
<
TechParam
Item
>>
techParamsMetaMap
=
new
ConcurrentHashMap
<>();
static
{
static
{
//▼ 指定扫描包路径(根据实际项目调整)
//▼ 指定扫描包路径(根据实际项目调整)
...
@@ -24,9 +24,9 @@ public class TechParamUtil {
...
@@ -24,9 +24,9 @@ public class TechParamUtil {
subClasses
=
reflections
.
getSubTypesOf
(
ITechParamDefine
.
class
);
subClasses
=
reflections
.
getSubTypesOf
(
ITechParamDefine
.
class
);
}
}
public
static
List
<
TechParam
Meta
>
getParamMetaList
(
String
equListCode
)
{
public
static
List
<
TechParam
Item
>
getParamMetaList
(
String
equListCode
)
{
return
techParamsMetaMap
.
computeIfAbsent
(
equListCode
,
(
key
)
->
{
return
techParamsMetaMap
.
computeIfAbsent
(
equListCode
,
(
key
)
->
{
List
<
TechParam
Meta
>
techParamMeta
s
=
new
ArrayList
<>();
List
<
TechParam
Item
>
techParamItem
s
=
new
ArrayList
<>();
for
(
Class
<?
extends
ITechParamDefine
>
subClass
:
subClasses
)
{
for
(
Class
<?
extends
ITechParamDefine
>
subClass
:
subClasses
)
{
Field
[]
fields
=
subClass
.
getDeclaredFields
();
Field
[]
fields
=
subClass
.
getDeclaredFields
();
Group
group
=
subClass
.
getAnnotation
(
Group
.
class
);
Group
group
=
subClass
.
getAnnotation
(
Group
.
class
);
...
@@ -34,16 +34,16 @@ public class TechParamUtil {
...
@@ -34,16 +34,16 @@ public class TechParamUtil {
for
(
Field
field
:
fields
)
{
for
(
Field
field
:
fields
)
{
field
.
setAccessible
(
true
);
field
.
setAccessible
(
true
);
TechnicalParameter
technicalParameter
=
field
.
getAnnotation
(
TechnicalParameter
.
class
);
TechnicalParameter
technicalParameter
=
field
.
getAnnotation
(
TechnicalParameter
.
class
);
TechParam
Meta
techParamMeta
=
new
TechParamMeta
();
TechParam
Item
techParamItem
=
new
TechParamItem
();
techParam
Meta
.
setParamKey
(
technicalParameter
.
key
());
techParam
Item
.
setParamKey
(
technicalParameter
.
key
());
techParam
Meta
.
setParamLabel
(
technicalParameter
.
label
());
techParam
Item
.
setParamLabel
(
technicalParameter
.
label
());
techParam
Meta
.
setEquListCode
(
equListCode
);
techParam
Item
.
setEquListCode
(
equListCode
);
techParam
Meta
.
setParamType
(
technicalParameter
.
type
());
techParam
Item
.
setParamType
(
technicalParameter
.
type
());
techParam
Metas
.
add
(
techParamMeta
);
techParam
Items
.
add
(
techParamItem
);
}
}
}
}
}
}
return
techParam
Meta
s
;
return
techParam
Item
s
;
});
});
}
}
...
...
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