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
a5ecc676
Commit
a5ecc676
authored
Aug 19, 2021
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.路线编辑删除点,增加约束,级联删除关联的任务点
parent
d01dfa5b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
38 deletions
+39
-38
PlanTaskController.java
...s/maintenance/business/controller/PlanTaskController.java
+21
-21
PlanTaskDetailMapper.java
...maintenance/business/dao/mapper/PlanTaskDetailMapper.java
+2
-0
RouteServiceImpl.java
...s/maintenance/business/service/impl/RouteServiceImpl.java
+7
-15
dbTemplate_plan_task.xml
...nce/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+2
-0
plan_task_detail.xml
...tenance/src/main/resources/db/mapper/plan_task_detail.xml
+7
-2
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/PlanTaskController.java
View file @
a5ecc676
...
...
@@ -186,27 +186,6 @@ public class PlanTaskController extends AbstractBaseController {
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"维保设施分页列表-mobile"
,
notes
=
"维保设施分页列表-mobile"
)
@RequestMapping
(
value
=
"/point/{planTaskId}/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
qryPlanTaskById
(
@ApiParam
(
value
=
"巡检计划任务ID"
,
required
=
true
)
@PathVariable
Long
planTaskId
,
@ApiParam
(
value
=
"建筑id"
,
required
=
true
)
@RequestParam
(
value
=
"buildingId"
,
required
=
false
)
String
buildingId
,
@ApiParam
(
value
=
"维保状态"
,
required
=
true
)
@RequestParam
(
value
=
"isFinish"
,
required
=
false
)
String
isFinish
,
@ApiParam
(
value
=
"消防系统id"
,
required
=
true
)
@RequestParam
(
value
=
"systemId"
,
required
=
false
)
String
systemId
,
@ApiParam
(
value
=
"设备编号"
,
required
=
true
)
@RequestParam
(
value
=
"pointNo"
,
required
=
false
)
String
pointNo
,
@ApiParam
(
value
=
"设备名称"
,
required
=
true
)
@RequestParam
(
value
=
"pointName"
,
required
=
false
)
String
pointName
)
{
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"planTaskId"
,
planTaskId
);
param
.
put
(
"buildingId"
,
buildingId
);
param
.
put
(
"isFinish"
,
isFinish
);
param
.
put
(
"systemId"
,
systemId
);
param
.
put
(
"pointNo"
,
pointNo
);
param
.
put
(
"pointName"
,
pointName
);
return
CommonResponseUtil
.
success
(
planTaskService
.
getPlanTaskPoints
(
param
));
}
/**
* 查询任务列表
*
...
...
@@ -243,6 +222,27 @@ public class PlanTaskController extends AbstractBaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"维保设施分页列表-mobile"
,
notes
=
"维保设施分页列表-mobile"
)
@RequestMapping
(
value
=
"/point/{planTaskId}/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
qryPlanTaskById
(
@ApiParam
(
value
=
"巡检计划任务ID"
,
required
=
true
)
@PathVariable
Long
planTaskId
,
@ApiParam
(
value
=
"建筑id"
,
required
=
true
)
@RequestParam
(
value
=
"buildingId"
,
required
=
false
)
String
buildingId
,
@ApiParam
(
value
=
"维保状态"
,
required
=
true
)
@RequestParam
(
value
=
"isFinish"
,
required
=
false
)
String
isFinish
,
@ApiParam
(
value
=
"消防系统id"
,
required
=
true
)
@RequestParam
(
value
=
"systemId"
,
required
=
false
)
String
systemId
,
@ApiParam
(
value
=
"设备编号"
,
required
=
true
)
@RequestParam
(
value
=
"pointNo"
,
required
=
false
)
String
pointNo
,
@ApiParam
(
value
=
"设备名称"
,
required
=
true
)
@RequestParam
(
value
=
"pointName"
,
required
=
false
)
String
pointName
)
{
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"planTaskId"
,
planTaskId
);
param
.
put
(
"buildingId"
,
buildingId
);
param
.
put
(
"isFinish"
,
isFinish
);
param
.
put
(
"systemId"
,
systemId
);
param
.
put
(
"pointNo"
,
pointNo
);
param
.
put
(
"pointName"
,
pointName
);
return
CommonResponseUtil
.
success
(
planTaskService
.
getPlanTaskPoints
(
param
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询维保设施,检查内容详情"
)
@GetMapping
(
value
=
"/task-point-detail"
)
public
CommonResponse
planTaskPointDetail
(
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/dao/mapper/PlanTaskDetailMapper.java
View file @
a5ecc676
...
...
@@ -9,4 +9,6 @@ public interface PlanTaskDetailMapper extends BaseMapper {
,
@Param
(
value
=
"executorId"
)
String
executorId
);
Map
findPlanTaskByTaskIdAndPointId
(
@Param
(
value
=
"planTaskId"
)
long
planTaskId
,
@Param
(
value
=
"pointId"
)
long
pointId
);
void
deleteByPointIdAndRouteId
(
@Param
(
"pointId"
)
long
pointId
,
@Param
(
"routeId"
)
long
routeId
);
}
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 @
a5ecc676
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
service
.
impl
;
import
com.yeejoin.amos.maintenance.business.constants.XJConstant
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.InputItemMapper
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.PointMapper
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.PlanTaskDetailMapper
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.RouteMapper
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.RoutePointItemMapper
;
import
com.yeejoin.amos.maintenance.business.dao.repository.*
;
import
com.yeejoin.amos.maintenance.business.param.RoutePageParam
;
import
com.yeejoin.amos.maintenance.business.service.intfc.IPlanService
;
...
...
@@ -18,7 +16,6 @@ import com.yeejoin.amos.maintenance.core.common.response.RoutePointRespone;
import
com.yeejoin.amos.maintenance.core.util.query.BaseQuerySpecification
;
import
com.yeejoin.amos.maintenance.dao.entity.*
;
import
com.yeejoin.amos.maintenance.exception.YeeException
;
import
com.yeejoin.amos.maintenance.feign.RemoteSecurityService
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
...
...
@@ -53,15 +50,6 @@ public class RouteServiceImpl implements IRouteService {
@Resource
private
RouteMapper
routeMapper
;
@Resource
private
PointMapper
pointMapper
;
@Resource
private
InputItemMapper
inputItemMapper
;
@Resource
private
RoutePointItemMapper
routePointItemMapper
;
@Autowired
private
IPointInputItemDao
iPointInputItemDao
;
...
...
@@ -72,9 +60,10 @@ public class RouteServiceImpl implements IRouteService {
private
IPlanTaskService
planTaskService
;
@Autowired
private
IRoutePointItemDao
iRoutePointItemDao
;
PlanTaskDetailMapper
planTaskDetailMapper
;
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
private
IRoutePointItemDao
iRoutePointItemDao
;
@Override
@Transactional
...
...
@@ -119,6 +108,7 @@ public class RouteServiceImpl implements IRouteService {
Long
routeId
=
route
.
getId
();
String
orgCode
=
route
.
getOrgCode
();
String
creatorId
=
route
.
getCreatorId
();
Route
finalRoute
=
route
;
routePoints
.
forEach
(
rp
->
{
rp
.
setOrgCode
(
orgCode
);
rp
.
setRouteId
(
routeId
);
...
...
@@ -126,6 +116,8 @@ public class RouteServiceImpl implements IRouteService {
if
(
rp
.
getIsDelete
())
{
iRoutePointItemDao
.
delRoutePointItem
(
rp
.
getId
());
iRoutePointDao
.
deleteById
(
rp
.
getId
());
//删除p_plan_task_detail 对应点
planTaskDetailMapper
.
deleteByPointIdAndRouteId
(
rp
.
getPointId
(),
finalRoute
.
getId
());
}
else
{
List
<
RoutePointItem
>
routePointItems
=
rp
.
getRoutePointItem
();
iRoutePointDao
.
saveAndFlush
(
rp
);
...
...
amos-boot-system-maintenance/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
a5ecc676
...
...
@@ -205,6 +205,7 @@
p_plan_task pt
INNER JOIN p_plan p ON pt.plan_id = p.id
INNER JOIN p_route r on r.id = pt.route_id
where pt.status = 0
) a
<include
refid=
"mobile-plan-task-where"
/>
<if
test=
"orderBy != null and orderBy != ''"
>
order by ${orderBy}
</if>
...
...
@@ -263,6 +264,7 @@
p_plan_task pt
INNER JOIN p_plan p ON pt.plan_id = p.id
INNER JOIN p_route r on r.id = pt.route_id
where pt.status = 0
) a
<include
refid=
"mobile-plan-task-where"
/>
</select>
...
...
amos-boot-system-maintenance/src/main/resources/db/mapper/plan_task_detail.xml
View file @
a5ecc676
...
...
@@ -5,8 +5,13 @@
<update
id=
"finishTaskDetail"
>
call updatePlanTask(#{planTaskId}, #{pointId}, #{planTaskDetailId} ,#{executorId})
</update>
<select
id=
"findPlanTaskByTaskIdAndPointId"
resultType=
"Map"
>
<delete
id=
"deleteByPointIdAndRouteId"
>
delete FROM `p_plan_task_detail`
where
point_id = #{pointId}
and task_no in (select id from p_plan_task t where t.route_id = #{routeId}) ;
</delete>
<select
id=
"findPlanTaskByTaskIdAndPointId"
resultType=
"Map"
>
SELECT
p.name planName, pt.begin_time beginTime, pt.end_time endTime, pp.name pointName, pp.point_no pointNo, ptd.id planTaskDetailId, pt.route_id routeId, pr.name routeName
FROM
...
...
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