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
eb36129d
Commit
eb36129d
authored
Nov 21, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新索引--涉及任务下发、定时器修改、任务执行
parent
b585659a
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
63 additions
and
2 deletions
+63
-2
ESPlanTaskListDto.java
...com/yeejoin/amos/patrol/dao/entity/ESPlanTaskListDto.java
+3
-0
ESTaskDetailDto.java
...a/com/yeejoin/amos/patrol/dao/entity/ESTaskDetailDto.java
+6
-0
PlanTaskDetail.java
...va/com/yeejoin/amos/patrol/dao/entity/PlanTaskDetail.java
+20
-0
PointMapper.java
.../yeejoin/amos/patrol/business/dao/mapper/PointMapper.java
+3
-0
IRoutePointDao.java
...n/amos/patrol/business/dao/repository/IRoutePointDao.java
+1
-1
PlanTaskServiceImpl.java
...mos/patrol/business/service/impl/PlanTaskServiceImpl.java
+19
-0
JobService.java
.../main/java/com/yeejoin/amos/patrol/quartz/JobService.java
+6
-1
pointMapper.xml
...zspatrol-biz/src/main/resources/db/mapper/pointMapper.xml
+5
-0
No files found.
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-api/src/main/java/com/yeejoin/amos/patrol/dao/entity/ESPlanTaskListDto.java
View file @
eb36129d
...
...
@@ -36,6 +36,9 @@ public class ESPlanTaskListDto {
private
String
taskName
;
@Field
(
type
=
FieldType
.
Text
)
private
String
type
;
@Field
(
type
=
FieldType
.
Text
)
private
String
beginTime
;
@Field
(
type
=
FieldType
.
Text
)
...
...
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-api/src/main/java/com/yeejoin/amos/patrol/dao/entity/ESTaskDetailDto.java
View file @
eb36129d
...
...
@@ -22,9 +22,15 @@ public class ESTaskDetailDto {
@Id
private
String
id
;
@Field
(
type
=
FieldType
.
Text
)
private
String
pointId
;
@Field
(
type
=
FieldType
.
Text
)
private
String
planTaskId
;
@Field
(
type
=
FieldType
.
Text
)
private
String
pointName
;
@Field
(
type
=
FieldType
.
Text
)
...
...
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-api/src/main/java/com/yeejoin/amos/patrol/dao/entity/PlanTaskDetail.java
View file @
eb36129d
...
...
@@ -34,6 +34,18 @@ public class PlanTaskDetail extends BasicEntity {
*/
@Column
(
name
=
"executor_id"
)
private
String
executorId
;
/**
* 点名称
*/
@Column
(
name
=
"name"
)
private
String
name
;
/**
* 点编号
*/
@Column
(
name
=
"point_no"
)
private
String
pointNo
;
/**
* 执行时间
...
...
@@ -69,6 +81,14 @@ public class PlanTaskDetail extends BasicEntity {
this
.
pointId
=
pointId
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
void
setPointNo
(
String
pointNo
)
{
this
.
pointNo
=
pointNo
;
}
public
long
getTaskNo
()
{
return
this
.
taskNo
;
}
...
...
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/mapper/PointMapper.java
View file @
eb36129d
...
...
@@ -163,4 +163,7 @@ public interface PointMapper extends BaseMapper {
List
<
Point
>
findByName
(
@Param
(
value
=
"pointName"
)
String
pointName
,
@Param
(
value
=
"pointId"
)
String
pointId
);
List
<
Point
>
findByNo
(
@Param
(
value
=
"pointNo"
)
String
pointNo
,
@Param
(
value
=
"pointId"
)
String
pointId
);
Point
selectPointInfo
(
long
pointId
);
}
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/repository/IRoutePointDao.java
View file @
eb36129d
...
...
@@ -12,7 +12,7 @@ import java.util.List;
@Repository
(
"iRoutePointDao"
)
public
interface
IRoutePointDao
extends
BaseDao
<
RoutePoint
,
Long
>
{
@Query
(
value
=
"SELECT COUNT( point_id ) FROM p_route_point where route_id = ?1"
,
nativeQuery
=
true
)
@Query
(
value
=
"SELECT COUNT( point_id )
cont
FROM p_route_point where route_id = ?1"
,
nativeQuery
=
true
)
int
countRoutePoint
(
Long
routeId
);
@Query
(
value
=
"SELECT * FROM p_route_point where point_id = ?1"
,
nativeQuery
=
true
)
...
...
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PlanTaskServiceImpl.java
View file @
eb36129d
...
...
@@ -176,6 +176,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
@Autowired
private
ICheckShotDao
iCheckShotDao
;
@Autowired
PointMapper
pointMapper
;
@Autowired
private
RepositoryTs
repositoryTs
;
...
...
@@ -938,9 +940,20 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
List
<
PlanTaskDetail
>
planTaskDetailList
=
new
ArrayList
<>();
planTaskDetails
.
forEach
(
single
->
planTaskDetailList
.
add
(
single
));
for
(
PlanTaskDetail
taskDetail
:
planTaskDetailList
)
{
Point
point
=
pointMapper
.
selectPointInfo
(
taskDetail
.
getPointId
());
taskDetail
.
setName
(
point
.
getName
());
taskDetail
.
setPointNo
(
point
.
getPointNo
());
}
for
(
ESPlanTaskListDto
esPlanTaskListDto
:
esPlanTaskListDtos
)
{
esPlanTaskListDto
.
setPoints
(
planTaskDetailList
);
Map
task
=
queryPlanTaskById
(
Long
.
valueOf
(
esPlanTaskListDto
.
getPlanTaskId
()));
esPlanTaskListDto
.
setFinshNum
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"finshNum"
))
?
"0"
:
task
.
get
(
"finshNum"
).
toString
());
esPlanTaskListDto
.
setOmission
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"omission"
))
?
"0"
:
task
.
get
(
"omission"
).
toString
());
esPlanTaskListDto
.
setUnqualified
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"unqualified"
))
?
"0"
:
task
.
get
(
"unqualified"
).
toString
());
esPlanTaskListDto
.
setUnplan
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"unplan"
))
?
"0"
:
task
.
get
(
"unplan"
).
toString
());
esPlanTaskListDto
.
setTaskPlanNum
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"taskPlanNum"
))
?
"0"
:
task
.
get
(
"taskPlanNum"
).
toString
());
}
saveEsPlanTaskList
(
esPlanTaskListDtos
,
oldEsPlanTaskListDtos
);
// 定时任务监控
...
...
@@ -1287,6 +1300,12 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
ESPlanTaskListDto
esPlanTaskListDto
=
JSONObject
.
parseObject
(
toJSONString
(
planTask
),
ESPlanTaskListDto
.
class
);
Map
task
=
queryPlanTaskById
(
Long
.
valueOf
(
id
));
esPlanTaskListDto
.
setFinshNum
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"finshNum"
))
?
"0"
:
task
.
get
(
"finshNum"
).
toString
());
esPlanTaskListDto
.
setOmission
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"omission"
))
?
"0"
:
task
.
get
(
"omission"
).
toString
());
esPlanTaskListDto
.
setUnqualified
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"unqualified"
))
?
"0"
:
task
.
get
(
"unqualified"
).
toString
());
esPlanTaskListDto
.
setUnplan
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"unplan"
))
?
"0"
:
task
.
get
(
"unplan"
).
toString
());
esPlanTaskListDto
.
setTaskPlanNum
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"taskPlanNum"
))
?
"0"
:
task
.
get
(
"taskPlanNum"
).
toString
());
esPlanTaskListDto
.
setPoints
(
planTaskDetails
);
esPlanTaskList
.
save
(
esPlanTaskListDto
);
// 生成巡检记录
...
...
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/java/com/yeejoin/amos/patrol/quartz/JobService.java
View file @
eb36129d
...
...
@@ -23,7 +23,6 @@ import com.yeejoin.amos.patrol.business.param.CheckInputParam;
import
com.yeejoin.amos.patrol.business.param.MsgConfigParam
;
import
com.yeejoin.amos.patrol.business.service.intfc.IMessageService
;
import
com.yeejoin.amos.patrol.business.service.intfc.IPatrolDataSyncService
;
import
com.yeejoin.amos.patrol.business.service.intfc.IPlanTaskService
;
import
com.yeejoin.amos.patrol.business.util.DateUtil
;
import
com.yeejoin.amos.patrol.business.util.Toke
;
import
com.yeejoin.amos.patrol.common.enums.*
;
...
...
@@ -225,6 +224,12 @@ public class JobService implements IJobService {
ESPlanTaskListDto
esPlanTaskListDto
=
new
ESPlanTaskListDto
();
esPlanTaskListDto
.
setPlanTaskId
(
id
);
esPlanTaskListDto
.
setFinishStatus
(
String
.
valueOf
(
status
));
Map
task
=
planTaskMapper
.
queryPlanTaskById
(
Long
.
valueOf
(
id
));
esPlanTaskListDto
.
setFinshNum
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"finshNum"
))
?
"0"
:
task
.
get
(
"finshNum"
).
toString
());
esPlanTaskListDto
.
setOmission
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"omission"
))
?
"0"
:
task
.
get
(
"omission"
).
toString
());
esPlanTaskListDto
.
setUnqualified
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"unqualified"
))
?
"0"
:
task
.
get
(
"unqualified"
).
toString
());
esPlanTaskListDto
.
setUnplan
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"unplan"
))
?
"0"
:
task
.
get
(
"unplan"
).
toString
());
esPlanTaskListDto
.
setTaskPlanNum
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"taskPlanNum"
))
?
"0"
:
task
.
get
(
"taskPlanNum"
).
toString
());
List
<
PlanTaskDetail
>
planTaskDetailList
=
planTaskMapper
.
selectTaskDetails
(
id
);
esPlanTaskListDto
.
setPoints
(
planTaskDetailList
);
esPlanTaskListDtos
.
add
(
esPlanTaskListDto
);
...
...
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/resources/db/mapper/pointMapper.xml
View file @
eb36129d
...
...
@@ -1509,4 +1509,8 @@
AND pp.id != #{pointId}
</if>
</select>
<select
id=
"selectPointInfo"
resultType=
"com.yeejoin.amos.patrol.dao.entity.Point"
>
select * from p_point where id = #{pointId}
</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