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
ec8978ad
Commit
ec8978ad
authored
Jan 16, 2025
by
hezhuozhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除导入的装置信息
parent
4c872f42
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
126 additions
and
5 deletions
+126
-5
IdxBizJgProjectContraptionController.java
.../biz/controller/IdxBizJgProjectContraptionController.java
+12
-0
IIdxBizJgProjectContraptionService.java
...le/jg/biz/service/IIdxBizJgProjectContraptionService.java
+3
-0
IdxBizJgProjectContraptionServiceImpl.java
...z/service/impl/IdxBizJgProjectContraptionServiceImpl.java
+111
-5
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/IdxBizJgProjectContraptionController.java
View file @
ec8978ad
...
...
@@ -171,6 +171,18 @@ public class IdxBizJgProjectContraptionController extends BaseController {
}
/**
* 根据sequenceNbr删除datasource为jg_his_gd_pl的数据
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/deleteByHisGdPl"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除datasource为jg_his_gd_pl的数据"
,
notes
=
"根据sequenceNbr删除datasource为jg_his_gd_pl的数据"
)
public
ResponseModel
<
Boolean
>
deleteByHisGdPl
(
@RequestParam
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
idxBizJgProjectContraptionServiceImpl
.
deleteByHisGdPl
(
sequenceNbr
));
}
/**
* 获取检验信息详情
*
* @return
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/IIdxBizJgProjectContraptionService.java
View file @
ec8978ad
...
...
@@ -24,4 +24,6 @@ public interface IIdxBizJgProjectContraptionService extends IService<IdxBizJgPro
IPage
<
IdxBizJgProjectContraption
>
proConPageByParams
(
Map
<
String
,
String
>
params
,
Page
<
IdxBizJgProjectContraption
>
page
,
ReginParams
reginParams
);
List
<
IdxBizJgProjectContraption
>
proConListByParams
(
Map
<
String
,
String
>
params
,
ReginParams
reginParams
);
Boolean
deleteByHisGdPl
(
Long
sequenceNbr
);
}
\ 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/IdxBizJgProjectContraptionServiceImpl.java
View file @
ec8978ad
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.date.DatePattern
;
import
cn.hutool.core.date.DateUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
...
@@ -8,16 +10,21 @@ 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.controller.BaseController
;
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.jg.api.converter.DictParamsConverter
;
import
com.yeejoin.amos.boot.module.jg.api.dto.InspectConclusionConverter
;
import
com.yeejoin.amos.boot.module.jg.api.dto.InspectTypeConverter
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PipingExcelDto
;
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.JgVehicleInformationMapper
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgProjectContraptionService
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.service.*
;
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
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgProjectContraptionMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
...
...
@@ -87,6 +94,26 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
private
JgVehicleInformationMapper
jgVehicleInformationMapper
;
@Autowired
private
JgInstallationNoticeServiceImpl
jgInstallationNoticeService
;
@Autowired
private
IdxBizJgUseInfoServiceImpl
idxBizJgUseInfoService
;
@Autowired
private
IdxBizJgDesignInfoServiceImpl
idxBizJgDesignInfoService
;
@Autowired
private
IdxBizJgFactoryInfoServiceImpl
idxBizJgFactoryInfoService
;
@Autowired
private
IdxBizJgRegisterInfoServiceImpl
idxBizJgRegisterInfoService
;
@Autowired
private
IdxBizJgSupervisionInfoServiceImpl
idxBizJgSupervisionInfoService
;
@Autowired
private
IdxBizJgOtherInfoServiceImpl
idxBizJgOtherInfoService
;
@Autowired
private
IdxBizJgTechParamsPipelineServiceImpl
idxBizJgTechParamsPipelineService
;
@Autowired
private
IdxBizJgInspectionDetectionInfoServiceImpl
idxBizJgInspectionDetectionInfoService
;
@Autowired
private
IdxBizJgConstructionInfoServiceImpl
idxBizJgConstructionInfoService
;
@Autowired
private
ESEquipmentCategory
esEquipmentCategory
;
@Override
public
boolean
saveOrUpdateData
(
IdxBizJgProjectContraption
projectContraption
)
{
...
...
@@ -474,4 +501,82 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
projectContraption
.
setUseUnitCreditCode
(
companyInfoMap
.
get
(
"creditCode"
).
toString
());
return
this
.
saveOrUpdateData
(
projectContraption
);
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Boolean
deleteByHisGdPl
(
Long
sequenceNbr
)
{
IdxBizJgProjectContraption
idxBizJgProjectContraption
=
baseMapper
.
selectById
(
sequenceNbr
);
if
(
Objects
.
nonNull
(
idxBizJgProjectContraption
)){
String
dataSource
=
idxBizJgProjectContraption
.
getDataSource
();
if
(!
"jg_his_gd_pl"
.
equals
(
dataSource
)){
throw
new
BadRequest
(
"数据源不是导入类型禁止删除"
);
}
// 删除管道对应的idx表数据
this
.
deletePipInfoToIdxTables
(
idxBizJgProjectContraption
);
// 删除工程装置表信息
removeById
(
idxBizJgProjectContraption
.
getSequenceNbr
());
}
return
Boolean
.
TRUE
;
}
private
void
deletePipInfoToIdxTables
(
IdxBizJgProjectContraption
idxBizJgProjectContraption
)
{
Long
jgProjectContraptionSequenceNbr
=
idxBizJgProjectContraption
.
getSequenceNbr
();
LambdaQueryWrapper
<
IdxBizJgUseInfo
>
jgUseInfoWrapper
=
new
LambdaQueryWrapper
<>();
jgUseInfoWrapper
.
eq
(
IdxBizJgUseInfo:
:
getProjectContraptionId
,
jgProjectContraptionSequenceNbr
);
List
<
IdxBizJgUseInfo
>
useInfos
=
idxBizJgUseInfoService
.
list
(
jgUseInfoWrapper
);
//获取records
List
<
String
>
records
=
new
ArrayList
<>();
if
(
CollectionUtil
.
isNotEmpty
(
useInfos
)){
for
(
IdxBizJgUseInfo
useInfo
:
useInfos
)
{
records
.
add
(
useInfo
.
getRecord
());
}
}
if
(
CollectionUtil
.
isNotEmpty
(
records
)){
// 删除检验检测信息
LambdaQueryWrapper
<
IdxBizJgInspectionDetectionInfo
>
inspectionDetectionInfoWrapper
=
new
LambdaQueryWrapper
<>();
inspectionDetectionInfoWrapper
.
in
(
IdxBizJgInspectionDetectionInfo:
:
getRecord
,
records
);
idxBizJgInspectionDetectionInfoService
.
remove
(
inspectionDetectionInfoWrapper
);
// 删除设计信息
LambdaQueryWrapper
<
IdxBizJgDesignInfo
>
designInfoWrapper
=
new
LambdaQueryWrapper
<>();
designInfoWrapper
.
in
(
IdxBizJgDesignInfo:
:
getRecord
,
records
);
idxBizJgDesignInfoService
.
remove
(
designInfoWrapper
);
// 删除制造信息
LambdaQueryWrapper
<
IdxBizJgFactoryInfo
>
factoryInfoWrapper
=
new
LambdaQueryWrapper
<>();
factoryInfoWrapper
.
in
(
IdxBizJgFactoryInfo:
:
getRecord
,
records
);
idxBizJgFactoryInfoService
.
remove
(
factoryInfoWrapper
);
// 删除施工信息
LambdaQueryWrapper
<
IdxBizJgConstructionInfo
>
constructionInfoWrapper
=
new
LambdaQueryWrapper
<>();
constructionInfoWrapper
.
in
(
IdxBizJgConstructionInfo:
:
getRecord
,
records
);
idxBizJgConstructionInfoService
.
remove
(
constructionInfoWrapper
);
// 删除注册登记信息
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>
registerInfoWrapper
=
new
LambdaQueryWrapper
<>();
registerInfoWrapper
.
in
(
IdxBizJgRegisterInfo:
:
getRecord
,
records
);
idxBizJgRegisterInfoService
.
remove
(
registerInfoWrapper
);
// 删除监督管理
LambdaQueryWrapper
<
IdxBizJgSupervisionInfo
>
supervisionInfoWrapper
=
new
LambdaQueryWrapper
<>();
supervisionInfoWrapper
.
in
(
IdxBizJgSupervisionInfo:
:
getRecord
,
records
);
idxBizJgSupervisionInfoService
.
remove
(
supervisionInfoWrapper
);
// 删除其他信息
LambdaQueryWrapper
<
IdxBizJgOtherInfo
>
otherInfoWrapper
=
new
LambdaQueryWrapper
<>();
otherInfoWrapper
.
in
(
IdxBizJgOtherInfo:
:
getRecord
,
records
);
idxBizJgOtherInfoService
.
remove
(
otherInfoWrapper
);
// 删除管道技术参数
LambdaQueryWrapper
<
IdxBizJgTechParamsPipeline
>
techParamsPipelineWrapper
=
new
LambdaQueryWrapper
<>();
techParamsPipelineWrapper
.
in
(
IdxBizJgTechParamsPipeline:
:
getRecord
,
records
);
idxBizJgTechParamsPipelineService
.
remove
(
techParamsPipelineWrapper
);
//删除es数据
for
(
String
record
:
records
)
{
esEquipmentCategory
.
deleteById
(
record
);
}
// 删除使用信息
idxBizJgUseInfoService
.
remove
(
jgUseInfoWrapper
);
}
}
}
\ No newline at end of file
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