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
16ef8398
Commit
16ef8398
authored
Mar 07, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_dl_plan6_temp' of…
Merge branch 'develop_dl_plan6_temp' of
http://39.98.45.134:8090/moa/amos-boot-biz
into develop_dl_plan6_temp
parents
23a7b027
7476bc50
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
204 additions
and
91 deletions
+204
-91
Video.java
...ain/java/com/yeejoin/equipmanage/common/entity/Video.java
+4
-0
AlamVideoVO.java
...com/yeejoin/equipmanage/common/entity/vo/AlamVideoVO.java
+2
-0
BuildingVideoVO.java
...yeejoin/equipmanage/common/entity/vo/BuildingVideoVO.java
+3
-0
DayHourEnum.java
...ava/com/yeejoin/equipmanage/common/enums/DayHourEnum.java
+0
-31
DateUtils.java
.../java/com/yeejoin/equipmanage/common/utils/DateUtils.java
+16
-12
Check.java
...c/main/java/com/yeejoin/amos/patrol/dao/entity/Check.java
+36
-0
EmergencyController.java
...m/yeejoin/equipmanage/controller/EmergencyController.java
+20
-1
IEmergencyService.java
...va/com/yeejoin/equipmanage/service/IEmergencyService.java
+2
-0
IPressurePumpService.java
...com/yeejoin/equipmanage/service/IPressurePumpService.java
+7
-0
BuildingServiceImpl.java
...yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
+2
-2
ConfirmAlarmServiceImpl.java
...oin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
+3
-3
EmergencyServiceImpl.java
...eejoin/equipmanage/service/impl/EmergencyServiceImpl.java
+0
-0
EquipmentSpecificAlarmServiceImpl.java
...anage/service/impl/EquipmentSpecificAlarmServiceImpl.java
+5
-12
EquipmentSpecificSerivceImpl.java
...quipmanage/service/impl/EquipmentSpecificSerivceImpl.java
+1
-1
PressurePumpServiceImpl.java
...oin/equipmanage/service/impl/PressurePumpServiceImpl.java
+15
-7
SupervisionVideoServiceImpl.java
...equipmanage/service/impl/SupervisionVideoServiceImpl.java
+1
-1
CheckController.java
...join/amos/patrol/business/controller/CheckController.java
+4
-13
CheckMapper.java
.../yeejoin/amos/patrol/business/dao/mapper/CheckMapper.java
+7
-0
CheckServiceImpl.java
...n/amos/patrol/business/service/impl/CheckServiceImpl.java
+16
-0
ICheckService.java
...oin/amos/patrol/business/service/intfc/ICheckService.java
+5
-0
wl-3.6.0.xml
...ot-system-equip/src/main/resources/changelog/wl-3.6.0.xml
+13
-0
EmergencyMapper.xml
...ystem-equip/src/main/resources/mapper/EmergencyMapper.xml
+1
-1
EquipmentSpecificIndexMapper.xml
...rc/main/resources/mapper/EquipmentSpecificIndexMapper.xml
+1
-0
OrgUsrMapper.xml
...t-system-equip/src/main/resources/mapper/OrgUsrMapper.xml
+2
-1
SupervisionVideoMapper.xml
...quip/src/main/resources/mapper/SupervisionVideoMapper.xml
+1
-0
VideoMapper.xml
...ot-system-equip/src/main/resources/mapper/VideoMapper.xml
+5
-0
AmosJcsApplication.java
...cs/src/main/java/com/yeejoin/amos/AmosJcsApplication.java
+12
-6
dbTemplate_check.xml
...-patrol/src/main/resources/db/mapper/dbTemplate_check.xml
+20
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/Video.java
View file @
16ef8398
...
...
@@ -137,4 +137,8 @@ public class Video extends BaseEntity {
@ApiModelProperty
(
value
=
"机构/部门名称"
)
@TableField
(
value
=
"biz_org_name"
,
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
String
bizOrgName
;
@ApiModelProperty
(
value
=
"视频格式"
)
@TableField
(
value
=
"video_type"
)
private
String
videoType
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/vo/AlamVideoVO.java
View file @
16ef8398
...
...
@@ -25,6 +25,8 @@ public class AlamVideoVO {
private
String
vedioFormat
;
private
String
videoType
;
/**
* 是否绑定设备
*/
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/vo/BuildingVideoVO.java
View file @
16ef8398
...
...
@@ -45,4 +45,7 @@ public class BuildingVideoVO {
@ApiModelProperty
(
"视频转码"
)
private
String
vedioFormat
;
@ApiModelProperty
(
"视频类型"
)
private
String
videoType
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/enums/DayHourEnum.java
deleted
100644 → 0
View file @
23a7b027
package
com
.
yeejoin
.
equipmanage
.
common
.
enums
;
/**
* 一天内不同时段个数
*/
public
enum
DayHourEnum
{
hour
(
"小时"
,
24
),
hafHour
(
"半小时个数"
,
48
),
twoHour
(
"两小时个数"
,
12
),
fourHour
(
"四小时个数"
,
6
);
private
String
name
;
private
int
number
;
DayHourEnum
(
String
name
,
int
number
){
this
.
name
=
name
;
this
.
number
=
number
;
}
public
String
getName
()
{
return
name
;
}
public
int
getNumber
()
{
return
number
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/DateUtils.java
View file @
16ef8398
...
...
@@ -473,9 +473,10 @@ public class DateUtils {
* @throws ParseException
*/
public
static
int
dateBetweenNew
(
Date
startDate
,
Date
endDate
)
throws
ParseException
{
Date
dateStart
=
dateParse
(
dateFormat
(
startDate
,
DATE_PATTERN
),
DATE_PATTERN
);
Date
dateEnd
=
dateParse
(
dateFormat
(
endDate
,
DATE_PATTERN
),
DATE_PATTERN
);
return
(
int
)
((
dateEnd
.
getTime
()
-
dateStart
.
getTime
())
/
1000
/
60
/
60
);
Date
dateStart
=
dateParse
(
dateFormat
(
startDate
,
DATE_TIME_PATTERN
),
DATE_TIME_PATTERN
);
Date
dateEnd
=
dateParse
(
dateFormat
(
endDate
,
DATE_TIME_PATTERN
),
DATE_TIME_PATTERN
);
double
ceil
=
Math
.
ceil
((
dateEnd
.
getTime
()
-
dateStart
.
getTime
())
*
1.0
/
1000
/
60
/
60
);
return
new
Double
(
ceil
).
intValue
()
;
}
/**
...
...
@@ -487,9 +488,10 @@ public class DateUtils {
* @throws ParseException
*/
public
static
int
dateBetweenNew1
(
Date
startDate
,
Date
endDate
)
throws
ParseException
{
Date
dateStart
=
dateParse
(
dateFormat
(
startDate
,
DATE_PATTERN
),
DATE_PATTERN
);
Date
dateEnd
=
dateParse
(
dateFormat
(
endDate
,
DATE_PATTERN
),
DATE_PATTERN
);
return
(
int
)
((
dateEnd
.
getTime
()
-
dateStart
.
getTime
())
/
1000
/
60
/
30
);
Date
dateStart
=
dateParse
(
dateFormat
(
startDate
,
DATE_TIME_PATTERN
),
DATE_TIME_PATTERN
);
Date
dateEnd
=
dateParse
(
dateFormat
(
endDate
,
DATE_TIME_PATTERN
),
DATE_TIME_PATTERN
);
double
ceil
=
Math
.
ceil
((
dateEnd
.
getTime
()
-
dateStart
.
getTime
())
*
1.0
/
1000
/
60
/
30
);
return
new
Double
(
ceil
).
intValue
()
;
}
/**
...
...
@@ -501,9 +503,10 @@ public class DateUtils {
* @throws ParseException
*/
public
static
int
dateBetweenNew2
(
Date
startDate
,
Date
endDate
)
throws
ParseException
{
Date
dateStart
=
dateParse
(
dateFormat
(
startDate
,
DATE_PATTERN
),
DATE_PATTERN
);
Date
dateEnd
=
dateParse
(
dateFormat
(
endDate
,
DATE_PATTERN
),
DATE_PATTERN
);
return
(
int
)
((
dateEnd
.
getTime
()
-
dateStart
.
getTime
())
/
1000
/
60
/
120
);
Date
dateStart
=
dateParse
(
dateFormat
(
startDate
,
DATE_TIME_PATTERN
),
DATE_TIME_PATTERN
);
Date
dateEnd
=
dateParse
(
dateFormat
(
endDate
,
DATE_TIME_PATTERN
),
DATE_TIME_PATTERN
);
double
ceil
=
Math
.
ceil
((
dateEnd
.
getTime
()
-
dateStart
.
getTime
())
*
1.0
/
1000
/
60
/
120
);
return
new
Double
(
ceil
).
intValue
()
;
}
/**
...
...
@@ -515,9 +518,10 @@ public class DateUtils {
* @throws ParseException
*/
public
static
int
dateBetweenNew3
(
Date
startDate
,
Date
endDate
)
throws
ParseException
{
Date
dateStart
=
dateParse
(
dateFormat
(
startDate
,
DATE_PATTERN
),
DATE_PATTERN
);
Date
dateEnd
=
dateParse
(
dateFormat
(
endDate
,
DATE_PATTERN
),
DATE_PATTERN
);
return
(
int
)
((
dateEnd
.
getTime
()
-
dateStart
.
getTime
())
/
1000
/
60
/
240
);
Date
dateStart
=
dateParse
(
dateFormat
(
startDate
,
DATE_TIME_PATTERN
),
DATE_TIME_PATTERN
);
Date
dateEnd
=
dateParse
(
dateFormat
(
endDate
,
DATE_TIME_PATTERN
),
DATE_TIME_PATTERN
);
double
ceil
=
Math
.
ceil
((
dateEnd
.
getTime
()
-
dateStart
.
getTime
())
*
1.0
/
1000
/
60
/
240
);
return
new
Double
(
ceil
).
intValue
()
;
}
/**
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-patrol-api/src/main/java/com/yeejoin/amos/patrol/dao/entity/Check.java
View file @
16ef8398
...
...
@@ -135,6 +135,7 @@ public class Check extends BasicEntity {
@Column
(
name
=
"route_name"
)
private
String
routeName
;
/**
* 评分
*/
...
...
@@ -412,4 +413,38 @@ public class Check extends BasicEntity {
this
.
routeName
=
routeName
;
}
@Override
public
String
toString
()
{
return
"Check{"
+
"address='"
+
address
+
'\''
+
", checkMode='"
+
checkMode
+
'\''
+
", checkTime="
+
checkTime
+
", deviceId='"
+
deviceId
+
'\''
+
", error='"
+
error
+
'\''
+
", isOk='"
+
isOk
+
'\''
+
", latitude='"
+
latitude
+
'\''
+
", longitude='"
+
longitude
+
'\''
+
", orgCode='"
+
orgCode
+
'\''
+
", planId="
+
planId
+
", planName='"
+
planName
+
'\''
+
", planTaskId="
+
planTaskId
+
", planTaskDetailId="
+
planTaskDetailId
+
", pointId="
+
pointId
+
", pointName='"
+
pointName
+
'\''
+
", remark='"
+
remark
+
'\''
+
", routeId="
+
routeId
+
", routeName='"
+
routeName
+
'\''
+
", score="
+
score
+
", shotNumber="
+
shotNumber
+
", uploadTime="
+
uploadTime
+
", userId='"
+
userId
+
'\''
+
", userName='"
+
userName
+
'\''
+
", depId='"
+
depId
+
'\''
+
", depName='"
+
depName
+
'\''
+
", errorClassify='"
+
errorClassify
+
'\''
+
", checkInput="
+
checkInput
+
", checkShot="
+
checkShot
+
'}'
;
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EmergencyController.java
View file @
16ef8398
...
...
@@ -577,7 +577,7 @@ public class EmergencyController extends AbstractBaseController {
@PersonIdentify
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getPressurePumpStatusChart"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"四横八纵-稳压泵启停状态图"
,
notes
=
"四横八纵-稳压泵启停状态图"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"四横八纵-稳压泵启停状态图"
,
notes
=
"四横八纵-稳压泵启停状态图
,取舍补点
"
)
public
ResponseModel
getPressurePumpStatusChart
(
@RequestParam
String
startTime
,
@RequestParam
String
endTime
,
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
if
(
StringUtils
.
isEmpty
(
bizOrgCode
))
{
...
...
@@ -595,6 +595,25 @@ public class EmergencyController extends AbstractBaseController {
@PersonIdentify
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getPressurePumpStatusDetailChart"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"四横八纵-稳压泵启停状态图"
,
notes
=
"四横八纵-稳压泵启停状态图,分钟级补点"
)
public
ResponseModel
getPressurePumpStatusDetailChart
(
@RequestParam
String
startTime
,
@RequestParam
String
endTime
,
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
if
(
StringUtils
.
isEmpty
(
bizOrgCode
))
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
if
(!
ValidationUtil
.
isEmpty
(
personIdentity
))
{
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
if
(
bizOrgCode
==
null
)
{
return
CommonResponseUtil
.
success
(
Collections
.
EMPTY_MAP
);
}
}
}
return
CommonResponseUtil
.
success
(
iEmergencyService
.
getPressurePumpStatusDetailChart
(
startTime
,
endTime
,
bizOrgCode
));
}
@PersonIdentify
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getPressurePumpDiagnosticAnalysis"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"四横八纵-稳压泵诊断分析"
,
notes
=
"四横八纵-稳压泵诊断分析"
)
public
ResponseModel
getPressurePumpDiagnosticAnalysis
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IEmergencyService.java
View file @
16ef8398
...
...
@@ -57,6 +57,8 @@ public interface IEmergencyService {
Map
<
String
,
Object
>
getPressurePumpStatusChart
(
String
startTime
,
String
endTime
,
String
bizOrgCode
);
Map
<
String
,
Object
>
getPressurePumpStatusDetailChart
(
String
startTime
,
String
endTime
,
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
getPressurePumpDiagnosticAnalysis
(
String
bizOrgCode
);
Page
<
Map
<
String
,
Object
>>
alarmList
(
Page
<
Map
<
String
,
Object
>>
page
,
String
bizOrgCode
,
List
<
String
>
types
,
List
<
String
>
emergencyLevels
,
String
name
,
Integer
cleanStatus
,
Integer
handleStatus
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IPressurePumpService.java
View file @
16ef8398
...
...
@@ -178,4 +178,11 @@ public interface IPressurePumpService {
* @return
*/
List
<
OrgUsrDto
>
getOrgUsrDtoInfo
(
Map
<
String
,
String
>
map
);
/**
* 获取公司顶级bizOrgCode
* @param bizOrgCode
* @return
*/
String
getCompanyBizOrgCode
(
String
bizOrgCode
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
View file @
16ef8398
...
...
@@ -770,7 +770,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
x
.
setLocation
(
x
.
getAddress
());
}
}
x
.
setVedioFormat
(
vedioFormat
);
x
.
setVedioFormat
(
x
.
getVideoType
()
);
x
.
setUrl
(
videoService
.
getVideoUrl
(
x
.
getName
(),
x
.
getPresetPosition
(),
x
.
getUrl
(),
x
.
getCode
()));
});
return
pages
;
...
...
@@ -1032,7 +1032,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
x
.
setLocation
(
x
.
getAddress
());
}
}
x
.
setVedioFormat
(
vedioFormat
);
x
.
setVedioFormat
(
x
.
getVideoType
()
);
x
.
setUrl
(
videoService
.
getVideoUrl
(
x
.
getName
(),
x
.
getPresetPosition
(),
x
.
getUrl
(),
x
.
getCode
()));
});
return
pages
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
View file @
16ef8398
...
...
@@ -139,7 +139,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
if
(
videoType
.
equals
(
type
))
{
List
<
AlamVideoVO
>
video
=
videoMapper
.
getVideoBySpeId
(
Long
.
valueOf
(
equipId
));
video
.
forEach
(
action
->
{
action
.
setVedioFormat
(
vedioFormat
);
action
.
setVedioFormat
(
action
.
getVideoType
()
);
action
.
setUrl
(
videoService
.
getVideoUrl
(
action
.
getName
(),
action
.
getPresetPosition
(),
action
.
getUrl
(),
action
.
getCode
()));
});
res
.
put
(
"video"
,
video
);
...
...
@@ -159,7 +159,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
}
videoBySpeId
.
forEach
(
action
->
{
action
.
setVedioFormat
(
vedioFormat
);
action
.
setVedioFormat
(
action
.
getVideoType
()
);
action
.
setUrl
(
videoService
.
getVideoUrl
(
action
.
getName
(),
action
.
getPresetPosition
(),
action
.
getUrl
(),
action
.
getCode
()));
});
res
.
put
(
"data"
,
specificAlarm
);
...
...
@@ -353,7 +353,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
// 设备关联的摄像头
List
<
AlamVideoVO
>
video
=
videoMapper
.
getVideoBySpeId
(
equipmentSpecificId
);
video
.
forEach
(
action
->
{
action
.
setVedioFormat
(
vedioFormat
);
action
.
setVedioFormat
(
action
.
getVideoType
()
);
action
.
setUrl
(
videoService
.
getVideoUrl
(
action
.
getName
(),
action
.
getPresetPosition
(),
action
.
getUrl
(),
action
.
getCode
()));
});
res
.
put
(
"video"
,
video
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EmergencyServiceImpl.java
View file @
16ef8398
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificAlarmServiceImpl.java
View file @
16ef8398
...
...
@@ -341,7 +341,7 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
video
.
setName
(
x
.
getName
());
video
.
setTokens
(
x
.
getToken
());
video
.
setUrl
(
x
.
getUrl
());
video
.
setVedioFormat
(
vedioFormat
);
video
.
setVedioFormat
(
x
.
getVideoType
()
);
video
.
setUrl
(
videoService
.
getVideoUrl
(
x
.
getName
(),
x
.
getPresetPosition
(),
x
.
getUrl
(),
x
.
getCode
()));
video
.
setIp
(
x
.
getIp
());
video
.
setPort
(
x
.
getPort
());
...
...
@@ -812,20 +812,13 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
// 计算平均每小时打压频率
try
{
int
hour
=
DateUtils
.
dateBetweenNew
(
DateUtils
.
dateParse
(
startTime
,
null
),
DateUtils
.
dateParse
(
endTime
,
null
));
int
hour
=
DateUtils
.
dateBetweenNew
(
DateUtils
.
dateParse
(
startTime
,
DateUtils
.
DATE_TIME_PATTERN
),
DateUtils
.
dateParse
(
endTime
,
DateUtils
.
DATE_TIME_PATTERN
));
int
hafHour
=
DateUtils
.
dateBetweenNew1
(
DateUtils
.
dateParse
(
startTime
,
null
),
DateUtils
.
dateParse
(
endTime
,
null
));
int
hafHour
=
DateUtils
.
dateBetweenNew1
(
DateUtils
.
dateParse
(
startTime
,
DateUtils
.
DATE_TIME_PATTERN
),
DateUtils
.
dateParse
(
endTime
,
DateUtils
.
DATE_TIME_PATTERN
));
int
twoHour
=
DateUtils
.
dateBetweenNew2
(
DateUtils
.
dateParse
(
startTime
,
null
),
DateUtils
.
dateParse
(
endTime
,
null
));
int
twoHour
=
DateUtils
.
dateBetweenNew2
(
DateUtils
.
dateParse
(
startTime
,
DateUtils
.
DATE_TIME_PATTERN
),
DateUtils
.
dateParse
(
endTime
,
DateUtils
.
DATE_TIME_PATTERN
));
int
fourHour
=
DateUtils
.
dateBetweenNew3
(
DateUtils
.
dateParse
(
startTime
,
null
),
DateUtils
.
dateParse
(
endTime
,
null
));
// 开始时间与结束时间为同一天时 给默认值
if
(
hour
==
0
){
hour
=
DayHourEnum
.
hour
.
getNumber
();
hafHour
=
DayHourEnum
.
hafHour
.
getNumber
();
twoHour
=
DayHourEnum
.
twoHour
.
getNumber
();
fourHour
=
DayHourEnum
.
fourHour
.
getNumber
();
}
int
fourHour
=
DateUtils
.
dateBetweenNew3
(
DateUtils
.
dateParse
(
startTime
,
DateUtils
.
DATE_TIME_PATTERN
),
DateUtils
.
dateParse
(
endTime
,
DateUtils
.
DATE_TIME_PATTERN
));
if
(
allNum
/
hour
>
15
)
{
retMap
.
put
(
"status"
,
"异常"
);
}
else
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificSerivceImpl.java
View file @
16ef8398
...
...
@@ -1065,7 +1065,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
if
(!
ObjectUtils
.
isEmpty
(
video
))
{
video
.
setUrl
(
videoService
.
getVideoUrl
(
video
.
getName
(),
video
.
getPresetPosition
(),
video
.
getUrl
(),
video
.
getCode
()));
video
.
setId
(
id
);
video
.
setVedioFormat
(
v
edioFormat
);
video
.
setVedioFormat
(
v
ideo
.
getVideoType
()
);
}
return
video
;
}
else
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/PressurePumpServiceImpl.java
View file @
16ef8398
...
...
@@ -58,13 +58,8 @@ public class PressurePumpServiceImpl implements IPressurePumpService {
@Async
public
void
saveDataToRedis
(
List
<
IotDataVO
>
iotDatalist
,
String
iotCode
,
String
bizOrgCode
)
{
// 获取公司顶级bizOrgCode
Map
<
String
,
String
>
params
=
new
HashMap
<>();
params
.
put
(
"bizOrgType"
,
PressurePumpRelateEnum
.
BIZ_ORG_TYPE_COMPANY
.
getValue
());
params
.
put
(
"bizOrgCode"
,
bizOrgCode
);
List
<
OrgUsrDto
>
orgUsrDtoList
=
getOrgUsrDtoInfo
(
params
);
if
(
CollectionUtils
.
isNotEmpty
(
orgUsrDtoList
))
{
bizOrgCode
=
orgUsrDtoList
.
get
(
0
).
getBizOrgCode
();
if
(
StringUtils
.
isNotBlank
(
bizOrgCode
))
{
bizOrgCode
=
getCompanyBizOrgCode
(
bizOrgCode
);
if
(
StringUtils
.
isNotBlank
(
bizOrgCode
))
{
String
pressurePumpValue
=
PressurePumpRelateEnum
.
PRESSURE_PUMP
.
getValue
();
// 获取配置JSON信息集合
List
<
Map
>
list
=
getNameKeyInfoList
(
pressurePumpValue
);
...
...
@@ -84,6 +79,17 @@ public class PressurePumpServiceImpl implements IPressurePumpService {
}
}
}
@Override
public
String
getCompanyBizOrgCode
(
String
bizOrgCode
)
{
Map
<
String
,
String
>
params
=
new
HashMap
<>();
params
.
put
(
"bizOrgType"
,
PressurePumpRelateEnum
.
BIZ_ORG_TYPE_COMPANY
.
getValue
());
params
.
put
(
"bizOrgCode"
,
bizOrgCode
);
List
<
OrgUsrDto
>
orgUsrDtoList
=
getOrgUsrDtoInfo
(
params
);
if
(
CollectionUtils
.
isNotEmpty
(
orgUsrDtoList
))
{
bizOrgCode
=
orgUsrDtoList
.
get
(
orgUsrDtoList
.
size
()
-
1
).
getBizOrgCode
();
}
return
bizOrgCode
;
}
@Override
...
...
@@ -303,6 +309,8 @@ public class PressurePumpServiceImpl implements IPressurePumpService {
PressurePumpCountVo
countVo
=
new
PressurePumpCountVo
();
countVo
.
setTime
(
time
);
countVo
.
setValue
(
dataMap
.
get
(
time
).
size
());
// 获取公司顶级bizOrgCode
bizOrgCode
=
getCompanyBizOrgCode
(
bizOrgCode
);
// 获取的数据存储到redis
String
topic
=
String
.
join
(
":"
,
infoCode
,
bizOrgCode
,
countRedisKey
,
fieldKey
,
iotCode
,
time
);
countVo
.
setIotCode
(
topic
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/SupervisionVideoServiceImpl.java
View file @
16ef8398
...
...
@@ -58,7 +58,7 @@ public class SupervisionVideoServiceImpl extends ServiceImpl<SupervisionVideoMap
public
List
<
AlamVideoVO
>
queryVideoList
(
String
bizOrgCode
)
{
List
<
AlamVideoVO
>
list
=
supervisionVideoMapper
.
getVideoByCompany
(
bizOrgCode
);
list
.
forEach
(
action
->
{
action
.
setVedioFormat
(
vedioFormat
);
action
.
setVedioFormat
(
action
.
getVideoType
()
);
action
.
setUrl
(
videoService
.
getVideoUrl
(
action
.
getName
(),
action
.
getPresetPosition
(),
action
.
getUrl
(),
action
.
getCode
()));
});
return
list
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/CheckController.java
View file @
16ef8398
...
...
@@ -163,19 +163,6 @@ public class CheckController extends AbstractBaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"保存巡检记录<font color='blue'>手机app</font>"
,
notes
=
"保存巡检记录<font color='blue'>手机app</font>"
)
@RequestMapping
(
value
=
"/saveRecordNew"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
...
...
@@ -188,6 +175,10 @@ public class CheckController extends AbstractBaseController {
int
statu
=
-
1
;
PlanTask
planTask
=
null
;
if
(
requestParam
.
getPlanTaskId
()!=
null
&&
requestParam
.
getPlanTaskId
()
!=
0
){
Map
<
String
,
Object
>
map
=
checkService
.
selectCheckById
(
requestParam
.
getPlanTaskId
());
if
(!
ObjectUtils
.
isEmpty
(
map
))
{
checkService
.
delCheckByTaskId
(
requestParam
.
getPlanTaskId
(),
Long
.
valueOf
((
String
)
map
.
get
(
"id"
)));
}
planTask
=
planTaskService
.
selectPlanTaskStatus
(
requestParam
.
getPlanTaskId
());
}
AgencyUserModel
user
=
getUserInfo
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/mapper/CheckMapper.java
View file @
16ef8398
...
...
@@ -4,6 +4,7 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
com.yeejoin.amos.patrol.dao.entity.Check
;
import
org.apache.ibatis.annotations.Param
;
import
com.yeejoin.amos.patrol.business.entity.mybatis.CheckDetailBo
;
...
...
@@ -282,4 +283,10 @@ public interface CheckMapper extends BaseMapper {
//Map<String, String> queryUserInfoByIds(@Param(value = "userIds") String userIds);
int
delCheckByTaskId
(
@Param
(
value
=
"taskId"
)
Long
taskId
);
int
delCheckInputByCheckId
(
@Param
(
value
=
"checkId"
)
Long
checkId
);
Map
<
String
,
Object
>
selectCheckById
(
@Param
(
value
=
"taskId"
)
Long
taskId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/CheckServiceImpl.java
View file @
16ef8398
...
...
@@ -27,6 +27,8 @@ import com.yeejoin.amos.patrol.dao.entity.Plan;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.assertj.core.util.Sets
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.cglib.beans.BeanMap
;
...
...
@@ -155,6 +157,8 @@ public class CheckServiceImpl implements ICheckService {
@Autowired
private
CheckInputMapper
checkInputMapper
;
public
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
CheckServiceImpl
.
class
);
@Override
public
Page
<
CheckInfoVo
>
getCheckInfo
(
String
toke
,
String
product
,
String
appKey
,
CheckInfoPageParam
param
)
{
long
total
=
checkMapper
.
getCheckInfoCount
(
param
);
...
...
@@ -606,6 +610,7 @@ public class CheckServiceImpl implements ICheckService {
}
// check = checkDao.save(check);
try
{
log
.
error
(
"手机app保存巡检记录++++++++++++++++++++++"
+
check
.
toString
()
+
"<Over><Over><Over><Over>"
);
check
=
checkDao
.
save
(
check
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
@@ -733,6 +738,17 @@ public class CheckServiceImpl implements ICheckService {
checkDao
.
deleteBatch
(
list
);
}
@Override
public
Map
<
String
,
Object
>
selectCheckById
(
Long
id
)
{
return
checkMapper
.
selectCheckById
(
id
);
}
@Override
public
void
delCheckByTaskId
(
Long
id
,
Long
checkId
)
{
checkMapper
.
delCheckByTaskId
(
id
);
checkMapper
.
delCheckInputByCheckId
(
checkId
);
}
private
CheckInput
paraseText
(
CheckInput
checkInput
,
String
json
,
CheckInputParam
item
,
String
isScore
)
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
json
);
String
checkType
=
jsonObject
.
getString
(
"CheckType"
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/intfc/ICheckService.java
View file @
16ef8398
...
...
@@ -52,8 +52,13 @@ public interface ICheckService {
* @param ids
*/
@Transactional
(
rollbackFor
=
{
YeeException
.
class
,
Exception
.
class
})
void
delCheckById
(
List
<
Long
>
ids
);
void
delCheckByTaskId
(
Long
id
,
Long
checkId
);
Map
<
String
,
Object
>
selectCheckById
(
Long
id
);
/**
* 获取检查结果中所有不合格检查项
*
...
...
amos-boot-system-equip/src/main/resources/changelog/wl-3.6.0.xml
View file @
16ef8398
...
...
@@ -741,4 +741,16 @@
</sql>
</changeSet>
<changeSet
author=
"litengwei"
id=
"20230303-12322-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"wl_video"
columnName=
"video_type"
/>
</not>
</preConditions>
<comment>
新增属性字段 video_type
</comment>
<sql>
alter table `wl_video` add column `video_type` varchar(100) DEFAULT 'flv' COMMENT '视频格式: 1.flv,2.rtsp,3.hls,4.other';
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/EmergencyMapper.xml
View file @
16ef8398
...
...
@@ -193,7 +193,7 @@
<select
id=
"selectOilDrainage"
resultType=
"java.util.Map"
>
SELECT
wes.id,
'1' as type
,
'1' as type,
(SELECT wei.emergency_level FROM wl_equipment_index wei LEFT JOIN wl_equipment_specific_index wesi on wei.id = wesi.equipment_index_id
WHERE wesi.equipment_specific_id = wes.id AND wesi.equipment_index_key = wes.realtime_iot_index_key) as level,
wes.equipment_code as code ,
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificIndexMapper.xml
View file @
16ef8398
...
...
@@ -168,6 +168,7 @@
`name`,
token,
`code`,
video_type as videoType,
preset_position
FROM wl_video wlv
LEFT JOIN wl_video_equipment_specific wlves ON wlv.id = wlves.video_id
...
...
amos-boot-system-equip/src/main/resources/mapper/OrgUsrMapper.xml
View file @
16ef8398
...
...
@@ -64,8 +64,9 @@
biz_org_type = #{bizOrgType}
</if>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND locate(
#{bizOrgCode}, biz_org_code
) > 0
AND locate(
biz_org_code, #{bizOrgCode}
) > 0
</if>
</where>
ORDER BY sequence_nbr
</select>
</mapper>
amos-boot-system-equip/src/main/resources/mapper/SupervisionVideoMapper.xml
View file @
16ef8398
...
...
@@ -9,6 +9,7 @@
wv.name as name,
wv.url,
wv.code,
wv.video_type as videoType,
wv.preset_position as presetPosition
from wl_supervision_video wsv left join wl_video wv on wsv.camera_id = wv.id
where wsv.biz_org_code like concat(#{bizOrgCode},'%');
...
...
amos-boot-system-equip/src/main/resources/mapper/VideoMapper.xml
View file @
16ef8398
...
...
@@ -99,6 +99,7 @@
v.name AS name,
v.token AS token,
v.url AS url,
v.video_type as videoType,
v.code AS code,
v.address,
v.preset_position as presetPosition
...
...
@@ -175,6 +176,7 @@
vid.name as name,
vid.url,
vid.code,
vid.video_type as videoType,
vid.preset_position as presetPosition,
vid.name
from wl_video_equipment_specific as ves
...
...
@@ -187,6 +189,7 @@
v.`code`,
v.url,
v.token,
v.video_type as videoType,
CONCAT_WS(' ', ws.full_name, v.address) AS address,
v.img,
v.preset_position as presetPosition,
...
...
@@ -367,6 +370,7 @@
v.name AS name,
v.token AS token,
v.url AS url,
v.video_type AS videoType,
v.code AS code,
v.address,
v.preset_position as presetPosition
...
...
@@ -418,6 +422,7 @@
v.id AS id,
v.name AS name,
v.token AS token,
v.video_type AS videoType,
v.url AS url,
v.code AS code,
v.address,
...
...
amos-boot-system-jcs/src/main/java/com/yeejoin/amos/AmosJcsApplication.java
View file @
16ef8398
...
...
@@ -17,6 +17,7 @@ import org.springframework.context.ConfigurableApplicationContext;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.core.env.Environment
;
import
org.springframework.data.redis.connection.RedisConnection
;
import
org.springframework.data.redis.connection.RedisConnectionFactory
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
...
...
@@ -53,9 +54,8 @@ public class AmosJcsApplication {
String
port
=
env
.
getProperty
(
"server.port"
);
String
path
=
oConvertUtils
.
getString
(
env
.
getProperty
(
"server.servlet.context-path"
));
GlobalExceptionHandler
.
setAlwaysOk
(
true
);
logger
.
info
(
"\n----------------------------------------------------------\n\t"
+
"Application Amos-Biz-Boot is running! Access URLs:\n\t"
+
"Swagger文档: \thttp://"
+
ip
+
":"
+
port
+
path
+
"/doc.html\n"
+
"----------------------------------------------------------"
);
String
logs
=
String
.
format
(
"%n----------------------------------------------------------%n Application Amos-Biz-Boot is running! Access URLs:%n Swagger文档: http:// %c : %c %c /doc.html%n----------------------------------------------------------"
,
ip
,
port
,
path
);
logger
.
info
(
logs
);
}
/**
...
...
@@ -71,12 +71,18 @@ public class AmosJcsApplication {
RedisTemplate
redisTemplate
=
context
.
getBean
(
"redisTemplate"
,
RedisTemplate
.
class
);
RedisConnection
redisConnection
=
null
;
try
{
redisConnection
=
redisTemplate
.
getConnectionFactory
().
getConnection
();
redisConnection
.
flushAll
();
RedisConnectionFactory
redisConnectionFactory
=
redisTemplate
.
getConnectionFactory
();
if
(
redisConnectionFactory
!=
null
){
redisConnection
=
redisConnectionFactory
.
getConnection
();
redisConnection
.
flushAll
();
}
}
catch
(
Exception
e
)
{
logger
.
info
(
"删除redis 缓存的key 失败"
);
}
finally
{
redisConnection
.
close
();
if
(
redisConnection
!=
null
){
redisConnection
.
close
();
}
}
}
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_check.xml
View file @
16ef8398
...
...
@@ -2159,4 +2159,23 @@
d.date
</select>
<select
id=
"delCheckByTaskId"
resultType=
"int"
>
DELETE FROM
p_check pc
WHERE pc.plan_task_id = #{taskId}
</select>
<select
id=
"delCheckInputByCheckId"
resultType=
"int"
>
DELETE FROM
p_check_input pci
WHERE pci.check_id = #{checkId}
</select>
<select
id=
"selectCheckById"
resultType=
"java.util.HashMap"
>
SELECT *
FROM
p_check pc
WHERE pc.plan_task_id = #{taskId}
</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