Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
5f0cf73e
Commit
5f0cf73e
authored
Apr 24, 2020
by
单奇雲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增接口,调试接口
parent
7fb3ae1b
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
312 additions
and
6 deletions
+312
-6
PlanTaskDetailStatusEnum.java
...ejoin/amos/fas/common/enums/PlanTaskDetailStatusEnum.java
+108
-0
SafetyExecuteBo.java
...ava/com/yeejoin/amos/fas/business/bo/SafetyExecuteBo.java
+47
-0
View3dController.java
...eejoin/amos/fas/business/controller/View3dController.java
+22
-4
View3dMapper.java
...om/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
+22
-0
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+68
-0
IView3dService.java
...ejoin/amos/fas/business/service/intfc/IView3dService.java
+12
-0
dbTemplate_risk_source.xml
...t/src/main/resources/db/mapper/dbTemplate_risk_source.xml
+3
-2
dbTemplate_view3d.xml
...sStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
+30
-0
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/common/enums/PlanTaskDetailStatusEnum.java
0 → 100644
View file @
5f0cf73e
package
com
.
yeejoin
.
amos
.
fas
.
common
.
enums
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
public
enum
PlanTaskDetailStatusEnum
{
NOTSTARTED
(
"未开始"
,
"0"
),
QUALIFIED
(
"合格"
,
"1"
),
UNQUALIFIED
(
"不合格"
,
"2"
),
OMISSION
(
"漏检"
,
"3"
);
/**
* 名称
*/
private
String
name
;
/**
* 值
*/
private
String
type
;
private
PlanTaskDetailStatusEnum
(
String
name
,
String
type
)
{
this
.
name
=
name
;
this
.
type
=
type
;
}
public
static
String
getName
(
String
type
)
{
for
(
PlanTaskDetailStatusEnum
c
:
PlanTaskDetailStatusEnum
.
values
())
{
if
(
type
.
equals
(
c
.
getType
()))
{
return
c
.
name
;
}
}
return
null
;
}
public
static
String
getType
(
String
name
)
{
for
(
PlanTaskDetailStatusEnum
c
:
PlanTaskDetailStatusEnum
.
values
())
{
if
(
c
.
getName
().
equals
(
name
))
{
return
c
.
type
;
}
}
return
""
;
}
public
static
PlanTaskDetailStatusEnum
getEnumByType
(
String
type
)
{
for
(
PlanTaskDetailStatusEnum
c
:
PlanTaskDetailStatusEnum
.
values
())
{
if
(
type
.
equals
(
c
.
getType
()))
{
return
c
;
}
}
return
null
;
}
public
static
PlanTaskDetailStatusEnum
getEnumByName
(
String
name
)
{
for
(
PlanTaskDetailStatusEnum
c
:
PlanTaskDetailStatusEnum
.
values
())
{
if
(
c
.
getName
().
equals
(
name
))
{
return
c
;
}
}
return
null
;
}
public
static
List
<
Map
<
String
,
Object
>>
getEnumList
()
{
List
<
Map
<
String
,
Object
>>
nameList
=
new
ArrayList
<>();
for
(
PlanTaskDetailStatusEnum
c:
PlanTaskDetailStatusEnum
.
values
())
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"name"
,
c
.
getName
());
map
.
put
(
"type"
,
c
.
getType
()
+
""
);
nameList
.
add
(
map
);
}
return
nameList
;
}
public
static
List
<
String
>
getEnumNameList
()
{
List
<
String
>
nameList
=
new
ArrayList
<
String
>();
for
(
PlanTaskDetailStatusEnum
c:
PlanTaskDetailStatusEnum
.
values
())
{
nameList
.
add
(
c
.
getName
());
}
return
nameList
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/bo/SafetyExecuteBo.java
0 → 100644
View file @
5f0cf73e
package
com
.
yeejoin
.
amos
.
fas
.
business
.
bo
;
public
class
SafetyExecuteBo
{
private
Long
id
;
private
String
code
;
private
String
label
;
private
String
pointId
;
private
String
type
;
private
String
changeDate
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getLabel
()
{
return
label
;
}
public
void
setLabel
(
String
label
)
{
this
.
label
=
label
;
}
public
String
getPointId
()
{
return
pointId
;
}
public
void
setPointId
(
String
pointId
)
{
this
.
pointId
=
pointId
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getChangeDate
()
{
return
changeDate
;
}
public
void
setChangeDate
(
String
changeDate
)
{
this
.
changeDate
=
changeDate
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/View3dController.java
View file @
5f0cf73e
...
@@ -37,7 +37,6 @@ public class View3dController extends BaseController {
...
@@ -37,7 +37,6 @@ public class View3dController extends BaseController {
public
CommonResponse
getRegionTree
()
{
public
CommonResponse
getRegionTree
()
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
orgCode
=
"10"
;
return
CommonResponseUtil
.
success
(
riskSourceService
.
findRegionTree
(
orgCode
));
return
CommonResponseUtil
.
success
(
riskSourceService
.
findRegionTree
(
orgCode
));
}
}
...
@@ -46,7 +45,6 @@ public class View3dController extends BaseController {
...
@@ -46,7 +45,6 @@ public class View3dController extends BaseController {
public
CommonResponse
getRegionDetail
(
@PathVariable
(
"riskSourceId"
)
Long
riskSourceId
)
{
public
CommonResponse
getRegionDetail
(
@PathVariable
(
"riskSourceId"
)
Long
riskSourceId
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
orgCode
=
"10"
;
return
CommonResponseUtil
.
success
(
riskSourceService
.
findRegionById
(
riskSourceId
,
orgCode
));
return
CommonResponseUtil
.
success
(
riskSourceService
.
findRegionById
(
riskSourceId
,
orgCode
));
}
}
...
@@ -73,7 +71,6 @@ public class View3dController extends BaseController {
...
@@ -73,7 +71,6 @@ public class View3dController extends BaseController {
if
(
ResourceTypeDefEnum
.
containsTypeCode
(
type
))
{
if
(
ResourceTypeDefEnum
.
containsTypeCode
(
type
))
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
orgCode
=
"10"
;
return
CommonResponseUtil
.
success
(
view3dService
.
getPointTreeByType
(
type
,
orgCode
));
return
CommonResponseUtil
.
success
(
view3dService
.
getPointTreeByType
(
type
,
orgCode
));
}
}
return
CommonResponseUtil
.
failure
(
type
+
" 类型不存在"
);
return
CommonResponseUtil
.
failure
(
type
+
" 类型不存在"
);
...
@@ -92,7 +89,6 @@ public class View3dController extends BaseController {
...
@@ -92,7 +89,6 @@ public class View3dController extends BaseController {
public
CommonResponse
safetyIndexWeek
(
String
type
,
Long
pointId
)
{
public
CommonResponse
safetyIndexWeek
(
String
type
,
Long
pointId
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
orgCode
=
"10"
;
return
CommonResponseUtil
.
success
(
view3dService
.
getSafetyIndexWeek
(
orgCode
));
return
CommonResponseUtil
.
success
(
view3dService
.
getSafetyIndexWeek
(
orgCode
));
}
}
...
@@ -120,5 +116,27 @@ public class View3dController extends BaseController {
...
@@ -120,5 +116,27 @@ public class View3dController extends BaseController {
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
return
CommonResponseUtil
.
success
(
view3dService
.
getSystemOnlineDate
(
orgCode
));
return
CommonResponseUtil
.
success
(
view3dService
.
getSystemOnlineDate
(
orgCode
));
}
}
@ApiOperation
(
value
=
"今日巡检统计接口"
,
notes
=
"今日巡检统计接口"
)
@GetMapping
(
value
=
"statistics/check"
)
public
CommonResponse
getStatisticsCheck
(){
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
return
CommonResponseUtil
.
success
(
view3dService
.
getStatisticsCheck
(
orgCode
));
}
@ApiOperation
(
value
=
"异常显示最新5条"
,
notes
=
"异常显示最新5条"
)
@GetMapping
(
value
=
"safetyExecute/list/{type}"
)
public
CommonResponse
getSafetyExecuteListTop5
(
@PathVariable
(
"type"
)
String
type
){
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
return
CommonResponseUtil
.
success
(
view3dService
.
getSafetyExecuteListTop5
(
type
,
orgCode
));
}
@ApiOperation
(
value
=
"今日值班统计"
,
notes
=
"今日值班统计"
)
@GetMapping
(
value
=
"statistics/duty"
)
public
CommonResponse
getStatisticsDuty
(){
return
CommonResponseUtil
.
success
(
view3dService
.
getStatisticsDuty
());
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
View file @
5f0cf73e
...
@@ -6,6 +6,7 @@ import java.util.Map;
...
@@ -6,6 +6,7 @@ import java.util.Map;
import
com.yeejoin.amos.fas.business.bo.CheckErrorBo
;
import
com.yeejoin.amos.fas.business.bo.CheckErrorBo
;
import
com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo
;
import
com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo
;
import
com.yeejoin.amos.fas.business.bo.SafetyExecuteBo
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -64,4 +65,25 @@ public interface View3dMapper extends BaseMapper{
...
@@ -64,4 +65,25 @@ public interface View3dMapper extends BaseMapper{
*/
*/
List
<
CheckErrorBo
>
getAllErrorPatrolPoint
(
Map
<
String
,
Object
>
params
);
List
<
CheckErrorBo
>
getAllErrorPatrolPoint
(
Map
<
String
,
Object
>
params
);
/**
* 今日巡检统计接口
* @param orgCode
* @return
*/
List
<
HashMap
<
String
,
Object
>>
getStatisticsCheck
(
String
orgCode
);
/**
* 风险异常显示最新5条
* @param orgCode
* @return
*/
List
<
SafetyExecuteBo
>
getRiskErrorTop5
(
String
orgCode
);
/**
* 巡检异常示最新5条
* @param orgCode
* @return
*/
List
<
SafetyExecuteBo
>
getCheckErrorTop5
(
String
orgCode
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
5f0cf73e
...
@@ -2,6 +2,8 @@ package com.yeejoin.amos.fas.business.service.impl;
...
@@ -2,6 +2,8 @@ package com.yeejoin.amos.fas.business.service.impl;
import
static
org
.
hamcrest
.
CoreMatchers
.
either
;
import
static
org
.
hamcrest
.
CoreMatchers
.
either
;
import
static
org
.
springframework
.
test
.
web
.
client
.
match
.
MockRestRequestMatchers
.
method
;
import
static
org
.
springframework
.
test
.
web
.
servlet
.
request
.
MockMvcRequestBuilders
.
get
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -20,6 +22,7 @@ import com.google.common.collect.Lists;
...
@@ -20,6 +22,7 @@ import com.google.common.collect.Lists;
import
com.yeejoin.amos.fas.business.bo.BindPointBo
;
import
com.yeejoin.amos.fas.business.bo.BindPointBo
;
import
com.yeejoin.amos.fas.business.bo.CheckErrorBo
;
import
com.yeejoin.amos.fas.business.bo.CheckErrorBo
;
import
com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo
;
import
com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo
;
import
com.yeejoin.amos.fas.business.bo.SafetyExecuteBo
;
import
com.yeejoin.amos.fas.business.dao.mapper.PatrolMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.PatrolMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.*
;
import
com.yeejoin.amos.fas.business.dao.repository.*
;
import
com.yeejoin.amos.fas.business.service.intfc.IView3dService
;
import
com.yeejoin.amos.fas.business.service.intfc.IView3dService
;
...
@@ -27,12 +30,16 @@ import com.yeejoin.amos.fas.business.vo.ErrorContentVo;
...
@@ -27,12 +30,16 @@ import com.yeejoin.amos.fas.business.vo.ErrorContentVo;
import
com.yeejoin.amos.fas.business.vo.SafetyIndexDetailVo
;
import
com.yeejoin.amos.fas.business.vo.SafetyIndexDetailVo
;
import
com.yeejoin.amos.fas.business.vo.TodaySafetyIndexVo
;
import
com.yeejoin.amos.fas.business.vo.TodaySafetyIndexVo
;
import
com.yeejoin.amos.fas.common.enums.CheckStatusEnum
;
import
com.yeejoin.amos.fas.common.enums.CheckStatusEnum
;
import
com.yeejoin.amos.fas.common.enums.PlanTaskDetailStatusEnum
;
import
com.yeejoin.amos.fas.common.enums.RpnChangeTypeEum
;
import
com.yeejoin.amos.fas.common.enums.RpnChangeTypeEum
;
import
com.yeejoin.amos.fas.common.enums.StatisticsErrorTypeEum
;
import
com.yeejoin.amos.fas.common.enums.StatisticsErrorTypeEum
;
import
com.yeejoin.amos.fas.core.common.request.DateUtil
;
import
com.yeejoin.amos.fas.core.common.request.DateUtil
;
import
com.yeejoin.amos.fas.core.util.*
;
import
com.yeejoin.amos.fas.core.util.*
;
import
com.yeejoin.amos.fas.dao.entity.*
;
import
com.yeejoin.amos.fas.dao.entity.*
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
springfox.documentation.spring.web.json.Json
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
...
@@ -338,4 +345,65 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -338,4 +345,65 @@ public class View3dServiceImpl implements IView3dService {
Date
now
=
DateUtil
.
getNow
();
Date
now
=
DateUtil
.
getNow
();
return
DateUtil
.
dayComparePrecise
(
beginDate
,
now
);
return
DateUtil
.
dayComparePrecise
(
beginDate
,
now
);
}
}
@Override
public
List
<
Map
<
String
,
Object
>>
getStatisticsCheck
(
String
orgCode
)
{
List
<
HashMap
<
String
,
Object
>>
statisticsCheck
=
view3dMapper
.
getStatisticsCheck
(
orgCode
);
List
<
Map
<
String
,
Object
>>
stateList
=
PlanTaskDetailStatusEnum
.
getEnumList
();
stateList
.
forEach
(
s
->
{
if
(
statisticsCheck
!=
null
)
{
Long
value
=
0
l
;
for
(
HashMap
<
String
,
Object
>
sc:
statisticsCheck
)
{
String
typeString
=
sc
.
get
(
"type"
).
toString
();
String
enumType
=
s
.
get
(
"type"
).
toString
();
if
(
typeString
.
equals
(
enumType
))
{
value
=
(
Long
)
sc
.
get
(
"value"
);
break
;
}
}
s
.
put
(
"value"
,
value
);
}
});
return
stateList
;
}
@Override
public
List
<
SafetyExecuteBo
>
getSafetyExecuteListTop5
(
String
type
,
String
orgCode
)
{
StatisticsErrorTypeEum
.
risk
.
getCode
();
switch
(
type
)
{
case
"risk"
:
//风险异常
return
view3dMapper
.
getRiskErrorTop5
(
orgCode
);
case
"check"
:
//巡检异常
return
view3dMapper
.
getCheckErrorTop5
(
orgCode
);
case
"equip"
:
return
JSON
.
parseArray
(
" [\r\n"
+
" {\r\n"
+
" \"id\": 35781,\r\n"
+
" \"code\": \"s001\",\r\n"
+
" \"label\": \"设备test\",\r\n"
+
" \"pointId\": \"1\",\r\n"
+
" \"type\": \"check\",\r\n"
+
" \"changeDate\": \"2020-04-23 14:31:31\"\r\n"
+
" },\r\n"
+
" {\r\n"
+
" \"id\": 35780,\r\n"
+
" \"code\": \"s002\",\r\n"
+
" \"label\": \"设备002\",\r\n"
+
" \"pointId\": \"23123\",\r\n"
+
" \"type\": \"check\",\r\n"
+
" \"changeDate\": \"2020-04-23 14:31:27\"\r\n"
+
" }]"
,
SafetyExecuteBo
.
class
);
default
:
throw
new
YeeException
(
"不支持的类型 -->"
+
type
);
}
}
@Override
public
Object
getStatisticsDuty
()
{
return
JSON
.
parse
(
"{\r\n"
+
" \"dutyPersonNumber\": 10,\r\n"
+
" \"firePersonNumber\": 15,\r\n"
+
" \"securityPersonNumber\": 20,\r\n"
+
" }"
);
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IView3dService.java
View file @
5f0cf73e
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.fas.business.service.intfc;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.fas.business.service.intfc;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.fas.business.bo.BindPointBo
;
import
com.yeejoin.amos.fas.business.bo.BindPointBo
;
import
com.yeejoin.amos.fas.business.bo.SafetyExecuteBo
;
import
com.yeejoin.amos.fas.business.vo.SafetyIndexDetailVo
;
import
com.yeejoin.amos.fas.business.vo.SafetyIndexDetailVo
;
import
com.yeejoin.amos.fas.business.vo.TodaySafetyIndexVo
;
import
com.yeejoin.amos.fas.business.vo.TodaySafetyIndexVo
;
import
com.yeejoin.amos.fas.core.common.response.RegionTreeResponse
;
import
com.yeejoin.amos.fas.core.common.response.RegionTreeResponse
;
...
@@ -78,4 +79,15 @@ public interface IView3dService {
...
@@ -78,4 +79,15 @@ public interface IView3dService {
* @return eg:10年3月2天
* @return eg:10年3月2天
*/
*/
Map
<
String
,
Object
>
getSystemOnlineDate
(
String
orgCode
);
Map
<
String
,
Object
>
getSystemOnlineDate
(
String
orgCode
);
/**
* 今日巡检统计接口
* @param orgCode
* @return
*/
List
<
Map
<
String
,
Object
>>
getStatisticsCheck
(
String
orgCode
);
List
<
SafetyExecuteBo
>
getSafetyExecuteListTop5
(
String
type
,
String
orgCode
);
Object
getStatisticsDuty
();
}
}
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_risk_source.xml
View file @
5f0cf73e
...
@@ -691,8 +691,9 @@
...
@@ -691,8 +691,9 @@
id,name,code,parent_id as parentId,ue4_location as ue4Location,ue4_rotation as ue4Rotation,ue4_extent as ue4Extent,
id,name,code,parent_id as parentId,ue4_location as ue4Location,ue4_rotation as ue4Rotation,ue4_extent as ue4Extent,
IF(ISNULL(IF(replace(trim(ue4_rotation),'[]','')='',NULL,ue4_rotation))
IF(ISNULL(IF(replace(trim(ue4_rotation),'[]','')='',NULL,ue4_rotation))
AND ISNULL(IF(replace(trim(ue4_location),'[]','')='',NULL,ue4_location)),0,1) as isBind,
AND ISNULL(IF(replace(trim(ue4_location),'[]','')='',NULL,ue4_location)),0,1) as isBind,
IF(is_region = 'TRUE',1,0) as isRegion
IF(is_region = 'TRUE',1,0) as isRegion,
from f_risk_source
(select name from f_risk_level where level = r.risk_level_id) as riskLevel
from f_risk_source r
where id=#{id} AND org_code like CONCAT(#{orgCode},'%')
where id=#{id} AND org_code like CONCAT(#{orgCode},'%')
</select>
</select>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
View file @
5f0cf73e
...
@@ -275,4 +275,33 @@
...
@@ -275,4 +275,33 @@
and DATE_FORMAT(a.check_time,'%Y-%m-%d') = #{date}
and DATE_FORMAT(a.check_time,'%Y-%m-%d') = #{date}
and a.org_code = #{orgCode}
and a.org_code = #{orgCode}
</select>
</select>
<select
id=
"getStatisticsCheck"
resultType=
"java.util.HashMap"
>
SELECT t.finish_status as type, count(1) as value
FROM p_plan_task_detail d
left JOIN p_plan_task t on t.id=d.task_no
WHERE DATEDIFF(t.begin_time,CURRENT_DATE) = 0 AND DATEDIFF(t.end_time,CURRENT_DATE) = 0
AND (t.org_code = #{org_code} or t.org_code like CONCAT(#{orgCode},'-','%'))
GROUP BY t.finish_status
</select>
<select
id=
"getRiskErrorTop5"
resultType=
"com.yeejoin.amos.fas.business.bo.SafetyExecuteBo"
>
SELECT n.id,r.code,r.name as label,r.id as pointId,'risk' as type,n.create_date as changeDate
FROM f_rpn_change_log n
LEFT JOIN f_risk_source r ON r.id = n.risk_source_id
WHERE n.type = 1
AND (r.org_code = #{org_code} or r.org_code like CONCAT(#{orgCode},'-','%'))
ORDER BY n.create_date desc
limit 0,5
</select>
<select
id=
"getCheckErrorTop5"
resultType=
"com.yeejoin.amos.fas.business.bo.SafetyExecuteBo"
>
SELECT p.id,I.point_no as code,I.name as label,p.point_id,'check' as type,p.check_time as changeDate
FROM p_check p
left join p_point I ON I.id = p.point_id
where p.org_code = #{org_code} or p.org_code like CONCAT(#{orgCode},'-','%')
ORDER BY p.check_time desc
limit 0,5
</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