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
df96cf02
Commit
df96cf02
authored
Aug 18, 2025
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):【现场问题】压力管道-压力容器导入优化
parent
61e12da9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
20 deletions
+35
-20
JgResumeInfoMapper.java
...in/amos/boot/module/jg/api/mapper/JgResumeInfoMapper.java
+2
-3
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+31
-15
JgResumeInfoServiceImpl.java
...t/module/jg/biz/service/impl/JgResumeInfoServiceImpl.java
+2
-2
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgResumeInfoMapper.java
View file @
df96cf02
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.common.api.mapper.CustomBaseMapper
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgResumeInfoDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgResumeInfoDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgResumeInfo
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgResumeInfo
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.Set
;
...
@@ -15,7 +14,7 @@ import java.util.Set;
...
@@ -15,7 +14,7 @@ import java.util.Set;
* @author system_generator
* @author system_generator
* @date 2024-05-29
* @date 2024-05-29
*/
*/
public
interface
JgResumeInfoMapper
extends
BaseMapper
<
JgResumeInfo
>
{
public
interface
JgResumeInfoMapper
extends
Custom
BaseMapper
<
JgResumeInfo
>
{
void
deleteBatchByBusinessId
(
@Param
(
"idList"
)
Set
<
String
>
idList
);
void
deleteBatchByBusinessId
(
@Param
(
"idList"
)
Set
<
String
>
idList
);
...
...
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/IdxBizJgRegisterInfoServiceImpl.java
View file @
df96cf02
...
@@ -4176,7 +4176,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -4176,7 +4176,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
SearchRequest
request
=
new
SearchRequest
(
IDX_BIZ_EQUIPMENT_INFO
);
SearchRequest
request
=
new
SearchRequest
(
IDX_BIZ_EQUIPMENT_INFO
);
SearchSourceBuilder
sourceBuilder
=
new
SearchSourceBuilder
().
size
(
10000
)
SearchSourceBuilder
sourceBuilder
=
new
SearchSourceBuilder
().
size
(
10000
)
.
fetchSource
(
new
String
[]{
"FACTORY_NUM"
,
"
PRODUC
E_UNIT_NAME"
},
null
);
.
fetchSource
(
new
String
[]{
"FACTORY_NUM"
,
"
US
E_UNIT_NAME"
},
null
);
BoolQueryBuilder
boolQuery
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
boolQuery
=
QueryBuilders
.
boolQuery
();
boolQuery
.
must
(
QueryBuilders
.
termQuery
(
"EQU_LIST_CODE"
,
"2000"
))
boolQuery
.
must
(
QueryBuilders
.
termQuery
(
"EQU_LIST_CODE"
,
"2000"
))
...
@@ -4198,8 +4198,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -4198,8 +4198,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
for
(
SearchHit
hit
:
response
.
getHits
().
getHits
())
{
for
(
SearchHit
hit
:
response
.
getHits
().
getHits
())
{
Map
<
String
,
Object
>
src
=
hit
.
getSourceAsMap
();
Map
<
String
,
Object
>
src
=
hit
.
getSourceAsMap
();
String
factoryNum
=
Objects
.
toString
(
src
.
get
(
"FACTORY_NUM"
),
""
);
String
factoryNum
=
Objects
.
toString
(
src
.
get
(
"FACTORY_NUM"
),
""
);
String
produceUnitName
=
Objects
.
toString
(
src
.
get
(
"PRODUC
E_UNIT_NAME"
),
""
);
String
useUnitName
=
Objects
.
toString
(
src
.
get
(
"US
E_UNIT_NAME"
),
""
);
resultMap
.
put
(
factoryNum
,
produc
eUnitName
);
resultMap
.
put
(
factoryNum
,
us
eUnitName
);
}
}
return
resultMap
;
return
resultMap
;
}
}
...
@@ -4563,17 +4563,35 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -4563,17 +4563,35 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
.
collect
(
Collectors
.
toList
())
.
collect
(
Collectors
.
toList
())
);
);
}
}
batchInsert
(
idxBizJgSupervisionInfoMapper
,
supervisionInfoList
,
"监督信息"
);
List
<
CompletableFuture
<
Void
>>
futures
=
new
ArrayList
<>();
batchInsert
(
idxBizJgUseInfoMapper
,
useInfoList
,
"使用信息"
);
futures
.
add
(
CompletableFuture
.
runAsync
(()
->
batchInsert
(
idxBizJgDesignInfoMapper
,
designInfoList
,
"设计信息"
);
batchInsert
(
idxBizJgSupervisionInfoMapper
,
supervisionInfoList
,
"监督信息"
)
batchInsert
(
idxBizJgRegisterInfoMapper
,
registerInfoList
,
"注册信息"
);
));
batchInsert
(
idxBizJgFactoryInfoMapper
,
factoryInfoList
,
"制造信息"
);
futures
.
add
(
CompletableFuture
.
runAsync
(()
->
batchInsert
(
otherInfoMapper
,
otherInfoList
,
"其他信息"
);
batchInsert
(
idxBizJgUseInfoMapper
,
useInfoList
,
"使用信息"
)
batchInsert
(
idxBizJgTechParamsVesselMapper
,
paramsVesselList
,
"容器参数信息"
);
));
batchInsert
(
idxBizJgInspectionDetectionInfoMapper
,
inspectionDetectionInfoList
,
"检验检测信息"
);
futures
.
add
(
CompletableFuture
.
runAsync
(()
->
batchInsert
(
idxBizJgDesignInfoMapper
,
designInfoList
,
"设计信息"
)
));
futures
.
add
(
CompletableFuture
.
runAsync
(()
->
batchInsert
(
idxBizJgRegisterInfoMapper
,
registerInfoList
,
"注册信息"
)
));
futures
.
add
(
CompletableFuture
.
runAsync
(()
->
batchInsert
(
idxBizJgFactoryInfoMapper
,
factoryInfoList
,
"制造信息"
)
));
futures
.
add
(
CompletableFuture
.
runAsync
(()
->
batchInsert
(
otherInfoMapper
,
otherInfoList
,
"其他信息"
)
));
futures
.
add
(
CompletableFuture
.
runAsync
(()
->
batchInsert
(
idxBizJgTechParamsVesselMapper
,
paramsVesselList
,
"容器参数信息"
)
));
futures
.
add
(
CompletableFuture
.
runAsync
(()
->
batchInsert
(
idxBizJgInspectionDetectionInfoMapper
,
inspectionDetectionInfoList
,
"检验检测信息"
)
));
if
(!
esEquipmentCategoryList
.
isEmpty
())
{
if
(!
esEquipmentCategoryList
.
isEmpty
())
{
esEquipmentCategory
.
saveAll
(
esEquipmentCategoryList
);
futures
.
add
(
CompletableFuture
.
runAsync
(()
->
esEquipmentCategory
.
saveAll
(
esEquipmentCategoryList
))
);
}
}
CompletableFuture
.
allOf
(
futures
.
toArray
(
new
CompletableFuture
[
0
])).
join
();
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
recordSet
,
EquipCreateOrEditEvent
.
EquipType
.
equip
));
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
recordSet
,
EquipCreateOrEditEvent
.
EquipType
.
equip
));
return
String
.
format
(
"导入完成,成功导入: %d 条数据!"
,
useInfoList
.
size
());
return
String
.
format
(
"导入完成,成功导入: %d 条数据!"
,
useInfoList
.
size
());
}
}
...
@@ -4581,10 +4599,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -4581,10 +4599,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
/** 通用批量插入方法 */
/** 通用批量插入方法 */
public
<
T
>
void
batchInsert
(
CustomBaseMapper
<
T
>
mapper
,
List
<
T
>
list
,
String
name
)
{
public
<
T
>
void
batchInsert
(
CustomBaseMapper
<
T
>
mapper
,
List
<
T
>
list
,
String
name
)
{
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
mapper
.
insertBatchSomeColumn
(
list
,
10
00
);
mapper
.
insertBatchSomeColumn
(
list
,
5
00
);
log
.
info
(
"{} 批量插入完成,数量:{}"
,
name
,
list
.
size
());
log
.
info
(
"{} 批量插入完成,数量:{}"
,
name
,
list
.
size
());
}
else
{
log
.
info
(
"{} 列表为空,无需插入"
,
name
);
}
}
}
}
...
...
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/JgResumeInfoServiceImpl.java
View file @
df96cf02
...
@@ -40,14 +40,14 @@ public class JgResumeInfoServiceImpl extends BaseService<JgResumeInfoDto, JgResu
...
@@ -40,14 +40,14 @@ public class JgResumeInfoServiceImpl extends BaseService<JgResumeInfoDto, JgResu
}
}
public
void
saveBatchResume
(
List
<
JgResumeInfoDto
>
jgResumeInfoDtoList
)
{
public
void
saveBatchResume
(
List
<
JgResumeInfoDto
>
jgResumeInfoDtoList
)
{
Collection
<
JgResumeInfo
>
jgResumeInfoCollection
=
jgResumeInfoDtoList
.
stream
()
List
<
JgResumeInfo
>
jgResumeInfoCollection
=
jgResumeInfoDtoList
.
stream
()
.
map
(
dto
->
{
.
map
(
dto
->
{
JgResumeInfo
info
=
new
JgResumeInfo
();
JgResumeInfo
info
=
new
JgResumeInfo
();
BeanUtils
.
copyProperties
(
dto
,
info
);
BeanUtils
.
copyProperties
(
dto
,
info
);
return
info
;
return
info
;
})
})
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
this
.
saveBatch
(
jgResumeInfoCollection
);
this
.
baseMapper
.
insertBatchSomeColumn
(
jgResumeInfoCollection
,
500
);
}
}
/**
/**
...
...
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