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
6f74f827
Commit
6f74f827
authored
Jun 30, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(已纳管设备无证时可编辑):已纳管设备调整
1.已纳管设备调整 2.技术参数整理
parent
23503f7a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
67 additions
and
1 deletion
+67
-1
CommonMapper.java
.../yeejoin/amos/boot/module/jg/api/mapper/CommonMapper.java
+6
-0
CommonMapper.xml
...-module-jg-api/src/main/resources/mapper/CommonMapper.xml
+0
-0
DiffUtils.java
...yeejoin/amos/boot/module/jg/biz/edit/utils/DiffUtils.java
+1
-1
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+11
-0
IdxBizJgProjectContraptionServiceImplService.java
...ce/impl/IdxBizJgProjectContraptionServiceImplService.java
+21
-0
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+14
-0
IdxBizJgProjectContraption.java
...oot/module/ymt/api/entity/IdxBizJgProjectContraption.java
+14
-0
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/CommonMapper.java
View file @
6f74f827
...
...
@@ -4,6 +4,7 @@ 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.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.dto.CountDto
;
import
com.yeejoin.amos.boot.biz.common.dto.KeyValueDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto
;
import
com.yeejoin.amos.boot.module.jg.api.bo.JgBizCountDataBO
;
...
...
@@ -314,5 +315,10 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> {
String
queryUnitCreditCodeBySeq
(
String
unitSeq
);
String
queryUnitNameByCreditCode
(
String
unitCreditCode
);
List
<
CountDto
>
countBizNumAfterUseRegBatchEquip
(
@Param
(
"records"
)
List
<
String
>
records
);
List
<
CountDto
>
countBizNumAfterUseRegBatchProjectContraption
(
@Param
(
"projectContraptionIds"
)
List
<
Long
>
projectContraptionIds
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/CommonMapper.xml
View file @
6f74f827
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/utils/DiffUtils.java
View file @
6f74f827
...
...
@@ -28,7 +28,7 @@ public class DiffUtils {
public
static
boolean
compare
(
String
type
,
String
newValue
,
String
oldValue
)
{
if
(
isNullOrEmpty
(
newValue
)
&&
isNullOrEmpty
(
oldValue
))
return
true
;
if
(
isNullOrEmpty
(
newValue
)
||
isNullOrEmpty
(
oldValue
))
return
tru
e
;
if
(
isNullOrEmpty
(
newValue
)
||
isNullOrEmpty
(
oldValue
))
return
fals
e
;
if
(
type
==
null
)
{
return
Objects
.
equals
(
newValue
,
oldValue
);
}
...
...
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 @
6f74f827
...
...
@@ -3192,4 +3192,14 @@ public class CommonServiceImpl implements ICommonService {
result
.
put
(
"dataQualityScore"
,
String
.
valueOf
(
remindServiceImpl
.
getReminderLevel
(
bizId
,
businessTypeEnum
.
name
())));
}
public
static
String
genRegTypeByDataSource
(
String
dataSource
)
{
if
(
dataSource
.
contains
(
"jg_his_black"
))
{
return
"2"
;
}
else
if
(
dataSource
.
contains
(
"jg_his"
))
{
return
"1"
;
}
else
{
return
"0"
;
}
}
}
\ No newline at end of file
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/IdxBizJgProjectContraptionServiceImplService.java
View file @
6f74f827
...
...
@@ -15,6 +15,8 @@ import com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQu
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.dto.CountDto
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
...
...
@@ -24,6 +26,7 @@ import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.EquipSourceEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.PipelineEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgVehicleInformationMapper
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
com.yeejoin.amos.boot.module.jg.biz.core.BaseEntityService
;
...
...
@@ -135,6 +138,8 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
private
RedisUtils
redisUtils
;
@Autowired
private
JgUseRegistrationManageServiceImpl
registrationManageService
;
@Autowired
private
CommonMapper
commonMapper
;
@Override
public
boolean
saveOrUpdateData
(
IdxBizJgProjectContraption
projectContraption
)
{
...
...
@@ -348,7 +353,9 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
IPage
<
IdxBizJgProjectContraption
>
pageList
=
queryWrapper
.
page
(
page
);
// 单位类型区分的企业还是监管
String
companyType2
=
CommonServiceImpl
.
getCompanyType
(
company
);
if
(!
ValidationUtil
.
isEmpty
(
pageList
.
getRecords
()))
{
Map
<
String
,
Boolean
>
projectContraptionUseMap
=
getPidUseMap
(
pageList
);
pageList
.
getRecords
().
forEach
(
record
->
{
BigDecimal
pipelineLength
=
BigDecimal
.
valueOf
(
record
.
getPipelineLength
());
BigDecimal
roundedValue
=
pipelineLength
.
setScale
(
3
,
RoundingMode
.
HALF_UP
);
...
...
@@ -362,6 +369,10 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
.
collect
(
Collectors
.
joining
())
);
record
.
setCompanyType
(
companyType2
);
// 来源类型:前端控制编辑按钮显示隐藏
record
.
setRegType
(
CommonServiceImpl
.
genRegTypeByDataSource
(
record
.
getDataSource
()));
// 设置是否发生过后续业务::前端控制编辑按钮显示隐藏
record
.
setHappenAfterBiz
(
projectContraptionUseMap
.
getOrDefault
(
record
.
getProjectContraptionNo
(),
false
));
});
List
<
Long
>
projectContraptionIdList
=
pageList
.
getRecords
().
stream
().
map
(
IdxBizJgProjectContraption:
:
getSequenceNbr
).
collect
(
Collectors
.
toList
());
...
...
@@ -375,6 +386,16 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
return
pageList
;
}
/**
* 按照装置id查询 是否做过后续业务
* @param pageList 装置集合
* @return key-装置id;value-true(发生后续业务)、false(未发生后续业务)
*/
private
Map
<
String
,
Boolean
>
getPidUseMap
(
IPage
<
IdxBizJgProjectContraption
>
pageList
)
{
List
<
CountDto
>
useCount
=
commonMapper
.
countBizNumAfterUseRegBatchProjectContraption
(
pageList
.
getRecords
().
stream
().
map
(
BaseEntity:
:
getSequenceNbr
).
collect
(
Collectors
.
toList
()));
return
useCount
.
stream
().
collect
(
Collectors
.
toMap
(
CountDto:
:
getKeyStr
,
e
->
e
.
getLongValue
()
>
0
));
}
private
SFunction
<
IdxBizJgProjectContraption
,
?>
resolveField
(
String
field
)
{
switch
(
field
)
{
...
...
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 @
6f74f827
...
...
@@ -19,6 +19,7 @@ import com.google.common.base.Joiner;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.dto.CountDto
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.utils.*
;
...
...
@@ -2850,6 +2851,10 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
)
);
}
// 获取是否发生过后续业务集合
Map
<
String
,
Boolean
>
afterBizMap
=
getHasHappenAfterBiz
(
equIds
);
// 更新设备使用情况和设备地址
for
(
JSONObject
item
:
list
)
{
item
.
put
(
"REC_DATE"
,
Instant
.
ofEpochMilli
(
Long
.
parseLong
(
item
.
getString
(
"REC_DATE"
)))
...
...
@@ -2861,6 +2866,10 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
item
.
put
(
"CAN_DELETE"
,
this
.
checkEquipIsCanDelete
(
item
.
getString
(
SEQUENCE_NBR
)));
// 单位类型区分是监管还是企业
item
.
put
(
"companyType"
,
companyLevel
);
// 区分新增设备、历史有证设备、历史无证设备,与使用登记一致:0-新设备、1-历史有证设备、2-历史无证设备
item
.
put
(
"regType"
,
CommonServiceImpl
.
genRegTypeByDataSource
(
item
.
getString
(
DATA_SOURCE
)));
// 是否发生后续业务,前端控制是否可编辑
item
.
put
(
BaseUseRegisterResultData
.
HAPPEN_AFTER_BIZ
,
afterBizMap
.
getOrDefault
(
item
.
getString
(
SEQUENCE_NBR
),
false
));
item
.
put
(
"DATA_QUALITY_SCORE"
,
commonServiceImpl
.
castDataQualityScore2Name
(
item
.
getString
(
DATA_QUALITY_SCORE
),
item
.
getBoolean
(
IS_INTO_MANAGEMENT
)));
}
}
...
...
@@ -2873,6 +2882,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
return
result
;
}
private
Map
<
String
,
Boolean
>
getHasHappenAfterBiz
(
List
<
String
>
equIds
)
{
List
<
CountDto
>
countDtoList
=
commonMapper
.
countBizNumAfterUseRegBatchEquip
(
equIds
);
return
countDtoList
.
stream
().
collect
(
Collectors
.
toMap
(
CountDto:
:
getKeyStr
,
e
->
e
.
getLongValue
()
>
0
));
}
private
String
getCompanyLevel
(
JSONObject
company
)
{
if
(
BaseController
.
COMPANY_TYPE_COMPANY
.
equals
(
company
.
getString
(
"level"
)))
{
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/entity/IdxBizJgProjectContraption.java
View file @
6f74f827
...
...
@@ -319,5 +319,19 @@ public class IdxBizJgProjectContraption extends BaseEntity {
@TableField
(
exist
=
false
)
private
String
companyType
;
/**
* 是否发生后续业务
*/
@TableField
(
exist
=
false
)
private
Boolean
happenAfterBiz
;
/**
* 登记类型:0-新增;1-历史有证;2-历史无证
*/
@TableField
(
exist
=
false
)
private
String
regType
;
}
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