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
4687dce0
Commit
4687dce0
authored
Jul 27, 2022
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加检查项绑定
parent
19720387
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
3 deletions
+48
-3
RouteServiceImpl.java
...s/maintenance/business/service/impl/RouteServiceImpl.java
+1
-1
PointController.java
...join/amos/patrol/business/controller/PointController.java
+10
-0
IPointInputItemDao.java
...os/patrol/business/dao/repository/IPointInputItemDao.java
+3
-0
IRoutePointItemDao.java
...os/patrol/business/dao/repository/IRoutePointItemDao.java
+4
-1
PointServiceImpl.java
...n/amos/patrol/business/service/impl/PointServiceImpl.java
+26
-0
IPointService.java
...oin/amos/patrol/business/service/intfc/IPointService.java
+2
-0
routeMapper.xml
...ystem-patrol/src/main/resources/db/mapper/routeMapper.xml
+2
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/impl/RouteServiceImpl.java
View file @
4687dce0
...
...
@@ -339,7 +339,7 @@ public class RouteServiceImpl implements IRouteService {
routePointItem
.
setPointInputItemId
(
pointInputItem
.
getId
());
routePointItem
.
setRoutePointId
(
routePointId
);
routePointItem
.
setRoutePoint
(
routePoint
);
routePointItem
.
setPointClassifyId
(
Long
.
valueOf
(
pointInputItem
.
getClassifyIds
()));
routePointList
.
add
(
routePointItem
);
}
iRoutePointItemDao
.
saveAll
(
routePointList
);
...
...
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 @
4687dce0
...
...
@@ -1280,6 +1280,16 @@ public class PointController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
iPointService
.
queryItemList4RoutePoint
(
pointId
,
classifyId
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新*查询巡检点对应设备列表新"
,
notes
=
"新*查询巡检点对应设备列表新"
)
@GetMapping
(
value
=
"/newQueryByIds"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryItemList4RoutePointNew
(
@ApiParam
(
value
=
"巡检点ID"
)
@RequestParam
(
value
=
"pointId"
)
Long
pointId
,
@ApiParam
(
value
=
"设备ID"
)
@RequestParam
(
value
=
"classifyId"
)
Long
classifyId
,
@ApiParam
(
value
=
"路线ID"
)
@RequestParam
(
value
=
"routeId"
)
Long
routeId
)
{
return
CommonResponseUtil
.
success
(
iPointService
.
queryItemList4RoutePointNew
(
routeId
,
pointId
,
classifyId
));
}
/**
* 更新巡检点
*
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/repository/IPointInputItemDao.java
View file @
4687dce0
...
...
@@ -51,4 +51,7 @@ public interface IPointInputItemDao extends BaseDao<PointInputItem, Long> {
@Transactional
@Query
(
value
=
"DELETE FROM p_point_inputitem WHERE classify_ids IN (?1)"
,
nativeQuery
=
true
)
void
deleteClassifyId
(
Long
classifyId
);
@Query
(
value
=
"SELECT input_item_id FROM p_point_inputitem WHERE id IN (?1) "
,
nativeQuery
=
true
)
List
<
String
>
selectItemIdByid
(
List
<
String
>
ids
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/repository/IRoutePointItemDao.java
View file @
4687dce0
...
...
@@ -52,5 +52,8 @@ public interface IRoutePointItemDao extends BaseDao<RoutePointItem, Long> {
@Query
(
value
=
"SELECT prpi.* FROM p_route_point_item prpi LEFT JOIN p_route_point prp ON prp.id = prpi.route_point_id WHERE prp.point_id = ?1"
,
nativeQuery
=
true
)
List
<
RoutePointItem
>
getRoutePointItemByPointId
(
Long
pointId
);
@Modifying
@Transactional
@Query
(
value
=
"SELECT point_input_item_id from p_route_point_item WHERE route_point_id in (?1)"
,
nativeQuery
=
true
)
List
<
String
>
selectByroutePointIds
(
List
<
String
>
routePointIds
);
}
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 @
4687dce0
...
...
@@ -789,6 +789,32 @@ public class PointServiceImpl implements IPointService {
}
@Override
public
List
queryItemList4RoutePointNew
(
Long
routeId
,
Long
pointId
,
Long
classifyId
)
{
if
(
pointId
==
null
||
classifyId
==
null
)
{
throw
new
RuntimeException
(
"查询条件有误"
);
}
List
<
Map
<
String
,
Object
>>
resList
=
pointMapper
.
queryItemList4RoutePoint
(
pointId
,
classifyId
);
//给前端返回是否绑定标识
Long
[]
longs
=
new
Long
[]{
pointId
};
List
<
RoutePoint
>
list
=
iRoutePointDao
.
queryRoutePoint
(
routeId
,
longs
);
List
<
String
>
rouPonintId
=
new
ArrayList
<>();
list
.
forEach
(
e
->
rouPonintId
.
add
(
String
.
valueOf
(
e
.
getId
())));
List
<
String
>
strings
=
iRoutePointItemDao
.
selectByroutePointIds
(
rouPonintId
);
String
ids
=
StringUtils
.
join
(
strings
.
toArray
(),
","
);
resList
.
forEach
(
e
->{
if
(
ids
.
contains
(
e
.
get
(
"itemId"
).
toString
())){
e
.
put
(
"checked"
,
false
);
}
else
{
e
.
put
(
"checked"
,
true
);
}
});
return
resList
;
}
@Override
public
Page
<
List
<
Point
>>
queryPointInfoPage
(
List
<
DaoCriteria
>
criterias
)
{
// TODO Auto-generated method stub
return
null
;
...
...
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 @
4687dce0
...
...
@@ -98,6 +98,8 @@ public interface IPointService {
*/
Point
queryPointById
(
Long
id
);
List
queryItemList4RoutePointNew
(
Long
routeId
,
Long
pointId
,
Long
classifyId
);
/**
* 查询巡检点信息
*/
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/routeMapper.xml
View file @
4687dce0
...
...
@@ -402,6 +402,6 @@
</select>
<select
id=
"queryRoutesByOrgCode"
resultType=
"com.yeejoin.amos.patrol.dao.entity.Route"
>
SELECT * FROM p_route r where r.is_delete = 0 and r.biz_org_code like CONCAT( #{orgCode}, '%')
)
SELECT * FROM p_route r where r.is_delete = 0 and r.biz_org_code like CONCAT( #{orgCode}, '%')
</select>
</mapper>
\ 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