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
08f53a52
Commit
08f53a52
authored
Jan 07, 2026
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(jg): 压力管道后续业务
1.启用停用代码提交
parent
31c27ea7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
87 additions
and
9 deletions
+87
-9
JgEnableDisableMapper.java
...amos/boot/module/jg/api/mapper/JgEnableDisableMapper.java
+4
-0
JgEnableDisableMapper.xml
...g-api/src/main/resources/mapper/JgEnableDisableMapper.xml
+12
-0
JgEnableDisableServiceImpl.java
...odule/jg/biz/service/impl/JgEnableDisableServiceImpl.java
+70
-5
ApplicationFormTypeEnum.java
...os/boot/module/ymt/api/enums/ApplicationFormTypeEnum.java
+1
-4
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/JgEnableDisableMapper.java
View file @
08f53a52
...
...
@@ -43,4 +43,8 @@ public interface JgEnableDisableMapper extends BaseMapper<JgEnableDisable> {
IPage
<
IdxBizJgProjectContraption
>
queryJgProjectContraptionPage
(
@Param
(
"page"
)
Page
<
IdxBizJgProjectContraption
>
page
,
@Param
(
"useUnitCreditCode"
)
String
useUnitCreditCode
,
@Param
(
"proIds"
)
Set
<
String
>
proIds
);
IPage
<
Map
<
String
,
Object
>>
selectPipeLinePage
(
@Param
(
"page"
)
Page
<
Map
<
String
,
Object
>>
page
,
@Param
(
"projectContraptionId"
)
String
projectContraptionId
,
@Param
(
"applyType"
)
String
applyType
);
List
<
Map
<
String
,
Object
>>
selectPipeLineByRecords
(
@Param
(
"records"
)
List
<
String
>
records
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgEnableDisableMapper.xml
View file @
08f53a52
...
...
@@ -252,4 +252,15 @@
)
ORDER BY REC_DATE DESC
</select>
<select
id=
"selectPipeLineByRecords"
resultType=
"java.util.Map"
>
select * from (
<include
refid=
"page-list-pipeline"
/>
WHERE
ui."RECORD" = ANY(ARRAY[
<foreach
collection=
"records"
item=
"record"
separator=
","
>
#{record}
</foreach>
]) )
ORDER BY REC_DATE DESC
</select>
</mapper>
\ 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/JgEnableDisableServiceImpl.java
View file @
08f53a52
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -15,6 +16,8 @@ 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.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.common.biz.refresh.DataRefreshEvent
;
import
com.yeejoin.amos.boot.module.jg.api.dto.*
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
...
...
@@ -28,6 +31,7 @@ import com.yeejoin.amos.boot.module.jg.biz.config.LocalBadRequest;
import
com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext
;
import
com.yeejoin.amos.boot.module.jg.biz.context.FlowingEquipRedisContext
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.permission.FillingEditPermForCurrentUser
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.utils.JsonDiffUtil
;
import
com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService
;
...
...
@@ -56,6 +60,7 @@ import org.springframework.util.CollectionUtils;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -125,6 +130,9 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
@Autowired
private
IdxBizJgProjectContraptionMapper
jgProjectContraptionMapper
;
@Autowired
private
ESEquipmentCategory
esEquipmentCategory
;
/**
* 设备状态:启用
*/
...
...
@@ -251,11 +259,6 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
throw
new
BadRequest
(
"启用的设备中存在超过定期检验有效期的设备"
);
}
});
}
else
{
// 管道校验检验有效期逻辑 nextInspectDate
equipments
.
forEach
(
equ
->{
});
}
}
...
...
@@ -309,6 +312,8 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
}
// 保存历史表
commonService
.
saveOrUpdateHistory
(
this
.
getRegistrationClass
(
jgEnableDisable
),
map
,
null
,
jgEnableDisable
.
getSequenceNbr
().
toString
());
// 前端显示需要将code转name
jgEnableDisable
.
setApplyType
(
getRegistrationClass
(
jgEnableDisable
));
return
Collections
.
singletonList
(
jgEnableDisable
);
}
catch
(
BadRequest
|
LocalBadRequest
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
...
...
@@ -864,14 +869,55 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryMapper
.
selectOne
(
new
LambdaQueryWrapper
<
JgRegistrationHistory
>()
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
sequenceNbr
)
.
eq
(
JgRegistrationHistory:
:
getIsDelete
,
false
));
// 已完成或者已作废查询json
if
(
enableDisable
.
getAuditStatus
().
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
())
||
enableDisable
.
getAuditStatus
().
equals
(
FlowStatusEnum
.
TO_BE_DISCARD
.
getName
()))
{
if
(
jgRegistrationHistory
!=
null
)
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
resultMap
.
putAll
(
jsonObject
);
}
}
else
{
// 基本信息使用json里面的,其他字段按照如下覆盖
if
(
jgRegistrationHistory
!=
null
)
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
resultMap
.
putAll
(
jsonObject
);
}
// 流程中实时显示设备信息
LambdaQueryWrapper
<
JgEnableDisableEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JgEnableDisableEq:
:
getEnableDisableApplyId
,
enableDisable
.
getSequenceNbr
());
queryWrapper
.
select
(
BaseEntity:
:
getSequenceNbr
,
JgEnableDisableEq:
:
getEquId
);
List
<
JgEnableDisableEq
>
enableDisableEqs
=
jgEnableDisableEqService
.
list
(
queryWrapper
).
stream
().
filter
(
e
->
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotEmpty
(
e
.
getEquId
())).
collect
(
Collectors
.
toList
());
if
(!
enableDisableEqs
.
isEmpty
())
{
List
<
Map
<
String
,
Object
>>
equipments
;
if
(!
enableDisable
.
getEquListCode
().
equals
(
EquipmentClassifityEnum
.
YLGD
.
getCode
())){
equipments
=
new
ArrayList
<>();
Iterable
<
ESEquipmentCategoryDto
>
equipmentCategoryDtos
=
esEquipmentCategory
.
findAllById
(
enableDisableEqs
.
stream
().
map
(
JgEnableDisableEq:
:
getEquId
).
collect
(
Collectors
.
toList
()));
equipmentCategoryDtos
.
forEach
(
dto
->{
Map
<
String
,
Object
>
item
=
new
HashMap
<>();
BeanUtils
.
copyProperties
(
dto
,
item
);
BeanUtil
.
beanToMap
(
dto
,
item
,
true
,
false
);
item
.
replaceAll
((
k
,
v
)
->
v
==
null
?
""
:
v
);
item
.
put
(
"record"
,
dto
.
getSEQUENCE_NBR
());
item
.
put
(
"equipAddress"
,
concatWithSplit
(
trimNull2Empty
(
dto
.
getUSE_PLACE
()),
trimNull2Empty
(
dto
.
getADDRESS
())));
item
.
put
(
"EQU_STATE_NAME"
,
!
ValidationUtil
.
isEmpty
(
dto
.
getEQU_STATE
())
?
EquimentEnum
.
getName
.
get
(
dto
.
getEQU_STATE
())
:
null
);
item
.
put
(
"NEXT_INSPECT_DATE"
,
this
.
castDate2TimeStr
(
dto
.
getNEXT_INSPECT_DATE
()));
equipments
.
add
(
item
);
});
}
else
{
equipments
=
this
.
getBaseMapper
().
selectPipeLineByRecords
(
enableDisableEqs
.
stream
().
map
(
JgEnableDisableEq:
:
getEquId
).
collect
(
Collectors
.
toList
()));
// 检验报告数据格式化 转json
equipments
.
stream
().
filter
(
e
->
e
.
get
(
"inspectReport"
)
!=
null
).
forEach
(
item
->{
item
.
put
(
"inspectReport"
,
JSON
.
parse
(
item
.
get
(
"inspectReport"
).
toString
()));
});
}
resultMap
.
put
(
"equipments"
,
equipments
);
}
}
resultMap
.
put
(
"receiveOrgCode"
,
enableDisable
.
getReceiveCompanyCode
()
+
'_'
+
enableDisable
.
getReceiveOrgName
());
resultMap
.
put
(
"receiveCompanyCode"
,
enableDisable
.
getReceiveCompanyCode
());
resultMap
.
put
(
"sequenceNbr"
,
enableDisable
.
getSequenceNbr
());
resultMap
.
put
(
"applyNo"
,
enableDisable
.
getApplyNo
());
resultMap
.
put
(
"applyType"
,
enableDisable
.
getApplyType
());
resultMap
.
put
(
"remark"
,
enableDisable
.
getRemark
());
resultMap
.
put
(
"auditStatus"
,
enableDisable
.
getAuditStatus
());
resultMap
.
put
(
"useUnitCreditCode"
,
enableDisable
.
getUseUnitCreditCode
());
commonService
.
convertStringToJsonobject
(
resultMap
,
new
String
[]{
"otherAccessories"
});
...
...
@@ -879,6 +925,25 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
return
resultMap
;
}
private
String
concatWithSplit
(
String
...
strs
){
return
Arrays
.
stream
(
strs
).
filter
(
org
.
apache
.
commons
.
lang3
.
StringUtils
::
isNotEmpty
).
collect
(
Collectors
.
joining
(
"/"
));
}
private
String
trimNull2Empty
(
String
str
)
{
return
JsonDiffUtil
.
nullToEmpty
(
str
);
}
private
Date
castDate2TimeStr
(
Long
timestamp
)
{
if
(
timestamp
!=
null
)
{
try
{
return
DateUtil
.
date
(
timestamp
);
}
catch
(
NumberFormatException
e
)
{
return
null
;
}
}
return
null
;
}
@Override
public
boolean
beforeCheck
(
JgEnableDisable
jgEnableDisable
)
{
return
jgEnableDisable
.
getInstanceId
()
!=
null
&&
!
jgEnableDisable
.
getAuditStatus
().
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
())
&&!
jgEnableDisable
.
getAuditStatus
().
equals
(
FlowStatusEnum
.
TO_BE_DISCARD
.
getName
());
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/enums/ApplicationFormTypeEnum.java
View file @
08f53a52
...
...
@@ -36,7 +36,7 @@ public enum ApplicationFormTypeEnum {
GMBG
(
"GMBG"
,
"DJ_GM"
,
"更名变更"
),
//更名变更
SBQY
(
"SBQY"
,
"SB_QY"
,
"设备启用"
),
//设备启用
CSJ
(
"CSJ"
,
"DJ_CSJ"
,
"超设计年限"
),
//超设计年限
SBTY
(
"SBTY"
,
"SB_TY"
,
"设备
启用"
);
//设备启
用
SBTY
(
"SBTY"
,
"SB_TY"
,
"设备
停用"
);
//设备停
用
/**
* 编号
...
...
@@ -70,7 +70,4 @@ public enum ApplicationFormTypeEnum {
return
null
;
}
}
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