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
417f57fd
Commit
417f57fd
authored
Feb 15, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
管控左屏巡检需求
parent
462a6d4e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
105 additions
and
0 deletions
+105
-0
ControlScreenController.java
...s/patrol/business/controller/ControlScreenController.java
+37
-0
PlanTaskMapper.java
...ejoin/amos/patrol/business/dao/mapper/PlanTaskMapper.java
+7
-0
PlanTaskServiceImpl.java
...mos/patrol/business/service/impl/PlanTaskServiceImpl.java
+5
-0
IPlanTaskService.java
.../amos/patrol/business/service/intfc/IPlanTaskService.java
+7
-0
dbTemplate_plan_task.xml
...rol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+49
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/ControlScreenController.java
0 → 100644
View file @
417f57fd
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
controller
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.patrol.business.service.intfc.IPlanTaskService
;
import
com.yeejoin.amos.patrol.business.util.CommonResponse
;
import
com.yeejoin.amos.patrol.business.util.CommonResponseUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
javax.annotation.Resource
;
@RestController
@RequestMapping
(
"/api/controlScreen"
)
@Api
(
value
=
"管控屏API"
,
tags
=
"管控屏API"
)
public
class
ControlScreenController
extends
AbstractBaseController
{
@Resource
private
IPlanTaskService
iPlanTaskService
;
@GetMapping
(
"/firePatrolStatics"
)
@ApiOperation
(
value
=
"消防巡检信息统计"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
public
CommonResponse
firePatrolStatics
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
if
(
StringUtils
.
isEmpty
(
bizOrgCode
))
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
bizOrgCode
=
reginParams
.
getPersonIdentity
().
getCompanyBizOrgCode
();
}
return
CommonResponseUtil
.
success
(
iPlanTaskService
.
firePatrolStatics
(
bizOrgCode
));
}
}
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 @
417f57fd
...
...
@@ -191,4 +191,11 @@ public interface PlanTaskMapper extends BaseMapper {
List
<
Plan
>
getPlanIdsByDate
(
@Param
(
"date"
)
Date
date
);
List
<
PlanTask
>
getPlanTaskList
(
@Param
(
"date"
)
Date
date
);
/**
* 消防巡检信息统计
* @param bizOrgCode 业务公司编码
* @return 消防巡检信息统计
*/
List
<
Map
<
String
,
Object
>>
firePatrolStatics
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
}
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 @
417f57fd
...
...
@@ -1811,4 +1811,9 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
return
result
;
}
@Override
public
List
<
Map
<
String
,
Object
>>
firePatrolStatics
(
String
bizOrgCode
)
{
return
planTaskMapper
.
firePatrolStatics
(
bizOrgCode
);
}
}
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 @
417f57fd
...
...
@@ -178,4 +178,11 @@ public interface IPlanTaskService {
List
<
Map
<
String
,
Object
>>
queryPlanTaskTimeAxis
(
Long
userId
,
Integer
createDate
);
List
<
Map
<
String
,
Object
>>
queryTimeAxis
(
Long
userId
,
Integer
createDate
);
/**
* 消防巡检信息统计
* @param bizOrgCode 业务公司编码
* @return 消防巡检信息统计
*/
List
<
Map
<
String
,
Object
>>
firePatrolStatics
(
String
bizOrgCode
);
}
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
417f57fd
...
...
@@ -1126,4 +1126,52 @@
and finish_status in (0,1)
and status = 0
</select>
<select
id=
"firePatrolStatics"
resultType=
"java.util.Map"
>
SELECT
ifnull( sum( `p_plan_task`.`point_num` ), 0 ) AS `value`,
'个' AS unit,
'今日应巡查点' AS `name`,
'currentDayTotal' AS `indexKey`,
'xfxc' AS type,
'1' AS `key`
FROM
`p_plan_task`
WHERE
DATE_FORMAT( check_date, '%Y-%m-%d' ) = CURRENT_DATE ()
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
UNION ALL
SELECT
ifnull( sum( `p_plan_task`.`point_num` ), 0 ) AS `value`,
'个' AS unit,
'今日漏查点位' AS `name`,
'currentDayMiss' AS `indexKey`,
'xfxc' AS type,
'2' AS `key`
FROM
`p_plan_task`
WHERE
`finish_status` = 3
AND DATE_FORMAT( check_date, '%Y-%m-%d' ) = CURRENT_DATE ()
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
UNION ALL
SELECT
ifnull( sum( `p_plan_task`.`finish_num` ), 0 ) AS `value`,
'个' AS unit,
'今日已巡查点' AS `name`,
'currentDayPass' AS `indexKey`,
'xfxc' AS type,
'3' AS `key`
FROM
`p_plan_task`
WHERE
DATE_FORMAT( check_date, '%Y-%m-%d' ) = CURRENT_DATE ()
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
</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