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
9bdb66bd
Commit
9bdb66bd
authored
Nov 28, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新索引--涉及任务下发、定时器修改、任务执行
parent
4b5f9e37
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
48 deletions
+66
-48
PlanTaskMapper.java
...ejoin/amos/patrol/business/dao/mapper/PlanTaskMapper.java
+2
-2
PlanTaskServiceImpl.java
...mos/patrol/business/service/impl/PlanTaskServiceImpl.java
+45
-26
JobService.java
.../main/java/com/yeejoin/amos/patrol/quartz/JobService.java
+3
-5
dbTemplate_plan_task.xml
...biz/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+16
-15
No files found.
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/mapper/PlanTaskMapper.java
View file @
9bdb66bd
...
@@ -316,9 +316,9 @@ public interface PlanTaskMapper extends BaseMapper {
...
@@ -316,9 +316,9 @@ public interface PlanTaskMapper extends BaseMapper {
List
<
PlanTask
>
selectTaskList
(
@Param
(
value
=
"ids"
)
List
<
String
>
ids
);
List
<
PlanTask
>
selectTaskList
(
@Param
(
value
=
"ids"
)
List
<
String
>
ids
);
List
<
PlanTaskStaticDto
>
queryPlanTaskStaticById
(
@Param
(
value
=
"planTaskIds"
)
List
<
String
>
planTaskIds
);
List
<
PlanTaskStaticDto
>
queryPlanTaskStaticById
(
@Param
(
value
=
"planTaskIds"
)
String
planTaskIds
);
List
<
ESTaskDetailDto
>
selectTaskDetailList
(
@Param
(
value
=
"
taskIds"
)
List
<
String
>
taskI
ds
);
List
<
ESTaskDetailDto
>
selectTaskDetailList
(
@Param
(
value
=
"
ids"
)
String
i
ds
);
List
<
ESTaskDetailDto
>
selectTaskInfoList
(
@Param
(
value
=
"id"
)
long
id
);
List
<
ESTaskDetailDto
>
selectTaskInfoList
(
@Param
(
value
=
"id"
)
long
id
);
...
...
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 @
9bdb66bd
...
@@ -990,13 +990,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
...
@@ -990,13 +990,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
//存在事物,在事务提交之后执行
//存在事物,在事务提交之后执行
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronizationAdapter
()
{
asyncSaveEs
(
planTaskDetails
,
esPlanTaskListDtos
,
oldEsPlanTaskListDtos
);
@Override
public
void
afterCommit
()
{
//异步存储任务和任务详情到es
asyncSavePlanTaskAndDetailListToEs
(
planTaskDetails
,
esPlanTaskListDtos
,
oldEsPlanTaskListDtos
);
}
});
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
log
.
error
(
e
.
getMessage
());
log
.
error
(
e
.
getMessage
());
...
@@ -1005,26 +1000,39 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
...
@@ -1005,26 +1000,39 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
}
}
}
private
void
asyncSavePlanTaskAndDetailListToEs
(
Iterable
<
PlanTaskDetail
>
planTaskDetails
,
List
<
ESPlanTaskListDto
>
esPlanTaskListDtos
,
List
<
ESPlanTaskListDto
>
oldEsPlanTaskListDtos
)
{
private
void
asyncSaveEs
(
Iterable
<
PlanTaskDetail
>
planTaskDetails
,
List
<
ESPlanTaskListDto
>
esPlanTaskListDtos
,
List
<
ESPlanTaskListDto
>
oldEsPlanTaskListDtos
)
{
log
.
error
(
"异步存储任务和任务详情到es"
);
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronizationAdapter
()
{
@Override
public
void
afterCommit
()
{
//异步存储任务和任务详情到es
asyncSavePlanTaskAndDetailListToEs
(
planTaskDetails
,
esPlanTaskListDtos
,
oldEsPlanTaskListDtos
);
}
});
}
@Async
public
void
asyncSavePlanTaskAndDetailListToEs
(
Iterable
<
PlanTaskDetail
>
planTaskDetails
,
List
<
ESPlanTaskListDto
>
esPlanTaskListDtos
,
List
<
ESPlanTaskListDto
>
oldEsPlanTaskListDtos
)
{
log
.
info
(
"异步存储任务和任务详情到es"
);
Plan
plan
=
planMapper
.
getPlan
(
esPlanTaskListDtos
.
get
(
0
).
getPlanId
());
Plan
plan
=
planMapper
.
getPlan
(
esPlanTaskListDtos
.
get
(
0
).
getPlanId
());
StopWatch
stopWatch
=
new
StopWatch
();
StopWatch
stopWatch
=
new
StopWatch
();
stopWatch
.
start
();
stopWatch
.
start
();
List
<
String
>
taskIds
=
planTaskMapper
.
getPlanTaskIds
(
plan
.
getId
());
List
<
String
>
taskIds
=
planTaskMapper
.
getPlanTaskIds
(
plan
.
getId
());
List
<
ESTaskDetailDto
>
esTaskDetailDtos
=
new
ArrayList
<>();
List
<
ESTaskDetailDto
>
esTaskDetailDtos
=
new
ArrayList
<>();
if
(!
ValidationUtil
.
isEmpty
(
taskIds
))
{
if
(!
ValidationUtil
.
isEmpty
(
taskIds
))
{
if
(
taskIds
.
size
()
>
10
000
)
{
if
(
taskIds
.
size
()
>
5
000
)
{
int
index
=
10
000
;
int
index
=
5
000
;
for
(
int
i
=
0
;
i
<
taskIds
.
size
();
i
+=
10
000
)
{
for
(
int
i
=
0
;
i
<
taskIds
.
size
();
i
+=
5
000
)
{
if
(
i
+
10
000
>
taskIds
.
size
())
{
if
(
i
+
5
000
>
taskIds
.
size
())
{
index
=
taskIds
.
size
()
-
i
;
index
=
taskIds
.
size
()
-
i
;
}
}
List
<
String
>
newList
=
taskIds
.
subList
(
i
,
i
+
index
);
List
<
String
>
newList
=
taskIds
.
subList
(
i
,
i
+
index
);
List
<
ESTaskDetailDto
>
maps
=
planTaskMapper
.
selectTaskDetailList
(
newList
);
String
ids
=
newList
.
stream
().
collect
(
Collectors
.
joining
(
"','"
,
"('"
,
"')"
));
List
<
ESTaskDetailDto
>
maps
=
planTaskMapper
.
selectTaskDetailList
(
ids
);
esTaskDetailDtos
.
addAll
(
maps
);
esTaskDetailDtos
.
addAll
(
maps
);
}
}
}
else
{
}
else
{
List
<
ESTaskDetailDto
>
maps
=
planTaskMapper
.
selectTaskDetailList
(
taskIds
);
String
ids
=
taskIds
.
stream
().
collect
(
Collectors
.
joining
(
"','"
,
"('"
,
"')"
));
List
<
ESTaskDetailDto
>
maps
=
planTaskMapper
.
selectTaskDetailList
(
ids
);
esTaskDetailDtos
.
addAll
(
maps
);
esTaskDetailDtos
.
addAll
(
maps
);
}
}
}
}
...
@@ -1078,18 +1086,20 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
...
@@ -1078,18 +1086,20 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
List
<
String
>
planTaskIds
=
esPlanTaskListDtos
.
stream
().
map
(
ESPlanTaskListDto:
:
getPlanTaskId
).
collect
(
Collectors
.
toList
());
List
<
String
>
planTaskIds
=
esPlanTaskListDtos
.
stream
().
map
(
ESPlanTaskListDto:
:
getPlanTaskId
).
collect
(
Collectors
.
toList
());
List
<
PlanTaskStaticDto
>
planTaskStaticListMap
=
new
ArrayList
<>();
List
<
PlanTaskStaticDto
>
planTaskStaticListMap
=
new
ArrayList
<>();
if
(!
ValidationUtil
.
isEmpty
(
planTaskIds
))
{
if
(!
ValidationUtil
.
isEmpty
(
planTaskIds
))
{
if
(
planTaskIds
.
size
()
>
10
000
)
{
if
(
planTaskIds
.
size
()
>
5
000
)
{
int
index
=
10
000
;
int
index
=
5
000
;
for
(
int
i
=
0
;
i
<
planTaskIds
.
size
();
i
+=
10
000
)
{
for
(
int
i
=
0
;
i
<
planTaskIds
.
size
();
i
+=
5
000
)
{
if
(
i
+
10000
>
planTaskIds
.
size
())
{
if
(
i
+
10000
>
planTaskIds
.
size
())
{
index
=
planTaskIds
.
size
()
-
i
;
index
=
planTaskIds
.
size
()
-
i
;
}
}
List
<
String
>
newList
=
planTaskIds
.
subList
(
i
,
i
+
index
);
List
<
String
>
newList
=
planTaskIds
.
subList
(
i
,
i
+
index
);
List
<
PlanTaskStaticDto
>
maps
=
queryPlanTaskStaticById
(
newList
);
String
ids
=
newList
.
stream
().
collect
(
Collectors
.
joining
(
"','"
,
"('"
,
"')"
));
List
<
PlanTaskStaticDto
>
maps
=
queryPlanTaskStaticById
(
ids
);
planTaskStaticListMap
.
addAll
(
maps
);
planTaskStaticListMap
.
addAll
(
maps
);
}
}
}
else
{
}
else
{
List
<
PlanTaskStaticDto
>
maps
=
queryPlanTaskStaticById
(
planTaskIds
);
String
ids
=
planTaskIds
.
stream
().
collect
(
Collectors
.
joining
(
"','"
,
"('"
,
"')"
));
List
<
PlanTaskStaticDto
>
maps
=
queryPlanTaskStaticById
(
ids
);
planTaskStaticListMap
.
addAll
(
maps
);
planTaskStaticListMap
.
addAll
(
maps
);
}
}
}
}
...
@@ -1098,9 +1108,11 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
...
@@ -1098,9 +1108,11 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
StopWatch
stopWatch6
=
new
StopWatch
();
StopWatch
stopWatch6
=
new
StopWatch
();
stopWatch6
.
start
();
stopWatch6
.
start
();
Map
<
Long
,
List
<
PlanTaskDetail
>>
collect
=
planTaskDetailList
.
stream
().
collect
(
Collectors
.
groupingBy
(
PlanTaskDetail:
:
getTaskNo
));
for
(
ESPlanTaskListDto
esPlanTaskListDto
:
esPlanTaskListDtos
)
{
for
(
ESPlanTaskListDto
esPlanTaskListDto
:
esPlanTaskListDtos
)
{
List
<
PlanTaskDetail
>
newPlanTaskDetailList
=
planTaskDetailList
.
stream
().
filter
(
x
->
x
.
getTaskNo
()
==
Long
.
valueOf
(
esPlanTaskListDto
.
getPlanTaskId
())).
collect
(
Collectors
.
toList
());
//
List<PlanTaskDetail> newPlanTaskDetailList = planTaskDetailList.stream().filter(x -> x.getTaskNo() == Long.valueOf(esPlanTaskListDto.getPlanTaskId())).collect(Collectors.toList());
esPlanTaskListDto
.
setPoints
(
newPlanTaskDetailList
);
esPlanTaskListDto
.
setPoints
(
collect
.
get
(
Long
.
valueOf
(
esPlanTaskListDto
.
getPlanTaskId
()))
);
if
(!
ValidationUtil
.
isEmpty
(
planTaskIds
))
{
if
(!
ValidationUtil
.
isEmpty
(
planTaskIds
))
{
PlanTaskStaticDto
task
=
planTaskStaticListMap
.
stream
().
filter
(
x
->
x
.
getPlanTaskId
().
equals
(
esPlanTaskListDto
.
getPlanTaskId
())).
collect
(
Collectors
.
toList
()).
get
(
0
);
PlanTaskStaticDto
task
=
planTaskStaticListMap
.
stream
().
filter
(
x
->
x
.
getPlanTaskId
().
equals
(
esPlanTaskListDto
.
getPlanTaskId
())).
collect
(
Collectors
.
toList
()).
get
(
0
);
esPlanTaskListDto
.
setFinshNum
(
ObjectUtils
.
isEmpty
(
task
.
getFinshNum
())
?
"0"
:
task
.
getFinshNum
());
esPlanTaskListDto
.
setFinshNum
(
ObjectUtils
.
isEmpty
(
task
.
getFinshNum
())
?
"0"
:
task
.
getFinshNum
());
...
@@ -1138,7 +1150,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
...
@@ -1138,7 +1150,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
return
checkInput
;
return
checkInput
;
}
}
private
List
<
PlanTaskStaticDto
>
queryPlanTaskStaticById
(
List
<
String
>
planTaskIds
)
{
private
List
<
PlanTaskStaticDto
>
queryPlanTaskStaticById
(
String
planTaskIds
)
{
return
planTaskMapper
.
queryPlanTaskStaticById
(
planTaskIds
);
return
planTaskMapper
.
queryPlanTaskStaticById
(
planTaskIds
);
}
}
...
@@ -1464,9 +1476,11 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
...
@@ -1464,9 +1476,11 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
}
List
<
PlanTaskDetail
>
planTaskDetails
=
iPlanTaskDetailDao
.
findAllByTaskNoAndStatus
(
planTask
.
getId
(),
PlanTaskDetailStatusEnum
.
NOTSTARTED
.
getValue
());
List
<
PlanTaskDetail
>
planTaskDetails
=
iPlanTaskDetailDao
.
findAllByTaskNoAndStatus
(
planTask
.
getId
(),
PlanTaskDetailStatusEnum
.
NOTSTARTED
.
getValue
());
List
<
ESTaskDetailDto
>
esTaskDetailDtos
=
new
ArrayList
<>();
if
(!
planTaskDetails
.
isEmpty
())
{
if
(!
planTaskDetails
.
isEmpty
())
{
Long
routId
=
planTaskMapper
.
selectRoutId
(
id
);
Long
routId
=
planTaskMapper
.
selectRoutId
(
id
);
planTaskDetails
=
planTaskDetails
.
stream
().
map
(
action
->
{
planTaskDetails
.
stream
().
map
(
action
->
{
action
.
setStatus
(
PlanTaskDetailStatusEnum
.
QUALIFIED
.
getValue
());
action
.
setStatus
(
PlanTaskDetailStatusEnum
.
QUALIFIED
.
getValue
());
iPlanTaskDetailDao
.
saveAndFlush
(
action
);
iPlanTaskDetailDao
.
saveAndFlush
(
action
);
planTaskDetailMapper
.
finishTaskDetail
(
action
.
getId
(),
action
.
getPointId
(),
planTaskDetailMapper
.
finishTaskDetail
(
action
.
getId
(),
action
.
getPointId
(),
...
@@ -1476,19 +1490,24 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
...
@@ -1476,19 +1490,24 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
JSONObject
jsonObject
=
jobService
.
getCheckInput
(
routId
,
action
.
getPointId
(),
"update"
,
null
);
JSONObject
jsonObject
=
jobService
.
getCheckInput
(
routId
,
action
.
getPointId
(),
"update"
,
null
);
appPointCheckRespone
.
setAppCheckInput
(
jsonObject
);
appPointCheckRespone
.
setAppCheckInput
(
jsonObject
);
esTaskDetailDto
.
setPointImgUrls
(
new
ArrayList
<>());
esTaskDetailDto
.
setPointImgUrls
(
new
ArrayList
<>());
esTaskDetail
.
save
(
esTaskDetailDto
);
esTaskDetail
Dtos
.
add
(
esTaskDetailDto
);
return
action
;
return
action
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
}
}
esTaskDetail
.
saveAll
(
esTaskDetailDtos
);
ESPlanTaskListDto
esPlanTaskListDto
=
esPlanTaskList
.
findById
(
String
.
valueOf
(
planTask
.
getId
())).
get
();
ESPlanTaskListDto
esPlanTaskListDto
=
esPlanTaskList
.
findById
(
String
.
valueOf
(
planTask
.
getId
())).
get
();
Map
task
=
queryPlanTaskById
(
Long
.
valueOf
(
id
));
Map
task
=
queryPlanTaskById
(
Long
.
valueOf
(
id
));
esPlanTaskListDto
.
setFinishStatus
(
String
.
valueOf
(
PlanTaskFinishStatusEnum
.
FINISHED
.
getValue
()));
esPlanTaskListDto
.
setFinshNum
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"finshNum"
))
?
"0"
:
task
.
get
(
"finshNum"
).
toString
());
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
.
setOmission
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"omission"
))
?
"0"
:
task
.
get
(
"omission"
).
toString
());
esPlanTaskListDto
.
setUnqualified
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"unqualified"
))
?
"0"
:
task
.
get
(
"unqualified"
).
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
.
setUnplan
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"unplan"
))
?
"0"
:
task
.
get
(
"unplan"
).
toString
());
esPlanTaskListDto
.
setTaskPlanNum
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"taskPlanNum"
))
?
"0"
:
task
.
get
(
"taskPlanNum"
).
toString
());
esPlanTaskListDto
.
setTaskPlanNum
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"taskPlanNum"
))
?
"0"
:
task
.
get
(
"taskPlanNum"
).
toString
());
esPlanTaskListDto
.
setPoints
(
planTaskDetails
);
List
<
PlanTaskDetail
>
planTaskDetailList
=
planTaskMapper
.
selectTaskDetails
(
esPlanTaskListDto
.
getPlanTaskId
());
esPlanTaskListDto
.
setPoints
(
planTaskDetailList
);
esPlanTaskList
.
save
(
esPlanTaskListDto
);
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 @
9bdb66bd
...
@@ -291,11 +291,8 @@ public class JobService implements IJobService {
...
@@ -291,11 +291,8 @@ public class JobService implements IJobService {
esPlanTaskListDto
.
setTaskPlanNum
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"taskPlanNum"
))
?
"0"
:
task
.
get
(
"taskPlanNum"
).
toString
());
esPlanTaskListDto
.
setTaskPlanNum
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"taskPlanNum"
))
?
"0"
:
task
.
get
(
"taskPlanNum"
).
toString
());
List
<
PlanTaskDetail
>
planTaskDetailList
=
planTaskMapper
.
selectTaskDetails
(
id
);
List
<
PlanTaskDetail
>
planTaskDetailList
=
planTaskMapper
.
selectTaskDetails
(
id
);
Long
routId
=
planTaskMapper
.
selectRoutId
(
id
);
Long
routId
=
planTaskMapper
.
selectRoutId
(
id
);
List
<
ESTaskDetailDto
>
esTaskDetailDtos
=
new
ArrayList
<>();
for
(
PlanTaskDetail
taskDetail
:
planTaskDetailList
)
{
for
(
PlanTaskDetail
taskDetail
:
planTaskDetailList
)
{
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
());
AppPointCheckRespone
appPointCheckRespone
=
planService
.
queryPointPlanTaskDetail
(
null
,
null
,
null
,
taskDetail
.
getTaskNo
(),
taskDetail
.
getPointId
());
ESTaskDetailDto
esTaskDetailDto
=
esTaskDetail
.
findById
(
String
.
valueOf
(
appPointCheckRespone
.
getId
())).
get
();
ESTaskDetailDto
esTaskDetailDto
=
esTaskDetail
.
findById
(
String
.
valueOf
(
appPointCheckRespone
.
getId
())).
get
();
JSONObject
jsonObject
=
getCheckInput
(
routId
,
taskDetail
.
getPointId
(),
type
,
requestParam
);
JSONObject
jsonObject
=
getCheckInput
(
routId
,
taskDetail
.
getPointId
(),
type
,
requestParam
);
...
@@ -303,8 +300,9 @@ public class JobService implements IJobService {
...
@@ -303,8 +300,9 @@ public class JobService implements IJobService {
esTaskDetailDto
.
setTaskStatus
(
String
.
valueOf
(
status
));
esTaskDetailDto
.
setTaskStatus
(
String
.
valueOf
(
status
));
appPointCheckRespone
.
setAppCheckInput
(
jsonObject
);
appPointCheckRespone
.
setAppCheckInput
(
jsonObject
);
esTaskDetailDto
.
setPointImgUrls
(
ObjectUtils
.
isEmpty
(
requestParam
)
?
new
ArrayList
<>()
:
requestParam
.
getCheckRecordImg
());
esTaskDetailDto
.
setPointImgUrls
(
ObjectUtils
.
isEmpty
(
requestParam
)
?
new
ArrayList
<>()
:
requestParam
.
getCheckRecordImg
());
esTaskDetail
.
save
(
esTaskDetailDto
);
esTaskDetail
Dtos
.
add
(
esTaskDetailDto
);
}
}
esTaskDetail
.
saveAll
(
esTaskDetailDtos
);
esPlanTaskListDto
.
setPoints
(
planTaskDetailList
);
esPlanTaskListDto
.
setPoints
(
planTaskDetailList
);
esPlanTaskListDtos
.
add
(
esPlanTaskListDto
);
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 @
9bdb66bd
...
@@ -1723,11 +1723,18 @@
...
@@ -1723,11 +1723,18 @@
</select>
</select>
<select
id=
"selectTaskDetails"
resultType=
"com.yeejoin.amos.patrol.dao.entity.PlanTaskDetail"
>
<select
id=
"selectTaskDetails"
resultType=
"com.yeejoin.amos.patrol.dao.entity.PlanTaskDetail"
>
select
select
*
pptd.is_finish,
from
pptd.point_id,
"p_plan_task_detail"
pptd.task_no,
where
pp.name,
pp.point_no,
pptd.status,
pptd.id,
pptd.create_date
from
"p_plan_task_detail" pptd LEFT JOIN p_point pp ON pp."id"=pptd.point_id
where
task_no = #{id}
task_no = #{id}
</select>
</select>
...
@@ -1809,10 +1816,7 @@
...
@@ -1809,10 +1816,7 @@
p_plan_task_detail ptd
p_plan_task_detail ptd
LEFT JOIN p_plan_task pt ON ptd.task_no = pt.id
LEFT JOIN p_plan_task pt ON ptd.task_no = pt.id
) a
) a
where a.planTaskId IN
where a.planTaskId IN ${planTaskIds}
<foreach
item=
"id"
collection=
"planTaskIds"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
GROUP BY a.planTaskId
GROUP BY a.planTaskId
</select>
</select>
...
@@ -1828,13 +1832,10 @@
...
@@ -1828,13 +1832,10 @@
pp.shot_max_number shortMaxNumber,
pp.shot_max_number shortMaxNumber,
'0' checkId
'0' checkId
FROM
FROM
"p_plan_task_detail" pptd LEFT JOIN p_point pp ON pp.id = pptd.point_id WHERE
"p_plan_task_detail" pptd LEFT JOIN p_point pp ON pp.id = pptd.point_id
task_no IN
WHERE
<foreach
item=
"id"
collection=
"taskIds"
index=
"index"
open=
"("
separator=
","
close=
")"
>
task_no IN ${ids}
#{id}
</foreach>
</select>
</select>
<select
id=
"selectTaskInfoList"
resultType=
"com.yeejoin.amos.patrol.dao.entity.ESTaskDetailDto"
>
<select
id=
"selectTaskInfoList"
resultType=
"com.yeejoin.amos.patrol.dao.entity.ESTaskDetailDto"
>
SELECT
SELECT
id planTaskId,
id planTaskId,
...
...
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