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
cd145c4f
Commit
cd145c4f
authored
Dec 03, 2025
by
张森
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
巡检报告问题处理
parent
1e1c6b71
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
195 additions
and
44 deletions
+195
-44
PlanTaskMapper.java
...ejoin/amos/patrol/business/dao/mapper/PlanTaskMapper.java
+16
-1
PlanTaskServiceImpl.java
...mos/patrol/business/service/impl/PlanTaskServiceImpl.java
+63
-42
DefectVo.java
...in/java/com/yeejoin/amos/patrol/business/vo/DefectVo.java
+2
-0
RemoteSecurityService.java
.../com/yeejoin/amos/patrol/feign/RemoteSecurityService.java
+17
-0
dbTemplate_plan_task.xml
...rol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+97
-1
firePatrolPlanTaskReport.ftl
...atrol/src/main/resources/ftl/firePatrolPlanTaskReport.ftl
+0
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/mapper/PlanTaskMapper.java
View file @
cd145c4f
...
...
@@ -309,12 +309,18 @@ public interface PlanTaskMapper extends BaseMapper {
long
countData
(
@Param
(
value
=
"param"
)
PlanTaskPageParam
param
);
long
planTaskPageCount
(
@Param
(
value
=
"param"
)
PlanTaskPageParam
param
);
List
<
HashMap
<
String
,
Object
>>
planTaskByPage
(
@Param
(
value
=
"param"
)
PlanTaskPageParam
param
);
List
<
HashMap
<
String
,
Object
>>
planTaskPage
(
@Param
(
value
=
"param"
)
PlanTaskPageParam
param
);
Map
<
String
,
Object
>
getPlanTaskBasicInfo
(
@Param
(
value
=
"taskDetailId"
)
String
taskDetailId
);
Map
<
String
,
Object
>
getPlanTaskExecuteInfo
(
@Param
(
value
=
"taskDetailId"
)
String
taskDetailId
);
Map
<
String
,
Object
>
getPlanTaskExecuteInfoByTaskId
(
@Param
(
value
=
"taskId"
)
String
taskId
);
List
<
String
>
getDefinitionObjCode
(
@Param
(
value
=
"taskDetailId"
)
String
taskDetailId
);
Map
<
String
,
Object
>
getDefectEquipInfo
(
@Param
(
value
=
"id"
)
String
id
);
...
...
@@ -328,7 +334,16 @@ public interface PlanTaskMapper extends BaseMapper {
List
<
Map
<
String
,
Object
>>
getCheckNotQualifiedEquipInfo
(
@Param
(
value
=
"taskDetailId"
)
String
taskDetailId
);
String
getCheckIdByDetailId
(
@Param
(
value
=
"taskDetailId"
)
String
taskDetailId
);
List
<
String
>
getCheckIdByDetailId
(
@Param
(
value
=
"taskDetailId"
)
String
taskDetailId
);
List
<
Map
<
String
,
Object
>>
getCheckMissedPointInfo
(
@Param
(
value
=
"taskDetailId"
)
String
taskDetailId
);
List
<
String
>
getUserIdByTaskIds
(
@Param
(
value
=
"taskDetailId"
)
String
taskDetailId
);
List
<
Map
<
String
,
Object
>>
getCheckPointInfo
(
@Param
(
value
=
"taskDetailId"
)
String
taskDetailId
,
@Param
(
value
=
"status"
)
String
status
);
String
queryByCompanyCode
(
@Param
(
"companyCode"
)
String
companyCode
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PlanTaskServiceImpl.java
View file @
cd145c4f
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
service
.
impl
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -1840,10 +1843,9 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
if
(
param
.
getPageNumber
()
>=
1
)
{
param
.
setPageNumber
((
param
.
getPageNumber
()
-
1
)*
param
.
getPageSize
());
}
long
total
=
planTaskMapper
.
countData
(
param
);
List
<
HashMap
<
String
,
Object
>>
content
=
planTaskMapper
.
planTaskPage
(
param
);
Page
<
HashMap
<
String
,
Object
>>
result
=
new
PageImpl
<>(
content
,
commonPageable
,
total
);
return
result
;
long
total
=
planTaskMapper
.
planTaskPageCount
(
param
);
List
<
HashMap
<
String
,
Object
>>
content
=
planTaskMapper
.
planTaskByPage
(
param
);
return
new
PageImpl
<>(
content
,
commonPageable
,
total
);
}
@Override
...
...
@@ -1921,10 +1923,11 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
String
timestr
=
DateUtils
.
secondsToTimeStr
(
Integer
.
parseInt
(
infoMap
.
get
(
"difSecond"
).
toString
()));
map
.
put
(
"task_total_time"
,
timestr
);
map
.
put
(
"task_status"
,
infoMap
.
get
(
"taskStatus"
));
Map
<
String
,
Object
>
executeInfoMap
=
planTaskMapper
.
getPlanTaskExecuteInfo
(
taskDetailId
);
Map
<
String
,
Object
>
executeInfoMap
=
planTaskMapper
.
getPlanTaskExecuteInfoByTaskId
(
taskDetailId
);
// 执行情况参数
int
total_count
=
Integer
.
valueOf
(
String
.
valueOf
(
executeInfoMap
.
get
(
"should_check_equip_n
um"
)));
int
real_count
=
Integer
.
valueOf
(
String
.
valueOf
(
executeInfoMap
.
get
(
"real_check_equip_n
um"
)));
int
total_count
=
Integer
.
valueOf
(
String
.
valueOf
(
infoMap
.
get
(
"pointN
um"
)));
int
real_count
=
Integer
.
valueOf
(
String
.
valueOf
(
infoMap
.
get
(
"finishN
um"
)));
map
.
put
(
"should_check_equip_num"
,
total_count
);
map
.
put
(
"real_check_equip_num"
,
real_count
);
double
complete_task_percent
;
...
...
@@ -1956,12 +1959,13 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
miss_task_percent
=
(
Double
.
valueOf
(
missed_count
)
/
Double
.
valueOf
(
total_count
))
*
100
;
}
map
.
put
(
"missed_equip_rate"
,
miss_task_percent
);
List
<
String
>
codes
=
planTaskMapper
.
getDefinitionObjCode
(
taskDetailId
);
String
checkId
=
planTaskMapper
.
getCheckIdByDetailId
(
taskDetailId
);
List
<
String
>
checkIdList
=
planTaskMapper
.
getCheckIdByDetailId
(
taskDetailId
);
// List<String> codes = planTaskMapper.getDefinitionObjCode(taskDetailId);
// String checkId = planTaskMapper.getCheckIdByDetailId(taskDetailId);
FeignClientResult
responseModel
=
new
FeignClientResult
();
List
result
=
new
ArrayList
();
try
{
responseModel
=
idxFeign
.
queryDefectBy
Codes
(
codes
,
checkId
);
responseModel
=
idxFeign
.
queryDefectBy
IdList
(
checkIdList
);
result
=
(
List
)
responseModel
.
getResult
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
@@ -1973,6 +1977,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
res
.
add
(
vo
);
}
}
Map
<
String
,
List
<
DefectVo
>>
collect
=
res
.
stream
().
filter
(
item
->
StrUtil
.
isNotEmpty
(
item
.
getCheckId
())).
collect
(
Collectors
.
groupingBy
(
DefectVo:
:
getCheckId
));
map
.
put
(
"defect_report_num"
,
res
.
size
());
// 上报缺陷
List
<
Map
<
String
,
Object
>>
defects
=
new
ArrayList
<>();
...
...
@@ -1983,23 +1988,23 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
defectMap
.
put
(
"defect_level"
,
DefectLevelEnum
.
getByKey
(
x
.
getDefectLevel
()).
getValue
());
defectMap
.
put
(
"defect_equip_name"
,
x
.
getDefectEquipmentName
());
StringBuffer
sb
=
new
StringBuffer
();
if
(!
StringUtils
.
isEmpty
(
x
.
getDefectEquipmentIds
())){
if
(
x
.
getDefectEquipmentIds
().
contains
(
","
)){
String
[]
ids
=
x
.
getDefectEquipmentIds
().
split
(
","
);
List
<
String
>
equipIds
=
Arrays
.
asList
(
ids
);
List
<
String
>
collect
=
equipIds
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
List
<
Map
<
String
,
String
>>
defectEquipInfoByIds
=
planTaskMapper
.
getDefectEquipInfoByIds
(
collect
);
Map
<
String
,
String
>
equipLocationMap
=
defectEquipInfoByIds
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"id"
),
t
->
t
.
get
(
"equipLocation"
)));
if
(
CollectionUtils
.
isNotEmpty
(
equipIds
))
{
for
(
String
s
:
equipIds
)
{
sb
.
append
(!
ObjectUtils
.
isEmpty
(
equipLocationMap
)
?
equipLocationMap
.
getOrDefault
(
s
,
""
)
:
""
).
append
(
","
);
}
}
}
else
{
Map
<
String
,
Object
>
defectEquipInfo
=
planTaskMapper
.
getDefectEquipInfo
(
x
.
getDefectEquipmentIds
());
sb
.
append
(
ObjectUtils
.
isEmpty
(
defectEquipInfo
)
?
""
:
defectEquipInfo
.
getOrDefault
(
"equipLocation"
,
""
));
}
}
//
if (!StringUtils.isEmpty(x.getDefectEquipmentIds())){
//
if (x.getDefectEquipmentIds().contains(",")){
//
String[] ids = x.getDefectEquipmentIds().split(",");
//
List<String> equipIds = Arrays.asList(ids);
//
List<String> collect = equipIds.stream().distinct().collect(Collectors.toList());
//
List<Map<String, String>> defectEquipInfoByIds = planTaskMapper.getDefectEquipInfoByIds(collect);
//
Map<String, String> equipLocationMap = defectEquipInfoByIds.stream().collect(Collectors.toMap(t -> t.get("id"), t -> t.get("equipLocation")));
//
if (CollectionUtils.isNotEmpty(equipIds)) {
//
for (String s : equipIds) {
//
sb.append(!ObjectUtils.isEmpty(equipLocationMap) ? equipLocationMap.getOrDefault(s, "") : "").append(",");
//
}
//
}
//
}else {
//
Map<String, Object> defectEquipInfo = planTaskMapper.getDefectEquipInfo(x.getDefectEquipmentIds());
//
sb.append(ObjectUtils.isEmpty(defectEquipInfo) ? "": defectEquipInfo.getOrDefault("equipLocation", ""));
//
}
//
}
defectMap
.
put
(
"defect_equip_position"
,
sb
==
null
?
""
:
sb
);
defectMap
.
put
(
"defect_equip_describe"
,
x
.
getDefectDescribe
());
defectMap
.
put
(
"defect_report_time"
,
sdf
.
format
(
x
.
getAddTime
()));
...
...
@@ -2009,7 +2014,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
map
.
put
(
"defect_list"
,
defects
);
// 漏检设备
List
<
Map
<
String
,
Object
>>
missedMaps
=
planTaskMapper
.
getCheckMissed
Equip
Info
(
taskDetailId
);
List
<
Map
<
String
,
Object
>>
missedMaps
=
planTaskMapper
.
getCheckMissed
Point
Info
(
taskDetailId
);
List
<
Map
<
String
,
Object
>>
missedList
=
new
ArrayList
<>();
if
(!
CollectionUtils
.
isEmpty
(
missedMaps
))
{
for
(
int
i
=
0
;
i
<
missedMaps
.
size
();
i
++)
{
...
...
@@ -2023,9 +2028,21 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
}
map
.
put
(
"missed_equip_list"
,
missedList
);
List
<
String
>
userIdByTaskIds
=
planTaskMapper
.
getUserIdByTaskIds
(
taskDetailId
);
Map
<
String
,
String
>
nameMap
=
new
HashMap
<>();
if
(
CollUtil
.
isNotEmpty
(
userIdByTaskIds
))
{
List
<
AgencyUserModel
>
agencyUserModels
=
remoteSecurityService
.
listUserByUserIdsAgencyUser
(
String
.
join
(
","
,
userIdByTaskIds
));
if
(
CollUtil
.
isNotEmpty
(
agencyUserModels
))
{
agencyUserModels
.
forEach
(
item
->
{
//遍历获取orgcode
nameMap
.
put
(
item
.
getUserId
(),
item
.
getRealName
());
});
}
}
// 合格设备
List
<
Map
<
String
,
Object
>>
qualifiedMaps
=
planTaskMapper
.
getCheckQualifiedEquipInfo
(
taskDetailId
);
List
<
Map
<
String
,
Object
>>
qualifiedEquipLists
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
qualifiedMaps
=
planTaskMapper
.
getCheckPointInfo
(
taskDetailId
,
"1"
);
List
<
Map
<
String
,
Object
>>
qualifiedEquipLists
=
new
ArrayList
<>();
if
(!
CollectionUtils
.
isEmpty
(
qualifiedMaps
))
{
for
(
int
i
=
0
;
i
<
qualifiedMaps
.
size
();
i
++)
{
Map
qualifiedMap
=
new
LinkedHashMap
();
...
...
@@ -2033,17 +2050,19 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
qualifiedMap
.
put
(
"qualified_equip_name"
,
qualifiedMaps
.
get
(
i
).
get
(
"equipName"
));
qualifiedMap
.
put
(
"qualified_equip_position"
,
qualifiedMaps
.
get
(
i
).
get
(
"equipPosition"
));
qualifiedMap
.
put
(
"qualified_equip_check_item"
,
qualifiedMaps
.
get
(
i
).
get
(
"checkItem"
));
qualifiedMap
.
put
(
"qualified_equip_result"
,
qualifiedMaps
.
get
(
i
).
get
(
"result"
)
);
qualifiedMap
.
put
(
"qualified_equip_result"
,
"合格"
);
LocalDateTime
checkTime
=
(
LocalDateTime
)
qualifiedMaps
.
get
(
i
).
get
(
"checkDate"
);
String
qualifiedTime
=
sdf
.
format
(
Date
.
from
(
checkTime
.
atZone
(
ZoneId
.
systemDefault
()).
toInstant
()));
qualifiedMap
.
put
(
"qualified_equip_check_time"
,
qualifiedTime
);
qualifiedMap
.
put
(
"qualified_equip_check_user"
,
qualifiedMaps
.
get
(
i
).
get
(
"checkUserName"
));
if
(
qualifiedMaps
.
get
(
i
).
containsKey
(
"executorId"
)
&&
!
Objects
.
isNull
(
qualifiedMaps
.
get
(
i
).
get
(
"executorId"
)))
{
qualifiedMap
.
put
(
"qualified_equip_check_user"
,
nameMap
.
get
(
qualifiedMaps
.
get
(
i
).
get
(
"executorId"
).
toString
()));
}
qualifiedEquipLists
.
add
(
qualifiedMap
);
}
}
map
.
put
(
"qualified_equip_list"
,
qualifiedEquipLists
);
// 不合格设备
List
<
Map
<
String
,
Object
>>
notQualifiedMaps
=
planTaskMapper
.
getCheck
NotQualifiedEquipInfo
(
taskDetailId
);
List
<
Map
<
String
,
Object
>>
notQualifiedMaps
=
planTaskMapper
.
getCheck
PointInfo
(
taskDetailId
,
"2"
);
List
<
Map
<
String
,
Object
>>
notQualifiedEquipLists
=
new
ArrayList
<>();
if
(!
CollectionUtils
.
isEmpty
(
notQualifiedMaps
))
{
for
(
int
i
=
0
;
i
<
notQualifiedMaps
.
size
();
i
++)
{
...
...
@@ -2052,18 +2071,20 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
notQualifiedMap
.
put
(
"not_qualified_equip_name"
,
notQualifiedMaps
.
get
(
i
).
get
(
"equipName"
));
notQualifiedMap
.
put
(
"not_qualified_equip_position"
,
notQualifiedMaps
.
get
(
i
).
get
(
"equipPosition"
));
notQualifiedMap
.
put
(
"not_qualified_equip_check_item"
,
notQualifiedMaps
.
get
(
i
).
get
(
"checkItem"
));
notQualifiedMap
.
put
(
"not_qualified_equip_result"
,
notQualifiedMaps
.
get
(
i
).
get
(
"result"
)
);
notQualifiedMap
.
put
(
"not_qualified_equip_result"
,
"不合格"
);
LocalDateTime
notQualifiedCheckTime
=
(
LocalDateTime
)
notQualifiedMaps
.
get
(
i
).
get
(
"checkDate"
);
String
notQualifiedTime
=
sdf
.
format
(
Date
.
from
(
notQualifiedCheckTime
.
atZone
(
ZoneId
.
systemDefault
()).
toInstant
()));
notQualifiedMap
.
put
(
"not_qualified_equip_check_time"
,
notQualifiedTime
);
notQualifiedMap
.
put
(
"not_qualified_equip_check_user"
,
notQualifiedMaps
.
get
(
i
).
get
(
"checkUserName"
));
if
(
0
<
res
.
size
())
{
for
(
DefectVo
vo
:
res
)
{
if
(
StringUtil
.
isNotEmpty
(
vo
.
getDefectEquipmentCode
())
&&
String
.
valueOf
(
notQualifiedMaps
.
get
(
i
).
get
(
"objCode"
)).
equals
(
vo
.
getDefectEquipmentCode
()))
{
notQualifiedMap
.
put
(
"not_qualified_equip_defect_num"
,
vo
.
getDefectNum
());
break
;
}
}
if
(
notQualifiedMaps
.
get
(
i
).
containsKey
(
"executorId"
)
&&
!
Objects
.
isNull
(
notQualifiedMaps
.
get
(
i
).
get
(
"executorId"
)))
{
notQualifiedMap
.
put
(
"not_qualified_equip_check_user"
,
nameMap
.
get
(
notQualifiedMaps
.
get
(
i
).
get
(
"executorId"
).
toString
()));
}
if
(!
Objects
.
isNull
(
collect
)
&&
ObjectUtil
.
isNotEmpty
(
notQualifiedMaps
.
get
(
i
).
get
(
"checkId"
))
&&
collect
.
containsKey
(
notQualifiedMaps
.
get
(
i
).
get
(
"checkId"
).
toString
()))
{
List
<
DefectVo
>
defectVoList
=
collect
.
get
(
notQualifiedMaps
.
get
(
i
).
get
(
"checkId"
).
toString
());
List
<
String
>
defectNumList
=
defectVoList
.
stream
().
map
(
DefectVo:
:
getDefectNum
).
collect
(
Collectors
.
toList
());
String
join
=
String
.
join
(
","
,
defectNumList
);
notQualifiedMap
.
put
(
"not_qualified_equip_defect_num"
,
join
);
}
notQualifiedEquipLists
.
add
(
notQualifiedMap
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/vo/DefectVo.java
View file @
cd145c4f
...
...
@@ -90,4 +90,6 @@ public class DefectVo {
private
String
batchId
;
@ApiModelProperty
(
value
=
"设备code"
)
private
String
defectEquipmentCode
;
@ApiModelProperty
(
value
=
"巡检检查记录ID"
)
private
String
checkId
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/feign/RemoteSecurityService.java
View file @
cd145c4f
...
...
@@ -53,6 +53,23 @@ public class RemoteSecurityService {
@Autowired
private
IAMOSSecurityServer
iAmosSecurityServer
;
//用户id批量获取用户信息
public
List
<
AgencyUserModel
>
listUserByUserIdsAgencyUser
(
String
userIds
)
{
Toke
serverToken
=
getServerToken
();
RequestContext
.
setAppKey
(
serverToken
.
getAppKey
());
RequestContext
.
setProduct
(
serverToken
.
getProduct
());
RequestContext
.
setToken
(
serverToken
.
getToke
());
List
<
AgencyUserModel
>
agencyUserModel
=
null
;
FeignClientResult
feignClientResult
;
try
{
feignClientResult
=
Privilege
.
agencyUserClient
.
queryByIds
(
userIds
,
Boolean
.
TRUE
);
agencyUserModel
=
(
List
<
AgencyUserModel
>)
feignClientResult
.
getResult
();
}
catch
(
InnerInvokException
e
)
{
e
.
printStackTrace
();
}
return
agencyUserModel
;
}
//根据公司名称获取公司人
public
List
<
CompanyModel
>
listCompanyTree
(
String
toke
,
String
product
,
String
appKey
,
String
companyName
)
{
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
cd145c4f
...
...
@@ -1196,6 +1196,16 @@
</where>
</select>
<select
id=
"getPlanTaskExecuteInfoByTaskId"
resultType=
"java.util.Map"
>
SELECT
count(`status` = '1' or null) as qualified_equip_num,
count(`status` = '2' or null) as not_qualified_equip_num,
count(`status` = '3' or null) as missed_equip_num
FROM
p_plan_task_detail
where task_no = #{taskId}
</select>
<select
id=
"getPlanTaskExecuteInfo"
resultType=
"Map"
>
SELECT
(SELECT
...
...
@@ -1338,7 +1348,45 @@
</select>
<select
id=
"getCheckIdByDetailId"
resultType=
"java.lang.String"
>
select id from p_check where plan_task_detail_id = #{taskDetailId} limit 1
select id from p_check where plan_task_id = #{taskDetailId}
</select>
<select
id=
"getCheckMissedPointInfo"
resultType=
"Map"
>
SELECT
'漏检' AS result,
b.`name` as equipName,
b.area_name as equipPosition,
c.data_source_name AS remark
FROM
p_plan_task_detail a
left join p_point b on a.point_id = b.id
left join p_point_classify c on b.id = c.point_id
where a.task_no = #{taskDetailId}
and a.`status` = '3'
</select>
<select
id=
"getUserIdByTaskIds"
resultType=
"java.lang.String"
>
select DISTINCT(executor_id) from p_plan_task_detail where task_no = #{taskDetailId} and executor_id is not null and executor_id != ''
</select>
<select
id=
"getCheckPointInfo"
resultType=
"java.util.Map"
>
SELECT
'合格' AS result,
b.`name` as equipName,
b.area_name as equipPosition,
GROUP_CONCAT(d.`name`) as checkItem,
a.executor_date as checkDate,
a.executor_id as executorId,
e.id as checkId
FROM
p_plan_task_detail a
left join p_point b on a.point_id = b.id
left join p_point_inputitem c on a.point_id = c.point_id
left join p_input_item d on d.id = c.input_item_id
left join p_check e on a.id = e.plan_task_detail_id
where
a.task_no = #{taskDetailId}
and a.`status` = #{status}
group by a.id
</select>
<select
id=
"getStatics"
resultType=
"java.util.Map"
>
...
...
@@ -1862,4 +1910,51 @@
GROUP BY
LEFT(t.org_code, 18)
</select>
<select
id=
"planTaskByPage"
resultType=
"java.util.HashMap"
>
SELECT
a.plan_name AS taskName,
b.`name` AS routeName,
CAST(a.begin_time AS CHAR) AS beginTime,
CAST(a.end_time AS CHAR) AS endTime,
a.point_num AS checkedNum,
a.finish_num AS finishedNum,
( CASE a.finish_status WHEN 0 THEN '未开始' WHEN 1 THEN '进行中' WHEN 2 THEN '已结束' WHEN 3 THEN '已超时' END ) AS execution,
a.user_name AS executor,
CAST(a.id AS CHAR) AS taskDetailId,
CAST(a.id AS CHAR) AS planTaskId
FROM
`p_plan_task` a
LEFT JOIN p_route b ON b.id = a.route_id
<where>
<if
test=
"param.beginDate != null and param.beginDate != '' "
>
and a.begin_time
<![CDATA[>=]]>
#{param.beginDate}
</if>
<if
test=
"param.endDate != null and param.endDate != ''"
>
and a.end_time
<![CDATA[<=]]>
#{param.endDate}
</if>
<if
test=
"param.taskName != null and param.taskName != ''"
>
and a.plan_name like concat('%',#{param.taskName},'%')
</if>
<if
test=
"param.status != null"
>
and a.`status` = #{param.status}
</if>
<if
test=
"param.routeId != null"
>
and a.route_id = #{param.routeId}
</if>
<if
test=
"param.bizOrgCode != null"
>
and a.org_code like concat(#{param.bizOrgCode},'%')
</if>
</where>
ORDER BY
a.begin_time DESC
<choose>
<when
test=
"param.pageSize==-1"
></when>
<when
test=
"param.pageSize!=-1"
>
limit #{param.pageNumber}, #{param.pageSize}
</when>
</choose>
</select>
<select
id=
"planTaskPageCount"
resultType=
"long"
>
SELECT
count(1)
FROM
`p_plan_task` a
LEFT JOIN p_route b ON b.id = a.route_id
<where>
<if
test=
"param.beginDate != null and param.beginDate != '' "
>
and a.begin_time
<![CDATA[>=]]>
#{param.beginDate}
</if>
<if
test=
"param.endDate != null and param.endDate != ''"
>
and a.end_time
<![CDATA[<=]]>
#{param.endDate}
</if>
<if
test=
"param.taskName != null and param.taskName != ''"
>
and a.plan_name like concat('%',#{param.taskName},'%')
</if>
<if
test=
"param.status != null"
>
and a.`status` = #{param.status}
</if>
<if
test=
"param.routeId != null"
>
and a.route_id = #{param.routeId}
</if>
<if
test=
"param.bizOrgCode != null"
>
and a.org_code like concat(#{param.bizOrgCode},'%')
</if>
</where>
</select>
</mapper>
\ No newline at end of file
amos-boot-system-patrol/src/main/resources/ftl/firePatrolPlanTaskReport.ftl
View file @
cd145c4f
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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