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
1f98e347
Commit
1f98e347
authored
Jan 07, 2026
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(jg): 压力管道后续业务
1.启用停用代码提交
parent
66e9c6fe
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
62 deletions
+45
-62
JgEnableDisableController.java
...t/module/jg/biz/controller/JgEnableDisableController.java
+6
-10
JgEnableDisableServiceImpl.java
...odule/jg/biz/service/impl/JgEnableDisableServiceImpl.java
+39
-52
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgEnableDisableController.java
View file @
1f98e347
...
...
@@ -5,8 +5,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgEnableDisableDto
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgEnableDisableServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgProjectContraptionDto
;
...
...
@@ -14,9 +12,9 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
...
...
@@ -31,13 +29,11 @@ import java.util.Map;
@RestController
@Api
(
tags
=
"Api"
)
@RequestMapping
(
value
=
"/jg-enable-disable"
)
@RequiredArgsConstructor
(
onConstructor
=
@__
(
@Autowired
))
public
class
JgEnableDisableController
extends
BaseController
{
@Autowired
JgEnableDisableServiceImpl
jgEnableDisableServiceImpl
;
@Autowired
RedisUtils
redisUtils
;
private
final
JgEnableDisableServiceImpl
jgEnableDisableServiceImpl
;
/**
* 新增
...
...
@@ -48,7 +44,7 @@ public class JgEnableDisableController extends BaseController {
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
ResponseModel
<
Object
>
save
(
@RequestBody
JSONObject
map
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
ReginParams
reginParams
=
getSelectedOrgInfo
(
);
return
ResponseHelper
.
buildResponse
(
jgEnableDisableServiceImpl
.
saveOrUpdate
(
map
,
reginParams
));
}
...
...
@@ -64,7 +60,7 @@ public class JgEnableDisableController extends BaseController {
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
jgEnableDisableServiceImpl
.
pageList
(
page
,
sort
,
dto
,
client
));
return
ResponseHelper
.
buildResponse
(
jgEnableDisableServiceImpl
.
pageList
(
page
,
sort
,
dto
,
client
,
getSelectedOrgInfo
()
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
...
@@ -75,7 +71,7 @@ public class JgEnableDisableController extends BaseController {
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"comment"
)),
String
.
valueOf
(
map
.
get
(
"nextTaskId"
)));
String
.
valueOf
(
map
.
get
(
"nextTaskId"
))
,
getSelectedOrgInfo
()
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
...
...
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 @
1f98e347
...
...
@@ -9,22 +9,27 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.RedisKe
y
;
import
com.yeejoin.amos.boot.biz.common.utils.
RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.
entity.BaseEntit
y
;
import
com.yeejoin.amos.boot.biz.common.utils.
SnowflakeIdUtil
;
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.api.service.ICompensateFlowDataOfRedis
;
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.*
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgEnableDisable
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgEnableDisableEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CertificateStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgEnableDisableEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgEnableDisableMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgRegistrationHistoryMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationManageMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgEnableDisableService
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
com.yeejoin.amos.boot.module.jg.biz.config.LocalBadRequest
;
...
...
@@ -35,7 +40,6 @@ 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
;
import
com.yeejoin.amos.boot.module.common.api.service.ICompensateFlowDataOfRedis
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgProjectContraptionDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgInspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption
;
...
...
@@ -46,7 +50,6 @@ import com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgProjectContraptionMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgUseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.RegistrationInfoMapper
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.model.*
;
...
...
@@ -64,6 +67,7 @@ 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
;
import
java.time.ZoneId
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
...
...
@@ -80,8 +84,6 @@ import static java.util.stream.Collectors.toSet;
@Service
public
class
JgEnableDisableServiceImpl
extends
BaseService
<
JgEnableDisableDto
,
JgEnableDisable
,
JgEnableDisableMapper
>
implements
IJgEnableDisableService
,
ICompensateFlowDataOfRedis
<
JgEnableDisable
>
{
@Autowired
RedisUtils
redisUtils
;
@Autowired
JgEnableDisableEqServiceImpl
jgEnableDisableEqService
;
...
...
@@ -91,11 +93,9 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
@Autowired
TzsServiceFeignClient
tzsServiceFeignClient
;
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Arrays
.
asList
(
"待提交"
,
"已驳回"
,
"已撤回"
,
"已作废"
,
"已完成"
);
private
final
String
PROCESS_DEFINITION_KEY
=
"deactivateEnable"
;
private
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
@Autowired
JgResumeInfoServiceImpl
jgResumeInfoService
;
@Autowired
private
CommonServiceImpl
commonService
;
...
...
@@ -133,19 +133,12 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
@Autowired
private
ESEquipmentCategory
esEquipmentCategory
;
/**
* 设备状态:启用
*/
public
static
final
String
APPLY_TYPE_QY
=
"SB_QY"
;
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Collections
.
unmodifiableList
(
Arrays
.
asList
(
"待提交"
,
"已驳回"
,
"已撤回"
,
"已作废"
,
"已完成"
));
/**
* 设备状态:启用
*/
public
static
final
String
APPLY_TYPE_TY
=
"SB_TY"
;
private
final
String
PROCESS_DEFINITION_KEY
=
"deactivateEnable"
;
private
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
@Autowired
JgResumeInfoServiceImpl
jgResumeInfoService
;
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
List
<
JgEnableDisable
>
saveOrUpdate
(
JSONObject
map
,
ReginParams
reginParams
)
{
...
...
@@ -246,8 +239,8 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
}
}
else
{
// 启用 选择的设备中有超过定期检验有效期的设备,下次检验日期在当前时间之前的,提示:启用的设备中存在超过定期检验有效期的设备。,不能继续下一步。
if
(
A
PPLY_TYPE_QY
.
equals
(
map
.
getString
(
"applyType"
)))
{
if
(!
EquipmentClassifityEnum
.
YLGD
.
getCode
().
equals
(
equListCode
))
{
if
(
A
pplicationFormTypeEnum
.
SBQY
.
getBusinessCode
()
.
equals
(
map
.
getString
(
"applyType"
)))
{
if
(!
EquipmentClassifityEnum
.
YLGD
.
getCode
().
equals
(
equListCode
))
{
List
<
String
>
record
=
equipments
.
stream
().
map
(
equ
->
String
.
valueOf
(
equ
.
get
(
"record"
))).
collect
(
Collectors
.
toList
());
List
<
IdxBizJgInspectionDetectionInfo
>
inspectInfos
=
jgInspectionDetectionInfoService
.
checkInspectionInfo
(
record
);
List
<
Date
>
nextInspectDates
=
inspectInfos
.
stream
().
map
(
IdxBizJgInspectionDetectionInfo:
:
getNextInspectDate
).
collect
(
Collectors
.
toList
());
...
...
@@ -329,7 +322,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
}
private
void
setCertInfoByEquList
(
JSONObject
map
,
JgEnableDisable
jgEnableDisable
)
{
if
(!
EquipmentClassifityEnum
.
YLGD
.
getCode
().
equals
(
jgEnableDisable
.
getEquListCode
()))
{
if
(!
EquipmentClassifityEnum
.
YLGD
.
getCode
().
equals
(
jgEnableDisable
.
getEquListCode
()))
{
// 使用登记证相关
List
<
String
>
certificates
=
(
List
<
String
>)
map
.
get
(
"sequenceNbrs"
);
LambdaQueryWrapper
<
JgUseRegistrationManage
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
...
...
@@ -371,7 +364,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
private
String
getRegistrationClass
(
JgEnableDisable
jgEnableDisable
)
{
// SB_QY启用,SB_TY停用
if
(
A
PPLY_TYPE_QY
.
equals
(
jgEnableDisable
.
getApplyType
()))
{
if
(
A
pplicationFormTypeEnum
.
SBQY
.
getBusinessCode
()
.
equals
(
jgEnableDisable
.
getApplyType
()))
{
return
BusinessTypeEnum
.
JG_EQUIPMENT_START
.
getName
();
}
else
{
return
BusinessTypeEnum
.
JG_EQUIPMENT_STOP
.
getName
();
...
...
@@ -463,7 +456,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
}
private
String
getRecordKey
(
String
equListCode
)
{
if
(!
EquipmentClassifityEnum
.
YLGD
.
getCode
().
equals
(
equListCode
))
{
if
(!
EquipmentClassifityEnum
.
YLGD
.
getCode
().
equals
(
equListCode
))
{
return
"SEQUENCE_NBR"
;
}
else
{
return
"record"
;
...
...
@@ -514,8 +507,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
}
public
Page
<
Map
<
String
,
Object
>>
pageList
(
Page
<
Map
<
String
,
Object
>>
page
,
String
sort
,
JgEnableDisableDto
dto
,
String
client
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
public
Page
<
Map
<
String
,
Object
>>
pageList
(
Page
<
Map
<
String
,
Object
>>
page
,
String
sort
,
JgEnableDisableDto
dto
,
String
client
,
ReginParams
reginParams
)
{
if
(
"company"
.
equals
(
reginParams
.
getCompany
().
getLevel
()))
{
dto
.
setUseUnitCreditCode
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
reginParams
.
getCompany
().
getCompanyType
())
?
reginParams
.
getCompany
().
getCompanyCode
().
split
(
"_"
)[
1
]
:
...
...
@@ -574,11 +566,8 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
}
@Autowired
RegistrationInfoMapper
tzsJgRegistrationInfoMapper
;
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
,
String
nextTaskId
)
{
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
,
String
nextTaskId
,
ReginParams
reginParams
)
{
String
lockKey
=
CommonServiceImpl
.
buildJgExecuteLockKey
(
instanceId
);
RLock
lock
=
redissonClient
.
getLock
(
lockKey
);
try
{
...
...
@@ -589,8 +578,6 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
}
// 流程执行时,状态及权限校验
commonService
.
checkForExecuteFlow
(
nextTaskId
,
instanceId
);
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
JgEnableDisable
jgEnableDisable
=
this
.
baseMapper
.
selectById
(
id
);
// 执行工作流并返回组装好的工作流信息
...
...
@@ -698,7 +685,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
LambdaQueryWrapper
<
JgEnableDisableEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JgEnableDisableEq:
:
getEnableDisableApplyId
,
jgEnableDisable
.
getSequenceNbr
());
List
<
JgEnableDisableEq
>
enableDisableEqs
=
jgEnableDisableEqService
.
list
(
queryWrapper
);
jgResumeInfoService
.
saveBatchResume
(
enableDisableEqs
.
stream
().
map
(
eq
->
JgResumeInfoDto
.
builder
().
applyNo
(
jgEnableDisable
.
getApplyNo
())
jgResumeInfoService
.
saveBatchResume
(
enableDisableEqs
.
stream
().
map
(
eq
->
JgResumeInfoDto
.
builder
().
applyNo
(
jgEnableDisable
.
getApplyNo
())
.
businessType
(
getRegistrationClass
(
jgEnableDisable
))
.
businessId
(
String
.
valueOf
(
jgEnableDisable
.
getSequenceNbr
()))
.
equId
(
eq
.
getEquId
())
...
...
@@ -726,7 +713,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
List
<
JgEnableDisableEq
>
jgEnableDisableEqs
=
jgEnableDisableEqMapper
.
selectList
(
lambdaEq
);
jgEnableDisableEqs
.
forEach
(
jgEnableDisableEq
->
{
IdxBizJgUseInfo
idxBizJgUseInfo
=
new
IdxBizJgUseInfo
();
if
(
A
PPLY_TYPE_QY
.
equals
(
jgEnableDisable
.
getApplyType
()))
{
if
(
A
pplicationFormTypeEnum
.
SBQY
.
getBusinessCode
()
.
equals
(
jgEnableDisable
.
getApplyType
()))
{
// 1启用
idxBizJgUseInfo
.
setEquState
(
String
.
valueOf
(
EquimentEnum
.
ZAIYONG
.
getCode
()));
}
else
{
...
...
@@ -885,16 +872,16 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
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
()))
{
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
);
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
())));
...
...
@@ -905,7 +892,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
}
else
{
equipments
=
this
.
getBaseMapper
().
selectPipeLineByRecords
(
enableDisableEqs
.
stream
().
map
(
JgEnableDisableEq:
:
getEquId
).
collect
(
Collectors
.
toList
()));
// 检验报告数据格式化 转json
equipments
.
stream
().
filter
(
e
->
e
.
get
(
"inspectReport"
)
!=
null
).
forEach
(
item
->
{
equipments
.
stream
().
filter
(
e
->
e
.
get
(
"inspectReport"
)
!=
null
).
forEach
(
item
->
{
item
.
put
(
"inspectReport"
,
JSON
.
parse
(
item
.
get
(
"inspectReport"
).
toString
()));
});
}
...
...
@@ -925,7 +912,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
return
resultMap
;
}
private
String
concatWithSplit
(
String
...
strs
)
{
private
String
concatWithSplit
(
String
...
strs
)
{
return
Arrays
.
stream
(
strs
).
filter
(
org
.
apache
.
commons
.
lang3
.
StringUtils
::
isNotEmpty
).
collect
(
Collectors
.
joining
(
"/"
));
}
...
...
@@ -946,7 +933,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
@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
());
return
jgEnableDisable
.
getInstanceId
()
!=
null
&&
!
jgEnableDisable
.
getAuditStatus
().
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
())
&&
!
jgEnableDisable
.
getAuditStatus
().
equals
(
FlowStatusEnum
.
TO_BE_DISCARD
.
getName
());
}
@Override
...
...
@@ -994,7 +981,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
public
IPage
<
IdxBizJgProjectContraption
>
getJgProjectContraptionPage
(
String
useUnitCreditCode
,
Page
<
IdxBizJgProjectContraption
>
page
,
String
sequenceNbr
)
{
// 兼容个人业务
if
(
useUnitCreditCode
.
contains
(
"_"
))
{
if
(
useUnitCreditCode
.
contains
(
"_"
))
{
useUnitCreditCode
=
useUnitCreditCode
.
split
(
"_"
)[
1
];
}
// 查询流程中的装置
...
...
@@ -1003,7 +990,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
proIds
.
remove
(
null
);
proIds
.
remove
(
""
);
// 编辑时要有自己
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotEmpty
(
sequenceNbr
))
{
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotEmpty
(
sequenceNbr
))
{
proIds
.
remove
(
sequenceNbr
);
}
return
this
.
getBaseMapper
().
queryJgProjectContraptionPage
(
page
,
useUnitCreditCode
,
proIds
);
...
...
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