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
7476bc50
Commit
7476bc50
authored
Mar 06, 2023
by
litengwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl_plan6_temp' into develop_dl_plan6_temp
parents
233d3822
24076df5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
177 additions
and
83 deletions
+177
-83
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
EmergencyServiceImpl.java
...eejoin/equipmanage/service/impl/EmergencyServiceImpl.java
+0
-0
EquipmentSpecificAlarmServiceImpl.java
...anage/service/impl/EquipmentSpecificAlarmServiceImpl.java
+4
-11
PressurePumpServiceImpl.java
...oin/equipmanage/service/impl/PressurePumpServiceImpl.java
+15
-7
CheckController.java
...join/amos/patrol/business/controller/CheckController.java
+4
-13
InputItemController.java
.../amos/patrol/business/controller/InputItemController.java
+7
-0
CheckMapper.java
.../yeejoin/amos/patrol/business/dao/mapper/CheckMapper.java
+7
-0
IPointInputItemDao.java
...os/patrol/business/dao/repository/IPointInputItemDao.java
+3
-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
EmergencyMapper.xml
...ystem-equip/src/main/resources/mapper/EmergencyMapper.xml
+1
-1
OrgUsrMapper.xml
...t-system-equip/src/main/resources/mapper/OrgUsrMapper.xml
+2
-1
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/enums/DayHourEnum.java
deleted
100644 → 0
View file @
233d3822
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 @
7476bc50
...
...
@@ -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 @
7476bc50
...
...
@@ -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 @
7476bc50
...
...
@@ -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 @
7476bc50
...
...
@@ -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 @
7476bc50
...
...
@@ -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/EmergencyServiceImpl.java
View file @
7476bc50
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 @
7476bc50
...
...
@@ -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/PressurePumpServiceImpl.java
View file @
7476bc50
...
...
@@ -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-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/CheckController.java
View file @
7476bc50
...
...
@@ -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/controller/InputItemController.java
View file @
7476bc50
...
...
@@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.patrol.business.dao.mapper.InputItemMapper
;
import
com.yeejoin.amos.patrol.business.dao.repository.IPointInputItemDao
;
import
com.yeejoin.amos.patrol.business.feign.JcsFeignClient
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -76,6 +77,8 @@ public class InputItemController extends AbstractBaseController {
JcsFeignClient
jcsFeignClient
;
@Autowired
InputItemMapper
inputItemMapper
;
@Autowired
IPointInputItemDao
iPointInputItemDao
;
@Value
(
"${equipment.hierarchy}"
)
private
String
hierarchy
;
...
...
@@ -312,6 +315,10 @@ public class InputItemController extends AbstractBaseController {
if
(
ObjectUtils
.
isEmpty
(
itemIDs
))
{
return
CommonResponseUtil
.
failure
(
"请选择要删除的检查项"
);
}
//查询该巡查项是否已有巡查点绑定 有就返回
if
(
iPointInputItemDao
.
selectByITemId
(
itemIDs
)
>
0
)
{
return
CommonResponseUtil
.
failure
(
"该巡检项已绑定,请先删除巡检设备的巡检项"
);
}
String
[]
ids
=
itemIDs
.
split
(
","
);
inputItemService
.
batchDelInputItem
(
ids
);
redisUtils
.
del
(
EQUIP_AND_FIRE_TREE
+
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
==
null
?
""
:
reginParams
.
getPersonIdentity
().
getBizOrgCode
()));
...
...
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 @
7476bc50
...
...
@@ -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/dao/repository/IPointInputItemDao.java
View file @
7476bc50
...
...
@@ -54,4 +54,7 @@ public interface IPointInputItemDao extends BaseDao<PointInputItem, Long> {
@Query
(
value
=
"SELECT input_item_id FROM p_point_inputitem WHERE id IN (?1) "
,
nativeQuery
=
true
)
List
<
String
>
selectItemIdByid
(
List
<
String
>
ids
);
@Query
(
value
=
"SELECT count(*) FROM p_point_inputitem WHERE input_item_id IN(?1) "
,
nativeQuery
=
true
)
int
selectByITemId
(
String
inputItemIds
);
}
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 @
7476bc50
...
...
@@ -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 @
7476bc50
...
...
@@ -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/mapper/EmergencyMapper.xml
View file @
7476bc50
...
...
@@ -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/OrgUsrMapper.xml
View file @
7476bc50
...
...
@@ -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-jcs/src/main/java/com/yeejoin/amos/AmosJcsApplication.java
View file @
7476bc50
...
...
@@ -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 @
7476bc50
...
...
@@ -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