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
2d0b603f
Commit
2d0b603f
authored
Jul 27, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_dl_plan6_temp' of…
Merge branch 'develop_dl_plan6_temp' of
http://39.98.45.134:8090/moa/amos-boot-biz
into develop_dl_plan6_temp
parents
491fb535
28833971
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
3 deletions
+66
-3
RouteController.java
...join/amos/patrol/business/controller/RouteController.java
+30
-2
RouteServiceImpl.java
...n/amos/patrol/business/service/impl/RouteServiceImpl.java
+33
-0
IRouteService.java
...oin/amos/patrol/business/service/intfc/IRouteService.java
+3
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/RouteController.java
View file @
2d0b603f
...
...
@@ -655,7 +655,32 @@ public class RouteController extends AbstractBaseController {
return
CommonResponseUtil
.
failure
(
"修改巡检线路点的巡检项失败"
);
}
}
/**
* 修改巡检线路点的巡检项
*
* @param routeId
* @param pointId
* @param inputItemIds
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"修改巡检线路点的巡检项新"
,
notes
=
"修改巡检线路点的巡检项新"
)
@PostMapping
(
value
=
"/updateRoutePointInputItemNew"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
updateRoutePointInputItemNew
(
@ApiParam
(
value
=
"巡检路线id"
,
required
=
true
)
@RequestParam
Long
routeId
,
@ApiParam
(
value
=
"巡检点id"
,
required
=
true
)
@RequestParam
Long
pointId
,
@ApiParam
(
value
=
"巡检点巡检项id"
,
required
=
true
)
@RequestParam
List
<
Long
>
inputItemIds
)
{
try
{
routeService
.
updateRoutePointInputItemNew
(
routeId
,
pointId
,
inputItemIds
.
toArray
(
new
Long
[
0
]));
return
CommonResponseUtil
.
success
();
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResponseUtil
.
failure
(
"修改巡检线路点的巡检项失败"
);
}
}
/**
* 根据巡检路线ID获取该路线上的所有点ID
* @return IDs
...
...
@@ -710,7 +735,10 @@ public class RouteController extends AbstractBaseController {
@PutMapping
(
value
=
"/relevancyPoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
relevancyPoint
(
@ApiParam
(
value
=
"巡检路线"
,
required
=
true
)
@RequestBody
Route
route
)
{
try
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
getOrgCode
(
reginParams
);
route
.
setOrgCode
(
orgCode
);
route
.
setCreatorId
(
getUserId
());
return
CommonResponseUtil
.
success
(
routeService
.
relevancyPoint
(
route
));
}
catch
(
Exception
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/RouteServiceImpl.java
View file @
2d0b603f
...
...
@@ -570,6 +570,39 @@ public class RouteServiceImpl implements IRouteService {
iRoutePointItemDao
.
saveAll
(
routePointList
);
}
@Transactional
public
void
updateRoutePointInputItemNew
(
Long
routeId
,
Long
pointId
,
Long
[]
inputItemIds
)
{
Long
[]
pointIds
=
{
pointId
};
String
creatorId
=
""
;
long
routePointId
=
0
;
RoutePoint
routePoint
=
null
;
// 1.先查找并删除表中已有的行(旧的项)
List
<
RoutePoint
>
oldRoutePointList
=
iRoutePointDao
.
queryRoutePoint
(
routeId
,
pointIds
);
if
(
oldRoutePointList
.
size
()
>
0
)
{
routePoint
=
oldRoutePointList
.
get
(
0
);
creatorId
=
routePoint
.
getCreatorId
();
routePointId
=
routePoint
.
getId
();
}
iRoutePointItemDao
.
delRoutePointItem
(
routePointId
);
// 2.保存新的项到数据库
List
<
RoutePointItem
>
routePointList
=
new
ArrayList
<>();
int
orderNo
=
0
;
for
(
Long
inputItemId
:
inputItemIds
)
{
// PointInputItem pointInputItem = iPointInputItemDao.getPointInputItem(pointId, inputItemId);
RoutePointItem
routePointItem
=
new
RoutePointItem
();
routePointItem
.
setCreatorId
(
creatorId
);
routePointItem
.
setOrderNo
(
orderNo
++);
routePointItem
.
setPointInputItemId
(
inputItemId
);
routePointItem
.
setRoutePointId
(
routePointId
);
routePointItem
.
setRoutePoint
(
routePoint
);
routePointList
.
add
(
routePointItem
);
}
iRoutePointItemDao
.
saveAll
(
routePointList
);
}
@Override
public
List
<
Route
>
queryRouteInfo
(
List
<
DaoCriteria
>
criterias
)
{
BaseQuerySpecification
<
Route
>
spec
=
new
BaseQuerySpecification
<>(
criterias
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/intfc/IRouteService.java
View file @
2d0b603f
...
...
@@ -138,7 +138,9 @@ public interface IRouteService {
* @param pointId
*/
void
updateRoutePointInputItem
(
Long
routeId
,
Long
pointId
,
Long
[]
inputItemIds
);
void
updateRoutePointInputItemNew
(
Long
routeId
,
Long
pointId
,
Long
[]
inputItemIds
);
/**
* 列出巡检点的巡检项及其分类
*
...
...
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