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
c1c09215
Commit
c1c09215
authored
Feb 21, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除巡查项优化
parent
589a2fa3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
InputItemController.java
.../maintenance/business/controller/InputItemController.java
+7
-0
IPointInputItemDao.java
...intenance/business/dao/repository/IPointInputItemDao.java
+3
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/InputItemController.java
View file @
c1c09215
...
@@ -9,6 +9,7 @@ import java.util.List;
...
@@ -9,6 +9,7 @@ import java.util.List;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
com.yeejoin.amos.maintenance.business.dao.repository.IPointInputItemDao
;
import
com.yeejoin.amos.maintenance.core.framework.PersonIdentify
;
import
com.yeejoin.amos.maintenance.core.framework.PersonIdentify
;
import
org.apache.poi.ss.usermodel.Sheet
;
import
org.apache.poi.ss.usermodel.Sheet
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.apache.poi.ss.usermodel.Workbook
;
...
@@ -73,6 +74,8 @@ public class InputItemController extends AbstractBaseController {
...
@@ -73,6 +74,8 @@ public class InputItemController extends AbstractBaseController {
IInputItemService
inputItemService
;
IInputItemService
inputItemService
;
@Autowired
@Autowired
IInputItemDao
inputItemDao
;
IInputItemDao
inputItemDao
;
@Autowired
IPointInputItemDao
iPointInputItemDao
;
/**
/**
* 新增巡检项
* 新增巡检项
...
@@ -155,6 +158,10 @@ public class InputItemController extends AbstractBaseController {
...
@@ -155,6 +158,10 @@ public class InputItemController extends AbstractBaseController {
if
(
ObjectUtils
.
isEmpty
(
itemIDs
))
{
if
(
ObjectUtils
.
isEmpty
(
itemIDs
))
{
return
CommonResponseUtil
.
failure
(
"请选择要删除的检查项"
);
return
CommonResponseUtil
.
failure
(
"请选择要删除的检查项"
);
}
}
//查询该巡查项是否已有巡查点绑定 有就返回
if
(
iPointInputItemDao
.
selectByITemId
(
itemIDs
)
>
0
)
{
return
CommonResponseUtil
.
failure
(
"该巡检项已绑定,请先删除巡检设备的巡检项"
);
}
String
[]
ids
=
itemIDs
.
split
(
","
);
String
[]
ids
=
itemIDs
.
split
(
","
);
inputItemService
.
batchDelInputItem
(
ids
);
inputItemService
.
batchDelInputItem
(
ids
);
return
CommonResponseUtil
.
success
();
return
CommonResponseUtil
.
success
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/dao/repository/IPointInputItemDao.java
View file @
c1c09215
...
@@ -25,6 +25,9 @@ public interface IPointInputItemDao extends BaseDao<PointInputItem, Long> {
...
@@ -25,6 +25,9 @@ public interface IPointInputItemDao extends BaseDao<PointInputItem, Long> {
@Query
(
value
=
"SELECT * FROM p_point_inputitem WHERE point_id = ?1 AND input_item_id = ?2"
,
nativeQuery
=
true
)
@Query
(
value
=
"SELECT * FROM p_point_inputitem WHERE point_id = ?1 AND input_item_id = ?2"
,
nativeQuery
=
true
)
PointInputItem
getPointInputItem
(
Long
pointId
,
Long
inputItemId
);
PointInputItem
getPointInputItem
(
Long
pointId
,
Long
inputItemId
);
@Query
(
value
=
"SELECT count(*) FROM p_point_inputitem WHERE input_item_id IN(?1) "
,
nativeQuery
=
true
)
int
selectByITemId
(
String
inputItemIds
);
@Modifying
@Modifying
@Transactional
@Transactional
@Query
(
value
=
"DELETE FROM p_point_inputitem WHERE point_id = (?1) AND input_item_id IN (?2)"
,
nativeQuery
=
true
)
@Query
(
value
=
"DELETE FROM p_point_inputitem WHERE point_id = (?1) AND input_item_id IN (?2)"
,
nativeQuery
=
true
)
...
...
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