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
bea4a664
Commit
bea4a664
authored
Jul 02, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(综合搜索):技术参数类型big处理
1.技术参数类型big处理
parent
4e85633e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
7 deletions
+27
-7
TechParamUtil.java
...join/amos/boot/module/common/biz/utils/TechParamUtil.java
+10
-0
StatisticsDataUpdateService.java
...ot/module/jg/biz/refresh/StatisticsDataUpdateService.java
+17
-7
No files found.
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 @
bea4a664
...
...
@@ -49,4 +49,14 @@ public class TechParamUtil {
});
}
public
static
Class
<?
extends
ITechParamDefine
>
getParamClazz
(
String
equListCode
)
{
for
(
Class
<?
extends
ITechParamDefine
>
subClass
:
subClasses
)
{
Group
group
=
subClass
.
getAnnotation
(
Group
.
class
);
if
(
group
!=
null
&&
equListCode
.
equals
(
group
.
value
()))
{
return
subClass
;
}
}
throw
new
RuntimeException
(
"not found equListCode "
+
equListCode
+
"clazz"
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/refresh/StatisticsDataUpdateService.java
View file @
bea4a664
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.refresh;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.boot.module.common.api.dto.ITechParamDefine
;
import
com.yeejoin.amos.boot.module.common.api.dto.TechParamItem
;
import
com.yeejoin.amos.boot.module.common.api.entity.ESEquipmentInfo
;
import
com.yeejoin.amos.boot.module.common.biz.utils.TechParamUtil
;
...
...
@@ -21,14 +22,23 @@ public class StatisticsDataUpdateService {
public
List
<
ESEquipmentInfo
.
TechParam
>
getTechParams
(
String
equList
,
String
record
)
{
Object
params
=
techParamsBackupService
.
getTechParams
(
equList
,
record
);
Map
<
String
,
Object
>
paramsMap
=
BeanUtil
.
beanToMap
(
params
);
List
<
TechParamItem
>
techParamItems
=
TechParamUtil
.
getParamMetaList
(
equList
);
List
<
ESEquipmentInfo
.
TechParam
>
techParams
=
new
ArrayList
<>();
techParamItems
.
forEach
(
techParamItem
->
{
ESEquipmentInfo
.
TechParam
techParam
=
new
ESEquipmentInfo
.
TechParam
(
techParamItem
,
paramsMap
.
get
(
techParamItem
.
getParamKey
()));
techParams
.
add
(
techParam
);
});
try
{
Object
params
=
techParamsBackupService
.
getTechParams
(
equList
,
record
);
// 类型转换,否则类型处理错误
Class
<?
extends
ITechParamDefine
>
clazz
=
TechParamUtil
.
getParamClazz
(
equList
);
ITechParamDefine
paramInstance
=
clazz
.
newInstance
();
BeanUtil
.
copyProperties
(
params
,
paramInstance
);
Map
<
String
,
Object
>
paramsMap
=
BeanUtil
.
beanToMap
(
paramInstance
);
List
<
TechParamItem
>
techParamItems
=
TechParamUtil
.
getParamMetaList
(
equList
);
techParamItems
.
forEach
(
techParamItem
->
{
ESEquipmentInfo
.
TechParam
techParam
=
new
ESEquipmentInfo
.
TechParam
(
techParamItem
,
paramsMap
.
get
(
techParamItem
.
getParamKey
()));
techParams
.
add
(
techParam
);
});
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
return
techParams
;
}
...
...
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