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
31a4333a
Commit
31a4333a
authored
Dec 16, 2024
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature:管道安装告知作废修改
parent
9d3183bd
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
74 additions
and
31 deletions
+74
-31
JgResumeInfoMapper.java
...in/amos/boot/module/jg/api/mapper/JgResumeInfoMapper.java
+4
-3
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+60
-18
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+2
-5
JgResumeInfoServiceImpl.java
...t/module/jg/biz/service/impl/JgResumeInfoServiceImpl.java
+4
-1
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+2
-2
JgVehicleInformationServiceImpl.java
.../jg/biz/service/impl/JgVehicleInformationServiceImpl.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 @
31a4333a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgResumeInfo
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgResumeInfo
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Set
;
/**
* Mapper 接口
...
...
@@ -13,5 +14,5 @@ import java.util.List;
*/
public
interface
JgResumeInfoMapper
extends
BaseMapper
<
JgResumeInfo
>
{
void
deleteBatchByBusinessId
(
@Param
(
"idList"
)
Lis
t
<
String
>
idList
);
void
deleteBatchByBusinessId
(
@Param
(
"idList"
)
Se
t
<
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/JgInstallationNoticeServiceImpl.java
View file @
31a4333a
...
...
@@ -180,7 +180,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
private
ObjectMapper
objectMapper
;
@Autowired
private
IdxBizJgProjectConstructionMapper
projectConstructionMapper
;
@Autowired
private
IdxBizJgProjectContraptionMapper
projectContraptionMapper
;
@Autowired
EventPublisher
eventPublisher
;
...
...
@@ -1154,6 +1155,17 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
if
(
PipelineEnum
.
INDUSTRIAL_PIPELINE
.
getCode
().
equals
(
jgInstallationNotice
.
getEquCategoryCode
()))
{
// 处理工业管道审批后业务数据保存
this
.
savePipelineData
(
jgInstallationNotice
,
jgRelationEquips
,
finalYm
,
dto
,
taskV2Model1
);
jgResumeInfoService
.
saveBatchResume
(
Lists
.
newArrayList
(
JgResumeInfoDto
.
builder
()
.
applyNo
(
jgInstallationNotice
.
getApplyNo
())
.
businessType
(
BusinessTypeEnum
.
JG_MAINTENANCE_RECORD
.
getName
())
.
businessId
(
String
.
valueOf
(
jgInstallationNotice
.
getSequenceNbr
()))
.
equId
(
String
.
valueOf
(
jgInstallationNotice
.
getProjectContraptionId
()))
.
approvalUnit
(
jgInstallationNotice
.
getReceiveOrgName
())
.
approvalUnitCode
(
jgInstallationNotice
.
getReceiveOrgCreditCode
())
.
status
(
"正常"
)
.
routePath
(
taskV2Model1
.
getRoutePath
())
.
build
()));
}
else
{
jgRelationEquips
.
forEach
(
jgRelationEquip
->
{
LambdaQueryWrapper
<
OtherInfo
>
queryWrapper1
=
new
LambdaQueryWrapper
<>();
...
...
@@ -1228,23 +1240,24 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
changeRecordEq
.
setProductCode
(
idxBizJgFactoryInfo
.
getFactoryNum
());
certificateChangeRecordEqService
.
save
(
changeRecordEq
);
});
jgResumeInfoService
.
saveBatchResume
(
jgRelationEquips
.
stream
()
.
map
(
v
->
JgResumeInfoDto
.
builder
()
.
applyNo
(
jgInstallationNotice
.
getApplyNo
())
.
businessType
(
BusinessTypeEnum
.
JG_MAINTENANCE_RECORD
.
getName
())
.
businessId
(
String
.
valueOf
(
jgInstallationNotice
.
getSequenceNbr
()))
.
equId
(
String
.
valueOf
(
v
.
getEquId
()))
.
approvalUnit
(
jgInstallationNotice
.
getReceiveOrgName
())
.
approvalUnitCode
(
jgInstallationNotice
.
getReceiveOrgCreditCode
())
.
status
(
"正常"
)
.
routePath
(
taskV2Model1
.
getRoutePath
())
.
build
())
.
collect
(
Collectors
.
toList
())
);
}
// 更新关联设备表
jgInstallationNoticeEqService
.
updateBatchById
(
jgRelationEquips
);
jgResumeInfoService
.
saveBatchResume
(
jgRelationEquips
.
stream
()
.
map
(
v
->
JgResumeInfoDto
.
builder
()
.
applyNo
(
jgInstallationNotice
.
getApplyNo
())
.
businessType
(
BusinessTypeEnum
.
JG_MAINTENANCE_RECORD
.
getName
())
.
businessId
(
String
.
valueOf
(
jgInstallationNotice
.
getSequenceNbr
()))
.
equId
(
Optional
.
ofNullable
(
projectContraptionId
).
orElse
(
String
.
valueOf
(
v
.
getEquId
())))
// 压力管道使用装置id
.
approvalUnit
(
jgInstallationNotice
.
getReceiveOrgName
())
.
approvalUnitCode
(
jgInstallationNotice
.
getReceiveOrgCreditCode
())
.
status
(
"正常"
)
.
routePath
(
taskV2Model1
.
getRoutePath
())
.
build
())
.
collect
(
Collectors
.
toList
())
);
}
else
{
jgInstallationNotice
.
setNextExecuteIds
(
workflowResultDto
.
getNextExecutorRoleIds
());
jgInstallationNotice
.
setNextExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
...
...
@@ -1460,7 +1473,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
queryWrapper
.
eq
(
JgInstallationNoticeEq:
:
getEquipTransferId
,
jgInstallationNotice
.
getSequenceNbr
());
List
<
JgInstallationNoticeEq
>
jgInstallationNoticeEqs
=
jgInstallationNoticeEqMapper
.
selectList
(
queryWrapper
);
List
<
String
>
ids
=
jgInstallationNoticeEqs
.
stream
().
map
(
item
->
item
.
getEquId
()).
collect
(
Collectors
.
toList
());
List
<
Map
<
String
,
Object
>>
equipListMaps
=
Lists
.
newArrayList
()
;
List
<
Map
<
String
,
Object
>>
equipListMaps
;
String
equCategoryCode
=
jgInstallationNotice
.
getEquCategoryCode
();
Map
<
String
,
Object
>
installationInfo
=
BeanUtil
.
beanToMap
(
jgInstallationNotice
,
false
,
true
);
// 压力管道从工程装置表查询设备信息
...
...
@@ -1633,6 +1646,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
private
void
deleteConstructionInfo
(
JgInstallationNotice
installationNotice
)
{
constructionInfoMapper
.
delete
(
new
LambdaQueryWrapper
<
IdxBizJgConstructionInfo
>().
eq
(
IdxBizJgConstructionInfo:
:
getNoticeId
,
installationNotice
.
getSequenceNbr
()));
// 如果设备类型是工业管道,则还需删除工程装置施工信息
if
(
PipelineEnum
.
INDUSTRIAL_PIPELINE
.
getCode
().
equals
(
installationNotice
.
getEquCategoryCode
()))
{
LambdaQueryWrapper
<
IdxBizJgProjectConstruction
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
IdxBizJgProjectConstruction:
:
getNoticeId
,
installationNotice
.
getSequenceNbr
());
projectConstructionMapper
.
delete
(
queryWrapper
);
}
}
private
void
clearUseInfoOfEquip
(
JgInstallationNotice
installationNotice
)
{
...
...
@@ -1655,17 +1674,40 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
// 6.es 回退
this
.
rollBackEsInfo
(
jgRelationEquip
,
idxBizJgRegisterInfo
);
});
// 如果是工业管道,则回滚工程装置表信息
if
(
PipelineEnum
.
INDUSTRIAL_PIPELINE
.
getCode
().
equals
(
installationNotice
.
getEquCategoryCode
()))
{
this
.
rollBackProjectContraptionInfo
(
installationNotice
);
}
//删除设备履历信息
Lis
t
<
String
>
equipTransferIds
=
jgInstallationNoticeEqs
.
stream
()
Se
t
<
String
>
equipTransferIds
=
jgInstallationNoticeEqs
.
stream
()
.
map
(
JgInstallationNoticeEq:
:
getEquipTransferId
)
.
filter
(
Objects:
:
nonNull
)
.
collect
(
Collectors
.
to
Lis
t
());
.
collect
(
Collectors
.
to
Se
t
());
if
(!
equipTransferIds
.
isEmpty
())
{
jgResumeInfoService
.
deleteBatchByBusinessId
(
equipTransferIds
);
}
}
/**
* 回滚工程装置表信息
* @param installationNotice installationNotice
*/
private
void
rollBackProjectContraptionInfo
(
JgInstallationNotice
installationNotice
)
{
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
IdxBizJgProjectContraption:
:
getSequenceNbr
,
installationNotice
.
getProjectContraptionId
());
// 设置更新条件
// 强制更新字段为 NULL
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getUseUnitCreditCode
,
null
);
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getUseUnitName
,
null
);
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getOrgCode
,
null
);
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getOrgName
,
null
);
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getUseRegistrationCode
,
null
);
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getSupervisoryCode
,
null
);
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getEquCode
,
null
);
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getIsIntoManagement
,
false
);
projectContraptionMapper
.
update
(
null
,
updateWrapper
);
}
/**
* 释放96333码为未使用状态
* @param jgRelationEquip jgRelationEquip
*/
...
...
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/JgMaintenanceContractServiceImpl.java
View file @
31a4333a
...
...
@@ -9,7 +9,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.RedisUtils
;
import
com.yeejoin.amos.boot.module.jg.api.dto.*
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContract
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContractEq
;
...
...
@@ -31,7 +30,6 @@ 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.jg.biz.service.ICompensateFlowDataOfRedis
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgUseInfoService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgMaintenanceRecordInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
...
...
@@ -42,7 +40,6 @@ import com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
lombok.SneakyThrows
;
import
org.elasticsearch.client.RestHighLevelClient
;
import
org.redisson.api.RLock
;
import
org.redisson.api.RedissonClient
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -894,9 +891,9 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
// 删除在审批完成时写入的设备维保记录
idxBizJgMaintenanceRecordInfoService
.
remove
(
new
LambdaQueryWrapper
<
IdxBizJgMaintenanceRecordInfo
>().
eq
(
IdxBizJgMaintenanceRecordInfo:
:
getSourceId
,
maintenanceContract
.
getSequenceNbr
()));
// 删除批量业务ID信息
List
<
String
>
equipTransferIds
=
Collections
.
singletonList
(
maintenanceContract
.
getSequenceNbr
().
toString
());
Set
<
String
>
equipTransferIds
=
Collections
.
singleton
(
maintenanceContract
.
getSequenceNbr
().
toString
());
jgResumeInfoService
.
deleteBatchByBusinessId
(
equipTransferIds
);
jgResumeInfoService
.
deleteBatchByBusinessId
(
equipmentLists
.
stream
().
filter
(
t
->
t
.
getEquipTransferId
()
!=
null
).
map
(
JgMaintenanceContractEq:
:
getEquId
).
collect
(
Collectors
.
to
Lis
t
()));
jgResumeInfoService
.
deleteBatchByBusinessId
(
equipmentLists
.
stream
().
filter
(
t
->
t
.
getEquipTransferId
()
!=
null
).
map
(
JgMaintenanceContractEq:
:
getEquId
).
collect
(
Collectors
.
to
Se
t
()));
}
}
...
...
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 @
31a4333a
...
...
@@ -9,8 +9,10 @@ import com.yeejoin.amos.boot.module.jg.api.service.IJgResumeInfoService;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -58,7 +60,7 @@ public class JgResumeInfoServiceImpl extends BaseService<JgResumeInfoDto, JgResu
* 根据业务id进行删除
* @param idList 业务id
*/
public
void
deleteBatchByBusinessId
(
Lis
t
<
String
>
idList
)
{
public
void
deleteBatchByBusinessId
(
Se
t
<
String
>
idList
)
{
this
.
baseMapper
.
deleteBatchByBusinessId
(
idList
);
}
}
\ 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/JgUseRegistrationServiceImpl.java
View file @
31a4333a
...
...
@@ -2763,10 +2763,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 5.历史设备处理
this
.
dealHisRegEquipData
(
jgUseRegistration
,
record
);
});
Lis
t
<
String
>
equipTransferIds
=
eqList
.
stream
()
Se
t
<
String
>
equipTransferIds
=
eqList
.
stream
()
.
map
(
JgUseRegistrationEq:
:
getEquipTransferId
)
.
filter
(
Objects:
:
nonNull
)
.
collect
(
Collectors
.
to
Lis
t
());
.
collect
(
Collectors
.
to
Se
t
());
if
(!
equipTransferIds
.
isEmpty
())
{
jgResumeInfoService
.
deleteBatchByBusinessId
(
equipTransferIds
);
}
...
...
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/JgVehicleInformationServiceImpl.java
View file @
31a4333a
...
...
@@ -1496,10 +1496,10 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
// 4.es的EQU_STATE, USE_ORG_CODE、ORG_BRANCH_CODE、ORG_BRANCH_NAME、STATUS
this
.
rollBackForEquipEsInfo
(
record
);
});
Lis
t
<
String
>
equipTransferIds
=
eqList
.
stream
()
Se
t
<
String
>
equipTransferIds
=
eqList
.
stream
()
.
map
(
JgVehicleInformationEq:
:
getVehicleId
)
.
filter
(
Objects:
:
nonNull
)
.
collect
(
Collectors
.
to
Lis
t
());
.
collect
(
Collectors
.
to
Se
t
());
if
(!
equipTransferIds
.
isEmpty
())
{
jgResumeInfoService
.
deleteBatchByBusinessId
(
equipTransferIds
);
}
...
...
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