Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
H
hzsomms
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
ZTGK
hzsomms
Commits
15347069
Commit
15347069
authored
Aug 09, 2024
by
史志龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
作业以及分析删除逻辑--shizhilong
parent
6a657431
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
AnalysisLineBatchServiceImpl.java
...seAnalysis/service/impl/AnalysisLineBatchServiceImpl.java
+11
-0
WorkBatchServiceImpl.java
...es/maintenanceWork/service/impl/WorkBatchServiceImpl.java
+8
-0
No files found.
jeecg-module-system/src/main/java/org/jeecg/modules/diseaseAnalysis/service/impl/AnalysisLineBatchServiceImpl.java
View file @
15347069
...
...
@@ -2,8 +2,10 @@ package org.jeecg.modules.diseaseAnalysis.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.jeecg.common.exception.JeecgBootException
;
import
org.jeecg.common.util.UUIDGenerator
;
import
org.jeecg.modules.diseaseAnalysis.algorithm.MultiProducerLine
;
import
org.jeecg.modules.diseaseAnalysis.dto.*
;
...
...
@@ -12,6 +14,8 @@ import org.jeecg.modules.diseaseAnalysis.mapper.*;
import
org.jeecg.modules.diseaseAnalysis.service.IAnalysisLineBatchService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.jeecg.modules.diseaseAnalysis.vo.*
;
import
org.jeecg.modules.maintenanceWork.entity.WorkBatchDetail
;
import
org.jeecg.modules.maintenanceWork.service.IWorkBatchDetailService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -48,6 +52,8 @@ public class AnalysisLineBatchServiceImpl extends ServiceImpl<AnalysisLineBatchM
private
AnalysisLineBatchUnitDevicePatrolInfoMapper
analysisLineBatchUnitDevicePatrolInfoMapper
;
@Resource
private
AnalysisLineBatchUnitDevicePatrolAssistInfoMapper
analysisLineBatchUnitDevicePatrolAssistInfoMapper
;
@Resource
private
IWorkBatchDetailService
workBatchDetailService
;
/**
* 线路质量分析-其他病害分析-检查记录-分页列表查询
*
...
...
@@ -319,6 +325,11 @@ public class AnalysisLineBatchServiceImpl extends ServiceImpl<AnalysisLineBatchM
@Override
@Transactional
public
void
deleteBatchRecord
(
List
<
String
>
idList
,
Integer
type
)
{
//查询是否具备删除分析批次得条件
List
<
WorkBatchDetail
>
list
=
workBatchDetailService
.
lambdaQuery
().
in
(
WorkBatchDetail:
:
getAnalysisBatchId
,
idList
).
list
();
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
throw
JeecgBootException
.
error
(
"删除失败,当前分析任务存在维修作业不允许删除!"
);
}
// 1.先删除病害分析主表与检查记录主表之间的关系表
LambdaQueryWrapper
<
AnalysisLineBatchCheckDataMap
>
wrapper
=
Wrappers
.
lambdaQuery
();
wrapper
.
in
(
AnalysisLineBatchCheckDataMap:
:
getAnalysisBatchId
,
idList
);
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/maintenanceWork/service/impl/WorkBatchServiceImpl.java
View file @
15347069
...
...
@@ -292,6 +292,14 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
@Override
@Transactional
public
void
deleteRecord
(
String
workBatchId
)
{
//查询作业主表
WorkBatch
workBatch
=
this
.
baseMapper
.
selectById
(
workBatchId
);
if
(
workBatch
==
null
){
throw
JeecgBootException
.
error
(
"删除失败,没找到作业数据!"
);
}
if
(
workBatch
.
getWorkStatus
()
==
9
){
throw
JeecgBootException
.
error
(
"当前作业已完成无法删除!"
);
}
//删除整改详情表
LambdaQueryWrapper
<
WorkBatchDetailModify
>
delModifyWrapper
=
Wrappers
.
lambdaQuery
();
delModifyWrapper
.
eq
(
WorkBatchDetailModify:
:
getWorkBatchId
,
workBatchId
);
...
...
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