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
1c207e6d
Commit
1c207e6d
authored
Nov 23, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
f79a83ad
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
180 additions
and
57 deletions
+180
-57
CheckController.java
...join/amos/patrol/business/controller/CheckController.java
+28
-4
PlanTaskMapper.java
...ejoin/amos/patrol/business/dao/mapper/PlanTaskMapper.java
+3
-1
PointCheckDetailBo.java
...os/patrol/business/entity/mybatis/PointCheckDetailBo.java
+6
-0
CheckServiceImpl.java
...n/amos/patrol/business/service/impl/CheckServiceImpl.java
+17
-0
PlanTaskServiceImpl.java
...mos/patrol/business/service/impl/PlanTaskServiceImpl.java
+7
-6
IJobService.java
...main/java/com/yeejoin/amos/patrol/quartz/IJobService.java
+2
-1
JobService.java
.../main/java/com/yeejoin/amos/patrol/quartz/JobService.java
+103
-45
application-dev.properties
...spatrol-biz/src/main/resources/application-dev.properties
+1
-0
dbTemplate_plan_task.xml
...biz/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+13
-0
No files found.
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/CheckController.java
View file @
1c207e6d
...
@@ -9,6 +9,7 @@ import com.yeejoin.amos.patrol.business.constants.XJConstant;
...
@@ -9,6 +9,7 @@ import com.yeejoin.amos.patrol.business.constants.XJConstant;
import
com.yeejoin.amos.patrol.business.dao.mapper.CheckMapper
;
import
com.yeejoin.amos.patrol.business.dao.mapper.CheckMapper
;
import
com.yeejoin.amos.patrol.business.dao.mapper.PlanTaskMapper
;
import
com.yeejoin.amos.patrol.business.dao.mapper.PlanTaskMapper
;
import
com.yeejoin.amos.patrol.business.dao.mapper.PointMapper
;
import
com.yeejoin.amos.patrol.business.dao.mapper.PointMapper
;
import
com.yeejoin.amos.patrol.business.dao.repository.ESPlanTaskList
;
import
com.yeejoin.amos.patrol.business.dao.repository.ICheckInputDao
;
import
com.yeejoin.amos.patrol.business.dao.repository.ICheckInputDao
;
import
com.yeejoin.amos.patrol.business.dto.*
;
import
com.yeejoin.amos.patrol.business.dto.*
;
import
com.yeejoin.amos.patrol.business.param.CheckInfoPageParam
;
import
com.yeejoin.amos.patrol.business.param.CheckInfoPageParam
;
...
@@ -28,7 +29,10 @@ import com.yeejoin.amos.patrol.core.common.response.GraphInitDataResponse;
...
@@ -28,7 +29,10 @@ import com.yeejoin.amos.patrol.core.common.response.GraphInitDataResponse;
import
com.yeejoin.amos.patrol.core.enums.QueryOperatorEnum
;
import
com.yeejoin.amos.patrol.core.enums.QueryOperatorEnum
;
import
com.yeejoin.amos.patrol.core.util.DateUtil
;
import
com.yeejoin.amos.patrol.core.util.DateUtil
;
import
com.yeejoin.amos.patrol.core.util.StringUtil
;
import
com.yeejoin.amos.patrol.core.util.StringUtil
;
import
com.yeejoin.amos.patrol.dao.entity.ESPlanTaskListDto
;
import
com.yeejoin.amos.patrol.dao.entity.PlanTask
;
import
com.yeejoin.amos.patrol.dao.entity.PlanTask
;
import
com.yeejoin.amos.patrol.dao.entity.PlanTaskDetail
;
import
com.yeejoin.amos.patrol.dao.entity.Point
;
import
com.yeejoin.amos.patrol.feign.RemoteSecurityService
;
import
com.yeejoin.amos.patrol.feign.RemoteSecurityService
;
import
com.yeejoin.amos.patrol.mqtt.WebMqttComponent
;
import
com.yeejoin.amos.patrol.mqtt.WebMqttComponent
;
import
com.yeejoin.amos.patrol.quartz.JobService
;
import
com.yeejoin.amos.patrol.quartz.JobService
;
...
@@ -208,7 +212,8 @@ public class CheckController extends AbstractBaseController {
...
@@ -208,7 +212,8 @@ public class CheckController extends AbstractBaseController {
return
ResponseHelper
.
buildResponse
(
"提交成功"
);
return
ResponseHelper
.
buildResponse
(
"提交成功"
);
}
}
@Autowired
ESPlanTaskList
esPlanTaskList
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"保存巡检记录<font color='blue'>手机app</font>"
,
notes
=
"保存巡检记录<font color='blue'>手机app</font>"
)
@ApiOperation
(
value
=
"保存巡检记录<font color='blue'>手机app</font>"
,
notes
=
"保存巡检记录<font color='blue'>手机app</font>"
)
...
@@ -254,13 +259,32 @@ public class CheckController extends AbstractBaseController {
...
@@ -254,13 +259,32 @@ public class CheckController extends AbstractBaseController {
requestParam
.
setOrgCode
(
orgCode
);
requestParam
.
setOrgCode
(
orgCode
);
requestParam
.
setUserId
(
getUserId
());
requestParam
.
setUserId
(
getUserId
());
CheckDto
checkDto
=
checkService
.
saveCheckRecordNew
(
requestParam
,
planTask
);
CheckDto
checkDto
=
checkService
.
saveCheckRecordNew
(
requestParam
,
planTask
);
Long
planTaskId
=
requestParam
.
getPlanTaskId
();
Long
planTaskId
=
requestParam
.
getPlanTaskId
();
ESPlanTaskListDto
esPlanTaskListDto
=
esPlanTaskList
.
findById
(
String
.
valueOf
(
planTaskId
)).
get
();
Map
task
=
planTaskMapper
.
queryPlanTaskById
(
planTaskId
);
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
(
String
.
valueOf
(
planTaskId
));
for
(
PlanTaskDetail
planTaskDetail
:
planTaskDetailList
)
{
Point
point
=
pointMapper
.
selectPointInfo
(
planTaskDetail
.
getPointId
());
planTaskDetail
.
setName
(
point
.
getName
());
planTaskDetail
.
setPointNo
(
point
.
getPointNo
());
}
esPlanTaskListDto
.
setPoints
(
planTaskDetailList
);
esPlanTaskList
.
save
(
esPlanTaskListDto
);
List
<
String
>
ids
=
new
ArrayList
<>();
List
<
String
>
ids
=
new
ArrayList
<>();
ids
.
add
(
String
.
valueOf
(
planTaskId
));
ids
.
add
(
String
.
valueOf
(
planTaskId
));
Map
<
String
,
Object
>
map
=
planTaskMapper
.
selectTaskStatus
(
planTaskId
);
Map
<
String
,
Object
>
map
=
planTaskMapper
.
selectTaskStatus
(
planTaskId
);
if
(
map
.
get
(
"status"
).
toString
().
equals
(
String
.
valueOf
(
PlanTaskFinishStatusEnum
.
FINISHED
)))
{
if
(
map
.
get
(
"status"
).
toString
().
equals
(
String
.
valueOf
(
PlanTaskFinishStatusEnum
.
FINISHED
.
getValue
())))
{
jobService
.
updateEsPlanTaskList
(
ids
,
Integer
.
parseInt
(
map
.
get
(
"status"
).
toString
()));
ESPlanTaskListDto
esPlanTaskListDto1
=
esPlanTaskList
.
findById
(
String
.
valueOf
(
planTaskId
)).
get
();
esPlanTaskListDto1
.
setFinishStatus
(
map
.
get
(
"status"
).
toString
());
esPlanTaskList
.
save
(
esPlanTaskListDto1
);
jobService
.
updateEsPlanTaskList
(
ids
,
Integer
.
parseInt
(
map
.
get
(
"status"
).
toString
()),
"app"
,
requestParam
);
// 更新统计表
// 更新统计表
if
(
planTask
.
getPlanType
().
equals
(
String
.
valueOf
(
PlanTaskTypeStatusEnum
.
day
.
getValue
())))
{
if
(
planTask
.
getPlanType
().
equals
(
String
.
valueOf
(
PlanTaskTypeStatusEnum
.
day
.
getValue
())))
{
planTaskMapper
.
updateSingle
(
P_STATIC_DAY
,
XJConstant
.
RISK_NUM
==
Integer
.
parseInt
(
map
.
get
(
"riskStatus"
).
toString
())
?
1
:
0
,
planTaskMapper
.
updateSingle
(
P_STATIC_DAY
,
XJConstant
.
RISK_NUM
==
Integer
.
parseInt
(
map
.
get
(
"riskStatus"
).
toString
())
?
1
:
0
,
...
...
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 @
1c207e6d
...
@@ -231,7 +231,7 @@ public interface PlanTaskMapper extends BaseMapper {
...
@@ -231,7 +231,7 @@ public interface PlanTaskMapper extends BaseMapper {
List
<
PlanTask
>
getPlanTaskTListByPlanId
(
long
planId
,
int
finishStatus
);
List
<
PlanTask
>
getPlanTaskTListByPlanId
(
long
planId
,
int
finishStatus
);
void
updatePlanTaskByPlanId
(
List
<
Long
>
ids
,
int
finishStatus
);
void
updatePlanTaskByPlanId
(
@Param
(
value
=
"ids"
)
List
<
Long
>
ids
,
int
finishStatus
);
void
updatePlanTaskDetailsByPlanId
(
@Param
(
value
=
"ids"
)
List
<
Long
>
ids
);
void
updatePlanTaskDetailsByPlanId
(
@Param
(
value
=
"ids"
)
List
<
Long
>
ids
);
...
@@ -274,4 +274,6 @@ public interface PlanTaskMapper extends BaseMapper {
...
@@ -274,4 +274,6 @@ public interface PlanTaskMapper extends BaseMapper {
Long
selectRoutId
(
String
id
);
Long
selectRoutId
(
String
id
);
List
<
String
>
selectPlanTaskIdLists
(
long
planId
,
int
status
,
int
status1
);
List
<
String
>
selectPlanTaskIdLists
(
long
planId
,
int
status
,
int
status1
);
List
<
PlanTask
>
selectTaskList
(
@Param
(
value
=
"ids"
)
List
<
String
>
ids
);
}
}
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 @
1c207e6d
...
@@ -6,6 +6,8 @@ public class PointCheckDetailBo {
...
@@ -6,6 +6,8 @@ public class PointCheckDetailBo {
private
Long
id
;
private
Long
id
;
private
long
pointId
;
private
long
pointId
;
private
long
inputItemId
;
private
String
pointName
;
private
String
pointName
;
...
@@ -23,6 +25,10 @@ public class PointCheckDetailBo {
...
@@ -23,6 +25,10 @@ public class PointCheckDetailBo {
return
id
;
return
id
;
}
}
public
long
getInputItemId
()
{
return
inputItemId
;
}
public
String
getDefaultValue
()
{
public
String
getDefaultValue
()
{
return
defaultValue
;
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/CheckServiceImpl.java
View file @
1c207e6d
...
@@ -39,6 +39,7 @@ import com.yeejoin.amos.patrol.core.util.DateUtil;
...
@@ -39,6 +39,7 @@ import com.yeejoin.amos.patrol.core.util.DateUtil;
import
com.yeejoin.amos.patrol.core.util.StringUtil
;
import
com.yeejoin.amos.patrol.core.util.StringUtil
;
import
com.yeejoin.amos.patrol.dao.entity.*
;
import
com.yeejoin.amos.patrol.dao.entity.*
;
import
com.yeejoin.amos.patrol.feign.RemoteSecurityService
;
import
com.yeejoin.amos.patrol.feign.RemoteSecurityService
;
import
com.yeejoin.amos.patrol.quartz.IJobService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.assertj.core.util.Sets
;
import
org.assertj.core.util.Sets
;
...
@@ -114,6 +115,9 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -114,6 +115,9 @@ public class CheckServiceImpl implements ICheckService {
private
CheckInputMapper
checkInputMapper
;
private
CheckInputMapper
checkInputMapper
;
@Autowired
@Autowired
ESTaskDetail
esTaskDetail
;
@Autowired
private
IdxFeign
idxFeign
;
private
IdxFeign
idxFeign
;
private
String
P_STATIC_DAY
=
"p_static_day"
;
private
String
P_STATIC_DAY
=
"p_static_day"
;
...
@@ -468,6 +472,9 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -468,6 +472,9 @@ public class CheckServiceImpl implements ICheckService {
}
}
@Autowired
IJobService
jobService
;
@Override
@Override
@Transactional
@Transactional
...
@@ -605,6 +612,13 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -605,6 +612,13 @@ public class CheckServiceImpl implements ICheckService {
taskDetail
.
setStatus
(
CheckStatusEnum
.
QUALIFIED
.
getCode
());
taskDetail
.
setStatus
(
CheckStatusEnum
.
QUALIFIED
.
getCode
());
}
}
planTaskDetailDao
.
saveAndFlush
(
taskDetail
);
planTaskDetailDao
.
saveAndFlush
(
taskDetail
);
ESTaskDetailDto
esTaskDetailDto
=
esTaskDetail
.
findById
(
String
.
valueOf
(
taskDetail
.
getId
())).
get
();
esTaskDetailDto
.
setPointStatus
(
String
.
valueOf
(
taskDetail
.
getIsFinish
()));
Long
routId
=
planTaskMapper
.
selectRoutId
(
String
.
valueOf
(
taskDetail
.
getTaskNo
()));
JSONObject
jsonObject
=
jobService
.
getCheckInput
(
routId
,
taskDetail
.
getPointId
(),
"update"
,
requestParam
);
esTaskDetailDto
.
setAppCheckInput
(
jsonObject
);
esTaskDetail
.
save
(
esTaskDetailDto
);
check
.
setError
(
error
);
check
.
setError
(
error
);
check
.
setErrorClassify
(
StringUtils
.
join
(
errorClassifyNames
.
keySet
(),
","
));
check
.
setErrorClassify
(
StringUtils
.
join
(
errorClassifyNames
.
keySet
(),
","
));
...
@@ -927,6 +941,9 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -927,6 +941,9 @@ public class CheckServiceImpl implements ICheckService {
pointImgUrls
.
add
(
action
.
getPhotoData
());
pointImgUrls
.
add
(
action
.
getPhotoData
());
});
});
Check
check
=
checkDao
.
findById
(
checkId
).
get
();
Check
check
=
checkDao
.
findById
(
checkId
).
get
();
pointCheckRespone
.
setId
(
planPointInfo
.
getId
());
pointCheckRespone
.
setPlanTaskId
(
planTaskId
);
pointCheckRespone
.
setTaskStatus
(
planPointInfo
.
getTaskStatus
());
pointCheckRespone
.
setTaskStatus
(
planPointInfo
.
getTaskStatus
());
pointCheckRespone
.
setPointStatus
(
planPointInfo
.
getPointStatus
());
pointCheckRespone
.
setPointStatus
(
planPointInfo
.
getPointStatus
());
pointCheckRespone
.
setBeginTime
(
planPointInfo
.
getBeginTime
());
pointCheckRespone
.
setBeginTime
(
planPointInfo
.
getBeginTime
());
...
...
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 @
1c207e6d
...
@@ -964,7 +964,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
...
@@ -964,7 +964,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
taskDetail
.
setName
(
point
.
getName
());
taskDetail
.
setName
(
point
.
getName
());
taskDetail
.
setPointNo
(
point
.
getPointNo
());
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
());
JSONObject
jsonObject
=
jobService
.
getCheckInput
(
routId
,
taskDetail
.
getPointId
());
JSONObject
jsonObject
=
jobService
.
getCheckInput
(
routId
,
taskDetail
.
getPointId
()
,
"save"
,
null
);
appPointCheckRespone
.
setAppCheckInput
(
jsonObject
);
appPointCheckRespone
.
setAppCheckInput
(
jsonObject
);
ESTaskDetailDto
esTaskDetailDto
=
JSONObject
.
parseObject
(
toJSONString
(
appPointCheckRespone
),
ESTaskDetailDto
esTaskDetailDto
=
JSONObject
.
parseObject
(
toJSONString
(
appPointCheckRespone
),
ESTaskDetailDto
.
class
);
ESTaskDetailDto
.
class
);
...
@@ -1322,16 +1322,16 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
...
@@ -1322,16 +1322,16 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
planTaskDetailMapper
.
finishTaskDetail
(
action
.
getId
(),
action
.
getPointId
(),
planTaskDetailMapper
.
finishTaskDetail
(
action
.
getId
(),
action
.
getPointId
(),
action
.
getPlanTask
().
getId
(),
userId
);
action
.
getPlanTask
().
getId
(),
userId
);
AppPointCheckRespone
appPointCheckRespone
=
planService
.
queryPointPlanTaskDetail
(
null
,
null
,
null
,
action
.
getTaskNo
(),
action
.
getPointId
());
AppPointCheckRespone
appPointCheckRespone
=
planService
.
queryPointPlanTaskDetail
(
null
,
null
,
null
,
action
.
getTaskNo
(),
action
.
getPointId
());
JSONObject
jsonObject
=
jobService
.
getCheckInput
(
routId
,
action
.
getPointId
());
ESTaskDetailDto
esTaskDetailDto
=
esTaskDetail
.
findById
(
String
.
valueOf
(
appPointCheckRespone
.
getId
())).
get
();
JSONObject
jsonObject
=
jobService
.
getCheckInput
(
routId
,
action
.
getPointId
(),
"update"
,
null
);
appPointCheckRespone
.
setAppCheckInput
(
jsonObject
);
appPointCheckRespone
.
setAppCheckInput
(
jsonObject
);
ESTaskDetailDto
esTaskDetailDto
=
JSONObject
.
parseObject
(
toJSONString
(
appPointCheckRespone
),
esTaskDetailDto
.
setPointImgUrls
(
new
ArrayList
<>());
ESTaskDetailDto
.
class
);
esTaskDetail
.
save
(
esTaskDetailDto
);
esTaskDetail
.
save
(
esTaskDetailDto
);
return
action
;
return
action
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
}
}
ESPlanTaskListDto
esPlanTaskListDto
=
JSONObject
.
parseObject
(
toJSONString
(
planTask
),
ESPlanTaskListDto
esPlanTaskListDto
=
esPlanTaskList
.
findById
(
String
.
valueOf
(
planTask
.
getId
())).
get
();
ESPlanTaskListDto
.
class
);
Map
task
=
queryPlanTaskById
(
Long
.
valueOf
(
id
));
Map
task
=
queryPlanTaskById
(
Long
.
valueOf
(
id
));
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
());
...
@@ -1339,6 +1339,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
...
@@ -1339,6 +1339,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
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
);
esPlanTaskListDto
.
setPoints
(
planTaskDetails
);
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/IJobService.java
View file @
1c207e6d
package
com
.
yeejoin
.
amos
.
patrol
.
quartz
;
package
com
.
yeejoin
.
amos
.
patrol
.
quartz
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.patrol.business.param.CheckRecordParam
;
import
com.yeejoin.amos.patrol.dao.entity.Msg
;
import
com.yeejoin.amos.patrol.dao.entity.Msg
;
import
com.yeejoin.amos.patrol.dao.entity.PlanTask
;
import
com.yeejoin.amos.patrol.dao.entity.PlanTask
;
import
com.yeejoin.amos.patrol.dao.entity.Task
;
import
com.yeejoin.amos.patrol.dao.entity.Task
;
...
@@ -65,6 +66,6 @@ public interface IJobService {
...
@@ -65,6 +66,6 @@ public interface IJobService {
public
void
createCheckRecord
(
PlanTask
planTask
,
String
userId
);
public
void
createCheckRecord
(
PlanTask
planTask
,
String
userId
);
public
JSONObject
getCheckInput
(
Long
routeId
,
Long
pointId
);
public
JSONObject
getCheckInput
(
Long
routeId
,
Long
pointId
,
String
type
,
CheckRecordParam
requestParam
);
}
}
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 @
1c207e6d
...
@@ -13,14 +13,13 @@ import com.yeejoin.amos.feign.systemctl.Systemctl;
...
@@ -13,14 +13,13 @@ import com.yeejoin.amos.feign.systemctl.Systemctl;
import
com.yeejoin.amos.feign.systemctl.model.MessageModel
;
import
com.yeejoin.amos.feign.systemctl.model.MessageModel
;
import
com.yeejoin.amos.patrol.business.bo.PlanTaskSyncBo
;
import
com.yeejoin.amos.patrol.business.bo.PlanTaskSyncBo
;
import
com.yeejoin.amos.patrol.business.constants.XJConstant
;
import
com.yeejoin.amos.patrol.business.constants.XJConstant
;
import
com.yeejoin.amos.patrol.business.dao.mapper.CheckInputMapper
;
import
com.yeejoin.amos.patrol.business.dao.mapper.*
;
import
com.yeejoin.amos.patrol.business.dao.mapper.CheckMapper
;
import
com.yeejoin.amos.patrol.business.dao.mapper.MsgMapper
;
import
com.yeejoin.amos.patrol.business.dao.mapper.PlanTaskMapper
;
import
com.yeejoin.amos.patrol.business.dao.repository.*
;
import
com.yeejoin.amos.patrol.business.dao.repository.*
;
import
com.yeejoin.amos.patrol.business.entity.mybatis.PlanTaskPointInputItemBo
;
import
com.yeejoin.amos.patrol.business.entity.mybatis.PlanTaskPointInputItemBo
;
import
com.yeejoin.amos.patrol.business.entity.mybatis.PointCheckDetailBo
;
import
com.yeejoin.amos.patrol.business.entity.mybatis.PointCheckDetailBo
;
import
com.yeejoin.amos.patrol.business.feign.JcsFeignClient
;
import
com.yeejoin.amos.patrol.business.feign.JcsFeignClient
;
import
com.yeejoin.amos.patrol.business.param.CheckInputParam
;
import
com.yeejoin.amos.patrol.business.param.CheckRecordParam
;
import
com.yeejoin.amos.patrol.business.service.intfc.IMessageService
;
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.IPatrolDataSyncService
;
import
com.yeejoin.amos.patrol.business.service.intfc.IPlanService
;
import
com.yeejoin.amos.patrol.business.service.intfc.IPlanService
;
...
@@ -33,6 +32,7 @@ import com.yeejoin.amos.patrol.core.common.response.AppPointCheckRespone;
...
@@ -33,6 +32,7 @@ import com.yeejoin.amos.patrol.core.common.response.AppPointCheckRespone;
import
com.yeejoin.amos.patrol.dao.entity.*
;
import
com.yeejoin.amos.patrol.dao.entity.*
;
import
com.yeejoin.amos.patrol.feign.RemoteSecurityService
;
import
com.yeejoin.amos.patrol.feign.RemoteSecurityService
;
import
com.yeejoin.amos.patrol.mqtt.WebMqttComponent
;
import
com.yeejoin.amos.patrol.mqtt.WebMqttComponent
;
import
liquibase.pro.packaged.S
;
import
org.quartz.Job
;
import
org.quartz.Job
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -216,11 +216,11 @@ public class JobService implements IJobService {
...
@@ -216,11 +216,11 @@ public class JobService implements IJobService {
}
}
List
<
String
>
newList
=
ids
.
subList
(
i
,
i
+
index
);
List
<
String
>
newList
=
ids
.
subList
(
i
,
i
+
index
);
planTaskMapper
.
updatePlanTaskList
(
newList
,
PlanTaskFinishStatusEnum
.
UNDERWAY
.
getValue
());
planTaskMapper
.
updatePlanTaskList
(
newList
,
PlanTaskFinishStatusEnum
.
UNDERWAY
.
getValue
());
updateEsPlanTaskList
(
newList
,
PlanTaskFinishStatusEnum
.
UNDERWAY
.
getValue
());
updateEsPlanTaskList
(
newList
,
PlanTaskFinishStatusEnum
.
UNDERWAY
.
getValue
()
,
"notApp"
,
null
);
}
}
}
else
{
}
else
{
planTaskMapper
.
updatePlanTaskList
(
ids
,
PlanTaskFinishStatusEnum
.
UNDERWAY
.
getValue
());
planTaskMapper
.
updatePlanTaskList
(
ids
,
PlanTaskFinishStatusEnum
.
UNDERWAY
.
getValue
());
updateEsPlanTaskList
(
ids
,
PlanTaskFinishStatusEnum
.
UNDERWAY
.
getValue
());
updateEsPlanTaskList
(
ids
,
PlanTaskFinishStatusEnum
.
UNDERWAY
.
getValue
()
,
"notApp"
,
null
);
}
}
}
}
planTaskAddJob
(
planTask
);
planTaskAddJob
(
planTask
);
...
@@ -244,11 +244,11 @@ public class JobService implements IJobService {
...
@@ -244,11 +244,11 @@ public class JobService implements IJobService {
}
}
List
<
String
>
newList
=
ids
.
subList
(
i
,
i
+
index
);
List
<
String
>
newList
=
ids
.
subList
(
i
,
i
+
index
);
planTaskMapper
.
updatePlanTaskList
(
newList
,
PlanTaskFinishStatusEnum
.
UNDERWAY
.
getValue
());
planTaskMapper
.
updatePlanTaskList
(
newList
,
PlanTaskFinishStatusEnum
.
UNDERWAY
.
getValue
());
updateEsPlanTaskList
(
newList
,
PlanTaskFinishStatusEnum
.
UNDERWAY
.
getValue
());
updateEsPlanTaskList
(
newList
,
PlanTaskFinishStatusEnum
.
UNDERWAY
.
getValue
()
,
"notApp"
,
null
);
}
}
}
else
{
}
else
{
planTaskMapper
.
updatePlanTaskList
(
ids
,
PlanTaskFinishStatusEnum
.
UNDERWAY
.
getValue
());
planTaskMapper
.
updatePlanTaskList
(
ids
,
PlanTaskFinishStatusEnum
.
UNDERWAY
.
getValue
());
updateEsPlanTaskList
(
ids
,
PlanTaskFinishStatusEnum
.
UNDERWAY
.
getValue
());
updateEsPlanTaskList
(
ids
,
PlanTaskFinishStatusEnum
.
UNDERWAY
.
getValue
()
,
"notApp"
,
null
);
}
}
}
}
}
}
...
@@ -271,13 +271,17 @@ public class JobService implements IJobService {
...
@@ -271,13 +271,17 @@ public class JobService implements IJobService {
}
}
}
}
@Autowired
PointMapper
pointMapper
;
public
void
updateEsPlanTaskList
(
List
<
String
>
ids
,
int
status
,
String
isApp
,
CheckRecordParam
requestParam
)
{
public
void
updateEsPlanTaskList
(
List
<
String
>
ids
,
int
status
)
{
String
type
=
"save"
;
if
(
"app"
.
equals
(
isApp
))
{
type
=
"update"
;
}
List
<
ESPlanTaskListDto
>
esPlanTaskListDtos
=
new
ArrayList
<>();
List
<
ESPlanTaskListDto
>
esPlanTaskListDtos
=
new
ArrayList
<>();
for
(
String
id
:
ids
)
{
for
(
String
id
:
ids
)
{
ESPlanTaskListDto
esPlanTaskListDto
=
new
ESPlanTaskListDto
();
ESPlanTaskListDto
esPlanTaskListDto
=
esPlanTaskList
.
findById
(
id
).
get
();
esPlanTaskListDto
.
setPlanTaskId
(
id
);
esPlanTaskListDto
.
setFinishStatus
(
String
.
valueOf
(
status
));
esPlanTaskListDto
.
setFinishStatus
(
String
.
valueOf
(
status
));
Map
task
=
planTaskMapper
.
queryPlanTaskById
(
Long
.
valueOf
(
id
));
Map
task
=
planTaskMapper
.
queryPlanTaskById
(
Long
.
valueOf
(
id
));
esPlanTaskListDto
.
setFinshNum
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"finshNum"
))
?
"0"
:
task
.
get
(
"finshNum"
).
toString
());
esPlanTaskListDto
.
setFinshNum
(
ObjectUtils
.
isEmpty
(
task
.
get
(
"finshNum"
))
?
"0"
:
task
.
get
(
"finshNum"
).
toString
());
...
@@ -287,12 +291,18 @@ public class JobService implements IJobService {
...
@@ -287,12 +291,18 @@ 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
);
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
());
JSONObject
jsonObject
=
getCheckInput
(
routId
,
taskDetail
.
getPointId
());
ESTaskDetailDto
esTaskDetailDto
=
esTaskDetail
.
findById
(
String
.
valueOf
(
appPointCheckRespone
.
getId
())).
get
();
JSONObject
jsonObject
=
getCheckInput
(
routId
,
taskDetail
.
getPointId
(),
type
,
requestParam
);
esTaskDetailDto
.
setPointStatus
((
status
==
0
||
status
==
1
)
?
"0"
:
status
==
2
?
"1"
:
"2"
);
esTaskDetailDto
.
setTaskStatus
(
String
.
valueOf
(
status
));
appPointCheckRespone
.
setAppCheckInput
(
jsonObject
);
appPointCheckRespone
.
setAppCheckInput
(
jsonObject
);
ESTaskDetailDto
esTaskDetailDto
=
JSONObject
.
parseObject
(
toJSONString
(
appPointCheckRespone
),
esTaskDetailDto
.
setPointImgUrls
(
ObjectUtils
.
isEmpty
(
requestParam
)
?
new
ArrayList
<>()
:
requestParam
.
getCheckRecordImg
());
ESTaskDetailDto
.
class
);
esTaskDetail
.
save
(
esTaskDetailDto
);
esTaskDetail
.
save
(
esTaskDetailDto
);
}
}
esPlanTaskListDto
.
setPoints
(
planTaskDetailList
);
esPlanTaskListDto
.
setPoints
(
planTaskDetailList
);
...
@@ -304,30 +314,38 @@ public class JobService implements IJobService {
...
@@ -304,30 +314,38 @@ public class JobService implements IJobService {
private
void
updatePlanTaskAndDetailStatus
(
PlanTask
planTask
)
{
private
void
updatePlanTaskAndDetailStatus
(
PlanTask
planTask
)
{
List
<
String
>
esIds
=
planTaskMapper
.
selectPlanTaskIdLists
(
planTask
.
getPlanId
(),
PlanTaskFinishStatusEnum
.
UNDERWAY
.
getValue
(),
PlanTaskFinishStatusEnum
.
NOTSTARTED
.
getValue
());
List
<
String
>
esIds
=
planTaskMapper
.
selectPlanTaskIdLists
(
planTask
.
getPlanId
(),
PlanTaskFinishStatusEnum
.
UNDERWAY
.
getValue
(),
PlanTaskFinishStatusEnum
.
NOTSTARTED
.
getValue
());
if
(
esIds
.
size
()
>
0
)
{
if
(
esIds
.
size
()
>
0
)
{
if
(!
ObjectUtils
.
isEmpty
(
esIds
))
{
if
(
esIds
.
size
()
>
10000
)
{
if
(
esIds
.
size
()
>
10000
)
{
int
index
=
10000
;
int
index
=
10000
;
for
(
int
i
=
0
;
i
<
esIds
.
size
();
i
+=
10000
)
{
for
(
int
i
=
0
;
i
<
esIds
.
size
();
i
+=
10000
)
{
if
(
i
+
10000
>
esIds
.
size
())
{
if
(
i
+
10000
>
esIds
.
size
())
{
index
=
esIds
.
size
()
-
i
;
index
=
esIds
.
size
()
-
i
;
}
List
<
String
>
newList
=
esIds
.
subList
(
i
,
i
+
index
);
planTaskMapper
.
updatePlanTaskList
(
newList
,
PlanTaskFinishStatusEnum
.
OVERTIME
.
getValue
());
updateEsPlanTaskList
(
newList
,
PlanTaskFinishStatusEnum
.
OVERTIME
.
getValue
(),
"notApp"
,
null
);
List
<
PlanTask
>
planTaskList
=
planTaskMapper
.
selectTaskList
(
newList
);
if
(!
ObjectUtils
.
isEmpty
(
planTaskList
))
{
for
(
PlanTask
task
:
planTaskList
)
{
createOmissionCheckRecord
(
task
);
}
}
List
<
String
>
newList
=
esIds
.
subList
(
i
,
i
+
index
);
planTaskMapper
.
updatePlanTaskList
(
newList
,
PlanTaskFinishStatusEnum
.
OVERTIME
.
getValue
());
updateEsPlanTaskList
(
newList
,
PlanTaskFinishStatusEnum
.
OVERTIME
.
getValue
());
}
}
}
else
{
}
planTaskMapper
.
updatePlanTaskList
(
esIds
,
PlanTaskFinishStatusEnum
.
OVERTIME
.
getValue
());
}
else
{
updateEsPlanTaskList
(
esIds
,
PlanTaskFinishStatusEnum
.
OVERTIME
.
getValue
());
planTaskMapper
.
updatePlanTaskList
(
esIds
,
PlanTaskFinishStatusEnum
.
OVERTIME
.
getValue
());
updateEsPlanTaskList
(
esIds
,
PlanTaskFinishStatusEnum
.
OVERTIME
.
getValue
(),
"notApp"
,
null
);
List
<
PlanTask
>
planTaskList
=
planTaskMapper
.
selectTaskList
(
esIds
);
if
(!
ObjectUtils
.
isEmpty
(
planTaskList
))
{
for
(
PlanTask
task
:
planTaskList
)
{
createOmissionCheckRecord
(
task
);
}
}
}
}
}
List
<
Long
>
ids
=
new
ArrayList
<>();
ids
.
add
(
planTask
.
getId
());
if
(!
ValidationUtil
.
isEmpty
(
ids
)){
planTaskMapper
.
updatePlanTaskDetailsByPlanId
(
ids
);
}
}
}
List
<
Long
>
ids
=
new
ArrayList
<>();
ids
.
add
(
planTask
.
getId
());
if
(!
ValidationUtil
.
isEmpty
(
ids
)){
planTaskMapper
.
updatePlanTaskDetailsByPlanId
(
ids
);
}
createOmissionCheckRecord
(
planTask
);
}
}
private
void
initMsgJob
()
{
private
void
initMsgJob
()
{
...
@@ -472,30 +490,70 @@ public class JobService implements IJobService {
...
@@ -472,30 +490,70 @@ public class JobService implements IJobService {
}
}
public
JSONObject
getCheckInput
(
Long
routeId
,
Long
pointId
){
public
JSONObject
getCheckInput
(
Long
routeId
,
Long
pointId
,
String
type
,
CheckRecordParam
requestParam
)
{
List
<
AppCheckInputRespone
>
appCheckInputResponeList
=
new
ArrayList
<
AppCheckInputRespone
>();
List
<
PointCheckDetailBo
>
pointInputs
=
planTaskMapper
.
getPointInputByRouteIdAndPointId
(
routeId
,
pointId
);
List
<
PointCheckDetailBo
>
pointInputs
=
planTaskMapper
.
getPointInputByRouteIdAndPointId
(
routeId
,
pointId
);
JSONObject
appResponeMap
=
new
JSONObject
();
JSONObject
appResponeMap
=
new
JSONObject
();
pointInputs
.
forEach
(
action
->
{
pointInputs
.
forEach
(
action
->
{
AppCheckInputRespone
input
=
new
AppCheckInputRespone
();
AppCheckInputRespone
input
=
new
AppCheckInputRespone
();
if
(
"save"
.
equals
(
type
))
{
input
.
setInputValue
(
null
);
input
.
setPointInputImgUrls
(
new
ArrayList
<>());
}
else
{
InputItem
inputItem
=
inputItemDao
.
findById
(
action
.
getInputItemId
()).
get
();
CheckInput
checkInput
=
new
CheckInput
();
if
(!
ValidationUtil
.
isEmpty
(
requestParam
))
{
List
<
CheckInputParam
>
checkItems
=
requestParam
.
getCheckItems
();
for
(
CheckInputParam
x
:
checkItems
)
{
if
(
x
.
getInputItemId
()
==
action
.
getInputItemId
())
{
input
.
setInputValue
(
x
.
getInputValue
());
break
;
}
}
}
else
{
if
(
XJConstant
.
INPUT_ITEM_SELECT
.
equals
(
inputItem
.
getItemType
()))
{
checkInput
=
paraseSelect
(
checkInput
,
inputItem
.
getDataJson
(),
inputItem
.
getIsScore
());
input
=
JSONObject
.
parseObject
(
toJSONString
(
checkInput
),
AppCheckInputRespone
.
class
);
}
else
if
(
XJConstant
.
INPUT_ITEM_NUMBER
.
equals
(
inputItem
.
getItemType
()))
{
input
.
setInputValue
(
inputItem
.
getDefaultValue
());
}
else
if
(
XJConstant
.
INPUT_ITEM_TEXT
.
equals
(
inputItem
.
getItemType
()))
{
input
.
setInputValue
(
inputItem
.
getDefaultValue
());
}
}
if
(!
ObjectUtils
.
isEmpty
(
requestParam
))
{
List
<
CheckInputParam
>
checkItems
=
requestParam
.
getCheckItems
();
for
(
CheckInputParam
x
:
checkItems
)
{
if
(
x
.
getInputItemId
()
==
action
.
getInputItemId
()
&&
(
x
.
getClassifyIds
()
==
action
.
getClassifyId
()
||
x
.
getClassifyIds
()
==
null
))
{
if
(
x
.
getCheckInputImg
()
!=
null
&&
x
.
getCheckInputImg
().
size
()
>
0
)
{
input
.
setPointInputImgUrls
(
x
.
getCheckInputImg
());
}
else
{
input
.
setPointInputImgUrls
(
new
ArrayList
<>());
}
}
}
}
}
input
.
setInputName
(
action
.
getInputName
());
input
.
setInputName
(
action
.
getInputName
());
input
.
setCheckInputId
(
action
.
getCheckInputId
());
input
.
setCheckInputId
(
action
.
getCheckInputId
());
input
.
setDefaultValue
(
action
.
getDefaultValue
());
input
.
setDataJson
(
action
.
getDataJson
());
input
.
setDataJson
(
action
.
getDataJson
());
input
.
setIsMultiline
(
action
.
getIsMultiline
());
input
.
setIsMultiline
(
action
.
getIsMultiline
());
input
.
setIsMust
(
action
.
getIsMust
());
input
.
setIsMust
(
action
.
getIsMust
());
input
.
setItemType
(
action
.
getItemType
());
input
.
setItemType
(
action
.
getItemType
());
input
.
setOrderNo
(
action
.
getOrderNo
());
input
.
setOrderNo
(
action
.
getOrderNo
());
input
.
setPictureJson
(
action
.
getPictureJson
());
input
.
setPictureJson
(
action
.
getPictureJson
());
input
.
setClassifyId
(
action
.
getClassifyId
());
input
.
setClassifyId
(
action
.
getClassifyId
());
input
.
setClassifyName
(
action
.
getClassifyName
());
input
.
setClassifyName
(
action
.
getClassifyName
());
String
key
=
ObjectUtils
.
isEmpty
(
action
.
getClassifyName
())
?
"其他"
:
action
.
getClassifyName
();
appCheckInputResponeList
.
add
(
input
);
if
(
appResponeMap
.
containsKey
(
key
))
{
appResponeMap
.
getJSONArray
(
key
).
add
(
input
);
}
else
{
List
<
AppCheckInputRespone
>
appCheckInputResponeList
=
new
ArrayList
<
AppCheckInputRespone
>();
appCheckInputResponeList
.
add
(
input
);
appResponeMap
.
put
(
key
,
appCheckInputResponeList
);
}
});
});
appResponeMap
.
put
(
"items"
,
appCheckInputResponeList
);
return
appResponeMap
;
return
appResponeMap
;
}
}
...
@@ -768,14 +826,14 @@ public class JobService implements IJobService {
...
@@ -768,14 +826,14 @@ public class JobService implements IJobService {
if
(
XJConstant
.
STATUS_MONITOR_START
.
equals
(
jobType
))
{
if
(
XJConstant
.
STATUS_MONITOR_START
.
equals
(
jobType
))
{
if
(!
ValidationUtil
.
isEmpty
(
notStartPlanTaskList
))
{
if
(!
ValidationUtil
.
isEmpty
(
notStartPlanTaskList
))
{
planTaskMapper
.
updatePlanTaskByPlanId
(
notStartPlanTaskList
,
PlanTaskFinishStatusEnum
.
UNDERWAY
.
getValue
());
planTaskMapper
.
updatePlanTaskByPlanId
(
notStartPlanTaskList
,
PlanTaskFinishStatusEnum
.
UNDERWAY
.
getValue
());
updateEsPlanTaskList
(
notStartPlanTaskStringList
,
PlanTaskFinishStatusEnum
.
UNDERWAY
.
getValue
());
updateEsPlanTaskList
(
notStartPlanTaskStringList
,
PlanTaskFinishStatusEnum
.
UNDERWAY
.
getValue
()
,
"notApp"
,
null
);
patrolDataSyncService
.
taskStatic
(
null
);
patrolDataSyncService
.
taskStatic
(
null
);
}
}
}
else
if
(
XJConstant
.
STATUS_MONITOR_END
.
equals
(
jobType
))
{
}
else
if
(
XJConstant
.
STATUS_MONITOR_END
.
equals
(
jobType
))
{
if
(!
ValidationUtil
.
isEmpty
(
StartPlanTaskList
))
{
if
(!
ValidationUtil
.
isEmpty
(
StartPlanTaskList
))
{
planTaskMapper
.
updatePlanTaskByPlanId
(
StartPlanTaskList
,
PlanTaskFinishStatusEnum
.
OVERTIME
.
getValue
());
planTaskMapper
.
updatePlanTaskByPlanId
(
StartPlanTaskList
,
PlanTaskFinishStatusEnum
.
OVERTIME
.
getValue
());
planTaskMapper
.
updatePlanTaskDetailsByPlanId
(
StartPlanTaskList
);
planTaskMapper
.
updatePlanTaskDetailsByPlanId
(
StartPlanTaskList
);
updateEsPlanTaskList
(
StartPlanTaskStringList
,
PlanTaskFinishStatusEnum
.
OVERTIME
.
getValue
());
updateEsPlanTaskList
(
StartPlanTaskStringList
,
PlanTaskFinishStatusEnum
.
OVERTIME
.
getValue
()
,
"notApp"
,
null
);
patrolDataSyncService
.
taskStatic
(
null
);
patrolDataSyncService
.
taskStatic
(
null
);
for
(
PlanTask
planTask:
planTaskList
for
(
PlanTask
planTask:
planTaskList
)
{
)
{
...
...
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/resources/application-dev.properties
View file @
1c207e6d
...
@@ -107,6 +107,7 @@ is.zxj=true
...
@@ -107,6 +107,7 @@ is.zxj=true
fire-rescue
=
1432549862557130753
fire-rescue
=
1432549862557130753
## ES properties:
## ES properties:
action.auto_create_index
:
true
elasticsearch.username
=
elastic
elasticsearch.username
=
elastic
elasticsearch.password
=
a123456
elasticsearch.password
=
a123456
spring.elasticsearch.rest.uris
=
http://172.16.10.243:9200
spring.elasticsearch.rest.uris
=
http://172.16.10.243:9200
...
...
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
1c207e6d
...
@@ -722,6 +722,7 @@
...
@@ -722,6 +722,7 @@
<select
id=
"getPointInputByRouteIdAndPointId"
resultType=
"com.yeejoin.amos.patrol.business.entity.mybatis.PointCheckDetailBo"
parameterType=
"long"
>
<select
id=
"getPointInputByRouteIdAndPointId"
resultType=
"com.yeejoin.amos.patrol.business.entity.mybatis.PointCheckDetailBo"
parameterType=
"long"
>
SELECT
SELECT
pii.id inputItemId,
pii.name inputName,
pii.name inputName,
pii.id checkInputId,
pii.id checkInputId,
ppc.id classifyId,
ppc.id classifyId,
...
@@ -1749,4 +1750,15 @@
...
@@ -1749,4 +1750,15 @@
plan_id = #{planId}
plan_id = #{planId}
AND (finish_status = #{status} or finish_status = #{status1} )
AND (finish_status = #{status} or finish_status = #{status1} )
</select>
</select>
<select
id=
"selectTaskList"
resultType=
"com.yeejoin.amos.patrol.dao.entity.PlanTask"
>
select
*
from
"p_plan_task"
where id in
<foreach
item=
"id"
collection=
"newList"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</select>
</mapper>
</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