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
733e11e1
Commit
733e11e1
authored
Aug 07, 2025
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
23b46eaf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
258 additions
and
231 deletions
+258
-231
OpenapiBizTokenService.java
...amos/api/openapi/face/service/OpenapiBizTokenService.java
+1
-0
CompanyAndPersonTask.java
.../precontrol/common/after/runner/CompanyAndPersonTask.java
+1
-0
StartPlatformTokenService.java
...in/precontrol/common/start/StartPlatformTokenService.java
+1
-0
PlatformUtils.java
...va/com/yeejoin/precontrol/common/utils/PlatformUtils.java
+1
-0
AmosAuth.java
.../src/main/java/com/yeejoin/amos/avic/config/AmosAuth.java
+1
-0
ConfigureController.java
...m/yeejoin/equipmanage/controller/ConfigureController.java
+0
-0
AnalysisReportSchedulerJob.java
...eejoin/equipmanage/quartz/AnalysisReportSchedulerJob.java
+58
-58
CarPropertyJob.java
...n/java/com/yeejoin/equipmanage/quartz/CarPropertyJob.java
+49
-49
RemoteSecurityService.java
...com/yeejoin/equipmanage/remote/RemoteSecurityService.java
+1
-0
ConfirmAlarmServiceImpl.java
...oin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
+1
-1
ESeqServiceImpl.java
...com/yeejoin/equipmanage/service/impl/ESeqServiceImpl.java
+1
-1
EmergencyServiceImpl.java
...eejoin/equipmanage/service/impl/EmergencyServiceImpl.java
+6
-6
EquipmentSpecificSerivceImpl.java
...quipmanage/service/impl/EquipmentSpecificSerivceImpl.java
+70
-70
JxiopCarIotListerServiceImpl.java
...quipmanage/service/impl/JxiopCarIotListerServiceImpl.java
+41
-36
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+0
-0
LoginController.java
...yeejoin/amos/fas/business/controller/LoginController.java
+1
-0
RemoteSecurityService.java
...eejoin/amos/fas/business/feign/RemoteSecurityService.java
+1
-0
RemoteSecurityService.java
...eejoin/amos/latentdanger/feign/RemoteSecurityService.java
+2
-0
RemoteSecurityService.java
...yeejoin/amos/maintenance/feign/RemoteSecurityService.java
+2
-0
RemoteSecurityService.java
.../com/yeejoin/amos/patrol/feign/RemoteSecurityService.java
+2
-0
RemoteSecurityService.java
...yeejoin/amos/supervision/feign/RemoteSecurityService.java
+2
-0
JobService.java
.../java/com/yeejoin/amos/supervision/quartz/JobService.java
+3
-3
PlanTaskJobService.java
...m/yeejoin/amos/supervision/quartz/PlanTaskJobService.java
+3
-3
WechatController.java
...amos/boot/module/tzs/biz/controller/WechatController.java
+1
-0
TzsAuthServiceImpl.java
.../boot/module/tzs/biz/service/impl/TzsAuthServiceImpl.java
+1
-0
CylinderSchedulerJob.java
.../boot/module/tzs/flc/biz/quartz/CylinderSchedulerJob.java
+1
-1
pom.xml
pom.xml
+7
-3
No files found.
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/OpenapiBizTokenService.java
View file @
733e11e1
...
...
@@ -53,6 +53,7 @@ public class OpenapiBizTokenService extends BaseService<OpenapiBizTokenModel, Op
bizTokenModel
.
setApiCompanyCode
(
openapiBizToken
.
getApiCompanyCode
());
RequestContext
.
setProduct
(
openapiBizToken
.
getProduct
());
RequestContext
.
setAppKey
(
openapiBizToken
.
getAppKey
());
System
.
out
.
println
(
"================================openapi"
);
FeignClientResult
<
HashMap
<
String
,
Object
>>
responseModel
=
Privilege
.
authClient
.
idpassword
(
idPasswordAuthModel
);
HashMap
<
String
,
Object
>
authModel
=
responseModel
.
getResult
();
String
token
=
(
String
)
authModel
.
get
(
"token"
);
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-precontrol-api/src/main/java/com/yeejoin/precontrol/common/after/runner/CompanyAndPersonTask.java
View file @
733e11e1
...
...
@@ -90,6 +90,7 @@ public class CompanyAndPersonTask {
IdPasswordAuthModel
authModel
=
new
IdPasswordAuthModel
();
authModel
.
setLoginId
(
user
);
authModel
.
setPassword
(
DesUtil
.
encode
(
password
,
secretKey
));
System
.
out
.
println
(
"================================companyandperson"
);
FeignClientResult
<
Map
<
String
,
String
>>
authResult
=
Privilege
.
authClient
.
idpassword
(
authModel
);
String
token
=
authResult
.
getResult
().
get
(
"token"
);
RequestContext
.
setToken
(
token
);
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-precontrol-api/src/main/java/com/yeejoin/precontrol/common/start/StartPlatformTokenService.java
View file @
733e11e1
...
...
@@ -41,6 +41,7 @@ public class StartPlatformTokenService {
authModel
.
setPassword
(
DesUtil
.
encode
(
password
,
secretKey
));
System
.
out
.
println
(
"user:"
+
user
);
System
.
out
.
println
(
"secretKey:"
+
secretKey
);
System
.
out
.
println
(
"================================startPlatform"
);
FeignClientResult
<
Map
<
String
,
String
>>
authResult
=
Privilege
.
authClient
.
idpassword
(
authModel
);
String
token
=
authResult
.
getResult
().
get
(
"token"
);
System
.
out
.
println
(
"token:"
+
token
);
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-precontrol-api/src/main/java/com/yeejoin/precontrol/common/utils/PlatformUtils.java
View file @
733e11e1
...
...
@@ -285,6 +285,7 @@ public class PlatformUtils {
authModel
.
setPassword
(
DesUtil
.
encode
(
password
,
secretKey
));
System
.
out
.
println
(
"user:"
+
user
);
System
.
out
.
println
(
"secretKey:"
+
secretKey
);
System
.
out
.
println
(
"================================getSyncPlatformUser"
);
FeignClientResult
<
Map
<
String
,
String
>>
authResult
=
Privilege
.
authClient
.
idpassword
(
authModel
);
String
token
=
authResult
.
getResult
().
get
(
"token"
);
System
.
out
.
println
(
"token:"
+
token
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-avic-biz/src/main/java/com/yeejoin/amos/avic/config/AmosAuth.java
View file @
733e11e1
...
...
@@ -52,6 +52,7 @@ public class AmosAuth {
arg0
.
setPassword
(
DesUtil
.
encode
(
password
,
"qaz"
));
RequestContext
.
setProduct
(
product
);
RequestContext
.
setAppKey
(
appKey
);
System
.
out
.
println
(
"================================AmosAuth"
);
FeignClientResult
o
=
privilege
.
authClient
.
idpassword
(
arg0
);
model
=
(
HashMap
<
String
,
Object
>)
o
.
getResult
();
flag
=
false
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/ConfigureController.java
View file @
733e11e1
This source diff could not be displayed because it is too large. You can
view the blob
instead.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/quartz/AnalysisReportSchedulerJob.java
View file @
733e11e1
package
com
.
yeejoin
.
equipmanage
.
quartz
;
import
com.yeejoin.equipmanage.common.enums.AnalysisReportEnum
;
import
com.yeejoin.equipmanage.common.utils.DateUtils
;
import
com.yeejoin.equipmanage.service.IAnalysisReportLogService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
java.text.ParseException
;
import
java.util.Date
;
/**
* @author DELL
*/
@Component
@EnableScheduling
public
class
AnalysisReportSchedulerJob
{
@Autowired
private
IAnalysisReportLogService
iAnalysisReportLogService
;
private
final
Logger
log
=
LoggerFactory
.
getLogger
(
AnalysisReportSchedulerJob
.
class
);
/**
* 每天凌晨0点-日报生成
*/
@Scheduled
(
cron
=
"0 0 0 * * ?"
)
public
void
dayReport
()
throws
ParseException
{
Date
beginDate
=
DateUtils
.
dateAdd
(
new
Date
(),-
1
,
false
);
Date
endDate
=
DateUtils
.
dateAdd
(
new
Date
(),-
1
,
false
);
iAnalysisReportLogService
.
generateReport
(
AnalysisReportEnum
.
DAY_REPORT
,
beginDate
,
endDate
);
}
/**
* 每周1(对应日期的2)凌晨0点-周报生成
*/
@Scheduled
(
cron
=
"0 0 0 ? * 1"
)
public
void
weekReport
()
throws
ParseException
{
Date
yestDay
=
DateUtils
.
dateAdd
(
new
Date
(),-
1
,
false
);
Date
beginDate
=
DateUtils
.
getFirstDayOfWeek
(
yestDay
);
Date
endDate
=
DateUtils
.
getLastDayOfWeek
(
yestDay
);
iAnalysisReportLogService
.
generateReport
(
AnalysisReportEnum
.
WEEK_REPORT
,
beginDate
,
endDate
);
}
/**
* 每月第1天凌晨0-月报生成
*/
@Scheduled
(
cron
=
"0 0 0 1 * ?"
)
public
void
monthReport
()
throws
ParseException
{
Date
yestDay
=
DateUtils
.
dateAdd
(
new
Date
(),-
1
,
false
);
Date
beginDate
=
DateUtils
.
getFirstDayOfMonth
(
yestDay
);
Date
endDate
=
DateUtils
.
getLastDayOfMonth
(
yestDay
);
log
.
warn
(
"monthReport报表开始生成"
);
iAnalysisReportLogService
.
generateMonthReport
(
AnalysisReportEnum
.
MONTH_REPORT
,
beginDate
,
endDate
);
}
}
//
package com.yeejoin.equipmanage.quartz;
//
//
import com.yeejoin.equipmanage.common.enums.AnalysisReportEnum;
//
import com.yeejoin.equipmanage.common.utils.DateUtils;
//
import com.yeejoin.equipmanage.service.IAnalysisReportLogService;
//
import org.slf4j.Logger;
//
import org.slf4j.LoggerFactory;
//
import org.springframework.beans.factory.annotation.Autowired;
//
import org.springframework.scheduling.annotation.EnableScheduling;
//
import org.springframework.scheduling.annotation.Scheduled;
//
import org.springframework.stereotype.Component;
//
//
import java.text.ParseException;
//
import java.util.Date;
//
/
//
**
//
* @author DELL
//
*/
//
@Component
//
@EnableScheduling
//
public class AnalysisReportSchedulerJob {
//
//
@Autowired
//
private IAnalysisReportLogService iAnalysisReportLogService;
//
private final Logger log = LoggerFactory.getLogger(AnalysisReportSchedulerJob.class);
//
/**
//
* 每天凌晨0点-日报生成
//
*/
//
@Scheduled(cron = "0 0 0 * * ?")
//
public void dayReport() throws ParseException {
//
Date beginDate = DateUtils.dateAdd(new Date(),-1,false);
//
Date endDate = DateUtils.dateAdd(new Date(),-1,false);
//
iAnalysisReportLogService.generateReport(AnalysisReportEnum.DAY_REPORT,beginDate,endDate);
//
}
//
//
/**
//
* 每周1(对应日期的2)凌晨0点-周报生成
//
*/
//
@Scheduled(cron = "0 0 0 ? * 1")
//
public void weekReport() throws ParseException {
//
Date yestDay = DateUtils.dateAdd(new Date(),-1,false);
//
Date beginDate = DateUtils.getFirstDayOfWeek(yestDay);
//
Date endDate = DateUtils.getLastDayOfWeek(yestDay);
//
iAnalysisReportLogService.generateReport(AnalysisReportEnum.WEEK_REPORT,beginDate,endDate);
//
}
//
//
/**
//
* 每月第1天凌晨0-月报生成
//
*/
//
@Scheduled(cron="0 0 0 1 * ?")
//
public void monthReport() throws ParseException {
//
Date yestDay = DateUtils.dateAdd(new Date(),-1,false);
//
Date beginDate = DateUtils.getFirstDayOfMonth(yestDay);
//
Date endDate = DateUtils.getLastDayOfMonth(yestDay);
//
log.warn("monthReport报表开始生成");
//
iAnalysisReportLogService.generateMonthReport(AnalysisReportEnum.MONTH_REPORT,beginDate,endDate);
//
}
//
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/quartz/CarPropertyJob.java
View file @
733e11e1
package
com
.
yeejoin
.
equipmanage
.
quartz
;
import
com.yeejoin.amos.component.rule.RuleTrigger
;
import
com.yeejoin.equipmanage.common.entity.dto.EquipQrDateDto
;
import
com.yeejoin.equipmanage.service.ICarService
;
import
com.yeejoin.equipmanage.service.impl.CarServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
import
java.util.Map
;
/**
* 定时监控车辆相关指标
* @author xxz
*/
@Component
@EnableScheduling
@Slf4j
public
class
CarPropertyJob
{
@Autowired
private
ICarService
carService
;
@Autowired
private
RuleTrigger
ruleTrigger
;
/**
* 车辆赋红码。定时查询车辆启停更新时间,
*/
@Scheduled
(
cron
=
"${update.car.qrCode}"
)
public
void
UpdateCarQrCode
()
{
List
<
Map
<
String
,
String
>>
list
=
carService
.
updateCarStartStatus
();
EquipQrDateDto
equipQrDateDto
=
new
EquipQrDateDto
();
equipQrDateDto
.
setContrast
(
"updateDate"
);
equipQrDateDto
.
setSource
(
"car"
);
equipQrDateDto
.
setData
(
list
);
try
{
ruleTrigger
.
publish
(
equipQrDateDto
,
"中心配置赋码规则/update-qr-code"
,
null
);
}
catch
(
Exception
e
)
{
log
.
error
(
"调用规则失败: {}"
,
e
.
getMessage
());
}
}
}
//
package com.yeejoin.equipmanage.quartz;
//
//
import com.yeejoin.amos.component.rule.RuleTrigger;
//
import com.yeejoin.equipmanage.common.entity.dto.EquipQrDateDto;
//
import com.yeejoin.equipmanage.service.ICarService;
//
import com.yeejoin.equipmanage.service.impl.CarServiceImpl;
//
import lombok.extern.slf4j.Slf4j;
//
import org.springframework.beans.factory.annotation.Autowired;
//
import org.springframework.scheduling.annotation.EnableScheduling;
//
import org.springframework.scheduling.annotation.Scheduled;
//
import org.springframework.stereotype.Component;
//
//
import java.util.List;
//
import java.util.Map;
//
/
//
**
//
* 定时监控车辆相关指标
//
* @author xxz
//
*/
//
@Component
//
@EnableScheduling
//
@Slf4j
//
public class CarPropertyJob {
//
//
@Autowired
//
private ICarService carService;
//
//
@Autowired
//
private RuleTrigger ruleTrigger;
//
//
/**
//
* 车辆赋红码。定时查询车辆启停更新时间,
//
*/
//
@Scheduled(cron = "${update.car.qrCode}")
//
public void UpdateCarQrCode() {
//
//
List<Map<String, String>> list = carService.updateCarStartStatus();
//
EquipQrDateDto equipQrDateDto = new EquipQrDateDto();
//
equipQrDateDto.setContrast("updateDate");
//
equipQrDateDto.setSource("car");
//
equipQrDateDto.setData(list);
//
try {
//
ruleTrigger.publish(equipQrDateDto, "中心配置赋码规则/update-qr-code", null);
//
} catch (Exception e) {
//
log.error("调用规则失败: {}", e.getMessage());
//
}
//
}
//
//
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/remote/RemoteSecurityService.java
View file @
733e11e1
...
...
@@ -265,6 +265,7 @@ public class RemoteSecurityService {
FeignClientResult
feignClientResult
=
new
FeignClientResult
();
RequestContext
.
setProduct
(
productApp
);
RequestContext
.
setAppKey
(
appKeyApp
);
System
.
out
.
println
(
"================================equip"
);
feignClientResult
=
Privilege
.
authClient
.
idpassword
(
dPasswordAuthModel
);
Map
map
=
(
Map
)
feignClientResult
.
getResult
();
if
(
map
!=
null
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
View file @
733e11e1
...
...
@@ -256,7 +256,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
set
(
EquipmentSpecific:
:
getRealtimeIotIndexUpdateDate
,
new
Date
()).
eq
(
EquipmentSpecific:
:
getId
,
alarm
.
getEquipmentSpecificId
());
equipmentSpecificSerivce
.
update
(
wrapper
);
MqttReceiveServiceImpl
.
upAlarmLogStatus
(
alarmLog
.
getIotCode
(),
alarmLog
.
getEquipmentSpecificIndexKey
(),
null
,
equipmentSpecificAlarmLogService
,
true
,
""
);
//
MqttReceiveServiceImpl.upAlarmLogStatus(alarmLog.getIotCode(), alarmLog.getEquipmentSpecificIndexKey(), null, equipmentSpecificAlarmLogService, true, "");
}
// 如果是批量确警,先查询,再确警,用于批量消息推送
isBatch
=
ent
.
getIsBatch
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/ESeqServiceImpl.java
View file @
733e11e1
...
...
@@ -129,7 +129,7 @@ public class ESeqServiceImpl implements IESeqService {
}
@Override
@Scheduled
(
cron
=
"${es.ESEquiplistSpecific.time}"
)
//
@Scheduled(cron = "${es.ESEquiplistSpecific.time}")
public
void
deleteESEquiplistSpecificBySystemES
()
{
if
(
flag
){
Calendar
calendar
=
Calendar
.
getInstance
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EmergencyServiceImpl.java
View file @
733e11e1
...
...
@@ -626,12 +626,12 @@ public class EmergencyServiceImpl implements IEmergencyService {
return
emergencyMapper
.
alarmList
(
page
,
bizOrgCode
,
systemCode
,
types
,
emergencyLevels
,
name
,
cleanStatus
,
handleStatus
);
}
//稳压泵定时向缓存中存昨日启动次数任务
@Scheduled
(
cron
=
"${equipment.pressurepump.start.cron}"
)
private
void
stationDoubleReport
()
{
System
.
out
.
println
(
"开始定时存储昨日稳压泵启动次数,定时时间为:"
+
pumpYesterdayStart
);
getPressurePumpDay
();
}
//
//稳压泵定时向缓存中存昨日启动次数任务
//
@Scheduled(cron = "${equipment.pressurepump.start.cron}")
//
private void stationDoubleReport() {
//
System.out.println("开始定时存储昨日稳压泵启动次数,定时时间为:" + pumpYesterdayStart);
//
getPressurePumpDay();
//
}
@Override
public
Map
<
String
,
List
<
PressurePumpCountVo
>>
getPressurePumpDay
()
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificSerivceImpl.java
View file @
733e11e1
...
...
@@ -1942,77 +1942,77 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
return
infoVoList
;
}
/**
* 在设备报废前30日 每日9点执行 系统推送提醒。设备报废后停止消息推送提醒。。
*
* @throws Exception
*/
@Scheduled
(
cron
=
"${equipment.scrap.cron}"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
equipmentScrap
()
throws
Exception
{
List
<
Map
<
String
,
Object
>>
equipSpecificScrap
=
equipmentSpecificIndexMapper
.
getEquipSpecificScrap
();
equipSpecificScrap
.
forEach
(
e
->
{
try
{
if
(
e
.
get
(
"weExpiry"
)
!=
null
)
{
int
year
=
Integer
.
parseInt
(
e
.
get
(
"weExpiry"
).
toString
());
Date
productDate
=
DateUtils
.
dateParse
(
e
.
get
(
"product"
).
toString
().
substring
(
0
,
10
),
DateUtils
.
DATE_PATTERN
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
productDate
);
calendar
.
add
(
Calendar
.
YEAR
,
year
);
Date
now
=
new
Date
();
String
scrapTime
=
new
SimpleDateFormat
(
DateUtils
.
DATE_TIME_PATTERN
).
format
(
calendar
.
getTime
());
int
day
=
DateUtils
.
dateBetween
(
now
,
calendar
.
getTime
());
if
(
day
<
Integer
.
parseInt
(
equipmentScrapDay
)
&&
day
>
-
1
)
{
syncSystemctlMsg
(
e
,
scrapTime
,
day
);
}
else
if
(
day
==
-
1
)
{
// 发送emq消息 给idx
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"id"
,
e
.
get
(
"id"
).
toString
());
map
.
put
(
"code"
,
e
.
get
(
"code"
).
toString
());
map
.
put
(
"bizOrgCode"
,
e
.
get
(
"bizOrgCode"
).
toString
());
map
.
put
(
"bizOrgName"
,
e
.
get
(
"bizOrgName"
).
toString
());
// /**
// * 在设备报废前30日 每日9点执行 系统推送提醒。设备报废后停止消息推送提醒。。
// *
// * @throws Exception
// */
// @Scheduled(cron = "${equipment.scrap.cron}")
// @Transactional(rollbackFor = Exception.class)
// public void equipmentScrap() throws Exception {
// List<Map<String, Object>> equipSpecificScrap = equipmentSpecificIndexMapper.getEquipSpecificScrap();
// equipSpecificScrap.forEach(e -> {
// try {
// if (e.get("weExpiry") != null) {
// int year = Integer.parseInt(e.get("weExpiry").toString());
// Date productDate = DateUtils.dateParse(e.get("product").toString().substring(0,10), DateUtils.DATE_PATTERN);
// Calendar calendar = Calendar.getInstance();
// calendar.setTime(productDate);
// calendar.add(Calendar.YEAR, year);
//
try
{
emqKeeper
.
getMqttClient
().
publish
(
"equip/scrap/put"
,
JSONObject
.
toJSONString
(
map
).
getBytes
(),
1
,
false
);
}
catch
(
MqttException
exp
)
{
log
.
info
(
String
.
format
(
"发送eqm转kafka消息失败:%s"
,
exp
.
getMessage
()));
}
// idxFeign.handleEquipNotScrapWhenExpired(String.valueOf(e.get("id")), String.valueOf(e.get("bizOrgCode")), String.valueOf(e.get("bizOrgName")));
}
}
}
catch
(
ParseException
parseException
)
{
parseException
.
printStackTrace
();
}
});
}
/**
* 每日计算当天巡检任务数量,任务是否至少有一次执行。。
*
* @throws Exception
*/
@Scheduled
(
cron
=
"${equip.patrol.cron:0 0 9 * * ?}"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
patrolTaskStatic
()
throws
Exception
{
Map
<
String
,
Object
>
mapPatrol
=
equipmentSpecificIndexMapper
.
patrolTaskStatic
();
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"isFinishOnce"
,
mapPatrol
.
get
(
"isFinishOnce"
).
toString
());
map
.
put
(
"taskNum"
,
mapPatrol
.
get
(
"taskNum"
).
toString
());
map
.
put
(
"planNum"
,
mapPatrol
.
get
(
"planNum"
).
toString
());
map
.
put
(
"bizOrgCode"
,
mapPatrol
.
get
(
"bizOrgCode"
).
toString
());
map
.
put
(
"bizOrgName"
,
mapPatrol
.
get
(
"bizOrgName"
).
toString
());
try
{
log
.
info
(
"每日统计当天巡检任务情况:{}==========="
,
map
);
emqKeeper
.
getMqttClient
().
publish
(
"equip/patrol/put"
,
JSONObject
.
toJSONString
(
map
).
getBytes
(),
1
,
false
);
}
catch
(
MqttException
exp
)
{
log
.
info
(
String
.
format
(
"发送eqm转kafka消息失败:%s"
,
exp
.
getMessage
()));
}
}
// Date now = new Date();
// String scrapTime = new SimpleDateFormat(DateUtils.DATE_TIME_PATTERN).format(calendar.getTime());
//
// int day = DateUtils.dateBetween(now, calendar.getTime());
// if (day < Integer.parseInt(equipmentScrapDay) && day > -1) {
// syncSystemctlMsg(e, scrapTime, day);
// } else if (day == -1) {
// // 发送emq消息 给idx
// Map<String, String> map = new HashMap<>();
// map.put("id", e.get("id").toString());
// map.put("code", e.get("code").toString());
// map.put("bizOrgCode", e.get("bizOrgCode").toString());
// map.put("bizOrgName", e.get("bizOrgName").toString());
////
// try {
// emqKeeper.getMqttClient().publish("equip/scrap/put", JSONObject.toJSONString(map).getBytes(), 1, false);
// } catch (MqttException exp) {
// log.info(String.format("发送eqm转kafka消息失败:%s", exp.getMessage()));
// }
//// idxFeign.handleEquipNotScrapWhenExpired(String.valueOf(e.get("id")), String.valueOf(e.get("bizOrgCode")), String.valueOf(e.get("bizOrgName")));
// }
// }
//
// } catch (ParseException parseException) {
// parseException.printStackTrace();
// }
// });
//
// }
// /**
// * 每日计算当天巡检任务数量,任务是否至少有一次执行。。
// *
// * @throws Exception
// */
// @Scheduled(cron = "${equip.patrol.cron:0 0 9 * * ?}")
// @Transactional(rollbackFor = Exception.class)
// public void patrolTaskStatic() throws Exception {
// Map<String, Object> mapPatrol = equipmentSpecificIndexMapper.patrolTaskStatic();
// Map<String, String> map = new HashMap<>();
// map.put("isFinishOnce", mapPatrol.get("isFinishOnce").toString());
// map.put("taskNum", mapPatrol.get("taskNum").toString());
// map.put("planNum", mapPatrol.get("planNum").toString());
// map.put("bizOrgCode", mapPatrol.get("bizOrgCode").toString());
// map.put("bizOrgName", mapPatrol.get("bizOrgName").toString());
// try {
// log.info("每日统计当天巡检任务情况:{}===========", map);
// emqKeeper.getMqttClient().publish("equip/patrol/put", JSONObject.toJSONString(map).getBytes(), 1, false);
// } catch (MqttException exp) {
// log.info(String.format("发送eqm转kafka消息失败:%s", exp.getMessage()));
// }
// }
void
syncSystemctlMsg
(
Map
<
String
,
Object
>
map
,
String
scrapTime
,
int
i
)
{
try
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/JxiopCarIotListerServiceImpl.java
View file @
733e11e1
...
...
@@ -76,47 +76,52 @@ public class JxiopCarIotListerServiceImpl {
return
;
}
cache
.
put
(
iotCode
,
iotCode
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
message
.
toString
());
//判断是否有效坐标
if
(!
ObjectUtils
.
isEmpty
(
jsonObject
.
get
(
"FireCar_Longitude"
))
&&
!
ObjectUtils
.
isEmpty
(
jsonObject
.
get
(
"FireCar_Latitude"
)))
{
//判断是否存在未结束进程,如果不存在,则进入判断插入开始节点
if
(
iWlCarMileageService
.
getUncompleteMileagByIotCode
(
iotCode
))
{
WlCarMileage
wlCarMileage
=
new
WlCarMileage
();
wlCarMileage
.
setIotCode
(
iotCode
);
wlCarMileage
.
setDate
(
new
Date
());
// 获取开始坐标
double
startLongitude
=
jsonObject
.
getDoubleValue
(
"FireCar_Longitude"
);
double
startLatitude
=
jsonObject
.
getDoubleValue
(
"FireCar_Latitude"
);
// String currentTime = "20"+jsonObject.getString("currentTime");
wlCarMileage
.
setStartLongitude
(
startLongitude
);
wlCarMileage
.
setStartLatitude
(
startLatitude
);
// Date startTime = UTCToCST();
//时间值被mysql自动转换
Date
startTime
=
new
Date
();
wlCarMileage
.
setStartTime
(
startTime
);
wlCarMileage
.
setStartName
(
getAddress
(
startLongitude
,
startLatitude
));
wlCarMileage
.
setStartSpeed
(
Double
.
valueOf
(
jsonObject
.
getDoubleValue
(
"FireCar_Speed"
)).
intValue
());
logger
.
info
(
"新增数据信息如下::"
+
JSONObject
.
toJSONString
(
wlCarMileage
));
try
{
iWlCarMileageService
.
save
(
wlCarMileage
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
iWlCarMileageService
.
save
(
wlCarMileage
);
try
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
message
.
toString
());
//判断是否有效坐标
if
(!
ObjectUtils
.
isEmpty
(
jsonObject
.
get
(
"FireCar_Longitude"
))
&&
!
ObjectUtils
.
isEmpty
(
jsonObject
.
get
(
"FireCar_Latitude"
)))
{
//判断是否存在未结束进程,如果不存在,则进入判断插入开始节点
if
(
iWlCarMileageService
.
getUncompleteMileagByIotCode
(
iotCode
))
{
WlCarMileage
wlCarMileage
=
new
WlCarMileage
();
wlCarMileage
.
setIotCode
(
iotCode
);
wlCarMileage
.
setDate
(
new
Date
());
// 获取开始坐标
double
startLongitude
=
jsonObject
.
getDoubleValue
(
"FireCar_Longitude"
);
double
startLatitude
=
jsonObject
.
getDoubleValue
(
"FireCar_Latitude"
);
// String currentTime = "20"+jsonObject.getString("currentTime");
wlCarMileage
.
setStartLongitude
(
startLongitude
);
wlCarMileage
.
setStartLatitude
(
startLatitude
);
// Date startTime = UTCToCST();
//时间值被mysql自动转换
Date
startTime
=
new
Date
();
wlCarMileage
.
setStartTime
(
startTime
);
wlCarMileage
.
setStartName
(
getAddress
(
startLongitude
,
startLatitude
));
wlCarMileage
.
setStartSpeed
(
Double
.
valueOf
(
jsonObject
.
getDoubleValue
(
"FireCar_Speed"
)).
intValue
());
logger
.
info
(
"新增数据信息如下::"
+
JSONObject
.
toJSONString
(
wlCarMileage
));
try
{
iWlCarMileageService
.
save
(
wlCarMileage
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
iWlCarMileageService
.
save
(
wlCarMileage
);
}
}
}
this
.
updateCarLocation
(
jsonObject
,
iotCode
);
String
coordinate
=
jsonObject
.
getString
(
"FireCar_Longitude"
)
+
","
+
jsonObject
.
getString
(
"FireCar_Latitude"
);
if
(
ObjectUtils
.
isEmpty
(
redisTemplate
.
opsForValue
().
get
(
iotCode
)))
{
redisTemplate
.
opsForValue
().
set
(
iotCode
,
coordinate
,
5
,
TimeUnit
.
MINUTES
);
//logger.info("首次入库redis:{}", iotCode);
}
else
{
if
(!
String
.
valueOf
(
redisTemplate
.
opsForValue
().
get
(
iotCode
)).
equals
(
coordinate
))
{
// logger.info("更新入库redis:{},旧:{},新:{}", iotCode, redisTemplate.opsForValue().get(iotCode), coordinate);
this
.
updateCarLocation
(
jsonObject
,
iotCode
);
String
coordinate
=
jsonObject
.
getString
(
"FireCar_Longitude"
)
+
","
+
jsonObject
.
getString
(
"FireCar_Latitude"
);
if
(
ObjectUtils
.
isEmpty
(
redisTemplate
.
opsForValue
().
get
(
iotCode
)))
{
redisTemplate
.
opsForValue
().
set
(
iotCode
,
coordinate
,
5
,
TimeUnit
.
MINUTES
);
//logger.info("首次入库redis:{}", iotCode);
}
else
{
if
(!
String
.
valueOf
(
redisTemplate
.
opsForValue
().
get
(
iotCode
)).
equals
(
coordinate
))
{
// logger.info("更新入库redis:{},旧:{},新:{}", iotCode, redisTemplate.opsForValue().get(iotCode), coordinate);
redisTemplate
.
opsForValue
().
set
(
iotCode
,
coordinate
,
5
,
TimeUnit
.
MINUTES
);
}
}
}
}
cache
.
remove
(
iotCode
);
finally
{
cache
.
remove
(
iotCode
);
}
}
public
String
getAddress
(
double
longitude
,
double
lantitude
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
733e11e1
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-fas-biz/src/main/java/com/yeejoin/amos/fas/business/controller/LoginController.java
View file @
733e11e1
...
...
@@ -81,6 +81,7 @@ public class LoginController {
dPasswordAuthModel
.
setLoginId
(
userId
);
dPasswordAuthModel
.
setPassword
(
DesUtil
.
encode
(
password
,
"qaz"
));
RequestContext
.
setProduct
(
product
);
System
.
out
.
println
(
"================================getBindEquipment"
);
FeignClientResult
feignClientResult
=
Privilege
.
authClient
.
idpassword
(
dPasswordAuthModel
);
if
(
ObjectUtils
.
isEmpty
(
feignClientResult
.
getResult
())){
throw
new
Exception
(
"缺失登录信息"
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-fas-biz/src/main/java/com/yeejoin/amos/fas/business/feign/RemoteSecurityService.java
View file @
733e11e1
...
...
@@ -170,6 +170,7 @@ public class RemoteSecurityService {
private
Toke
getLogin
(
IdPasswordAuthModel
dPasswordAuthModel
){
Toke
toke
=
new
Toke
();
RequestContext
.
setProduct
(
productWeb
);
System
.
out
.
println
(
"================================fas"
);
FeignClientResult
feignClientResult
=
Privilege
.
authClient
.
idpassword
(
dPasswordAuthModel
);
Map
map
=
(
Map
)
feignClientResult
.
getResult
();
if
(
map
!=
null
){
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/feign/RemoteSecurityService.java
View file @
733e11e1
...
...
@@ -113,6 +113,7 @@ public class RemoteSecurityService {
private
Toke
getLogin
(
IdPasswordAuthModel
dPasswordAuthModel
)
{
Toke
toke
=
new
Toke
();
RequestContext
.
setProduct
(
productWeb
);
System
.
out
.
println
(
"================================latent"
);
FeignClientResult
feignClientResult
=
Privilege
.
authClient
.
idpassword
(
dPasswordAuthModel
);
Map
map
=
(
Map
)
feignClientResult
.
getResult
();
if
(
map
!=
null
)
{
...
...
@@ -532,6 +533,7 @@ public class RemoteSecurityService {
RequestContext
.
setProduct
(
productApp
);
Toke
oked
=
new
Toke
();
try
{
System
.
out
.
println
(
"================================latentdanger2"
);
feignClientResult
=
Privilege
.
authClient
.
idpassword
(
dPasswordAuthModel
);
map
=
(
Map
)
feignClientResult
.
getResult
();
map
.
put
(
"appKey"
,
appKey
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/feign/RemoteSecurityService.java
View file @
733e11e1
...
...
@@ -114,6 +114,7 @@ public class RemoteSecurityService {
private
Toke
getLogin
(
IdPasswordAuthModel
dPasswordAuthModel
)
{
Toke
toke
=
new
Toke
();
RequestContext
.
setProduct
(
productWeb
);
System
.
out
.
println
(
"================================maintenance"
);
FeignClientResult
feignClientResult
=
Privilege
.
authClient
.
idpassword
(
dPasswordAuthModel
);
Map
map
=
(
Map
)
feignClientResult
.
getResult
();
if
(
map
!=
null
)
{
...
...
@@ -541,6 +542,7 @@ public class RemoteSecurityService {
RequestContext
.
setProduct
(
productApp
);
Toke
oked
=
new
Toke
();
try
{
System
.
out
.
println
(
"================================maintenance2"
);
feignClientResult
=
Privilege
.
authClient
.
idpassword
(
dPasswordAuthModel
);
map
=
(
Map
)
feignClientResult
.
getResult
();
map
.
put
(
"appKey"
,
appKey
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/feign/RemoteSecurityService.java
View file @
733e11e1
...
...
@@ -116,6 +116,7 @@ public class RemoteSecurityService {
private
Toke
getLogin
(
IdPasswordAuthModel
dPasswordAuthModel
)
{
Toke
toke
=
new
Toke
();
RequestContext
.
setProduct
(
productWeb
);
System
.
out
.
println
(
"================================patrol"
);
FeignClientResult
feignClientResult
=
Privilege
.
authClient
.
idpassword
(
dPasswordAuthModel
);
Map
map
=
(
Map
)
feignClientResult
.
getResult
();
if
(
map
!=
null
)
{
...
...
@@ -535,6 +536,7 @@ public class RemoteSecurityService {
RequestContext
.
setProduct
(
productApp
);
Toke
oked
=
new
Toke
();
try
{
System
.
out
.
println
(
"================================patrol2"
);
feignClientResult
=
Privilege
.
authClient
.
idpassword
(
dPasswordAuthModel
);
map
=
(
Map
)
feignClientResult
.
getResult
();
map
.
put
(
"appKey"
,
appKey
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/feign/RemoteSecurityService.java
View file @
733e11e1
...
...
@@ -117,6 +117,7 @@ public class RemoteSecurityService {
private
Toke
getLogin
(
IdPasswordAuthModel
dPasswordAuthModel
)
{
Toke
toke
=
new
Toke
();
RequestContext
.
setProduct
(
productWeb
);
System
.
out
.
println
(
"================================supervision"
);
FeignClientResult
feignClientResult
=
Privilege
.
authClient
.
idpassword
(
dPasswordAuthModel
);
Map
map
=
(
Map
)
feignClientResult
.
getResult
();
if
(
map
!=
null
)
{
...
...
@@ -544,6 +545,7 @@ public class RemoteSecurityService {
RequestContext
.
setProduct
(
productApp
);
Toke
oked
=
new
Toke
();
try
{
System
.
out
.
println
(
"================================supervision2"
);
feignClientResult
=
Privilege
.
authClient
.
idpassword
(
dPasswordAuthModel
);
map
=
(
Map
)
feignClientResult
.
getResult
();
map
.
put
(
"appKey"
,
appKey
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/quartz/JobService.java
View file @
733e11e1
...
...
@@ -85,9 +85,9 @@ public class JobService implements IJobService {
public
void
initScheduler
()
{
// TODO Auto-generated method stub
log
.
debug
(
"======================initScheduler==========================="
);
initTaskJob
();
initPlanTaskJob
();
initMsgJob
();
//
initTaskJob();
//
initPlanTaskJob();
//
initMsgJob();
}
@Override
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/quartz/PlanTaskJobService.java
View file @
733e11e1
...
...
@@ -12,9 +12,9 @@ public class PlanTaskJobService implements Job {
@Override
public
void
execute
(
JobExecutionContext
context
)
throws
JobExecutionException
{
JobDataMap
jobDataMap
=
context
.
getJobDetail
().
getJobDataMap
();
setJobService
((
IJobService
)
jobDataMap
.
get
(
"jobService"
));
jobService
.
planTaskJobPerform
(
Long
.
valueOf
(
jobDataMap
.
get
(
"id"
).
toString
()),
jobDataMap
.
get
(
"jobType"
).
toString
(),
jobDataMap
.
get
(
"jobName"
).
toString
());
//
JobDataMap jobDataMap = context.getJobDetail().getJobDataMap();
//
setJobService((IJobService) jobDataMap.get("jobService"));
//
jobService.planTaskJobPerform(Long.valueOf(jobDataMap.get("id").toString()),jobDataMap.get("jobType").toString(),jobDataMap.get("jobName").toString());
}
public
IJobService
getJobService
()
{
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/WechatController.java
View file @
733e11e1
...
...
@@ -330,6 +330,7 @@ public class WechatController extends BaseController {
IdPasswordAuthModel
loninData
=
new
IdPasswordAuthModel
();
loninData
.
setLoginId
(
model
.
getPhone
());
loninData
.
setPassword
(
passwd
);
System
.
out
.
println
(
"================================wechat"
);
FeignClientResult
loginResult
=
Privilege
.
authClient
.
idpassword
(
loninData
);
if
(
loginResult
.
getStatus
()
==
200
)
{
HashMap
resultMap
=
(
HashMap
)
loginResult
.
getResult
();
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/TzsAuthServiceImpl.java
View file @
733e11e1
...
...
@@ -151,6 +151,7 @@ public class TzsAuthServiceImpl implements TzsAuthService {
IdPasswordAuthModel
loninData
=
new
IdPasswordAuthModel
();
loninData
.
setLoginId
(
ctiUserName
);
loninData
.
setPassword
(
passwd
);
System
.
out
.
println
(
"================================tzs.loginCtiUser"
);
FeignClientResult
loginResult
=
Privilege
.
authClient
.
idpassword
(
loninData
);
if
(
loginResult
.
getStatus
()
==
200
)
{
HashMap
resultMap
=
(
HashMap
)
loginResult
.
getResult
();
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/quartz/CylinderSchedulerJob.java
View file @
733e11e1
...
...
@@ -22,6 +22,6 @@ public class CylinderSchedulerJob {
*/
@Scheduled
(
cron
=
"${cylinder-early-warning-cron:0 0 9 * * ?}"
)
public
void
dayReport
()
{
scheduleService
.
calEarlyWarningLevel
();
//
scheduleService.calEarlyWarningLevel();
}
}
pom.xml
View file @
733e11e1
...
...
@@ -333,6 +333,10 @@
<modules>
<module>
amos-boot-module
</module>
<module>
amos-boot-biz-common
</module>
<module>
amos-boot-data
</module>
<module>
amos-boot-core
</module>
<module>
amos-boot-utils
</module>
<!--
<module>amos-boot-system-tzs</module>
<module>amos-boot-system-jcs</module>
<module>amos-boot-system-knowledgebase</module>
...
...
@@ -340,16 +344,16 @@
<module>amos-boot-system-patrol</module>
<module>amos-boot-system-maintenance</module>
<module>amos-boot-system-supervision</module>
-->
<module>
amos-boot-system-equip
</module>
<module>
amos-boot-core
</module>
<module>
amos-boot-utils
</module>
<!--
<module>amos-boot-system-latentdanger</module>
<module>amos-boot-system-ccs</module>
<module>
amos-boot-data
</module>
<module>amos-boot-system-precontrol</module>
<module>amos-boot-system-cas</module>
<module>amos-boot-system-tdc</module>
<module>amos-boot-system-kgd</module>
-->
</modules>
<build>
...
...
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