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
459569e6
Commit
459569e6
authored
Jan 27, 2022
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加防火监督检查计划删除后端校验
parent
a00375f3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
5 deletions
+16
-5
LatentDangerServiceImpl.java
...danger/business/service/impl/LatentDangerServiceImpl.java
+1
-0
PlanController.java
.../amos/supervision/business/controller/PlanController.java
+1
-1
IPlanDao.java
...in/amos/supervision/business/dao/repository/IPlanDao.java
+4
-1
PlanServiceImpl.java
...os/supervision/business/service/impl/PlanServiceImpl.java
+9
-2
IPlanService.java
...amos/supervision/business/service/intfc/IPlanService.java
+1
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/service/impl/LatentDangerServiceImpl.java
View file @
459569e6
...
...
@@ -1986,6 +1986,7 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
pageParam
.
put
(
"governUserId"
,
jcsUserId
);
}
}
pageParam
.
put
(
"bizType"
,
bizType
);
Page
page
=
new
Page
(
pageParam
.
getParamPageCurrent
(),
pageParam
.
getParamPageSize
());
IPage
<
LatentDanger
>
iPage
=
this
.
baseMapper
.
selectPageByParam
(
page
,
(
Map
<
String
,
Object
>)
pageParam
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/controller/PlanController.java
View file @
459569e6
...
...
@@ -127,7 +127,7 @@ public class PlanController extends AbstractBaseController {
return
CommonResponseUtil
.
success
();
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResponseUtil
.
failure
(
"删除巡检计划失败"
);
return
CommonResponseUtil
.
failure
(
"删除巡检计划失败"
+
":"
+
e
.
getMessage
()
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/repository/IPlanDao.java
View file @
459569e6
...
...
@@ -40,5 +40,7 @@ public interface IPlanDao extends BaseDao<Plan, Long> {
@Query
(
value
=
"select * from p_plan where original_id in (?1) and is_delete = 0"
,
nativeQuery
=
true
)
List
<
Plan
>
findByOriginalIds
(
List
<
String
>
originalIds
);
@Query
(
value
=
"select count(*) from p_plan where is_delete = 0 and id in (?1) and status != (?2)"
,
nativeQuery
=
true
)
int
countNotDeletable
(
List
<
Long
>
ids
,
int
status
);
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/PlanServiceImpl.java
View file @
459569e6
...
...
@@ -362,11 +362,18 @@ public class PlanServiceImpl implements IPlanService {
@Override
@Transactional
public
void
delPlanById
(
String
[]
param
)
{
List
<
Long
>
ids
=
new
ArrayList
<
Long
>();
public
void
delPlanById
(
String
[]
param
)
throws
Exception
{
List
<
Long
>
ids
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
param
.
length
;
i
++)
{
ids
.
add
(
Long
.
parseLong
(
param
[
i
]));
}
if
(
ValidationUtil
.
isEmpty
(
ids
))
{
throw
new
Exception
(
"参数为空"
);
}
// 校验是否可以删除(PlanStatusEnum.DRAFT:草稿状态可删除)
if
(
planDao
.
countNotDeletable
(
ids
,
PlanStatusEnum
.
DRAFT
.
getValue
())
>
0
)
{
throw
new
Exception
(
"非草稿状态计划不能删除"
);
}
planDao
.
updatePlanDel
(
ids
);
// 删除对应该计划今天往后的所有计划执行信息
Calendar
calendar
=
Calendar
.
getInstance
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/intfc/IPlanService.java
View file @
459569e6
...
...
@@ -28,7 +28,7 @@ public interface IPlanService {
/**
* 巡检计划删除
*/
void
delPlanById
(
String
[]
param
);
void
delPlanById
(
String
[]
param
)
throws
Exception
;
/**
* 巡检计划另存
...
...
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