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