Commit 49e6c31a authored by lizehua's avatar lizehua

Merge remote-tracking branch 'origin/dev_upgrade' into dev_upgrade

parents 486ad5ec 8ca9ac67
...@@ -97,6 +97,12 @@ public class StationInfo extends BasicEntity{ ...@@ -97,6 +97,12 @@ public class StationInfo extends BasicEntity{
private String safetyChargeUserId; private String safetyChargeUserId;
/** /**
* 队长
*/
@Column(name="fire_captain_user_id")
private String fireCaptainUserId;
/**
* 创建人 * 创建人
*/ */
@Column(name="create_by") @Column(name="create_by")
...@@ -149,6 +155,37 @@ public class StationInfo extends BasicEntity{ ...@@ -149,6 +155,37 @@ public class StationInfo extends BasicEntity{
@Column(name="safety_user_phone_num") @Column(name="safety_user_phone_num")
private String safetyUserPhoneNum; private String safetyUserPhoneNum;
@Column(name="fire_captain_name")
private String fireCaptainName;
@Column(name="fire_captain_phone_num")
private String fireCaptainPhoneNum;
public String getFireCaptainUserId() {
return fireCaptainUserId;
}
public void setFireCaptainUserId(String fireCaptainUserId) {
this.fireCaptainUserId = fireCaptainUserId;
}
public String getFireCaptainName() {
return fireCaptainName;
}
public void setFireCaptainName(String fireCaptainName) {
this.fireCaptainName = fireCaptainName;
}
public String getFireCaptainPhoneNum() {
return fireCaptainPhoneNum;
}
public void setFireCaptainPhoneNum(String fireCaptainPhoneNum) {
this.fireCaptainPhoneNum = fireCaptainPhoneNum;
}
public String getCreateUserPhoneNum() { public String getCreateUserPhoneNum() {
return createUserPhoneNum; return createUserPhoneNum;
} }
......
...@@ -15,14 +15,9 @@ public class ContingencyLogListener implements ApplicationListener<ContingencyEv ...@@ -15,14 +15,9 @@ public class ContingencyLogListener implements ApplicationListener<ContingencyEv
@Autowired @Autowired
IRuleRunningSnapshotService ruleRunningSnapshotService; IRuleRunningSnapshotService ruleRunningSnapshotService;
// @Autowired
// @Lazy
// 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();
} }
} }
...@@ -32,7 +32,6 @@ import java.util.Map; ...@@ -32,7 +32,6 @@ import java.util.Map;
@RestController @RestController
@RequestMapping(value = "/file") @RequestMapping(value = "/file")
//@Authorization(ingore = true)
public class FileController extends BaseController { public class FileController extends BaseController {
private static final transient Logger log = LoggerFactory.getLogger(FileController.class); private static final transient Logger log = LoggerFactory.getLogger(FileController.class);
......
...@@ -44,7 +44,6 @@ public class SafetyController extends BaseController{ ...@@ -44,7 +44,6 @@ public class SafetyController extends BaseController{
@PostMapping(value = "/save/curCompany") @PostMapping(value = "/save/curCompany")
public CommonResponse saveCurCompany(@RequestBody ReginParams reginParams) { public CommonResponse saveCurCompany(@RequestBody ReginParams reginParams) {
this.saveSelectedOrgInfo(reginParams); this.saveSelectedOrgInfo(reginParams);
equipmentHandlerService.subscribeTopic();
return CommonResponseUtil.success(); return CommonResponseUtil.success();
} }
......
...@@ -99,6 +99,8 @@ public interface RiskSourceMapper extends BaseMapper { ...@@ -99,6 +99,8 @@ public interface RiskSourceMapper extends BaseMapper {
void updateRpn(RiskSource riskSource); void updateRpn(RiskSource riskSource);
void updateRpnForNull(RiskSource riskSource);
List<RegionTreeResponse> getRegionList(String channelType,String orgCode); List<RegionTreeResponse> getRegionList(String channelType,String orgCode);
HashMap<String, Object> findRegionById(@Param("id")Long id,@Param("orgCode")String orgCode,@Param("channelType")String channelType); HashMap<String, Object> findRegionById(@Param("id")Long id,@Param("orgCode")String orgCode,@Param("channelType")String channelType);
......
package com.yeejoin.amos.fas.business.dao.mongo; //package com.yeejoin.amos.fas.business.dao.mongo;
import org.springframework.data.mongodb.repository.MongoRepository; //import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository; //import org.springframework.stereotype.Repository;
//
import com.yeejoin.amos.fas.business.vo.EquipCommunicationData; //import com.yeejoin.amos.fas.business.vo.EquipCommunicationData;
//
@Repository("equipCommunicationDao") //@Repository("equipCommunicationDao")
public interface EquipCommunicationDao extends MongoRepository<EquipCommunicationData, String>{ //public interface EquipCommunicationDao extends MongoRepository<EquipCommunicationData, String>{
//
} //}
...@@ -59,10 +59,6 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla ...@@ -59,10 +59,6 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
@Autowired @Autowired
private FireEquipPointMapper fireEquipPointMapper; private FireEquipPointMapper fireEquipPointMapper;
@Value("${params.remoteRuleUrl}")
private String remoteRuleUrl;
@Autowired @Autowired
private IContingencyInstance iContingencyInstance; private IContingencyInstance iContingencyInstance;
......
...@@ -25,9 +25,6 @@ import org.springframework.data.domain.PageImpl; ...@@ -25,9 +25,6 @@ import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
import org.springframework.data.domain.Sort.Direction; import org.springframework.data.domain.Sort.Direction;
import org.springframework.data.domain.Sort.Order; import org.springframework.data.domain.Sort.Order;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -41,7 +38,6 @@ import com.yeejoin.amos.fas.business.constants.FasConstant; ...@@ -41,7 +38,6 @@ import com.yeejoin.amos.fas.business.constants.FasConstant;
import com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper; import com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper;
import com.yeejoin.amos.fas.business.dao.mapper.ImpAndFireEquipMapper; import com.yeejoin.amos.fas.business.dao.mapper.ImpAndFireEquipMapper;
import com.yeejoin.amos.fas.business.dao.mapper.ImpEquipMapper; import com.yeejoin.amos.fas.business.dao.mapper.ImpEquipMapper;
import com.yeejoin.amos.fas.business.dao.mongo.EquipCommunicationDao;
import com.yeejoin.amos.fas.business.dao.repository.IEquipmentDao; import com.yeejoin.amos.fas.business.dao.repository.IEquipmentDao;
import com.yeejoin.amos.fas.business.dao.repository.IEquipmentFireEquipmentDao; import com.yeejoin.amos.fas.business.dao.repository.IEquipmentFireEquipmentDao;
import com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentDao; import com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentDao;
...@@ -101,11 +97,8 @@ public class EquipmentServiceImpl implements IEquipmentService { ...@@ -101,11 +97,8 @@ public class EquipmentServiceImpl implements IEquipmentService {
@Autowired @Autowired
private IFmeaEquipmentPointDao iFmeaEquipmentPointDao; private IFmeaEquipmentPointDao iFmeaEquipmentPointDao;
@Autowired // @Autowired
private MongoTemplate mongoTemplate; // private MongoTemplate mongoTemplate;
@Autowired
private EquipCommunicationDao equipCommunicationDao;
@Value("${windows.img.path}") @Value("${windows.img.path}")
private String winImgPath; private String winImgPath;
...@@ -469,25 +462,22 @@ public class EquipmentServiceImpl implements IEquipmentService { ...@@ -469,25 +462,22 @@ public class EquipmentServiceImpl implements IEquipmentService {
@Override @Override
public EquipCommunicationData findFireEquipmentByPointCode(String code) { public EquipCommunicationData findFireEquipmentByPointCode(String code) {
// EquipCommunicationData data = (EquipCommunicationData) redisTemplate.opsForHash().get("fireEquipData", code);
// if (ObjectUtils.isEmpty(data)) {
EquipCommunicationData data = fireEquipMapper.findOneByPointCode(code); EquipCommunicationData data = fireEquipMapper.findOneByPointCode(code);
// }
return data; return data;
} }
@Override @Override
public EquipCommunicationData findFireEquipDataByPointCode(String code) { public EquipCommunicationData findFireEquipDataByPointCode(String code) {
Query query = new Query(); // Query query = new Query();
query.addCriteria(Criteria.where("pointCode").is(code)).limit(1); // query.addCriteria(Criteria.where("pointCode").is(code)).limit(1);
query.with(new Sort(new Order(Direction.DESC, "recDate"))); // query.with(new Sort(new Order(Direction.DESC, "recDate")));
query.limit(1); // query.limit(1);
List<EquipCommunicationData> data = mongoTemplate.find(query, EquipCommunicationData.class); // List<EquipCommunicationData> data = mongoTemplate.find(query, EquipCommunicationData.class);
if (data.isEmpty()) { // if (data.isEmpty()) {
// return null;
// }
return null; return null;
} }
return data.get(0);
}
@Override @Override
......
...@@ -192,8 +192,8 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService { ...@@ -192,8 +192,8 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
content.put("id", "id"); content.put("id", "id");
content.put("label", "eqPointName"); content.put("label", "eqPointName");
content.put("changeDate", new Date()); content.put("changeDate", new Date());
content.put("orgCode", "orgCode"); content.put("orgCode", equipmentSpecific.getOrgCode());
content.put("status", deviceData.getSoe()); content.put("status", equipmentSpecificIndex.getValue());
iDataRefreshService.sendRefreshDataWithArea(View3dRefreshAreaEum.monitor_data.getCode(), content); iDataRefreshService.sendRefreshDataWithArea(View3dRefreshAreaEum.monitor_data.getCode(), content);
String title = String.format("/%s/%s/%s", serviceName, stationName,"data/refresh/monitorData"); String title = String.format("/%s/%s/%s", serviceName, stationName,"data/refresh/monitorData");
webMqttComponent.publish(title, JSON.toJSONString(view3dService.getEquipStatusList(equipmentSpecific.getOrgCode()))); webMqttComponent.publish(title, JSON.toJSONString(view3dService.getEquipStatusList(equipmentSpecific.getOrgCode())));
......
...@@ -70,7 +70,6 @@ import com.yeejoin.amos.fas.business.dao.mapper.FmeaMapper; ...@@ -70,7 +70,6 @@ import com.yeejoin.amos.fas.business.dao.mapper.FmeaMapper;
import com.yeejoin.amos.fas.business.dao.mapper.FmeaPointInputitemMapper; import com.yeejoin.amos.fas.business.dao.mapper.FmeaPointInputitemMapper;
import com.yeejoin.amos.fas.business.dao.mapper.ImpAndFireEquipMapper; import com.yeejoin.amos.fas.business.dao.mapper.ImpAndFireEquipMapper;
import com.yeejoin.amos.fas.business.dao.mapper.RiskSourceMapper; import com.yeejoin.amos.fas.business.dao.mapper.RiskSourceMapper;
import com.yeejoin.amos.fas.business.dao.mongo.EquipCommunicationDao;
import com.yeejoin.amos.fas.business.dao.repository.IAlarmDao; import com.yeejoin.amos.fas.business.dao.repository.IAlarmDao;
import com.yeejoin.amos.fas.business.dao.repository.IContingencyOriginalDataDao; import com.yeejoin.amos.fas.business.dao.repository.IContingencyOriginalDataDao;
import com.yeejoin.amos.fas.business.dao.repository.IDictDao; import com.yeejoin.amos.fas.business.dao.repository.IDictDao;
...@@ -214,9 +213,6 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -214,9 +213,6 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
private RemoteWebSocketServer remoteWebSocketServer; private RemoteWebSocketServer remoteWebSocketServer;
@Autowired @Autowired
private EquipCommunicationDao equipCommunicationDao;
@Autowired
private IEquipmentService equipmentService; private IEquipmentService equipmentService;
@Autowired @Autowired
...@@ -1269,7 +1265,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -1269,7 +1265,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
return data; return data;
}).filter(param -> !ObjectUtils.isEmpty(param)).collect(Collectors.toList()); }).filter(param -> !ObjectUtils.isEmpty(param)).collect(Collectors.toList());
equipCommunicationDao.saveAll(list); // equipCommunicationDao.saveAll(list);
} }
/** /**
...@@ -1656,7 +1652,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -1656,7 +1652,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
riskSource.setRiskLevelId(null); riskSource.setRiskLevelId(null);
riskSource.setFlickerFrequency(0); riskSource.setFlickerFrequency(0);
//1.更新fmea对应风险点rpn、rpni、level //1.更新fmea对应风险点rpn、rpni、level
riskSourceMapper.updateRpn(riskSource); riskSourceMapper.updateRpnForNull(riskSource);
//2.记录风险点rpn变化流水 //2.记录风险点rpn变化流水
this.saveRpnLog(riskSource.getId(), fmeaId, resetValue, resetValue, notifyType); this.saveRpnLog(riskSource.getId(), fmeaId, resetValue, resetValue, notifyType);
...@@ -1822,6 +1818,10 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -1822,6 +1818,10 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
List<Fmea> fmeas = fmeaMapper.listByRiskSourceIds(ids); List<Fmea> fmeas = fmeaMapper.listByRiskSourceIds(ids);
RpnCalculationBo rpnValueBo = RpnUtils.calRpnAndRpni(fmeas); RpnCalculationBo rpnValueBo = RpnUtils.calRpnAndRpni(fmeas);
if (rpnValueBo.isEmpty()) { if (rpnValueBo.isEmpty()) {
riskSource.setRpn(null);
riskSource.setRpni(null);
riskSource.setRiskLevelId(null);
iRiskSourceDao.save(riskSource);
return; return;
} }
BigDecimal rpn = rpnValueBo.getRpn(); BigDecimal rpn = rpnValueBo.getRpn();
......
...@@ -20,31 +20,45 @@ public class StationMaintenServiceImp implements IStationMaintenService { ...@@ -20,31 +20,45 @@ public class StationMaintenServiceImp implements IStationMaintenService {
@Override @Override
public void save(StationInfo stationInfo){ public void save(StationInfo stationInfo){
// 状态为启用(0)下只能修改换流站名称
if(stationInfo.getId() == 0){
StringBuilder stringBuilder = new StringBuilder(); StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(stationInfo.getUseType()); Integer useType = stationInfo.getUseType();
stringBuilder.append(stationInfo.getRegionCode()); String regionCode = stationInfo.getRegionCode();
stringBuilder.append(stationInfo.getCode()); String code = stationInfo.getCode();
stationInfo.setStationCode(stringBuilder.toString()); if (regionCode == null || "".equals(regionCode) ){
}else{
StationInfo station = detail(); StationInfo station = detail();
// 判断状态是否切换 stationInfo.setStationCode(station.getStationCode());
if(!station.getStatus().equals(stationInfo.getStatus())){ }else {
StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(useType);
stringBuilder.append(regionCode);
if(StringUtils.isEmpty(stationInfo.getRegionCode())){ stringBuilder.append(code);
stringBuilder.append(station.getStationCode());
}else{
stringBuilder.append(stationInfo.getUseType());
stringBuilder.append(stationInfo.getRegionCode());
stringBuilder.append(stationInfo.getCode());
}
stationInfo.setStationCode(stringBuilder.toString()); stationInfo.setStationCode(stringBuilder.toString());
} }
}
// // 状态为启用(0)下只能修改换流站名称
// if(stationInfo.getId() == 0){
// StringBuilder stringBuilder = new StringBuilder();
// stringBuilder.append(stationInfo.getUseType());
// stringBuilder.append(stationInfo.getRegionCode());
// stringBuilder.append(stationInfo.getCode());
// stationInfo.setStationCode(stringBuilder.toString());
// }else{
// StationInfo station = detail();
// // 判断状态是否切换
// if(!station.getStatus().equals(stationInfo.getStatus())){
// StringBuilder stringBuilder = new StringBuilder();
//
// if(StringUtils.isEmpty(stationInfo.getRegionCode())){
// stringBuilder.append(station.getStationCode());
// }else{
// stringBuilder.append(stationInfo.getUseType());
// stringBuilder.append(stationInfo.getRegionCode());
// stringBuilder.append(stationInfo.getCode());
// }
//
// stationInfo.setStationCode(stringBuilder.toString());
// }
// }
//保存 //保存
iStationMaintenDao.save(stationInfo); iStationMaintenDao.save(stationInfo);
......
...@@ -100,7 +100,6 @@ public interface IEquipmentService { ...@@ -100,7 +100,6 @@ public interface IEquipmentService {
EquipCommunicationData findFireEquipmentByPointCode(String code); EquipCommunicationData findFireEquipmentByPointCode(String code);
EquipCommunicationData findFireEquipDataByPointCode(String code); EquipCommunicationData findFireEquipDataByPointCode(String code);
int countImpEquipByIds(String[] idArray); int countImpEquipByIds(String[] idArray);
int countFemaRelation(String[] idArray); int countFemaRelation(String[] idArray);
......
...@@ -4,10 +4,8 @@ import java.io.Serializable; ...@@ -4,10 +4,8 @@ import java.io.Serializable;
import java.util.Date; import java.util.Date;
import org.springframework.data.annotation.Id; import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
@Document(collection = "EquipCommunicationData") //@Document(collection = "EquipCommunicationData")
public class EquipCommunicationData implements Serializable{ public class EquipCommunicationData implements Serializable{
/** /**
* *
...@@ -16,13 +14,13 @@ public class EquipCommunicationData implements Serializable{ ...@@ -16,13 +14,13 @@ public class EquipCommunicationData implements Serializable{
@Id @Id
private String id; private String id;
private String informationAddress; //转发码 private String informationAddress; //转发码
@Indexed // @Indexed
private int soe; private int soe;
private String state; // 值 private String state; // 值
private String unit; private String unit;
private String serviceId; //服务ID private String serviceId; //服务ID
private int isInvalid; // 是否有效 private int isInvalid; // 是否有效
@Indexed // @Indexed
private String pointCode; private String pointCode;
private String pointName; private String pointName;
// @Indexed // @Indexed
...@@ -32,13 +30,13 @@ public class EquipCommunicationData implements Serializable{ ...@@ -32,13 +30,13 @@ public class EquipCommunicationData implements Serializable{
private String type; private String type;
private String alarmType; private String alarmType;
@Indexed // @Indexed
private String fireEquipmentId; private String fireEquipmentId;
private String fireEquipmentName; private String fireEquipmentName;
private String fireEquipmentCode; private String fireEquipmentCode;
@Indexed // @Indexed
private Date recDate; private Date recDate;
public String getInformationAddress() { public String getInformationAddress() {
......
package com.yeejoin.amos.fas.business.vo; package com.yeejoin.amos.fas.business.vo;
import lombok.Data;
/** /**
* @author keyong * @author keyong
* @title: EquipmentSpecificIndexVo * @title: EquipmentSpecificIndexVo
...@@ -8,6 +10,7 @@ package com.yeejoin.amos.fas.business.vo; ...@@ -8,6 +10,7 @@ package com.yeejoin.amos.fas.business.vo;
* </pre> * </pre>
* @date 2020/11/11 16:49 * @date 2020/11/11 16:49
*/ */
@Data
public class EquipmentSpecificIndexVo { public class EquipmentSpecificIndexVo {
// id // id
...@@ -22,6 +25,10 @@ public class EquipmentSpecificIndexVo { ...@@ -22,6 +25,10 @@ public class EquipmentSpecificIndexVo {
// 性能指标id // 性能指标id
private Long equipmentIndexId; private Long equipmentIndexId;
private String equipmentIndexName;
private String equipmentIndexUnitName;
// 性能指标name key // 性能指标name key
private String nameKey; private String nameKey;
......
package com.yeejoin.amos.fas.config;
import com.yeejoin.amos.fas.business.service.intfc.IEquipmentHandlerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;
/**
* @author keyong
* @title: ApplicationRunnerImpl
* <pre>
* @description: TODO
* </pre>
* @date 2020/12/12 20:18
*/
@Component
public class ApplicationRunnerImpl implements ApplicationRunner {
@Autowired
IEquipmentHandlerService equipmentHandlerService;
@Override
public void run(ApplicationArguments args) throws Exception {
equipmentHandlerService.subscribeTopic();
}
}
#系统服务账号,用户后端服务调用
security.password=a1234560 security.password=a1234560
security.loginId=fas_autosys security.loginId=fas_autosys
security.productWeb=STUDIO_APP_WEB
security.appKeyWeb=studio_normalapp_2668446
#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/
...@@ -20,16 +18,9 @@ spring.datasource.hikari.maxLifetime = 1765000 ...@@ -20,16 +18,9 @@ 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
#ws
#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/ params.remoteWebsocketUrl=http://172.16.11.36:10600/
#redis
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
...@@ -39,53 +30,22 @@ spring.redis.jedis.pool.max-wait=-1 ...@@ -39,53 +30,22 @@ 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
windows.img.path = E:\\
linux.img.path = /
file.uploadUrl=E:\\upload\\files\\ file.uploadUrl=E:\\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
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/ file.downLoad.url=http://39.98.246.31:8888/
#站端名称使用全拼 #站端名称使用全拼
station.name = yinan station.name = yinan
#是否开启将风险区域同步至仓库货位true开启,false关闭。默认关闭。
#查询装备分类 equipManage.fegin.isSyn=false
#消防车:2101
#灭火器:3104
#消火栓:3105
#探测器:8501
#消防小室:9301
#消防水池:9302
#消防泡沫间:9305
#消防视频:xfsp
station.equipment.code=2101,3104,3105,8501,9301,9302,9305,xfsp
security.password=tw123456 #系统服务账号,用户后端服务调用
security.loginId=tw3 security.password=a1234560
security.productWeb=CONVERTER_STATION_WEB security.loginId=fas_autosys
security.appKeyWeb=CONVERTER_STATION
#environment #environment
#spring.profiles.active = dev #spring.profiles.active = dev
eureka.client.serviceUrl.defaultZone=http://amos-eurka:10001/eureka/ eureka.client.serviceUrl.defaultZone=http://amos-eurka:10001/eureka/
...@@ -11,7 +9,6 @@ eureka.client.fetch-registry = true ...@@ -11,7 +9,6 @@ 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://amos-mysql:3306/yeejoin_safety_business?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8 spring.datasource.url=jdbc:mysql://amos-mysql:3306/yeejoin_safety_business?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username=root spring.datasource.username=root
...@@ -22,13 +19,7 @@ spring.datasource.hikari.maximum-pool-size = 10 ...@@ -22,13 +19,7 @@ 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
spring.data.mongodb.uri = mongodb://amos-mongo:27017/iecmonitor
#rule #rule
#params.remoteRuleUrl=http://172.16.3.3:8080/
params.remoteRuleUrl=http://station-rule:8080/
params.remoteWebsocketUrl=http://station-websocket:10600/ params.remoteWebsocketUrl=http://station-websocket:10600/
spring.redis.database=1 spring.redis.database=1
...@@ -42,6 +33,8 @@ spring.redis.jedis.pool.min-idle=0 ...@@ -42,6 +33,8 @@ spring.redis.jedis.pool.min-idle=0
spring.redis.timeout=1000 spring.redis.timeout=1000
#picture upload #picture upload
windows.img.path = E:\\
linux.img.path = /
file.uploadUrl=D:\\upload\\files\\ file.uploadUrl=D:\\upload\\files\\
#picture read #picture read
file.readUrl=http://station-fireautosys:8083/file/getFile?in= file.readUrl=http://station-fireautosys:8083/file/getFile?in=
...@@ -54,6 +47,8 @@ emqx.broker=tcp://172.16.10.85:1883 ...@@ -54,6 +47,8 @@ emqx.broker=tcp://172.16.10.85:1883
emqx.user-name=super emqx.user-name=super
emqx.password=a123456 emqx.password=a123456
#\uFFFD\u013C\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD #\uFFFD\u013C\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
file.downLoad.url=http://172.16.10.175:8888/ file.downLoad.url=http://172.16.10.175:8888/
#是否开启将风险区域同步至仓库货位true开启,false关闭。默认关闭。
equipManage.fegin.isSyn=false
security.password=tw123456 #系统服务账号,用户后端服务调用
security.loginId=tw3 security.password=a1234560
security.productWeb=CONVERTER_STATION_WEB security.loginId=fas_autosys
security.appKeyWeb=CONVERTER_STATION
#environment #environment
#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://47.103.14.66:3306/91-safety-business?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8 spring.datasource.url=jdbc:mysql://47.103.14.66:3306/91-safety-business?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username=root spring.datasource.username=root
...@@ -21,16 +17,9 @@ spring.datasource.hikari.maxLifetime = 1765000 ...@@ -21,16 +17,9 @@ 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
#ws
#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.10.91:10600/ params.remoteWebsocketUrl=http://172.16.10.91:10600/
#redis
spring.redis.database=1 spring.redis.database=1
spring.redis.host=127.0.0.1 spring.redis.host=127.0.0.1
spring.redis.port=6379 spring.redis.port=6379
...@@ -40,12 +29,12 @@ spring.redis.jedis.pool.max-wait=-1 ...@@ -40,12 +29,12 @@ 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
windows.img.path = E:\\
linux.img.path = /
file.uploadUrl=D:\\upload\\files\\ file.uploadUrl=D:\\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=
## 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]}
...@@ -53,6 +42,5 @@ emqx.broker=tcp://172.16.10.85:1883 ...@@ -53,6 +42,5 @@ emqx.broker=tcp://172.16.10.85:1883
emqx.user-name=super emqx.user-name=super
emqx.password=a123456 emqx.password=a123456
#\uFFFD\u013C\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD #\uFFFD\u013C\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
file.downLoad.url=http://172.16.10.175:8888/ file.downLoad.url=http://172.16.10.175:8888/
spring.application.name = AMOS-AUTOSYS spring.application.name = AMOS-AUTOSYS
server.port = 8083 server.port = 8083
spring.profiles.active=dev spring.profiles.active=dev
#应用product appkey
security.productWeb=STUDIO_APP_WEB
security.appKeyWeb=studio_normalapp_2668446
#spring.freemarker.cache=false #spring.freemarker.cache=false
spring.devtools.restart.enabled=true spring.devtools.restart.enabled=true
...@@ -43,27 +46,21 @@ spring.servlet.multipart.max-request-size=20MB ...@@ -43,27 +46,21 @@ spring.servlet.multipart.max-request-size=20MB
#feginName #feginName
visual.fegin.name=maas-visual visual.fegin.name=maas-visual
dutyMode.fegin.name=AMOSDUTYMODE #值班系统
dutyMode.fegin.name=AMOS-DUTYMODE
#队站装备管理名称,主要用于风险区域同步至仓库货位和订阅装备信息系统 #队站装备管理名称,主要用于风险区域同步至仓库货位和订阅装备信息系统
equipManage.fegin.name=AMOS-EQUIPMANAGE equipManage.fegin.name=AMOS-EQUIPMANAGE
#是否开启将风险区域同步至仓库货位true开启,false关闭。默认关闭。
equipManage.fegin.isSyn=false
#jpush 服务名称 #jpush 服务名称
Push.fegin.name=APPMESSAGEPUSHSERVICE Push.fegin.name=AMOS-JPUSH
spring.http.multipart.maxFileSize = 10480000 spring.http.multipart.maxFileSize = 10480000
spring.http.multipart.MaxRequestSize = 50480000 spring.http.multipart.MaxRequestSize = 50480000
windows.img.path = E:\\
linux.img.path = /
param.safetyIndexChange.cron = 0 0 2 * * ? param.safetyIndexChange.cron = 0 0 2 * * ?
#param.weather.url = http://t.weather.sojson.com/api/weather/city/
param.weather.url = http://wthrcdn.etouch.cn/weather_mini?citykey= param.weather.url = http://wthrcdn.etouch.cn/weather_mini?citykey=
# 只用于初始化 # 只用于初始化
emqx.defaultTopic=mqtt_topic emqx.defaultTopic=mqtt_topic
...@@ -77,3 +74,14 @@ amos.feign.gennerator.use-gateway=true ...@@ -77,3 +74,14 @@ amos.feign.gennerator.use-gateway=true
# 消息推送类型 # 消息推送类型
autoSys.push.type=mqtt autoSys.push.type=mqtt
#查询装备分类
#消防车:2101
#灭火器:3104
#消火栓:3105
#探测器:8501
#消防小室:9301
#消防水池:9302
#消防泡沫间:9305
#消防视频:xfsp
station.equipment.code=2101,3104,3105,8501,9301,9302,9305,xfsp
...@@ -554,5 +554,18 @@ ...@@ -554,5 +554,18 @@
ALTER TABLE `f_station_info` ADD COLUMN `safety_user_phone_num` varchar(20) NULL COMMENT '安全负责人联系方式'; ALTER TABLE `f_station_info` ADD COLUMN `safety_user_phone_num` varchar(20) NULL COMMENT '安全负责人联系方式';
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="zjw" id="16062323232111">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_station_info" columnName="safety_user_phone_num" />
</not>
</preConditions>
<comment>修改f_station_info表结构</comment>
<sql>
ALTER TABLE `f_station_info` ADD COLUMN `fire_captain_name` varchar(20) NULL COMMENT '驻站消防队队长姓名';
ALTER TABLE `f_station_info` ADD COLUMN `fire_captain_phone_num` varchar(20) NULL COMMENT '驻站消防队队长电话';
ALTER TABLE `f_station_info` ADD COLUMN `fire_captain_user_id` varchar(20) NULL COMMENT '驻站消防队队长';
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
\ No newline at end of file
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
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 wl_equipment_category as cate on equ.category_id = cate.id left join wl_equipment_category as cate on equ.category_id = cate.id
left join f_equipment_manage as manage on spe.system_id = manage.SEQUENCE_NBR left join f_fire_fighting_system as manage on spe.system_id = manage.SEQUENCE_NBR
where sto.amount <![CDATA[>]]> 0 where sto.amount <![CDATA[>]]> 0
<if test="name != null and name!='null' "> <if test="name != null and name!='null' ">
and det.name like CONCAT('%',#{name},'%' ) and det.name like CONCAT('%',#{name},'%' )
...@@ -88,11 +88,12 @@ ...@@ -88,11 +88,12 @@
<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.equipment_specific_id as id ,
equ.code as f_code, spec.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_specific as spec on spec.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.equipment_specific_id = fire.fire_equipment_id
where sto.amount <![CDATA[>]]> 0 where sto.amount <![CDATA[>]]> 0
...@@ -138,7 +139,7 @@ ...@@ -138,7 +139,7 @@
<select id="getAssoEquips" resultType="com.yeejoin.amos.fas.business.vo.AssoEquipsVo"> <select id="getAssoEquips" resultType="com.yeejoin.amos.fas.business.vo.AssoEquipsVo">
select select
sto.id as equipmentId, sto.id as equipmentId,
equip.code as equipmentCode, spe.code as equipmentCode,
det.name as equipmentName , det.name as equipmentName ,
fqe.name as importantEquipName , fqe.name as importantEquipName ,
(select group_concat(concat( name, '##', state )) from wl_equipment_index as equindex where equip.id = equindex.equipment_id and type_code = 'BREAKDOWN' group by equindex.equipment_id) as equipmentPointNames, (select group_concat(concat( name, '##', state )) from wl_equipment_index as equindex where equip.id = equindex.equipment_id and type_code = 'BREAKDOWN' group by equindex.equipment_id) as equipmentPointNames,
......
...@@ -159,11 +159,12 @@ ...@@ -159,11 +159,12 @@
SELECT SELECT
det.`name` as fireEquipmentName, det.`name` as fireEquipmentName,
spe.`code` as fireEquipmentCode, spe.`code` as fireEquipmentCode,
ein.name, ein.name as eq_point_name,
CASE ind.value WHEN 'true' THEN '是' CASE ind.value WHEN 'true' THEN '是'
WHEN 'false' THEN '否' WHEN 'false' THEN '否'
ELSE ind.value END 'e_value', ELSE ind.value END 'e_value',
ein.unit, ein.unit as eq_point_unit,
sce.name as source_name,
( (
SELECT SELECT
group_concat(DISTINCT f.`name`) group_concat(DISTINCT f.`name`)
...@@ -173,12 +174,15 @@ ...@@ -173,12 +174,15 @@
WHERE WHERE
efe.fire_equipment_id = ind.equipment_specific_id efe.fire_equipment_id = ind.equipment_specific_id
) equipmentName, ) equipmentName,
ind.update_date ind.update_date as create_date
FROM FROM
wl_equipment_specific_index as ind wl_equipment_specific_index as ind
left join wl_equipment_specific as spe on spe.id = ind.equipment_specific_id left join wl_equipment_specific as spe on spe.id = ind.equipment_specific_id
left join wl_equipment_detail as det on spe.equipment_detail_id = det.id left join wl_equipment_detail as det on spe.equipment_detail_id = det.id
left join wl_equipment_index as ein on ind.equipment_index_id = ein.id left join wl_equipment_index as ein on ind.equipment_index_id = ein.id
left join wl_stock_detail as sto on sto.qr_code = spe.qr_code
left join wl_warehouse_structure as str on sto.warehouse_structure_id = str.id
left join f_risk_source as sce on str.source_id = sce.id
) d ) d
WHERE WHERE
1 = 1 1 = 1
...@@ -189,9 +193,9 @@ ...@@ -189,9 +193,9 @@
AND d.equipmentName LIKE '%${equipmentName}%' AND d.equipmentName LIKE '%${equipmentName}%'
</if> </if>
<if test="startTime!=null"> <if test="startTime!=null">
AND d.update_date BETWEEN '${startTime}' AND '${endTime}' AND d.create_date BETWEEN '${startTime}' AND '${endTime}'
</if> </if>
ORDER BY d.update_date desc ORDER BY d.create_date desc
LIMIT ${start},${length} LIMIT ${start},${length}
</select> </select>
......
...@@ -701,6 +701,15 @@ ...@@ -701,6 +701,15 @@
parent_id = #{riskSourceId} parent_id = #{riskSourceId}
</select> </select>
<update id="updateRpnForNull">
update f_risk_source
set
rpn = null,
rpni = null,
risk_level_id = null,
flicker_frequency = null
where id = #{id}
</update>
<update id="updateRpn"> <update id="updateRpn">
update f_risk_source update f_risk_source
<set> <set>
......
...@@ -518,7 +518,7 @@ ...@@ -518,7 +518,7 @@
and wlei.type_code!='FIREALARM' and wlei.type_code!='FIREALARM'
and (wlesi.`value` = 'true' and (wlesi.`value` = 'true'
OR wlesi.`value` = 'false') OR wlesi.`value` = 'false')
ORDER BY wlesi.create_date DESC ORDER BY wlesi.update_date DESC
limit 0,5 limit 0,5
</select> </select>
......
...@@ -177,10 +177,6 @@ ...@@ -177,10 +177,6 @@
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId> <artifactId>spring-boot-starter-data-redis</artifactId>
</dependency> </dependency>
<dependency> <dependency>
......
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