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
8e8b2fa2
Commit
8e8b2fa2
authored
Nov 07, 2023
by
李秀明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(patrol) 巡检接口bug处理
parent
ea000999
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
57 deletions
+53
-57
FaultCaseServiceImpl.java
...eejoin/equipmanage/service/impl/FaultCaseServiceImpl.java
+2
-2
PlanTaskController.java
...n/amos/patrol/business/controller/PlanTaskController.java
+2
-2
PlanTaskServiceImpl.java
...mos/patrol/business/service/impl/PlanTaskServiceImpl.java
+2
-5
IPlanTaskService.java
.../amos/patrol/business/service/intfc/IPlanTaskService.java
+1
-1
dbTemplate_plan_task.xml
...rol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+46
-47
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FaultCaseServiceImpl.java
View file @
8e8b2fa2
...
...
@@ -24,8 +24,8 @@ public class FaultCaseServiceImpl extends ServiceImpl<FaultCaseMapper, FaultCase
@Override
public
Page
<
FaultCase
>
listPage
(
Page
page
,
FaultCase
faultCase
)
{
Page
<
FaultCase
>
pages
=
this
.
baseMapper
.
listPage
(
page
,
faultCase
);
if
(
0
<
pages
.
getRecords
().
size
())
{
pages
.
getRecords
().
stream
().
map
(
x
->
x
.
setFaultLevel
(
EmergencyLevelEum
.
getNameByCode
(
x
.
getFaultLevel
()))).
collect
(
Collectors
.
toList
(
));
if
(
!
pages
.
getRecords
().
isEmpty
())
{
pages
.
getRecords
().
forEach
(
x
->
x
.
setFaultLevel
(
EmergencyLevelEum
.
getNameByCode
(
x
.
getFaultLevel
())
));
}
return
pages
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/PlanTaskController.java
View file @
8e8b2fa2
...
...
@@ -1102,8 +1102,8 @@ public class PlanTaskController extends AbstractBaseController {
@ApiParam
(
value
=
"开始日期"
)
@RequestParam
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
Date
startDate
,
@ApiParam
(
value
=
"结束日期"
)
@RequestParam
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
Date
endDate
)
{
try
{
Map
<
String
,
Object
>
map
=
planTaskService
.
queryPatrolInfo
(
bizOrgCode
,
startDate
,
endDate
);
return
CommonPatrolResponseUtil
.
success
(
map
);
List
<
Map
<
String
,
Object
>>
result
=
planTaskService
.
queryPatrolInfo
(
bizOrgCode
,
startDate
,
endDate
);
return
CommonPatrolResponseUtil
.
success
(
result
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonPatrolResponseUtil
.
failure
(
"远程查询巡检信息失败!"
);
...
...
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 @
8e8b2fa2
...
...
@@ -2101,12 +2101,9 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
@Override
public
Map
<
String
,
Object
>
queryPatrolInfo
(
String
bizOrgCode
,
Date
startDate
,
Date
endDate
)
{
public
List
<
Map
<
String
,
Object
>
>
queryPatrolInfo
(
String
bizOrgCode
,
Date
startDate
,
Date
endDate
)
{
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
list
=
planTaskMapper
.
queryPatrolInfo
(
bizOrgCode
,
startDate
,
endDate
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"patrol"
,
list
);
return
map
;
return
planTaskMapper
.
queryPatrolInfo
(
bizOrgCode
,
startDate
,
endDate
);
}
public
static
byte
[]
file2byte
(
File
file
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/intfc/IPlanTaskService.java
View file @
8e8b2fa2
...
...
@@ -201,6 +201,6 @@ public interface IPlanTaskService {
Map
<
String
,
Object
>
queryPatrolInfoList
(
String
bizOrgCode
,
Date
startDate
,
Date
endDate
);
Map
<
String
,
Object
>
queryPatrolInfo
(
String
bizOrgCode
,
Date
startDate
,
Date
endDate
);
List
<
Map
<
String
,
Object
>
>
queryPatrolInfo
(
String
bizOrgCode
,
Date
startDate
,
Date
endDate
);
}
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
8e8b2fa2
...
...
@@ -263,7 +263,7 @@
p_plan_task pt
INNER JOIN p_plan p ON pt.plan_id = p.id
) a
<include
refid=
"plan-task-app-where"
/>
<if
test=
"orderBy != null and orderBy != ''"
>
order by ${orderBy}
</if>
...
...
@@ -514,7 +514,7 @@
ptd.route_id routeId,
ptd.plan_id planId,
ptd.user_id AS userId,
ptd.end_time AS endTime,
pptd.id as planTaskDetailId,
(select p_plan.dept_id from p_plan where p_plan.id=ptd.plan_id) depId
...
...
@@ -1589,54 +1589,52 @@
<select
id=
"queryPatrolInfo"
resultType=
"Map"
>
SELECT
s1.date,
IFNULL(s2.`name`, '') AS `name`,
IFNULL(s2.`code`, '') AS `code`,
IFNULL(s2.`planPerson`, '') AS planPerson,
IFNULL(s2.`chargePerson`, '') AS chargePerson,
IFNULL(s2.`beginTime`, '') AS beginTime,
IFNULL(s2.`endTime`, '') AS endTime,
'patrol' AS type
s1.date,
IFNULL(s2.`name`, '') AS `name`,
IFNULL(s2.`code`, '') AS `code`,
IFNULL(s2.`planPerson`, '') AS planPerson,
IFNULL(s2.`chargePerson`, '') AS chargePerson,
IFNULL(s2.`beginTime`, '') AS beginTime,
IFNULL(s2.`endTime`, '') AS endTime,
'patrol' AS type
FROM
(
SELECT
@s := @s + 1 AS `index`,
DATE_FORMAT( DATE_ADD(( DATE( DATE_ADD(#{endDate}, INTERVAL - DATEDIFF(#{endDate}, #{startDate}) DAY ))), INTERVAL @s DAY ), '%Y-%m-%d' ) AS date
FROM
mysql.help_topic,
( SELECT @s := -1 ) temp
WHERE
@s
<
DATEDIFF(#{endDate}, #{startDate})
SELECT
@s := @s + 1 AS `index`,
DATE_FORMAT( DATE_ADD(( DATE( DATE_ADD(#{endDate}, INTERVAL - DATEDIFF(#{endDate}, #{startDate}) DAY ))), INTERVAL @s DAY ), '%Y-%m-%d' ) AS date
FROM
mysql.help_topic,
( SELECT @s := -1 ) temp
WHERE
@s
<
DATEDIFF(#{endDate}, #{startDate})
) s1
LEFT JOIN (
SELECT
s.*
FROM
(
SELECT
p.`name`,
pt.batch_no AS `code`,
pt.user_name AS planPerson,
pt.user_name AS chargePerson,
pt.begin_time AS beginTime,
pt.end_time AS endTime,
DATE_FORMAT(pt.check_date, '%Y-%m-%d') AS date
FROM
`p_plan_task` pt
LEFT JOIN p_plan p ON p.id = pt.plan_id
<where>
pt.finish_status=2
<if
test=
"bizOrgCode != null"
>
AND p.biz_org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
</where>
GROUP BY
LEFT (pt.check_date, 10)
ORDER BY
pt.check_date
) s
) s2 ON s2.date = s1.date
LEFT JOIN (
SELECT
s.*
FROM
(
SELECT
p.`name`,
pt.batch_no AS `code`,
pt.user_name AS planPerson,
pt.user_name AS chargePerson,
pt.begin_time AS beginTime,
pt.end_time AS endTime,
DATE_FORMAT(pt.check_date, '%Y-%m-%d') AS date
FROM
`p_plan_task` pt
LEFT JOIN p_plan p ON p.id = pt.plan_id
<where>
pt.finish_status=2
<if
test=
"bizOrgCode != null"
>
AND p.biz_org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
</where>
ORDER BY
pt.check_date
) s
) s2 ON s2.date = s1.date
ORDER BY
s1.date
s1.date
</select>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment