Commit 3f16f65c authored by chenhao's avatar chenhao

Merge branch 'developer' of http://39.98.45.134:8090/moa/amos-boot-biz into developer

parents c67ab427 08932d09
......@@ -12,10 +12,10 @@
<artifactId>amos-boot-module-command-api</artifactId>
<dependencies>
<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-mongodb</artifactId>-->
<!-- </dependency>-->
</dependencies>
</project>
package com.yeejoin.amos.boot.module.command.api.dto;
import com.alibaba.excel.annotation.ExcelIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;
import org.springframework.data.mongodb.core.mapping.MongoId;
import java.util.Date;
......@@ -19,36 +15,36 @@ import java.util.Date;
*/
@Data
@ApiModel(value = "SeismometeorologyDto", description = "地震气象信息")
@Document(collection = "heart_rate")
//@Document(collection = "heart_rate")
public class SeismometeorologyDto {
@MongoId
// @MongoId
@ApiModelProperty(value = "主键ID")
protected Long sequenceNbr;
@ApiModelProperty(value = "预警类型 1:警情通知 0:气象通知")
@Field("type")
// @Field("type")
private String type;
@ApiModelProperty(value = "预警类型名称")
@Field("typeName")
// @Field("typeName")
private String typeName;
@ApiModelProperty(value = "预警等级")
@Field("grade")
// @Field("grade")
private String grade;
@ApiModelProperty(value = "发布时间")
@Field("releaseTime")
// @Field("releaseTime")
private Date releaseTime;
@ApiModelProperty(value = "发布单位")
@Field("releaseCompany")
// @Field("releaseCompany")
private String releaseCompany;
@ApiModelProperty(value = "发布内容")
@Field("content")
// @Field("content")
private String content;
......
......@@ -179,7 +179,7 @@ public class FireEquipment implements Serializable {
@ApiModelProperty(value = "资产生命周期日期")
@TableField("lifecycledate")
private String lifecycledate = "";
private Date lifecycledate;
@ApiModelProperty(value = "资产生命周期状态")
@TableField("lifecyclestate")
......
......@@ -23,7 +23,7 @@ public class DateUtils {
public static final String YEAR_PATTERN = "yyyy";
public static final String MINUTE_ONLY_PATTERN = "mm";
public static final String HOUR_ONLY_PATTERN = "HH";
public static final String DATE_TIME_T_PATTERN = "yyyy-MM-dd'T'HH:mm:ss";
public static final String DATE_TIME_T_PATTERN = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'";
/**
* 获取当前时间
*
......
package com.yeejoin.amos.boot.module.tzs.flc.api.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
......@@ -53,4 +54,7 @@ public class CylinderFillingCheckDataUnitDto extends BaseDto {
@ApiModelProperty(value = "充装月份")
private String fillingMonth;
@ApiModelProperty(value = "充装年月")
private String fillingDate;
}
......@@ -93,4 +93,11 @@ public class CylinderFillingCheckDataUnit extends BaseEntity {
*/
@TableField("filling_month")
private String fillingMonth;
//filling_date
/**
* 充装年月
*/
@TableField("filling_date")
private String fillingDate;
}
......@@ -22,6 +22,12 @@
<artifactId>cxf-spring-boot-starter-jaxws</artifactId>
<version>3.2.6</version>
</dependency>
<dependency>
<groupId>com.yeejoin</groupId>
<artifactId>indicators-feign</artifactId>
<version>1.0.4-SNAPSHOT</version>
</dependency>
</dependencies>
......
......@@ -56,7 +56,6 @@ public class AvicCustomPathResource {
JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
Client client = dcf.createClient(webserviceUrl);
try {
// invoke("方法名",参数1,参数2,参数3....);
client.invoke("transferPathConfig", model);
} catch (java.lang.Exception e) {
e.printStackTrace();
......
package com.yeejoin.amos.avic.controller;
import java.io.File;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import javax.activation.DataHandler;
import javax.activation.FileDataSource;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestBody;
......@@ -28,7 +28,9 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import com.yeejoin.amos.avic.face.model.AvicCustomPathModel;
import com.yeejoin.amos.avic.face.model.InputStreamDataSource;
import com.yeejoin.amos.avic.face.model.UploadFileModel;
import com.yeejoin.indicators.feign.IndicatorsManager;
import com.yeejoin.indicators.feign.request.DataRecordRequest;
import com.yeejoin.indicators.feign.workflow.WorkFlowFeign;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -42,12 +44,21 @@ public class WebServicesFileFransferResource {
@Value("${avic.webservice.path}")
String webserviceUrl;
@Autowired
IndicatorsManager indicatorsManager;
@Autowired
WorkFlowFeign workFlowFeign;
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(value = "传输文件")
@RequestMapping(value = "/file", method = RequestMethod.POST)
public ResponseModel postfile(@RequestPart MultipartFile[] files, @RequestParam String code, @RequestParam String path ) {
public ResponseModel postfile(
@RequestPart MultipartFile[] files,
@RequestParam String code,
@RequestParam String path,
@RequestParam String processDefinitionId,
@RequestParam String taskId,
@RequestParam String bizId) {
JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
Client client = dcf.createClient(webserviceUrl);
try {
......@@ -64,6 +75,14 @@ public class WebServicesFileFransferResource {
client.invoke("useCodetransferFile", handler, file.getOriginalFilename(), path, code);
}
}
List<DataRecordRequest> list = new ArrayList<>();
DataRecordRequest dataRecordRequest = new DataRecordRequest();
dataRecordRequest.put("avicCode", code);
dataRecordRequest.put("targetPath", path);
list.add(dataRecordRequest);
indicatorsManager.indicatorClient.saveBizRecord(taskId, bizId, list);
workFlowFeign.startFormByProcess(null, processDefinitionId);
} catch (java.lang.Exception e) {
e.printStackTrace();
}
......
......@@ -14,7 +14,6 @@ import com.yeejoin.amos.boot.biz.common.enums.HomePageEnum;
import com.yeejoin.amos.boot.biz.common.service.IDataDictionaryService;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.biz.common.utils.WordConverterUtils;
import com.yeejoin.amos.boot.module.command.api.dao.SeismometeorologyDtoDao;
import com.yeejoin.amos.boot.module.command.api.dto.CarTaskDto;
import com.yeejoin.amos.boot.module.command.api.dto.SeismometeorologyDto;
import com.yeejoin.amos.boot.module.command.biz.service.impl.RemoteSecurityService;
......@@ -81,8 +80,8 @@ public class CommandController extends BaseController {
IFireTeamService iFireTeamService;
@Autowired
IWaterResourceService iWaterResourceService;
@Autowired
SeismometeorologyDtoDao seismometeorologyDtoDao;
// @Autowired
// SeismometeorologyDtoDao seismometeorologyDtoDao;
@Autowired
IOrgUsrService iOrgUsrService;
@Autowired
......@@ -631,7 +630,8 @@ public class CommandController extends BaseController {
RequestData requestData = new RequestData();
requestData.setWhether24(true);
List<AlertCalledZhDto> list = iAlertCalledService.alertCalledListByAlertStatus(null, null, requestData);
List<SeismometeorologyDto> li = seismometeorologyDtoDao.findCarStateByWatchSn();
// List<SeismometeorologyDto> li = seismometeorologyDtoDao.findCarStateByWatchSn();
List<SeismometeorologyDto> li =new ArrayList<>();
//数据组装
for (AlertCalledZhDto alertCalledZhDto : list) {
......@@ -1062,8 +1062,8 @@ public class CommandController extends BaseController {
@RequestMapping(value = "/findDutyCarStateBy", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "当日气象预警", notes = "当日气象预警")
public ResponseModel<Object> findDutyCarStateBy() throws Exception {
List<SeismometeorologyDto> li = seismometeorologyDtoDao.findDutyCarStateBy();
return ResponseHelper.buildResponse(li);
// List<SeismometeorologyDto> li = seismometeorologyDtoDao.findDutyCarStateBy();
return ResponseHelper.buildResponse(null);
}
/**
......
......@@ -31,6 +31,7 @@ import org.springframework.data.domain.Page;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.DateTimeUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
......@@ -866,11 +867,13 @@ public class TopographyController extends AbstractBaseController {
List<Date> dates = new ArrayList<>();
for (IotDataVO vo : timeList) {
SimpleDateFormat sdf = new SimpleDateFormat(DateUtils.DATE_TIME_T_PATTERN);
SimpleDateFormat sdf1 = new SimpleDateFormat(DateUtils.DATE_TIME_PATTERN);
logger.info("返回时间===================================(" + vo.getValue() + ") =======================================");
Date date=sdf.parse(String.valueOf(vo.getValue()));
sdf.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
String time= sdf.format(date);
dates.add(sdf.parse(time));
sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
// String time= sdf.format(date);
String time= DateTimeUtil.format(date, DateTimeUtil.ISO_DATE_HOUR24_MIN_SEC);
dates.add(sdf1.parse(time));
logger.info("返回时间===================================(" + sdf.parse(String.valueOf(vo.getValue())) + ") =======================================");
}
List<EquipmentSpecificIndex> indexes = equipmentSpecificIndexMapper.getEquipmentSpeIndexByIotCodeAndTrend(iotCode);
......@@ -928,4 +931,6 @@ public class TopographyController extends AbstractBaseController {
}
}
......@@ -105,6 +105,8 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
CommonPageInfoParam param = new CommonPageInfoParam();
if (AlarmTypeEnum.GZGJ.getCode().equals(alarmType)) {
param.setIsFireAlarm("false");
} else if (AlarmTypeEnum.HZGJ.getCode().equals(alarmType)) {
param.setAlarmType(alarmType);
}
List<HashMap<String, Object>> list = this.baseMapper.getAlarmList(param);
List<EquipmentAlarmDownloadVO> equipmentDownloads = handleExportData(ids, list);
......
......@@ -416,6 +416,17 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
this.update(new LambdaUpdateWrapper<EquipmentSpecific>().set(EquipmentSpecific::getAgencyId, equipmentSpecific.getAgencyId()).set(EquipmentSpecific::getTeamId, equipmentSpecific.getTeamId()).eq(EquipmentSpecific::getId, equipmentSpecific.getId()));
if (equipmentSpecific.getStockDetail() != null && equipmentSpecific.getStockDetail().getWarehouseStructureId() != null) {
equipmentSpecific.setWarehouseStructureId(equipmentSpecific.getStockDetail().getWarehouseStructureId());
// 更新alarm表没有复位的装备位置信息
LambdaQueryWrapper<EquipmentSpecificAlarm> queryWrapper = new LambdaQueryWrapper();
queryWrapper.eq(EquipmentSpecificAlarm::getEquipmentSpecificId, equipmentSpecific.getId());
queryWrapper.ne(EquipmentSpecificAlarm::getStatus, AlarmStatusEnum.HF.getCode());
List<EquipmentSpecificAlarm> alarms = equipmentSpecificAlarmService.getBaseMapper().selectList(queryWrapper);
if (0 < alarms.size()) {
alarms.stream().map(x -> x.setLocation(equipmentSpecific.getPosition() + " "
+ null == equipmentSpecific.getStockDetail().getDescription() ? "" : equipmentSpecific.getStockDetail().getDescription())).collect(Collectors.toList());
equipmentSpecificAlarmService.updateBatchById(alarms);
}
}
boolean updateById = this.updateById(equipmentSpecific);
if (updateById) {
......@@ -474,17 +485,6 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
equipmentSpecific.getStockDetail().setDescription(detail.getArea());
stockDetailService.save(equipmentSpecific.getStockDetail());
// 更新alarm表没有复位的装备位置信息
LambdaQueryWrapper<EquipmentSpecificAlarm> queryWrapper = new LambdaQueryWrapper();
queryWrapper.eq(EquipmentSpecificAlarm::getEquipmentSpecificId, equipmentSpecific.getId());
queryWrapper.ne(EquipmentSpecificAlarm::getStatus, AlarmStatusEnum.HF.getCode());
List<EquipmentSpecificAlarm> alarms = equipmentSpecificAlarmService.getBaseMapper().selectList(queryWrapper);
if (0 < alarms.size()) {
alarms.stream().map(x -> x.setLocation(equipmentSpecific.getPosition() + " "
+ equipmentSpecific.getStockDetail().getDescription())).collect(Collectors.toList());
equipmentSpecificAlarmService.updateBatchById(alarms);
}
//生成入库单
StockBill stockBill = buildStockBills(equipmentSpecific, reginParams, agencyUserModel);
stockBillService.save(stockBill);
......
......@@ -282,7 +282,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
}
static void upAlarmLogStatus(String iotCode, String equipmentSpecificIndexKey, IEquipmentSpecificAlarmLogService equipmentSpecificAlarmLogService) {
public static List<EquipmentSpecificAlarmLog> upAlarmLogStatus(String iotCode, String equipmentSpecificIndexKey, IEquipmentSpecificAlarmLogService equipmentSpecificAlarmLogService) {
LambdaQueryWrapper<EquipmentSpecificAlarmLog> queryWrapper = new LambdaQueryWrapper();
queryWrapper.eq(EquipmentSpecificAlarmLog::getIotCode, iotCode);
queryWrapper.eq(EquipmentSpecificAlarmLog::getEquipmentSpecificIndexKey, equipmentSpecificIndexKey);
......@@ -295,6 +295,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
if (!logs.isEmpty()) {
equipmentSpecificAlarmLogService.updateBatchById(logs);
}
return logs;
}
public void publishDataToCanvas(List<EquipmentSpecificIndex> indexList) {
......@@ -321,10 +322,19 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
}
Map<String, Object> map = JSON.parseObject(JSON.toJSONString(equipmentStateVo));
map.put(canvasTopic, topicObject);
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
@Override
public void afterCompletion(int status) {
if (TransactionSynchronization.STATUS_COMMITTED == status) {
// 发送数据至画布
mqttSendGateway.sendToMqtt(canvasTopic, JSON.toJSONString(map));
}
}
});
}
}
void syncSystemctlMsg(EquipmentSpecificAlarmLog equipmentSpecificAlarmLog) {
try {
......@@ -679,8 +689,6 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
}
}
});
//向画布推送
publishDataToCanvas(equipmentSpecificIndexList);
// 首页性能指标数据订阅
mqttSendGateway.sendToMqtt(indexTopic, JSON.toJSONString(indexStateList));
......@@ -697,6 +705,8 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
//则更新拓扑节点数据及告警状态
updateNodeDateByEquipId(equipmentSpecificIndexList);
//向画布推送
publishDataToCanvas(equipmentSpecificIndexList);
}
......@@ -714,23 +724,20 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
}
mqttSendGateway.sendToMqtt(TopicEnum.EQDQR.getTopic(), JSONArray.toJSON(action).toString());
} else {
upAlarmLogStatus(action.getIotCode(), action.getEquipmentSpecificIndexKey(), equipmentSpecificAlarmLogService);
equipmentAlarmLogs.addAll(upAlarmLogStatus(action.getIotCode(), action.getEquipmentSpecificIndexKey(), equipmentSpecificAlarmLogService));
mqttSendGateway.sendToMqtt(TopicEnum.EQYQR.getTopic(), JSONArray.toJSON(action).toString());
bool = Boolean.TRUE;
}
});
if(ObjectUtils.isEmpty(equipmentAlarmLogs)){
return;
}
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
@Override
public void afterCommit() {
JSONObject jsonObject = new JSONObject();
jsonObject.put("seqNo", UUID.randomUUID().toString().replace("-", "").toLowerCase());
mqttSendGateway.sendToMqtt(TopicEnum.ALARM_LOG_INSERT.getTopic(), jsonObject.toString());
mqttSendGateway.sendToMqtt(TopicEnum.EQZXDT.getTopic(), "");
// 数字换流站数据处理(高斯库同步及南瑞告警推送)
if (syncSwitch) {
List<FireEquipmentFireAlarm> alarmList = createFireEquipmentFireAlarmVo(equipmentAlarmLogs);
......@@ -761,9 +768,11 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
}
// 向南瑞平台推送报警消息
if(!bool){
syncDataService.syncCreatedSendAlarm(equipmentAlarmLogs);
}
}
}
});
}
......@@ -913,7 +922,6 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
@Override
public void afterCommit() {
mqttSendGateway.sendToMqtt(TopicEnum.EQZXDT.getTopic(), "");
mqttSendGateway.sendToMqtt(TopicEnum.EQXXTJ.getTopic(), "");
iEquipmentSpecificSerivce.integrationPageSysDataRefresh(topicEntity.getCode());
iEquipmentSpecificSerivce.updateEquipmentSpecIndexRealtimeData(equipmentSpecificIndexList);
......@@ -960,7 +968,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
}
}
} catch (Exception e) {
e.printStackTrace();
}
return "";
}
......
......@@ -456,6 +456,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
String monthStr = month < 10 ? "0" + month : month + "";
temp.setFillingMonth(monthStr);
temp.setFillingYear(year);
temp.setFillingDate(year + "-" + monthStr);
Integer countThisMonth = cylinderFillingRecordServiceImpl.getFillingCountByMonth(cylinderUnit.getAppId(), c.getTime());
temp.setTotalSum((long) countThisMonth);
// 获取本月数据
......@@ -495,7 +496,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
}
/**
* 卸液量按单位统计
* 充装量、卸液量按单位统计
*/
@Transactional(rollbackFor = Exception.class)
@Scheduled(cron = "0 0 2 * * ?")
......
......@@ -2396,7 +2396,7 @@
alter table `wl_video_source` add column `parent_source_ids` text COMMENT '本级及父级建筑ids,冗余树形搜索';
</sql>
</changeSet>
<changeSet author="shg" id="1644459872903-1" runAlways="true">
<changeSet author="shg" id="1644459872903-10" runAlways="true">
<comment>`getBuildingParentIds` 存在前后顺序依赖关系所以放在这里</comment>
<sql endDelimiter="#">
DROP FUNCTION IF EXISTS `getBuildingParentIds`#
......@@ -2686,4 +2686,21 @@
</sql>
</changeSet>
<changeSet author="tw" id="2022-04-14">
<preConditions onFail="MARK_RAN">
<tableExists tableName="wl_form_group_column"/>
</preConditions>
<comment>插入动态表单数据 wl_form_group_column</comment>
<sql>
INSERT INTO `wl_form_group_column`(`id`, `field_name`, `field_label`, `data_type`, `group_id`, `query_strategy`, `not_null`, `group_code`, `creator_id`, `create_date`) VALUES (133000000319, 'latitude', '纬度', 'String', 132828674815, 'eq', b'0', 'r_else', 2581805, '2022-03-01 12:01:04');
INSERT INTO `wl_form_group_column`(`id`, `field_name`, `field_label`, `data_type`, `group_id`, `query_strategy`, `not_null`, `group_code`, `creator_id`, `create_date`) VALUES (133000000320, 'longitude', '经度', 'String', 132828674813, 'eq', b'0', 'r_else', 2581805, '2022-03-01 12:04:47');
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
......@@ -1299,58 +1299,114 @@
xhsanhj,
xhsangz,
xhsanpb,
ABS(xhsan - xhsanhj- xhsangz-xhsanpb) as xhszc,
(xhszc - noZcTotal) AS xhszc,
xhsan
from
(select
(SELECT
FROM
(
SELECT
(
SELECT
count(1)
FROM `wl_equipment_specific_index` s
where s.equipment_index_key = 'FAS_FireHydrantButton_FireAlarm'
and s.`value` = 'true') as xhsanhj,
(SELECT
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_FireHydrantButton_FireAlarm'
AND s.`value` = 'true'
) AS xhsanhj,
(
SELECT
count(1)
FROM `wl_equipment_specific_index` s
where s.equipment_index_key = 'FAS_FireHydrantButton_Fault'
and s.`value` = 'true') as xhsangz,
(SELECT
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_FireHydrantButton_Fault'
AND s.`value` = 'true'
) AS xhsangz,
(
SELECT
count(1)
FROM `wl_equipment_specific_index` s
where s.equipment_index_key = 'FAS_FireHydrantButton_Shield'
and s.`value` = 'true') as xhsanpb,
(SELECT
FROM
`wl_equipment_specific_index` s
WHERE
s.equipment_index_key = 'FAS_FireHydrantButton_Shield'
AND s.`value` = 'true'
) AS xhsanpb,
(
SELECT
count(1)
from
FROM
`wl_equipment_specific_index` si
where
si.equipment_index_key = 'FAS_FireHydrantButton_FireAlarm') as xhsan
) as hydrant
WHERE
si.equipment_index_key = 'FAS_FireHydrantButton_FireAlarm'
) AS xhsan,
(
SELECT
count(
DISTINCT equipment_specific_id
)
FROM
`wl_equipment_specific_index` s
WHERE
(
s.`value` = 'false'
OR s.`value` IS NULL
)
AND (
s.equipment_index_key = 'FAS_FireHydrantButton_FireAlarm'
OR s.equipment_index_key = 'FAS_FireHydrantButton_Fault'
OR s.equipment_index_key = 'FAS_FireHydrantButton_Shield'
)
) AS xhszc,
(
SELECT
count(
DISTINCT equipment_specific_id
)
FROM
`wl_equipment_specific_index` s
WHERE
(
s.`value` = 'true'
)
AND (
s.equipment_index_key = 'FAS_FireHydrantButton_FireAlarm'
OR s.equipment_index_key = 'FAS_FireHydrantButton_Fault'
OR s.equipment_index_key = 'FAS_FireHydrantButton_Shield'
)
) AS noZcTotal
) AS hydrant
</select>
<select id="fireWaterSysCollectingDevice" resultType="java.util.Map">
SELECT
sbfcjzzyc,
sbfcjzzbs,
(sbfcjzz-sbfcjzzyc-sbfcjzzbs) as sbfcjzzzc,
( sbfcjzzzc - noZcTotal ) AS sbfcjzzzc,
sbfcjzz
from
(select
(SELECT
count(1)
FROM `wl_equipment_specific_index` s
where s.equipment_index_key = 'FHS_CollectingDevice_DeviceAbnormal'
and s.`value` = 'true') as sbfcjzzyc,
(SELECT
count(1)
FROM `wl_equipment_specific_index` s
where s.equipment_index_key = 'FHS_CollectingDevice_DeviceLock'
and s.`value` = 'true') as sbfcjzzbs,
(SELECT
count(1)
from
`wl_equipment_specific_index` si
where
si.equipment_index_key = 'FHS_CollectingDevice_DeviceAbnormal') as sbfcjzz
) as collectingDevice
FROM
(
SELECT
( SELECT count( 1 ) FROM `wl_equipment_specific_index` s WHERE s.equipment_index_key = 'FHS_CollectingDevice_DeviceAbnormal' AND s.`value` = 'true' ) AS sbfcjzzyc,
( SELECT count( 1 ) FROM `wl_equipment_specific_index` s WHERE s.equipment_index_key = 'FHS_CollectingDevice_DeviceLock' AND s.`value` = 'true' ) AS sbfcjzzbs,
(
SELECT
count( DISTINCT equipment_specific_id )
FROM
`wl_equipment_specific_index` s
WHERE
( s.`value` = 'false' OR s.`value` IS NULL )
AND ( s.equipment_index_key = 'FHS_CollectingDevice_DeviceAbnormal' )
) AS sbfcjzz,
(
SELECT
count( DISTINCT equipment_specific_id )
FROM
`wl_equipment_specific_index` s
WHERE
( s.`value` = 'false' OR s.`value` IS NULL )
AND s.equipment_index_key = 'FHS_CollectingDevice_DeviceAbnormal'
) AS sbfcjzzzc,
( SELECT count( DISTINCT equipment_specific_id ) FROM `wl_equipment_specific_index` s WHERE ( s.`value` = 'true' ) AND s.equipment_index_key = 'FHS_CollectingDevice_DeviceAbnormal' ) AS noZcTotal
) AS collectingDevice
</select>
<select id="fireWaterSysWaterPump" resultType="java.util.Map">
select
......
......@@ -6,7 +6,7 @@ spring.datasource.password=root_123
## eureka properties:
eureka.client.serviceUrl.defaultZone=http://172.16.3.97:10001/eureka/
## redis properties:
## redis properties:danger/list
spring.redis.database=1
spring.redis.host=172.16.3.35
spring.redis.port=6379
......@@ -14,7 +14,7 @@ spring.redis.password=yeejoin@2020
## ES properties:
biz.elasticsearch.address=172.16.3.135
biz.elasticsearch.address=172.16.6.60
spring.data.elasticsearch.cluster-name=elasticsearch
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
......@@ -33,7 +33,7 @@ rule.definition.default-agency=jcs
rule.definition.localIp=172.16.3.35
## mongodb properties:
spring.data.mongodb.uri=mongodb://172.16.3.35:27017/command_db
#spring.data.mongodb.uri=mongodb://172.16.6.60:27017/command_db
## file properties:
file.url=http://39.98.45.134:9000/
......
......@@ -2874,5 +2874,43 @@
</sql>
</changeSet>
<changeSet author="chenzhao" id="2022-04-14-1">
<preConditions onFail="MARK_RAN">
<tableExists tableName="wl_form_group"/>
</preConditions>
<comment>add data wl_form_group</comment>
<sql>
INSERT INTO wl_form_group (`id`, `group_name`, `group_code`, `group_type`, `allow_operation`, `creator_id`, `create_date`) VALUES (132828674824, '储罐', 'r_tank', 'room', 'edit,delete,room_add', 258105, '2022-04-14 10:15:10');
</sql>
</changeSet>
<changeSet author="chenzhao" id="2022-04-14-2">
<preConditions onFail="MARK_RAN">
<tableExists tableName="wl_form_group"/>
</preConditions>
<comment>add data wl_form_group</comment>
<sql>
INSERT INTO `wl_form_group_column`(`id`, `field_name`, `field_label`, `data_type`, `group_id`, `query_strategy`, `not_null`, `group_code`, `creator_id`) VALUES (133000000329, 'company_code', '单位编码', 'String', 132828674824, 'eq', b'0', 'r_tank', 2581805);
INSERT INTO `wl_form_group_column`(`id`, `field_name`, `field_label`, `data_type`, `group_id`, `query_strategy`, `not_null`, `group_code`, `creator_id`) VALUES (133000000330, 'tank_code', '储罐编号', 'String', 132828674824, 'eq', b'0', 'r_tank', 2581805);
INSERT INTO `wl_form_group_column`(`id`, `field_name`, `field_label`, `data_type`, `group_id`, `query_strategy`, `not_null`, `group_code`, `creator_id`) VALUES (133000000321, 'tank_name', '储罐编号', 'String', 132828674824, 'eq', b'0', 'r_tank', 2581805);
INSERT INTO `wl_form_group_column`(`id`, `field_name`, `field_label`, `data_type`, `group_id`, `query_strategy`, `not_null`, `group_code`, `creator_id`) VALUES (133000000322, 'storage_name', '储存物名称', 'String', 132828674824, 'eq', b'0', 'r_tank', 2581805);
INSERT INTO `wl_form_group_column`(`id`, `field_name`, `field_label`, `data_type`, `group_id`, `query_strategy`, `not_null`, `group_code`, `creator_id`) VALUES (133000000323, 'storage_nature', '储存物性质', 'String', 132828674824, 'eq', b'0', 'r_tank', 2581805);
INSERT INTO `wl_form_group_column`(`id`, `field_name`, `field_label`, `data_type`, `group_id`, `query_strategy`, `not_null`, `group_code`, `creator_id`) VALUES (133000000324, 'storage_form', '储存物形式', 'String', 132828674824, 'eq', b'0', 'r_tank', 2581805);
INSERT INTO `wl_form_group_column`(`id`, `field_name`, `field_label`, `data_type`, `group_id`, `query_strategy`, `not_null`, `group_code`, `creator_id`) VALUES (133000000325, 'storage_capacity', '储存容量', 'String', 132828674824, 'eq', b'0', 'r_tank', 2581805);
INSERT INTO `wl_form_group_column`(`id`, `field_name`, `field_label`, `data_type`, `group_id`, `query_strategy`, `not_null`, `group_code`, `creator_id`) VALUES (133000000326, 'storage_plan_name', '储罐区平面图名称', 'String', 132828674824, 'eq', b'0', 'r_tank', 2581805);
INSERT INTO `wl_form_group_column`(`id`, `field_name`, `field_label`, `data_type`, `group_id`, `query_strategy`, `not_null`, `group_code`, `creator_id`) VALUES (133000000327, 'storage_plan', '储罐区平面图图纸', 'String', 132828674824, 'eq', b'0', 'r_tank', 2581805);
INSERT INTO `wl_form_group_column`(`id`, `field_name`, `field_label`, `data_type`, `group_id`, `query_strategy`, `not_null`, `group_code`, `creator_id`) VALUES (133000000328, 'company_code', '消防设施情况', 'String', 132828674824, 'eq', b'0', 'r_tank', 2581805);
</sql>
</changeSet>
</databaseChangeLog>
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