Commit 49e6c31a authored by lizehua's avatar lizehua

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

parents 486ad5ec 8ca9ac67
......@@ -94,13 +94,19 @@ public class StationInfo extends BasicEntity{
* 安全负责人
*/
@Column(name="safety_charge_user_id")
private String safetyChargeUserId;
private String safetyChargeUserId;
/**
* 队长
*/
@Column(name="fire_captain_user_id")
private String fireCaptainUserId;
/**
* 创建人
*/
@Column(name="create_by")
private String createBy;
private String createBy;
/**
* 创建日期
......@@ -149,6 +155,37 @@ public class StationInfo extends BasicEntity{
@Column(name="safety_user_phone_num")
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() {
return createUserPhoneNum;
}
......
......@@ -15,14 +15,9 @@ public class ContingencyLogListener implements ApplicationListener<ContingencyEv
@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();
}
}
......@@ -32,7 +32,6 @@ import java.util.Map;
@RestController
@RequestMapping(value = "/file")
//@Authorization(ingore = true)
public class FileController extends BaseController {
private static final transient Logger log = LoggerFactory.getLogger(FileController.class);
......
......@@ -44,7 +44,6 @@ public class SafetyController extends BaseController{
@PostMapping(value = "/save/curCompany")
public CommonResponse saveCurCompany(@RequestBody ReginParams reginParams) {
this.saveSelectedOrgInfo(reginParams);
equipmentHandlerService.subscribeTopic();
return CommonResponseUtil.success();
}
......
package com.yeejoin.amos.fas.business.dao.mapper;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.yeejoin.amos.fas.business.bo.BindRegionBo;
import com.yeejoin.amos.fas.business.param.CommonPageInfoParam;
import com.yeejoin.amos.fas.core.common.response.RegionTreeResponse;
import com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse;
import com.yeejoin.amos.fas.dao.entity.RiskSource;
public interface RiskSourceMapper extends BaseMapper {
/**
* 风险点查询,分页查询统计用
*
* @param param
* @return
*/
long countPageData(CommonPageInfoParam param);
/**
* 风险点分页查询queryForRiskSourceLevel
*
* @param param
* @return
*/
List<HashMap<String, Object>> queryRiskSourceByPage(CommonPageInfoParam param);
List<Map> queryForRegion();
List<Map> queryRPNReport();
Map queryForRiseUp(@Param("startTime") String startTime, @Param("endTime") String endTime);
Long countByParentIdAndIsRegion(@Param("riskSourceId") Long riskSourceId, @Param("isRegion") String isRegion);
List<Map> queryForMatrix();
List<RiskSourceTreeResponse> getRiskSources(String compCode);
List<RiskSourceTreeResponse> getRiskSourcesEquipment();
List<RiskSource> queryByFireEqument(@Param("fireEquipmentId") Long fireEquipmentId);
List<RiskSource> queryByPoint(@Param("pointId") Long pointId);
//厂区rpn,重点设备个数,风险点个数,巡检点个数
Map<String, List> statistics3dCount();
//消防设备按分类统计个数
List<Map> statisticsEquipClassify();
//风险点按级别统计个数
List<Map> statisticsRiskLevel();
//巡检点按状态统计个数
List<Map> statisticsPointStatus();
RiskSourceTreeResponse findRiskSourceDetatil(@Param("id") Long id);
//风险点详情和级别
Map queryForRiskSourceLevel(@Param("riskSourceId") Long riskSourceId);
List<Map> queryForUnqualified(@Param("riskSourceId") Long riskSourceId);
List<Map> queryForFmeaEquipAlarm(@Param("riskSourceId") Long riskSourceId);
/**
* 子节点的rpni
*
* @param parentId
* @return
*/
List<Map<String, BigDecimal>> queryForRiskSourceRpni(@Param("parentId") Long parentId);
List<HashMap<String, Object>> queryRiskAreaRpn();
List<RiskSource> queryByFactor(@Param("factorId") Long factorId);
List<HashMap<String, Object>> queryRiskSourceSecondLevel(String compCode);
List<RiskSourceTreeResponse> getRiskSourcesFireEquipmentByType(@Param("type") String[] type);
List<RiskSourceTreeResponse> getCheckPointRiskSource();
List<Map> queryContingencyWater();
List<Map> queryFmeaByPointId(@Param("pointId") Long pointId);
void updateRpn(RiskSource riskSource);
List<RegionTreeResponse> getRegionList(String channelType,String orgCode);
HashMap<String, Object> findRegionById(@Param("id")Long id,@Param("orgCode")String orgCode,@Param("channelType")String channelType);
void batchSaveRegionUe4(List<BindRegionBo> regionBoList);
}
package com.yeejoin.amos.fas.business.dao.mapper;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.yeejoin.amos.fas.business.bo.BindRegionBo;
import com.yeejoin.amos.fas.business.param.CommonPageInfoParam;
import com.yeejoin.amos.fas.core.common.response.RegionTreeResponse;
import com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse;
import com.yeejoin.amos.fas.dao.entity.RiskSource;
public interface RiskSourceMapper extends BaseMapper {
/**
* 风险点查询,分页查询统计用
*
* @param param
* @return
*/
long countPageData(CommonPageInfoParam param);
/**
* 风险点分页查询queryForRiskSourceLevel
*
* @param param
* @return
*/
List<HashMap<String, Object>> queryRiskSourceByPage(CommonPageInfoParam param);
List<Map> queryForRegion();
List<Map> queryRPNReport();
Map queryForRiseUp(@Param("startTime") String startTime, @Param("endTime") String endTime);
Long countByParentIdAndIsRegion(@Param("riskSourceId") Long riskSourceId, @Param("isRegion") String isRegion);
List<Map> queryForMatrix();
List<RiskSourceTreeResponse> getRiskSources(String compCode);
List<RiskSourceTreeResponse> getRiskSourcesEquipment();
List<RiskSource> queryByFireEqument(@Param("fireEquipmentId") Long fireEquipmentId);
List<RiskSource> queryByPoint(@Param("pointId") Long pointId);
//厂区rpn,重点设备个数,风险点个数,巡检点个数
Map<String, List> statistics3dCount();
//消防设备按分类统计个数
List<Map> statisticsEquipClassify();
//风险点按级别统计个数
List<Map> statisticsRiskLevel();
//巡检点按状态统计个数
List<Map> statisticsPointStatus();
RiskSourceTreeResponse findRiskSourceDetatil(@Param("id") Long id);
//风险点详情和级别
Map queryForRiskSourceLevel(@Param("riskSourceId") Long riskSourceId);
List<Map> queryForUnqualified(@Param("riskSourceId") Long riskSourceId);
List<Map> queryForFmeaEquipAlarm(@Param("riskSourceId") Long riskSourceId);
/**
* 子节点的rpni
*
* @param parentId
* @return
*/
List<Map<String, BigDecimal>> queryForRiskSourceRpni(@Param("parentId") Long parentId);
List<HashMap<String, Object>> queryRiskAreaRpn();
List<RiskSource> queryByFactor(@Param("factorId") Long factorId);
List<HashMap<String, Object>> queryRiskSourceSecondLevel(String compCode);
List<RiskSourceTreeResponse> getRiskSourcesFireEquipmentByType(@Param("type") String[] type);
List<RiskSourceTreeResponse> getCheckPointRiskSource();
List<Map> queryContingencyWater();
List<Map> queryFmeaByPointId(@Param("pointId") Long pointId);
void updateRpn(RiskSource riskSource);
void updateRpnForNull(RiskSource riskSource);
List<RegionTreeResponse> getRegionList(String channelType,String orgCode);
HashMap<String, Object> findRegionById(@Param("id")Long id,@Param("orgCode")String orgCode,@Param("channelType")String channelType);
void batchSaveRegionUe4(List<BindRegionBo> regionBoList);
}
package com.yeejoin.amos.fas.business.dao.mongo;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;
import com.yeejoin.amos.fas.business.vo.EquipCommunicationData;
@Repository("equipCommunicationDao")
public interface EquipCommunicationDao extends MongoRepository<EquipCommunicationData, String>{
}
//package com.yeejoin.amos.fas.business.dao.mongo;
//import org.springframework.data.mongodb.repository.MongoRepository;
//import org.springframework.stereotype.Repository;
//
//import com.yeejoin.amos.fas.business.vo.EquipCommunicationData;
//
//@Repository("equipCommunicationDao")
//public interface EquipCommunicationDao extends MongoRepository<EquipCommunicationData, String>{
//
//}
......@@ -58,10 +58,6 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
private RedisTemplate redisTemplate;
@Autowired
private FireEquipPointMapper fireEquipPointMapper;
@Value("${params.remoteRuleUrl}")
private String remoteRuleUrl;
@Autowired
private IContingencyInstance iContingencyInstance;
......
......@@ -25,9 +25,6 @@ import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Sort;
import org.springframework.data.domain.Sort.Direction;
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.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -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.ImpAndFireEquipMapper;
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.IEquipmentFireEquipmentDao;
import com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentDao;
......@@ -101,11 +97,8 @@ public class EquipmentServiceImpl implements IEquipmentService {
@Autowired
private IFmeaEquipmentPointDao iFmeaEquipmentPointDao;
@Autowired
private MongoTemplate mongoTemplate;
@Autowired
private EquipCommunicationDao equipCommunicationDao;
// @Autowired
// private MongoTemplate mongoTemplate;
@Value("${windows.img.path}")
private String winImgPath;
......@@ -469,24 +462,21 @@ public class EquipmentServiceImpl implements IEquipmentService {
@Override
public EquipCommunicationData findFireEquipmentByPointCode(String code) {
// EquipCommunicationData data = (EquipCommunicationData) redisTemplate.opsForHash().get("fireEquipData", code);
// if (ObjectUtils.isEmpty(data)) {
EquipCommunicationData data = fireEquipMapper.findOneByPointCode(code);
// }
return data;
}
@Override
public EquipCommunicationData findFireEquipDataByPointCode(String code) {
Query query = new Query();
query.addCriteria(Criteria.where("pointCode").is(code)).limit(1);
query.with(new Sort(new Order(Direction.DESC, "recDate")));
query.limit(1);
List<EquipCommunicationData> data = mongoTemplate.find(query, EquipCommunicationData.class);
if (data.isEmpty()) {
return null;
}
return data.get(0);
// Query query = new Query();
// query.addCriteria(Criteria.where("pointCode").is(code)).limit(1);
// query.with(new Sort(new Order(Direction.DESC, "recDate")));
// query.limit(1);
// List<EquipCommunicationData> data = mongoTemplate.find(query, EquipCommunicationData.class);
// if (data.isEmpty()) {
// return null;
// }
return null;
}
......
......@@ -192,8 +192,8 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
content.put("id", "id");
content.put("label", "eqPointName");
content.put("changeDate", new Date());
content.put("orgCode", "orgCode");
content.put("status", deviceData.getSoe());
content.put("orgCode", equipmentSpecific.getOrgCode());
content.put("status", equipmentSpecificIndex.getValue());
iDataRefreshService.sendRefreshDataWithArea(View3dRefreshAreaEum.monitor_data.getCode(), content);
String title = String.format("/%s/%s/%s", serviceName, stationName,"data/refresh/monitorData");
webMqttComponent.publish(title, JSON.toJSONString(view3dService.getEquipStatusList(equipmentSpecific.getOrgCode())));
......
......@@ -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.ImpAndFireEquipMapper;
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.IContingencyOriginalDataDao;
import com.yeejoin.amos.fas.business.dao.repository.IDictDao;
......@@ -214,9 +213,6 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
private RemoteWebSocketServer remoteWebSocketServer;
@Autowired
private EquipCommunicationDao equipCommunicationDao;
@Autowired
private IEquipmentService equipmentService;
@Autowired
......@@ -1269,7 +1265,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
return data;
}).filter(param -> !ObjectUtils.isEmpty(param)).collect(Collectors.toList());
equipCommunicationDao.saveAll(list);
// equipCommunicationDao.saveAll(list);
}
/**
......@@ -1656,7 +1652,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
riskSource.setRiskLevelId(null);
riskSource.setFlickerFrequency(0);
//1.更新fmea对应风险点rpn、rpni、level
riskSourceMapper.updateRpn(riskSource);
riskSourceMapper.updateRpnForNull(riskSource);
//2.记录风险点rpn变化流水
this.saveRpnLog(riskSource.getId(), fmeaId, resetValue, resetValue, notifyType);
......@@ -1822,6 +1818,10 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
List<Fmea> fmeas = fmeaMapper.listByRiskSourceIds(ids);
RpnCalculationBo rpnValueBo = RpnUtils.calRpnAndRpni(fmeas);
if (rpnValueBo.isEmpty()) {
riskSource.setRpn(null);
riskSource.setRpni(null);
riskSource.setRiskLevelId(null);
iRiskSourceDao.save(riskSource);
return;
}
BigDecimal rpn = rpnValueBo.getRpn();
......
......@@ -20,32 +20,46 @@ public class StationMaintenServiceImp implements IStationMaintenService {
@Override
public void save(StationInfo stationInfo){
// 状态为启用(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{
StringBuilder stringBuilder = new StringBuilder();
Integer useType = stationInfo.getUseType();
String regionCode = stationInfo.getRegionCode();
String code = stationInfo.getCode();
if (regionCode == null || "".equals(regionCode) ){
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());
}
stationInfo.setStationCode(station.getStationCode());
}else {
stringBuilder.append(useType);
stringBuilder.append(regionCode);
stringBuilder.append(code);
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);
}
......
......@@ -100,7 +100,6 @@ public interface IEquipmentService {
EquipCommunicationData findFireEquipmentByPointCode(String code);
EquipCommunicationData findFireEquipDataByPointCode(String code);
int countImpEquipByIds(String[] idArray);
int countFemaRelation(String[] idArray);
......
......@@ -4,10 +4,8 @@ import java.io.Serializable;
import java.util.Date;
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{
/**
*
......@@ -16,13 +14,13 @@ public class EquipCommunicationData implements Serializable{
@Id
private String id;
private String informationAddress; //转发码
@Indexed
// @Indexed
private int soe;
private String state; // 值
private String unit;
private String serviceId; //服务ID
private int isInvalid; // 是否有效
@Indexed
// @Indexed
private String pointCode;
private String pointName;
// @Indexed
......@@ -32,13 +30,13 @@ public class EquipCommunicationData implements Serializable{
private String type;
private String alarmType;
@Indexed
// @Indexed
private String fireEquipmentId;
private String fireEquipmentName;
private String fireEquipmentCode;
@Indexed
// @Indexed
private Date recDate;
public String getInformationAddress() {
......
package com.yeejoin.amos.fas.business.vo;
import lombok.Data;
/**
* @author keyong
* @title: EquipmentSpecificIndexVo
......@@ -8,6 +10,7 @@ package com.yeejoin.amos.fas.business.vo;
* </pre>
* @date 2020/11/11 16:49
*/
@Data
public class EquipmentSpecificIndexVo {
// id
......@@ -21,6 +24,10 @@ public class EquipmentSpecificIndexVo {
// 性能指标id
private Long equipmentIndexId;
private String equipmentIndexName;
private String equipmentIndexUnitName;
// 性能指标name key
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.loginId=fas_autosys
security.productWeb=STUDIO_APP_WEB
security.appKeyWeb=studio_normalapp_2668446
#environment
#spring.profiles.active = dev
eureka.client.serviceUrl.defaultZone=http://172.16.10.72:10001/eureka/
......@@ -20,16 +18,9 @@ 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/
#ws
params.remoteWebsocketUrl=http://172.16.11.36:10600/
#redis
spring.redis.database=0
spring.redis.host=172.16.10.85
spring.redis.port=6379
......@@ -39,53 +30,22 @@ 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
windows.img.path = E:\\
linux.img.path = /
file.uploadUrl=E:\\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
#查询装备分类
#消防车:2101
#灭火器:3104
#消火栓:3105
#探测器:8501
#消防小室:9301
#消防水池:9302
#消防泡沫间:9305
#消防视频:xfsp
station.equipment.code=2101,3104,3105,8501,9301,9302,9305,xfsp
#是否开启将风险区域同步至仓库货位true开启,false关闭。默认关闭。
equipManage.fegin.isSyn=false
security.password=tw123456
security.loginId=tw3
security.productWeb=CONVERTER_STATION_WEB
security.appKeyWeb=CONVERTER_STATION
#系统服务账号,用户后端服务调用
security.password=a1234560
security.loginId=fas_autosys
#environment
#spring.profiles.active = dev
eureka.client.serviceUrl.defaultZone=http://amos-eurka:10001/eureka/
......@@ -11,7 +9,6 @@ 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://amos-mysql:3306/yeejoin_safety_business?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username=root
......@@ -22,13 +19,7 @@ spring.datasource.hikari.maximum-pool-size = 10
spring.datasource.testWhileIdle = true
spring.datasource.validationQuery = SELECT 1
#mongodb
spring.data.mongodb.uri = mongodb://amos-mongo:27017/iecmonitor
#rule
#params.remoteRuleUrl=http://172.16.3.3:8080/
params.remoteRuleUrl=http://station-rule:8080/
params.remoteWebsocketUrl=http://station-websocket:10600/
spring.redis.database=1
......@@ -42,6 +33,8 @@ spring.redis.jedis.pool.min-idle=0
spring.redis.timeout=1000
#picture upload
windows.img.path = E:\\
linux.img.path = /
file.uploadUrl=D:\\upload\\files\\
#picture read
file.readUrl=http://station-fireautosys:8083/file/getFile?in=
......@@ -54,6 +47,8 @@ emqx.broker=tcp://172.16.10.85:1883
emqx.user-name=super
emqx.password=a123456
#\uFFFD\u013C\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
file.downLoad.url=http://172.16.10.175:8888/
#是否开启将风险区域同步至仓库货位true开启,false关闭。默认关闭。
equipManage.fegin.isSyn=false
security.password=tw123456
security.loginId=tw3
security.productWeb=CONVERTER_STATION_WEB
security.appKeyWeb=CONVERTER_STATION
#系统服务账号,用户后端服务调用
security.password=a1234560
security.loginId=fas_autosys
#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://47.103.14.66:3306/91-safety-business?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username=root
......@@ -21,16 +17,9 @@ 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/
#ws
params.remoteWebsocketUrl=http://172.16.10.91:10600/
#redis
spring.redis.database=1
spring.redis.host=127.0.0.1
spring.redis.port=6379
......@@ -40,12 +29,12 @@ 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
windows.img.path = E:\\
linux.img.path = /
file.uploadUrl=D:\\upload\\files\\
#picture read
file.readUrl=http://172.16.3.89:8083/file/getFile?in=
## emqx
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
......@@ -53,6 +42,5 @@ emqx.broker=tcp://172.16.10.85:1883
emqx.user-name=super
emqx.password=a123456
#\uFFFD\u013C\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
file.downLoad.url=http://172.16.10.175:8888/
spring.application.name = AMOS-AUTOSYS
server.port = 8083
spring.profiles.active=dev
#应用product appkey
security.productWeb=STUDIO_APP_WEB
security.appKeyWeb=studio_normalapp_2668446
#spring.freemarker.cache=false
spring.devtools.restart.enabled=true
......@@ -43,27 +46,21 @@ spring.servlet.multipart.max-request-size=20MB
#feginName
visual.fegin.name=maas-visual
dutyMode.fegin.name=AMOSDUTYMODE
#值班系统
dutyMode.fegin.name=AMOS-DUTYMODE
#队站装备管理名称,主要用于风险区域同步至仓库货位和订阅装备信息系统
equipManage.fegin.name=AMOS-EQUIPMANAGE
#是否开启将风险区域同步至仓库货位true开启,false关闭。默认关闭。
equipManage.fegin.isSyn=false
#jpush 服务名称
Push.fegin.name=APPMESSAGEPUSHSERVICE
Push.fegin.name=AMOS-JPUSH
spring.http.multipart.maxFileSize = 10480000
spring.http.multipart.MaxRequestSize = 50480000
windows.img.path = E:\\
linux.img.path = /
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=
# 只用于初始化
emqx.defaultTopic=mqtt_topic
......@@ -77,3 +74,14 @@ amos.feign.gennerator.use-gateway=true
# 消息推送类型
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 @@
ALTER TABLE `f_station_info` ADD COLUMN `safety_user_phone_num` varchar(20) NULL COMMENT '安全负责人联系方式';
</sql>
</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>
\ No newline at end of file
......@@ -49,7 +49,7 @@
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_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
<if test="name != null and name!='null' ">
and det.name like CONCAT('%',#{name},'%' )
......@@ -88,11 +88,12 @@
<select id="getFireEquiments" resultType="com.yeejoin.amos.fas.business.vo.EquipmentSpeVo">
select
sto.equipment_specific_id as id ,
equ.code as f_code,
spec.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_specific as spec on spec.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
where sto.amount <![CDATA[>]]> 0
......@@ -138,7 +139,7 @@
<select id="getAssoEquips" resultType="com.yeejoin.amos.fas.business.vo.AssoEquipsVo">
select
sto.id as equipmentId,
equip.code as equipmentCode,
spe.code as equipmentCode,
det.name as equipmentName ,
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,
......
......@@ -159,11 +159,12 @@
SELECT
det.`name` as fireEquipmentName,
spe.`code` as fireEquipmentCode,
ein.name,
ein.name as eq_point_name,
CASE ind.value WHEN 'true' THEN '是'
WHEN 'false' THEN '否'
ELSE ind.value END 'e_value',
ein.unit,
ein.unit as eq_point_unit,
sce.name as source_name,
(
SELECT
group_concat(DISTINCT f.`name`)
......@@ -173,12 +174,15 @@
WHERE
efe.fire_equipment_id = ind.equipment_specific_id
) equipmentName,
ind.update_date
ind.update_date as create_date
FROM
wl_equipment_specific_index as ind
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_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
WHERE
1 = 1
......@@ -189,9 +193,9 @@
AND d.equipmentName LIKE '%${equipmentName}%'
</if>
<if test="startTime!=null">
AND d.update_date BETWEEN '${startTime}' AND '${endTime}'
AND d.create_date BETWEEN '${startTime}' AND '${endTime}'
</if>
ORDER BY d.update_date desc
ORDER BY d.create_date desc
LIMIT ${start},${length}
</select>
......
......@@ -701,6 +701,15 @@
parent_id = #{riskSourceId}
</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 f_risk_source
<set>
......
......@@ -518,7 +518,7 @@
and wlei.type_code!='FIREALARM'
and (wlesi.`value` = 'true'
OR wlesi.`value` = 'false')
ORDER BY wlesi.create_date DESC
ORDER BY wlesi.update_date DESC
limit 0,5
</select>
......
......@@ -175,10 +175,6 @@
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
<dependency>
<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>
......
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