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
3ba88fbc
Commit
3ba88fbc
authored
Jul 28, 2022
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
2818540a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
18 deletions
+33
-18
PointController.java
...join/amos/patrol/business/controller/PointController.java
+18
-15
PointServiceImpl.java
...n/amos/patrol/business/service/impl/PointServiceImpl.java
+13
-3
IPointService.java
...oin/amos/patrol/business/service/intfc/IPointService.java
+2
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/PointController.java
View file @
3ba88fbc
...
@@ -198,7 +198,7 @@ public class PointController extends AbstractBaseController {
...
@@ -198,7 +198,7 @@ public class PointController extends AbstractBaseController {
}
else
{
}
else
{
newPointClassify
.
setId
(
pointClassify
.
getId
());
newPointClassify
.
setId
(
pointClassify
.
getId
());
List
<
PointInputItemVo
>
oldInputItemList
=
iPointService
.
queryOldPointInputItem
(
pointClassify
.
getPoin
tId
());
// 新的巡检项的补集,即需要删除的项
List
<
PointInputItemVo
>
oldInputItemList
=
iPointService
.
queryOldPointInputItemNew
(
pointClassify
.
getPointId
(),
pointClassify
.
ge
tId
());
// 新的巡检项的补集,即需要删除的项
List
<
PointInputItemVo
>
newInputItemList
=
new
ArrayList
<>();
List
<
PointInputItemVo
>
newInputItemList
=
new
ArrayList
<>();
List
<
PointInputItemVo
>
classList
=
pointClassify
.
getEquipIputDetailData
();
List
<
PointInputItemVo
>
classList
=
pointClassify
.
getEquipIputDetailData
();
newInputItemList
.
addAll
(
classList
);
newInputItemList
.
addAll
(
classList
);
...
@@ -334,23 +334,26 @@ public class PointController extends AbstractBaseController {
...
@@ -334,23 +334,26 @@ public class PointController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"删除巡查对象"
,
notes
=
"删除巡查对象"
)
@ApiOperation
(
value
=
"删除巡查对象"
,
notes
=
"删除巡查对象"
)
@
Get
Mapping
(
value
=
"/deletPointClassify"
,
produces
=
"application/json;charset=UTF-8"
)
@
Delete
Mapping
(
value
=
"/deletPointClassify"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
deletPointClassify
(
@ApiParam
(
value
=
"巡查对象id"
,
required
=
true
)
@RequestParam
L
ong
id
)
{
public
CommonResponse
deletPointClassify
(
@ApiParam
(
value
=
"巡查对象id"
,
required
=
true
)
@RequestParam
L
ist
<
Long
>
ids
)
{
try
{
try
{
//如果点下只有一个对象,并且点已经关联线路就不能删除
for
(
Long
id
:
ids
)
{
PointClassify
pointClassify
=
iPointClassifyDao
.
getOne
(
id
);
PointClassify
pointClassify
=
iPointClassifyDao
.
getOne
(
id
);
List
<
PointClassify
>
list
=
iPointClassifyDao
.
getPointClassifyByPointId
(
pointClassify
.
getPointId
());
List
<
PointClassify
>
list
=
iPointClassifyDao
.
getPointClassifyByPointId
(
pointClassify
.
getPointId
());
List
<
RoutePointItem
>
listp
=
iRoutePointItemDao
.
getRoutePointItemByPointId
(
pointClassify
.
getPointId
());
List
<
RoutePointItem
>
listp
=
iRoutePointItemDao
.
getRoutePointItemByPointId
(
pointClassify
.
getPointId
());
if
(
list
.
size
()==
1
&&
listp
!=
null
&&
listp
.
size
()>
0
){
if
(
list
.
size
()==
1
&&
listp
!=
null
&&
listp
.
size
()>
0
){
return
CommonResponseUtil
.
failure
(
"巡查点已绑定路线,最少保留一个巡查对象!"
);
return
CommonResponseUtil
.
failure
(
"巡查点已绑定路线,最少保留一个巡查对象!"
);
}
//删除对象
iPointClassifyDao
.
deleteById
(
id
);
//删除检查项
iPointInputItemDao
.
deleteClassifyId
(
id
);
//删除巡检路线和项的关系表
iRoutePointItemDao
.
delRoutePointItemByPointClassifyId
(
id
);
}
}
//删除对象
iPointClassifyDao
.
deleteById
(
id
);
//删除检查项
iPointInputItemDao
.
deleteClassifyId
(
id
);
//删除巡检路线和项的关系表
iRoutePointItemDao
.
delRoutePointItemByPointClassifyId
(
id
);
//如果点下只有一个对象,并且点已经关联线路就不能删除
return
CommonResponseUtil
.
success
();
return
CommonResponseUtil
.
success
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PointServiceImpl.java
View file @
3ba88fbc
...
@@ -1480,6 +1480,19 @@ public class PointServiceImpl implements IPointService {
...
@@ -1480,6 +1480,19 @@ public class PointServiceImpl implements IPointService {
return
list
;
return
list
;
}
}
public
List
<
PointInputItemVo
>
queryOldPointInputItemNew
(
Long
pointId
,
Long
classifyId
)
{
List
<
PointInputItemVo
>
inputItemList
=
pointMapper
.
getPointInputItemById1
(
pointId
,
classifyId
);
Map
<
Long
,
PointInputItemVo
>
itemMap
=
new
HashMap
<>();
for
(
PointInputItemVo
itemVo
:
inputItemList
)
{
itemMap
.
put
(
itemVo
.
getPointItemId
(),
itemVo
);
}
List
<
PointInputItemVo
>
list
=
new
ArrayList
<>();
itemMap
.
values
().
forEach
(
item
->
{
list
.
add
(
item
);
});
return
list
;
}
@Override
@Override
public
List
<
PointResponse
>
getPointConfigDom
()
{
public
List
<
PointResponse
>
getPointConfigDom
()
{
// TODO Auto-generated method stub
// TODO Auto-generated method stub
...
@@ -1632,9 +1645,6 @@ public class PointServiceImpl implements IPointService {
...
@@ -1632,9 +1645,6 @@ public class PointServiceImpl implements IPointService {
@Override
@Override
public
Page
queryPointList4RouteNew
(
String
bizOrgCode
,
Long
riskSourceId
,
String
pointNo
,
String
name
,
int
current
,
int
size
)
{
public
Page
queryPointList4RouteNew
(
String
bizOrgCode
,
Long
riskSourceId
,
String
pointNo
,
String
name
,
int
current
,
int
size
)
{
if
(
current
<
1
||
size
<
0
)
{
throw
new
RuntimeException
(
"查询条件有误"
);
}
List
<
Long
>
structureIdList
=
null
;
List
<
Long
>
structureIdList
=
null
;
List
<
Map
<
String
,
Object
>>
list
=
Collections
.
EMPTY_LIST
;
List
<
Map
<
String
,
Object
>>
list
=
Collections
.
EMPTY_LIST
;
// 传入riskSourceId为-2请求的是巡检点区域为空
// 传入riskSourceId为-2请求的是巡检点区域为空
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/intfc/IPointService.java
View file @
3ba88fbc
...
@@ -371,4 +371,6 @@ public interface IPointService {
...
@@ -371,4 +371,6 @@ public interface IPointService {
void
syncPointClassify
(
Map
<
String
,
Object
>
map
);
void
syncPointClassify
(
Map
<
String
,
Object
>
map
);
List
<
PointInputItemVo
>
queryOldPointInputItemNew
(
Long
pointId
,
Long
id
);
}
}
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