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
24f901ff
Commit
24f901ff
authored
Aug 14, 2025
by
刘林
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_bugfix' into develop_tzs_bugfix
parents
fa90387d
334f6932
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
3 deletions
+40
-3
EsUserInfo.java
...eejoin/amos/boot/module/common/api/entity/EsUserInfo.java
+20
-0
CommonMapper.java
.../yeejoin/amos/boot/module/jg/api/mapper/CommonMapper.java
+10
-0
DataHandlerServiceImpl.java
...ot/module/jg/biz/service/impl/DataHandlerServiceImpl.java
+10
-3
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/entity/EsUserInfo.java
View file @
24f901ff
...
...
@@ -195,6 +195,26 @@ public class EsUserInfo {
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date
)
private
LocalDate
licenseMinExpiryDate
;
/**
* 绑定设备状态
* 已绑定 : "1"
* 未绑定 : "0"
*/
@Field
(
type
=
FieldType
.
Keyword
)
private
String
bindEquStatus
;
/**
* 绑定的平台账号用户id
*/
@Field
(
type
=
FieldType
.
Keyword
)
private
String
amosUserId
;
/**
* 绑定的平台账号用户名称
*/
@Field
(
type
=
FieldType
.
Text
)
private
String
amosUserName
;
@Data
public
static
class
License
{
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/CommonMapper.java
View file @
24f901ff
...
...
@@ -13,6 +13,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.EquipmentClassifyDto;
import
com.yeejoin.amos.boot.module.jg.api.dto.ReportAnalysisSearchDTO
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -326,5 +327,14 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> {
List
<
CountDto
>
countBizNumAfterUseRegBatchProjectContraption
(
@Param
(
"projectContraptionIds"
)
List
<
Long
>
projectContraptionIds
);
List
<
Map
<
String
,
String
>>
gdEquOnJgServiceOperationRecords
(
@Param
(
"record"
)
String
record
);
/**
* 用户绑定设备数量
*
* @param userSeq 用户userId
* @return 数量
*/
@Select
(
"SELECT count(1) from tzs_user_equip where user_seq = #{userSeq}"
)
Integer
queryUserBindEquNum
(
@Param
(
"userSeq"
)
String
userSeq
);
}
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/DataHandlerServiceImpl.java
View file @
24f901ff
...
...
@@ -30,13 +30,13 @@ import com.yeejoin.amos.boot.module.common.api.entity.ESEquipmentInfo;
import
com.yeejoin.amos.boot.module.common.api.entity.EsBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.common.api.entity.EsUserInfo
;
import
com.yeejoin.amos.boot.module.common.api.entity.TzsUserPermission
;
import
com.yeejoin.amos.boot.module.common.api.enums.CylinderTypeEnum
;
import
com.yeejoin.amos.boot.module.common.biz.refresh.cm.RefreshCmService
;
import
com.yeejoin.amos.boot.module.common.biz.utils.RefreshDataUtils
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeEqDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PieLineEquipContraptionDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
import
com.yeejoin.amos.boot.module.common.api.enums.CylinderTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.PipelineEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.SafetyProblemTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
...
...
@@ -53,9 +53,9 @@ import com.yeejoin.amos.boot.module.ymt.api.mapper.*;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.elasticsearch.index.query.BoolQueryBuilder
;
import
org.elasticsearch.index.query.QueryBuilders
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
...
...
@@ -63,6 +63,7 @@ import org.springframework.util.ObjectUtils;
import
org.springframework.util.StopWatch
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.lang.reflect.Method
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
...
...
@@ -75,6 +76,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
toJSONString
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
.
JgInstallationNoticeServiceImpl
.
CONSTRUCTION_TYPE
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
.
JgInstallationNoticeServiceImpl
.
CONSTRUCTION_TYPE_NAME
;
...
...
@@ -1504,6 +1506,8 @@ public class DataHandlerServiceImpl {
esUserInfo
.
setSubPost
(
RefreshDataUtils
.
castStrList2String
(
u
.
getSubPost
()));
esUserInfo
.
setEquipType
(
RefreshDataUtils
.
castStrList2String
(
u
.
getEquipType
()));
esUserInfo
.
setEquipTypeName
(
RefreshDataUtils
.
castEquCategory2Name
(
esUserInfo
.
getEquipType
()));
// 绑定设备状态
esUserInfo
.
setBindEquStatus
(
this
.
queryUserBindEquStatus
(
u
.
getSequenceNbr
()));
// 人员类型暂时取esBaseEnterpriseInfo按照资质分开后的,等检验和检测分开后,按照实际情况取就即可:useCodeEnterpriseMap.getOrDefault(u.getUnitCode(), new TzBaseEnterpriseInfo()).getUnitType()
String
unitType
=
esUseCodeEnterpriseMap
.
getOrDefault
(
u
.
getUnitCode
(),
useCodeEnterpriseMap
.
getOrDefault
(
u
.
getUnitCode
(),
new
TzBaseEnterpriseInfo
()).
getUnitType
());
esUserInfo
.
setUnitType
(
unitType
);
...
...
@@ -1520,6 +1524,10 @@ public class DataHandlerServiceImpl {
return
units
.
size
();
}
private
String
queryUserBindEquStatus
(
Long
sequenceNbr
)
{
return
commonMapper
.
queryUserBindEquNum
(
sequenceNbr
.
toString
())
>
0
?
"1"
:
"0"
;
}
private
List
<
EsUserInfo
.
License
>
buildUserLicenses
(
Long
sequenceNbr
)
{
List
<
TzsUserPermission
>
permissions
=
userPermissionMapper
.
selectList
(
new
LambdaQueryWrapper
<
TzsUserPermission
>().
eq
(
TzsUserPermission:
:
getUserSeq
,
sequenceNbr
));
return
permissions
.
stream
().
map
(
p
->
{
...
...
@@ -1530,7 +1538,6 @@ public class DataHandlerServiceImpl {
return
license
;
}).
collect
(
Collectors
.
toList
());
}
public
Integer
initEquipStatistData2EsBatch
()
{
log
.
info
(
"综合统计设备信息入库开始"
);
StopWatch
watch
=
new
StopWatch
();
...
...
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