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
afc9e3c1
Commit
afc9e3c1
authored
Nov 21, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新索引--涉及任务下发、定时器修改、任务执行
parent
eb36129d
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
185 additions
and
102 deletions
+185
-102
AppPointCheckRespone.java
...mos/patrol/core/common/response/AppPointCheckRespone.java
+18
-0
ESTaskDetailDto.java
...a/com/yeejoin/amos/patrol/dao/entity/ESTaskDetailDto.java
+2
-2
PointCheckDetailBo.java
...os/patrol/business/entity/mybatis/PointCheckDetailBo.java
+6
-1
PlanServiceImpl.java
...in/amos/patrol/business/service/impl/PlanServiceImpl.java
+108
-3
PlanTaskServiceImpl.java
...mos/patrol/business/service/impl/PlanTaskServiceImpl.java
+19
-89
IPlanService.java
...join/amos/patrol/business/service/intfc/IPlanService.java
+9
-0
IPlanTaskService.java
.../amos/patrol/business/service/intfc/IPlanTaskService.java
+0
-7
JobService.java
.../main/java/com/yeejoin/amos/patrol/quartz/JobService.java
+21
-0
dbTemplate_plan_task.xml
...biz/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+2
-0
No files found.
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-api/src/main/java/com/yeejoin/amos/patrol/core/common/response/AppPointCheckRespone.java
View file @
afc9e3c1
...
...
@@ -9,7 +9,10 @@ import java.util.List;
public
class
AppPointCheckRespone
{
private
long
id
;
private
long
pointId
;
private
long
planTaskId
;
private
String
pointName
;
...
...
@@ -175,11 +178,26 @@ public class AppPointCheckRespone {
public
long
getPointId
()
{
return
pointId
;
}
public
long
getPlanTaskId
()
{
return
planTaskId
;
}
public
long
getId
()
{
return
id
;
}
public
void
setPointId
(
long
pointId
)
{
this
.
pointId
=
pointId
;
}
public
void
setId
(
long
id
)
{
this
.
id
=
id
;
}
public
void
setPlanTaskId
(
long
planTaskId
)
{
this
.
planTaskId
=
planTaskId
;
}
public
String
getRemark
()
{
return
remark
;
}
...
...
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 @
afc9e3c1
...
...
@@ -22,7 +22,7 @@ public class ESTaskDetailDto {
@Id
private
Stri
ng
id
;
private
Lo
ng
id
;
@Field
(
type
=
FieldType
.
Text
)
private
String
pointId
;
...
...
@@ -86,7 +86,7 @@ public class ESTaskDetailDto {
@Field
(
type
=
FieldType
.
Text
)
private
List
<
String
>
pointImgUrls
;
@Field
(
type
=
FieldType
.
Tex
t
)
@Field
(
type
=
FieldType
.
Objec
t
)
private
JSONObject
appCheckInput
;
...
...
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/java/com/yeejoin/amos/patrol/business/entity/mybatis/PointCheckDetailBo.java
View file @
afc9e3c1
...
...
@@ -3,7 +3,8 @@ package com.yeejoin.amos.patrol.business.entity.mybatis;
import
java.util.Date
;
public
class
PointCheckDetailBo
{
private
Long
id
;
private
long
pointId
;
private
String
pointName
;
...
...
@@ -18,6 +19,10 @@ public class PointCheckDetailBo {
private
String
defaultValue
;
public
long
getId
()
{
return
id
;
}
public
String
getDefaultValue
()
{
return
defaultValue
;
}
...
...
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PlanServiceImpl.java
View file @
afc9e3c1
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.patrol.business.constants.XJConstant
;
import
com.yeejoin.amos.patrol.business.dao.mapper.PlanMapper
;
import
com.yeejoin.amos.patrol.business.dao.
repository.IPlanDao
;
import
com.yeejoin.amos.patrol.business.dao.repository.
IPlanTaskDao
;
import
com.yeejoin.amos.patrol.business.
dao.repository.IPlanTaskDetailDa
o
;
import
com.yeejoin.amos.patrol.business.dao.
mapper.PlanTaskMapper
;
import
com.yeejoin.amos.patrol.business.dao.repository.
*
;
import
com.yeejoin.amos.patrol.business.
entity.mybatis.PointCheckDetailB
o
;
import
com.yeejoin.amos.patrol.business.param.PlanInfoPageParam
;
import
com.yeejoin.amos.patrol.business.service.intfc.ICheckService
;
import
com.yeejoin.amos.patrol.business.service.intfc.IPlanService
;
import
com.yeejoin.amos.patrol.core.common.response.AppCheckInputRespone
;
import
com.yeejoin.amos.patrol.core.common.response.AppPointCheckRespone
;
import
com.yeejoin.amos.patrol.core.util.DateUtil
;
import
com.yeejoin.amos.patrol.core.util.StringUtil
;
import
com.yeejoin.amos.patrol.dao.entity.Check
;
import
com.yeejoin.amos.patrol.dao.entity.CheckInput
;
import
com.yeejoin.amos.patrol.dao.entity.CheckShot
;
import
com.yeejoin.amos.patrol.dao.entity.Plan
;
import
liquibase.pro.packaged.L
;
import
org.slf4j.Logger
;
...
...
@@ -21,6 +28,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
(
"planService"
)
public
class
PlanServiceImpl
implements
IPlanService
{
...
...
@@ -44,7 +52,104 @@ public class PlanServiceImpl implements IPlanService {
Page
<
HashMap
<
String
,
Object
>>
result
=
new
PageImpl
<
HashMap
<
String
,
Object
>>(
content
,
param
,
total
);
return
result
;
}
@Autowired
private
ICheckDao
checkDao
;
@Autowired
private
ICheckService
checkService
;
@Autowired
PlanTaskMapper
planTaskMapper
;
@Autowired
private
ICheckShotDao
iCheckShotDao
;
@Override
public
AppPointCheckRespone
queryPointPlanTaskDetail
(
String
toke
,
String
product
,
String
appKey
,
Long
planTaskId
,
Long
pointId
)
{
AppPointCheckRespone
pointCheckRespone
=
new
AppPointCheckRespone
();
Check
check
=
checkDao
.
findByPlanTaskIdAndPointId
(
planTaskId
,
pointId
);
if
(
check
!=
null
)
{
pointCheckRespone
=
checkService
.
queryCheckPointDetailInVersion2
(
toke
,
product
,
appKey
,
check
.
getId
(),
planTaskId
,
pointId
);
}
else
{
PointCheckDetailBo
planPointInfo
=
planTaskMapper
.
getPointPlanTaskInfo
(
planTaskId
,
pointId
);
pointCheckRespone
.
setTaskStatus
(
planPointInfo
.
getTaskStatus
());
pointCheckRespone
.
setPointStatus
(
planPointInfo
.
getPointStatus
());
if
(
planPointInfo
!=
null
)
{
if
(
check
!=
null
)
{
List
<
CheckShot
>
checkShots
=
iCheckShotDao
.
findAllByCheckIdAndCheckInputId
(
check
.
getId
(),
0L
);
List
<
String
>
photos
=
new
ArrayList
<>();
if
(!
org
.
springframework
.
util
.
CollectionUtils
.
isEmpty
(
checkShots
))
{
photos
=
checkShots
.
stream
().
map
(
e
->
{
if
(
e
!=
null
)
{
return
e
.
getPhotoData
().
replaceAll
(
"\\\\"
,
"/"
);
}
else
{
return
""
;
}
}).
collect
(
Collectors
.
toList
());
}
pointCheckRespone
.
setPointImgUrls
(
photos
);
}
pointCheckRespone
.
setId
(
planPointInfo
.
getId
());
pointCheckRespone
.
setPlanTaskId
(
Long
.
valueOf
(
planPointInfo
.
getPlanTaskId
()));
pointCheckRespone
.
setPointId
(
pointId
);
pointCheckRespone
.
setPointName
(
planPointInfo
.
getPointName
());
pointCheckRespone
.
setPointNo
(
planPointInfo
.
getPointNo
());
pointCheckRespone
.
setBeginTime
(
planPointInfo
.
getBeginTime
());
pointCheckRespone
.
setEndTime
(
planPointInfo
.
getEndTime
());
pointCheckRespone
.
setPlanName
(
planPointInfo
.
getPlanName
());
pointCheckRespone
.
setShortMaxNumber
(
planPointInfo
.
getShortMaxNumber
());
pointCheckRespone
.
setShortMinNumber
(
planPointInfo
.
getShortMinNumber
());
List
<
PointCheckDetailBo
>
pointInputs
=
planTaskMapper
.
getPointInputByRouteIdAndPointId
(
planPointInfo
.
getRouteId
(),
planPointInfo
.
getPointId
());
JSONObject
appResponeMap
=
new
JSONObject
();
List
<
AppCheckInputRespone
>
appCheckInputResponeList
=
new
ArrayList
<
AppCheckInputRespone
>();
pointInputs
.
forEach
(
action
->
{
AppCheckInputRespone
input
=
new
AppCheckInputRespone
();
input
.
setInputName
(
action
.
getInputName
());
input
.
setCheckInputId
(
action
.
getCheckInputId
());
input
.
setDefaultValue
(
action
.
getDefaultValue
());
input
.
setDataJson
(
action
.
getDataJson
());
input
.
setIsMultiline
(
action
.
getIsMultiline
());
input
.
setIsMust
(
action
.
getIsMust
());
input
.
setInputValue
(
null
);
if
(
null
!=
check
)
{
for
(
CheckInput
ck
:
check
.
getCheckInput
()
)
{
if
(
ck
.
getInputId
().
toString
().
equals
(
String
.
valueOf
(
action
.
getCheckInputId
())))
{
input
.
setInputValue
(
ck
.
getInputValue
());
}
}
List
<
CheckShot
>
checkShotsNew
=
iCheckShotDao
.
findAllByCheckIdAndCheckInputId
(
check
.
getId
(),
action
.
getCheckInputId
());
List
<
String
>
photosNew
=
new
ArrayList
<>();
if
(!
org
.
springframework
.
util
.
CollectionUtils
.
isEmpty
(
checkShotsNew
))
{
photosNew
=
checkShotsNew
.
stream
().
map
(
e
->
{
if
(
e
!=
null
)
{
return
e
.
getPhotoData
().
replaceAll
(
"\\\\"
,
"/"
);
}
else
{
return
""
;
}
}).
collect
(
Collectors
.
toList
());
}
input
.
setPointInputImgUrls
(
photosNew
);
}
input
.
setItemType
(
action
.
getItemType
());
input
.
setOrderNo
(
action
.
getOrderNo
());
input
.
setPictureJson
(
action
.
getPictureJson
());
input
.
setClassifyId
(
action
.
getClassifyId
());
input
.
setClassifyName
(
action
.
getClassifyName
());
appCheckInputResponeList
.
add
(
input
);
});
appResponeMap
.
put
(
"items"
,
appCheckInputResponeList
);
pointCheckRespone
.
setAppCheckInput
(
appResponeMap
);
}
}
return
pointCheckRespone
;
}
@Override
public
Plan
addPlan
(
HashMap
<
String
,
Object
>
map
)
{
Plan
param
=
(
Plan
)
map
.
get
(
"param"
);
...
...
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 @
afc9e3c1
...
...
@@ -27,6 +27,7 @@ import com.yeejoin.amos.patrol.business.param.CheckPtListPageParam;
import
com.yeejoin.amos.patrol.business.param.PlanTaskPageParam
;
import
com.yeejoin.amos.patrol.business.service.intfc.ICheckService
;
import
com.yeejoin.amos.patrol.business.service.intfc.IPatrolDataSyncService
;
import
com.yeejoin.amos.patrol.business.service.intfc.IPlanService
;
import
com.yeejoin.amos.patrol.business.service.intfc.IPlanTaskService
;
import
com.yeejoin.amos.patrol.business.util.MyByteArrayMultipartFile
;
import
com.yeejoin.amos.patrol.business.util.PlanTaskUtil
;
...
...
@@ -115,6 +116,12 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
ESPlanTaskList
esPlanTaskList
;
@Autowired
ESTaskDetail
esTaskDetail
;
@Autowired
IPlanService
planService
;
@Autowired
PlanTaskMapper
planTaskMapper
;
@Autowired
PlanTaskDetailMapper
planTaskDetailMapper
;
...
...
@@ -941,9 +948,13 @@ 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
());
Point
point
=
pointMapper
.
selectPointInfo
(
taskDetail
.
getPointId
());
taskDetail
.
setName
(
point
.
getName
());
taskDetail
.
setPointNo
(
point
.
getPointNo
());
AppPointCheckRespone
appPointCheckRespone
=
planService
.
queryPointPlanTaskDetail
(
null
,
null
,
null
,
taskDetail
.
getTaskNo
(),
taskDetail
.
getPointId
());
ESTaskDetailDto
esTaskDetailDto
=
JSONObject
.
parseObject
(
toJSONString
(
appPointCheckRespone
),
ESTaskDetailDto
.
class
);
esTaskDetail
.
save
(
esTaskDetailDto
);
}
for
(
ESPlanTaskListDto
esPlanTaskListDto
:
esPlanTaskListDtos
)
{
...
...
@@ -1295,6 +1306,10 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
iPlanTaskDetailDao
.
saveAndFlush
(
action
);
planTaskDetailMapper
.
finishTaskDetail
(
action
.
getId
(),
action
.
getPointId
(),
action
.
getPlanTask
().
getId
(),
userId
);
AppPointCheckRespone
appPointCheckRespone
=
planService
.
queryPointPlanTaskDetail
(
null
,
null
,
null
,
action
.
getTaskNo
(),
action
.
getPointId
());
ESTaskDetailDto
esTaskDetailDto
=
JSONObject
.
parseObject
(
toJSONString
(
appPointCheckRespone
),
ESTaskDetailDto
.
class
);
esTaskDetail
.
save
(
esTaskDetailDto
);
return
action
;
}).
collect
(
Collectors
.
toList
());
}
...
...
@@ -1308,6 +1323,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
esPlanTaskListDto
.
setTaskPlanNum
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"taskPlanNum"
))
?
"0"
:
task
.
get
(
"taskPlanNum"
).
toString
());
esPlanTaskListDto
.
setPoints
(
planTaskDetails
);
esPlanTaskList
.
save
(
esPlanTaskListDto
);
// 生成巡检记录
jobService
.
createCheckRecord
(
planTask
,
userId
);
}
...
...
@@ -1629,92 +1645,6 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
return
planTaskMapper
.
getPlanTaskStatisticsForApp
(
params
);
}
@Override
public
AppPointCheckRespone
queryPointPlanTaskDetail
(
String
toke
,
String
product
,
String
appKey
,
Long
planTaskId
,
Long
pointId
)
{
AppPointCheckRespone
pointCheckRespone
=
new
AppPointCheckRespone
();
Check
check
=
checkDao
.
findByPlanTaskIdAndPointId
(
planTaskId
,
pointId
);
if
(
check
!=
null
)
{
pointCheckRespone
=
checkService
.
queryCheckPointDetailInVersion2
(
toke
,
product
,
appKey
,
check
.
getId
(),
planTaskId
,
pointId
);
}
else
{
PointCheckDetailBo
planPointInfo
=
planTaskMapper
.
getPointPlanTaskInfo
(
planTaskId
,
pointId
);
pointCheckRespone
.
setTaskStatus
(
planPointInfo
.
getTaskStatus
());
pointCheckRespone
.
setPointStatus
(
planPointInfo
.
getPointStatus
());
if
(
planPointInfo
!=
null
)
{
if
(
check
!=
null
)
{
List
<
CheckShot
>
checkShots
=
iCheckShotDao
.
findAllByCheckIdAndCheckInputId
(
check
.
getId
(),
0L
);
List
<
String
>
photos
=
new
ArrayList
<>();
if
(!
org
.
springframework
.
util
.
CollectionUtils
.
isEmpty
(
checkShots
))
{
photos
=
checkShots
.
stream
().
map
(
e
->
{
if
(
e
!=
null
)
{
return
e
.
getPhotoData
().
replaceAll
(
"\\\\"
,
"/"
);
}
else
{
return
""
;
}
}).
collect
(
Collectors
.
toList
());
}
pointCheckRespone
.
setPointImgUrls
(
photos
);
}
pointCheckRespone
.
setPointId
(
pointId
);
pointCheckRespone
.
setPointName
(
planPointInfo
.
getPointName
());
pointCheckRespone
.
setPointNo
(
planPointInfo
.
getPointNo
());
pointCheckRespone
.
setBeginTime
(
planPointInfo
.
getBeginTime
());
pointCheckRespone
.
setEndTime
(
planPointInfo
.
getEndTime
());
pointCheckRespone
.
setPlanName
(
planPointInfo
.
getPlanName
());
pointCheckRespone
.
setShortMaxNumber
(
planPointInfo
.
getShortMaxNumber
());
pointCheckRespone
.
setShortMinNumber
(
planPointInfo
.
getShortMinNumber
());
List
<
PointCheckDetailBo
>
pointInputs
=
planTaskMapper
.
getPointInputByRouteIdAndPointId
(
planPointInfo
.
getRouteId
(),
planPointInfo
.
getPointId
());
JSONObject
appResponeMap
=
new
JSONObject
();
List
<
AppCheckInputRespone
>
appCheckInputResponeList
=
new
ArrayList
<
AppCheckInputRespone
>();
pointInputs
.
forEach
(
action
->
{
AppCheckInputRespone
input
=
new
AppCheckInputRespone
();
input
.
setInputName
(
action
.
getInputName
());
input
.
setCheckInputId
(
action
.
getCheckInputId
());
input
.
setDefaultValue
(
action
.
getDefaultValue
());
input
.
setDataJson
(
action
.
getDataJson
());
input
.
setIsMultiline
(
action
.
getIsMultiline
());
input
.
setIsMust
(
action
.
getIsMust
());
input
.
setInputValue
(
null
);
if
(
null
!=
check
)
{
for
(
CheckInput
ck
:
check
.
getCheckInput
()
)
{
if
(
ck
.
getInputId
().
toString
().
equals
(
String
.
valueOf
(
action
.
getCheckInputId
())))
{
input
.
setInputValue
(
ck
.
getInputValue
());
}
}
List
<
CheckShot
>
checkShotsNew
=
iCheckShotDao
.
findAllByCheckIdAndCheckInputId
(
check
.
getId
(),
action
.
getCheckInputId
());
List
<
String
>
photosNew
=
new
ArrayList
<>();
if
(!
org
.
springframework
.
util
.
CollectionUtils
.
isEmpty
(
checkShotsNew
))
{
photosNew
=
checkShotsNew
.
stream
().
map
(
e
->
{
if
(
e
!=
null
)
{
return
e
.
getPhotoData
().
replaceAll
(
"\\\\"
,
"/"
);
}
else
{
return
""
;
}
}).
collect
(
Collectors
.
toList
());
}
input
.
setPointInputImgUrls
(
photosNew
);
}
input
.
setItemType
(
action
.
getItemType
());
input
.
setOrderNo
(
action
.
getOrderNo
());
input
.
setPictureJson
(
action
.
getPictureJson
());
input
.
setClassifyId
(
action
.
getClassifyId
());
input
.
setClassifyName
(
action
.
getClassifyName
());
appCheckInputResponeList
.
add
(
input
);
});
appResponeMap
.
put
(
"items"
,
appCheckInputResponeList
);
pointCheckRespone
.
setAppCheckInput
(
appResponeMap
);
}
}
return
pointCheckRespone
;
}
@Override
public
AppPointCheckRespone
queryPointPlanTaskDetailInVersion2
(
String
toke
,
String
product
,
String
appKey
,
Long
planTaskId
,
Long
pointId
)
{
...
...
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/intfc/IPlanService.java
View file @
afc9e3c1
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
service
.
intfc
;
import
com.yeejoin.amos.patrol.business.param.PlanInfoPageParam
;
import
com.yeejoin.amos.patrol.core.common.response.AppPointCheckRespone
;
import
com.yeejoin.amos.patrol.dao.entity.Plan
;
import
org.springframework.data.domain.Page
;
...
...
@@ -21,6 +22,14 @@ public interface IPlanService {
* @param map
*/
Plan
addPlan
(
HashMap
<
String
,
Object
>
map
);
/**
* 根据任务id点id 获取点详情
* @param planTaskId
* @param pointId
* @return
*/
AppPointCheckRespone
queryPointPlanTaskDetail
(
String
toke
,
String
product
,
String
appKey
,
Long
planTaskId
,
Long
pointId
);
/**
* 巡检计划删除
...
...
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/intfc/IPlanTaskService.java
View file @
afc9e3c1
...
...
@@ -156,13 +156,6 @@ public interface IPlanTaskService {
*/
List
<
PlanTaskVo
>
getPlanTaskListByIds
(
String
toke
,
String
product
,
String
appKey
,
Long
[]
ids
);
List
<
PlanTaskVo
>
getPlanTaskListByIdsNew
(
Long
[]
ids
);
/**
* 根据任务id点id 获取点详情
* @param planTaskId
* @param pointId
* @return
*/
AppPointCheckRespone
queryPointPlanTaskDetail
(
String
toke
,
String
product
,
String
appKey
,
Long
planTaskId
,
Long
pointId
);
AppPointCheckRespone
queryPointPlanTaskDetailInVersion2
(
String
toke
,
String
product
,
String
appKey
,
Long
planTaskId
,
Long
pointId
);
...
...
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 @
afc9e3c1
...
...
@@ -21,15 +21,19 @@ import com.yeejoin.amos.patrol.business.entity.mybatis.PlanTaskPointInputItemBo;
import
com.yeejoin.amos.patrol.business.feign.JcsFeignClient
;
import
com.yeejoin.amos.patrol.business.param.CheckInputParam
;
import
com.yeejoin.amos.patrol.business.param.MsgConfigParam
;
import
com.yeejoin.amos.patrol.business.service.impl.PlanServiceImpl
;
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.IPlanService
;
import
com.yeejoin.amos.patrol.business.util.DateUtil
;
import
com.yeejoin.amos.patrol.business.util.Toke
;
import
com.yeejoin.amos.patrol.common.enums.*
;
import
com.yeejoin.amos.patrol.core.async.AsyncTask
;
import
com.yeejoin.amos.patrol.core.common.response.AppPointCheckRespone
;
import
com.yeejoin.amos.patrol.dao.entity.*
;
import
com.yeejoin.amos.patrol.feign.RemoteSecurityService
;
import
com.yeejoin.amos.patrol.mqtt.WebMqttComponent
;
import
liquibase.pro.packaged.I
;
import
org.quartz.Job
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -49,6 +53,7 @@ import java.text.SimpleDateFormat;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
toJSONString
;
import
static
com
.
yeejoin
.
amos
.
patrol
.
common
.
enums
.
NotifyBusinessTypeEum
.
planTask
;
@Service
(
"jobService"
)
...
...
@@ -60,6 +65,12 @@ public class JobService implements IJobService {
ESPlanTaskList
esPlanTaskList
;
@Autowired
IPlanService
planService
;
@Autowired
ESTaskDetail
esTaskDetail
;
@Autowired
private
ITaskDao
iTaskDao
;
@Autowired
...
...
@@ -208,6 +219,10 @@ public class JobService implements IJobService {
}
if
(!
ObjectUtils
.
isEmpty
(
ids
))
{
updateEsPlanTaskList
(
ids
,
PlanTaskFinishStatusEnum
.
NOTSTARTED
.
getValue
());
for
(
String
id
:
ids
)
{
}
}
}
catch
(
ParseException
e
)
{
// TODO Auto-generated catch block
...
...
@@ -231,6 +246,12 @@ public class JobService implements IJobService {
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
);
for
(
PlanTaskDetail
taskDetail
:
planTaskDetailList
)
{
AppPointCheckRespone
appPointCheckRespone
=
planService
.
queryPointPlanTaskDetail
(
null
,
null
,
null
,
taskDetail
.
getTaskNo
(),
taskDetail
.
getPointId
());
ESTaskDetailDto
esTaskDetailDto
=
JSONObject
.
parseObject
(
toJSONString
(
appPointCheckRespone
),
ESTaskDetailDto
.
class
);
esTaskDetail
.
save
(
esTaskDetailDto
);
}
esPlanTaskListDto
.
setPoints
(
planTaskDetailList
);
esPlanTaskListDtos
.
add
(
esPlanTaskListDto
);
}
...
...
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
afc9e3c1
...
...
@@ -682,6 +682,8 @@
<select
id=
"getPointPlanTaskInfo"
resultType=
"com.yeejoin.amos.patrol.business.entity.mybatis.PointCheckDetailBo"
parameterType=
"long"
>
SELECT
pptd.id,
ppt.id planTaskId,
pp.id pointId,
pp.name pointName,
pp.point_no pointNo,
...
...
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