Commit 44c58f79 authored by zhengjiawei's avatar zhengjiawei

Merge branch 'dev_upgrade' of G:\AAA-mypro\java\YeeAmosFireAutoSysRoot with conflicts.

parent e3cf5c9a
package com.yeejoin.amos.fas.business.action;
import com.yeejoin.amos.fas.business.service.intfc.IEquipmentHandlerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import com.yeejoin.amos.fas.business.action.model.ContingencyEvent;
import com.yeejoin.amos.fas.business.service.intfc.IRuleRunningSnapshotService;
@Component
public class ContingencyLogListener implements ApplicationListener<ContingencyEvent>{
@Autowired
IRuleRunningSnapshotService ruleRunningSnapshotService;
// @Autowired
// @Lazy
// IEquipmentHandlerService equipmentHandlerService;
@Override
public void onApplicationEvent(ContingencyEvent event) {
ruleRunningSnapshotService.reacordPlan(event.getTopic(), event.getMsgType(), event.getMsgBody(), event.getContingency());
// equipmentHandlerService.subscribeTopic();
}
}
package com.yeejoin.amos.fas.business.action;
import com.yeejoin.amos.fas.business.service.intfc.IEquipmentHandlerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import com.yeejoin.amos.fas.business.action.model.ContingencyEvent;
import com.yeejoin.amos.fas.business.service.intfc.IRuleRunningSnapshotService;
@Component
public class ContingencyLogListener implements ApplicationListener<ContingencyEvent>{
@Autowired
IRuleRunningSnapshotService ruleRunningSnapshotService;
// @Autowired
// @Lazy
// IEquipmentHandlerService equipmentHandlerService;
@Override
public void onApplicationEvent(ContingencyEvent event) {
ruleRunningSnapshotService.reacordPlan(event.getTopic(), event.getMsgType(), event.getMsgBody(), event.getContingency());
// equipmentHandlerService.subscribeTopic();
}
}
package com.yeejoin.amos.fas.business.controller;
import com.yeejoin.amos.fas.business.service.intfc.IStationMaintenService;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import com.yeejoin.amos.fas.dao.entity.StationInfo;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
@RestController
@RequestMapping(value = "/api/stationMainten")
@Api(tags="站端api")
public class StationMaintenController extends BaseController{
@Autowired
private IStationMaintenService stationMaintenService;
/**
* 保存站端信息
*/
@Permission
@ApiOperation(value = "保存录入站端信息", notes = "保存录入站端信息")
@PostMapping(value = "/save")
public CommonResponse saveStation(@RequestBody StationInfo stationParams) {
AgencyUserModel userModel = getUserInfo();
stationParams.setCreateBy(getUserId());
stationParams.setCreateDate(new Date());
stationParams.setCreateUserName(userModel.getUserName());
stationParams.setCreateUserPhoneNum(userModel.getMobile());
stationMaintenService.save(stationParams);
return CommonResponseUtil.success();
}
/**
* 获取站端信息
*/
@Permission
@ApiOperation(value = "获取站端信息", notes = "获取站端信息")
@PostMapping(value = "/detail")
public CommonResponse detail() {
StationInfo stationInfo = stationMaintenService.detail();
return CommonResponseUtil.success(stationInfo);
}
}
package com.yeejoin.amos.fas.business.controller;
import com.yeejoin.amos.fas.business.service.intfc.IStationMaintenService;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import com.yeejoin.amos.fas.dao.entity.StationInfo;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
@RestController
@RequestMapping(value = "/api/stationMainten")
@Api(tags="站端api")
public class StationMaintenController extends BaseController{
@Autowired
private IStationMaintenService stationMaintenService;
/**
* 保存站端信息
*/
@Permission
@ApiOperation(value = "保存录入站端信息", notes = "保存录入站端信息")
@PostMapping(value = "/save")
public CommonResponse saveStation(@RequestBody StationInfo stationParams) {
AgencyUserModel userModel = getUserInfo();
stationParams.setCreateBy(getUserId());
stationParams.setCreateDate(new Date());
stationParams.setCreateUserName(userModel.getUserName());
stationParams.setCreateUserPhoneNum(userModel.getMobile());
stationMaintenService.save(stationParams);
return CommonResponseUtil.success();
}
/**
* 获取站端信息
*/
@Permission
@ApiOperation(value = "获取站端信息", notes = "获取站端信息")
@PostMapping(value = "/detail")
public CommonResponse detail() {
StationInfo stationInfo = stationMaintenService.detail();
return CommonResponseUtil.success(stationInfo);
}
}
......@@ -333,7 +333,6 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
if (ids.size() > 0) {
fmeaEquipmentPointMapper.updateStateByIds(state, ids);
}
final Integer st = state;
String monitor = equipmentSpecificMapper.findEquipNameById(equipmentSpecificIndex.getEquipmentSpecificId());
RsDataQueue rsDataQueue = RsDataQueue.getInstance();
......
package com.yeejoin.amos.fas.business.service.intfc;
import com.yeejoin.amos.fas.business.vo.ReginParams;
/**
* @author keyong
* @title: IEquipmentHandler
* <pre>
* @description: 站端接受装备信息系统数据处理流程
* </pre>
* @date 2020/11/10 18:01
*/
public interface IEquipmentHandlerService {
void handlerMqttMessage(String topic, String message);
// void subscribeTopic(ReginParams reginParams);
void subscribeTopic();
}
package com.yeejoin.amos.fas.business.service.intfc;
import com.yeejoin.amos.fas.business.vo.ReginParams;
/**
* @author keyong
* @title: IEquipmentHandler
* <pre>
* @description: 站端接受装备信息系统数据处理流程
* </pre>
* @date 2020/11/10 18:01
*/
public interface IEquipmentHandlerService {
void handlerMqttMessage(String topic, String message);
// void subscribeTopic(ReginParams reginParams);
void subscribeTopic();
}
package com.yeejoin.amos.fas.business.vo;
import lombok.Data;
@Data
public class EquipmentSpecificVo {
private String id;
//装备码
private String code;
//装备名称
private String name;
//装备分类
private String type;
//是否绑定
private String isbind;
//地址
private String address;
//库存
private Integer amount;
//是否单件管理(1是多件)
private Integer single;
//IOT编码
private String iotCode;
//装备编码
private String specificCode;
//系统名称
private String systemName;
}
package com.yeejoin.amos.fas.business.vo;
import lombok.Data;
@Data
public class EquipmentSpecificVo {
private String id;
//装备码
private String code;
//装备名称
private String name;
//装备分类
private String type;
//是否绑定
private String isbind;
//地址
private String address;
//库存
private Integer amount;
//是否单件管理(1是多件)
private Integer single;
//IOT编码
private String iotCode;
//装备编码
private String specificCode;
//系统名称
private String systemName;
}
security.password=a1234560
security.loginId=fas_autosys
security.productWeb=CONVERTER_STATION_WEB
security.appKeyWeb=CONVERTER_STATION
#environment
#spring.profiles.active = dev
eureka.client.serviceUrl.defaultZone=http://172.16.10.72:10001/eureka/
eureka.client.register-with-eureka = true
eureka.client.fetch-registry = true
eureka.client.healthcheck.enabled = true
eureka.client.fetchRegistry = true
eureka.instance.prefer-ip-address=true
#DB properties:
spring.datasource.url=jdbc:mysql://172.16.11.33:3306/safety-business-2.0-36?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=admin_1234
spring.datasource.driver-class-name = com.mysql.jdbc.Driver
spring.datasource.hikari.maxLifetime = 1765000
spring.datasource.hikari.maximum-pool-size = 10
spring.datasource.testWhileIdle = true
spring.datasource.validationQuery = SELECT 1
#mongodb
spring.data.mongodb.uri = mongodb://172.16.11.33:27017/iecmonitor
#rule
#params.remoteRuleUrl=http://172.16.3.3:8080/
params.remoteRuleUrl=http://magintursh.xicp.net:18080/
params.remoteWebsocketUrl=http://172.16.11.36:10600/
spring.redis.database=0
spring.redis.host=172.16.10.85
spring.redis.port=6379
spring.redis.password=amos2019Redis
spring.redis.jedis.pool.max-active=200
spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=10
spring.redis.jedis.pool.min-idle=0
spring.redis.timeout=1000
#picture upload
file.uploadUrl=F:\\upload\\files\\
#picture read
file.readUrl=http://172.16.3.89:8083/file/getFile?in=
params.isPush=true
## emqx
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.10.85:1883
emqx.user-name=super
emqx.password=a123456
# 只用于初始化
emqx.defaultTopic=mqtt_topic
Push.fegin.name=APPMESSAGEPUSHSERVICE-36
dutyMode.fegin.name=AMOSDUTYMODE
##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF
rule.definition.load=true
rule.definition.model-package=com.yeejoin.amos.fas.business.action.model
rule.definition.default-agency=STATE_GRID
#Fegin service config
amos.feign.gennerator.use-gateway=true
autoSys.push.type=mqtt
#�����
file.downLoad.url=http://39.98.246.31:8888/
#站端名称使用全拼
station.name = yinan
security.password=a1234560
security.loginId=fas_autosys
security.productWeb=CONVERTER_STATION_WEB
security.appKeyWeb=CONVERTER_STATION
#environment
#spring.profiles.active = dev
eureka.client.serviceUrl.defaultZone=http://172.16.10.72:10001/eureka/
eureka.client.register-with-eureka = true
eureka.client.fetch-registry = true
eureka.client.healthcheck.enabled = true
eureka.client.fetchRegistry = true
eureka.instance.prefer-ip-address=true
#DB properties:
spring.datasource.url=jdbc:mysql://172.16.11.33:3306/safety-business-2.0-36?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=admin_1234
spring.datasource.driver-class-name = com.mysql.jdbc.Driver
spring.datasource.hikari.maxLifetime = 1765000
spring.datasource.hikari.maximum-pool-size = 10
spring.datasource.testWhileIdle = true
spring.datasource.validationQuery = SELECT 1
#mongodb
spring.data.mongodb.uri = mongodb://172.16.11.33:27017/iecmonitor
#rule
#params.remoteRuleUrl=http://172.16.3.3:8080/
params.remoteRuleUrl=http://magintursh.xicp.net:18080/
params.remoteWebsocketUrl=http://172.16.11.36:10600/
spring.redis.database=0
spring.redis.host=172.16.10.85
spring.redis.port=6379
spring.redis.password=amos2019Redis
spring.redis.jedis.pool.max-active=200
spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=10
spring.redis.jedis.pool.min-idle=0
spring.redis.timeout=1000
#picture upload
file.uploadUrl=F:\\upload\\files\\
#picture read
file.readUrl=http://172.16.3.89:8083/file/getFile?in=
params.isPush=true
## emqx
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.10.85:1883
emqx.user-name=super
emqx.password=a123456
# 只用于初始化
emqx.defaultTopic=mqtt_topic
Push.fegin.name=APPMESSAGEPUSHSERVICE-36
dutyMode.fegin.name=AMOSDUTYMODE
##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF
rule.definition.load=true
rule.definition.model-package=com.yeejoin.amos.fas.business.action.model
rule.definition.default-agency=STATE_GRID
#Fegin service config
amos.feign.gennerator.use-gateway=true
autoSys.push.type=mqtt
#�����
file.downLoad.url=http://39.98.246.31:8888/
#站端名称使用全拼
station.name = yinan
spring.application.name = AMOS-AUTOSYS
spring.application.name = AMOS-AUTOSYS-ZJW
server.port = 8083
spring.profiles.active=dev
......
......@@ -86,14 +86,14 @@
</select>
<select id="getFireEquiments" resultType="com.yeejoin.amos.fas.business.vo.EquipmentSpeVo">
select
sto.equipment_specific_id as id ,
sto.id as id ,
equ.code as f_code,
det.name as f_name
from
wl_stock_detail as sto
left join wl_equipment_detail as det on sto.equipment_detail_id = det.id
left join wl_equipment as equ on det.equipment_id = equ.id
left join f_equipment_fire_equipment as fire on sto.equipment_specific_id = fire.fire_equipment_id
left join f_equipment_fire_equipment as fire on sto.id = fire.fire_equipment_id
where sto.amount <![CDATA[>]]> 0
<if test="fname != null and fname!='null' ">
and det.name like CONCAT('%',#{fname},'%' )
......@@ -119,9 +119,9 @@
d.important_equipment_id = #{importantEquipId} ) isBound
from
f_equipment_fire_equipment as fire
left join wl_stock_detail as sto on fire.fire_equipment_id = sto.equipment_specific_id
left join wl_stock_detail as sto on fire.fire_equipment_id = sto.id
left join wl_equipment_specific as spe on sto.qr_code = spe.qr_code
left join wl_equipment_specific_index as speind on sto.equipment_specific_id = speind.equipment_specific_id
left join wl_equipment_specific_index as speind on spe.id = speind.equipment_specific_id
left join wl_equipment_index as equindex on speind.equipment_index_id = equindex.id
where equindex.type_code ='BREAKDOWN'
<if test="importantEquipId != null ">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment