Commit 2dc5d1c6 authored by limei's avatar limei

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

parents 29f1c37f 1edc3d07
...@@ -382,7 +382,7 @@ public class WaterResourceDto extends BaseDto { ...@@ -382,7 +382,7 @@ public class WaterResourceDto extends BaseDto {
@ExcelIgnore @ExcelIgnore
@ApiModelProperty("水池液位显示装置id") @ApiModelProperty("水池液位显示装置id")
private Long levelDeviceId; private String levelDeviceId;
@ApiModelProperty("水池液位显示装置名称") @ApiModelProperty("水池液位显示装置名称")
@ExcelProperty(value = "水池液位显示装置", index = 45) @ExcelProperty(value = "水池液位显示装置", index = 45)
......
...@@ -69,7 +69,7 @@ public class WaterResourcePoolDto extends BaseDto { ...@@ -69,7 +69,7 @@ public class WaterResourcePoolDto extends BaseDto {
private float maxWaterLevel; private float maxWaterLevel;
@ApiModelProperty("水池液位显示装置id") @ApiModelProperty("水池液位显示装置id")
private Long levelDeviceId; private String levelDeviceId;
@ApiModelProperty("水池液位显示装置名称") @ApiModelProperty("水池液位显示装置名称")
private String levelDeviceName; private String levelDeviceName;
......
...@@ -104,7 +104,7 @@ public class WaterResourcePool extends BaseEntity { ...@@ -104,7 +104,7 @@ public class WaterResourcePool extends BaseEntity {
* 水池液位显示装置id * 水池液位显示装置id
*/ */
@TableField("level_device_id") @TableField("level_device_id")
private Long levelDeviceId; private String levelDeviceId;
/** /**
* 水池液位显示装置名称 * 水池液位显示装置名称
......
...@@ -10,6 +10,7 @@ public enum WaterResourceTypeEnum { ...@@ -10,6 +10,7 @@ public enum WaterResourceTypeEnum {
消防水鹤("crane", "消防水鹤"), 消防水鹤("crane", "消防水鹤"),
消防水池("pool", "消防水池"), 消防水池("pool", "消防水池"),
天然水源("natural", "天然水源"), 天然水源("natural", "天然水源"),
消防水箱("waterTank", "消防水箱"),
工业水池("industryPool", "工业水池"); 工业水池("industryPool", "工业水池");
private String code; private String code;
......
...@@ -38,12 +38,15 @@ public class Equipment extends BaseEntity { ...@@ -38,12 +38,15 @@ public class Equipment extends BaseEntity {
@ApiModelProperty(value = "国别") @ApiModelProperty(value = "国别")
private String country; private String country;
@ApiModelProperty(value = "保养周期") @ApiModelProperty(value = "维保周期")
private Short maintenanceCycle; private Short maintenanceCycle;
@ApiModelProperty(value = "检查周期(天)") @ApiModelProperty(value = "检查周期(天)")
private Short checkCycle; private Short checkCycle;
@ApiModelProperty(value = "报废期限")
private Short expiryDate;
private String remark; private String remark;
@ApiModelProperty(value = "管理方式 单件还是批量管理模式,单件S,批量:P") @ApiModelProperty(value = "管理方式 单件还是批量管理模式,单件S,批量:P")
......
...@@ -179,4 +179,10 @@ public class EquipmentDetail extends BaseEntity { ...@@ -179,4 +179,10 @@ public class EquipmentDetail extends BaseEntity {
@TableField(value = "latitude") @TableField(value = "latitude")
private Double latitude; private Double latitude;
@TableField(exist = false)
private List<UploadFile> quality;
@TableField(exist = false)
private List<UploadFile> operation;
} }
...@@ -4,6 +4,7 @@ import java.util.Date; ...@@ -4,6 +4,7 @@ import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yeejoin.equipmanage.common.entity.publics.BaseEntity; import com.yeejoin.equipmanage.common.entity.publics.BaseEntity;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
...@@ -159,4 +160,13 @@ public class EquipmentSpecific extends BaseEntity { ...@@ -159,4 +160,13 @@ public class EquipmentSpecific extends BaseEntity {
@ApiModelProperty(value = "设备值说明") @ApiModelProperty(value = "设备值说明")
@TableField("value_label") @TableField("value_label")
private String valueLabel; private String valueLabel;
@ApiModelProperty(value = "质保信息")
@TableField("warranty_info")
private String warrantyInfo;
@ApiModelProperty(value = "质保周期")
@TableField("warranty_period")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date warrantyPeriod;
} }
package com.yeejoin.equipmanage.common.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.equipmanage.common.entity.publics.BaseEntity;
import io.swagger.annotations.ApiModel;
import lombok.Data;
@Data
@TableName("wl_marquee_data")
@ApiModel(value = "marquee_data对象", description = "")
public class MarqueeData extends BaseEntity {
/**
* 类型
*/
private String type;
/**
* 设备名称
*/
private String name;
/**
* 位置
*/
private String position;
/**
* 消息类型
*/
private String messageType;
/**
* 是否已读【0:未读;1:已读】
*/
private int isRead;
/**
* 设备id
*/
private Long equipmentSpecificId;
}
package com.yeejoin.equipmanage.common.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.equipmanage.common.entity.publics.BaseEntity;
import io.swagger.annotations.ApiModel;
import lombok.Data;
@Data
@TableName("wl_supervision_video")
@ApiModel(value = "Video对象", description = "")
public class SupervisionVideo extends BaseEntity {
private String bizOrgCode;
private String cameraId;
}
package com.yeejoin.equipmanage.common.entity.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author DELL
*/
@Data
@ApiModel(value = "FormGroupColumnDto对象", description = "分组Dto对象")
public class FormGroupColumnDto {
@ApiModelProperty(value = "字段名")
private String fieldName;
@ApiModelProperty(value = "中文名")
private String fieldLabel;
@ApiModelProperty(value = "值")
private String fieldValue;
@ApiModelProperty(value = "数据类型:文本,数字,枚举,日期")
private String dataType;
@ApiModelProperty(value = "查询策略;全等,模糊,区间")
private String queryStrategy;
@ApiModelProperty(value = "分组编号")
private String groupCode;
}
...@@ -2,7 +2,8 @@ package com.yeejoin.equipmanage.common.enums; ...@@ -2,7 +2,8 @@ package com.yeejoin.equipmanage.common.enums;
public enum FileTypeEnum { public enum FileTypeEnum {
image("图片"),video("视频"),instruction("说明"),certificate("资质"),face("平面图"); image("图片"),video("视频"),instruction("说明"),certificate("资质"),
face("平面图"),quality("合格证"),operation("操作说明");
String describe; String describe;
......
...@@ -24,7 +24,10 @@ public enum GroupCodeEnum { ...@@ -24,7 +24,10 @@ public enum GroupCodeEnum {
R_RAIN_ROOM("雨淋阀间","r_rainRoom","YLFJ"), R_RAIN_ROOM("雨淋阀间","r_rainRoom","YLFJ"),
R_FIRE_FOAM_ROOM("消防泡沫间","r_fireFoamRoom","PMJ"), R_FIRE_FOAM_ROOM("消防泡沫间","r_fireFoamRoom","PMJ"),
R_FIRE_CONTROL_ROOM("消防控制室","r_fireControlRoom","XKS"), R_FIRE_CONTROL_ROOM("消防控制室","r_fireControlRoom","XKS"),
FLOOR("楼层","floor","LC"); FLOOR("楼层","floor","LC"),
PMYG("泡沫液罐","92031900","PMYG"),
GWYLTCQ("管网压力探测器","92011000","GWYLTCQ"),
XFSCZZ("消防水池装置","92010700","XFSCZZ");
private String groupName; private String groupName;
private String groupCode; private String groupCode;
......
...@@ -5,5 +5,5 @@ package com.yeejoin.equipmanage.common.enums; ...@@ -5,5 +5,5 @@ package com.yeejoin.equipmanage.common.enums;
* @author DELL * @author DELL
*/ */
public enum GroupColumnDataType { public enum GroupColumnDataType {
String, Integer,datetime, Enum,Double,Date,Boolean,Array,File,InstanceId String, Integer,datetime, Enum,Double,Date,Boolean,Array,File,InstanceId,inputNumber
} }
package com.yeejoin.equipmanage.common.enums;
public enum PressurePumpCheckEnum {
LE("le", "小于等于"),
GE("ge", "大于等于"),
BE("be", "在两者之间");
private String code;
private String describe;
private PressurePumpCheckEnum(String code, String describe) {
this.code = code;
this.describe = describe;
}
public String getCode() {
return code;
}
public String getDescribe() {
return describe;
}
public static PressurePumpCheckEnum getByCode(String code) {
for (PressurePumpCheckEnum l : PressurePumpCheckEnum.values()) {
if (code.equals(l.getCode())) {
return l;
}
}
return null;
}
}
package com.yeejoin.equipmanage.common.enums;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public enum PressurePumpEnum {
ALONE_START_YXSC("FHS_PressurePump_Start_ALONE_START_YXSC","", "0 0/5 * * * ?", "5",
PressurePumpValueEnum.PUMP_START_TIME.getCode(), PressurePumpMessageEnum.MESSAGE_LEVEL_QT_WJ_YXSC.getCode()),
ALONE_START_QT("FHS_PressurePump_Start_ALONE_START_QT", PressurePumpCheckEnum.LE.getCode(), "", "5",
PressurePumpValueEnum.LAST_STOP.getCode(), PressurePumpMessageEnum.MESSAGE_LEVEL_QT_WJ.getCode()),
ALONE_STOP_QT("FHS_PressurePump_Stop_ALONE_STOP_QT", PressurePumpCheckEnum.GE.getCode(), "5", "",
PressurePumpValueEnum.LAST_START.getCode(), PressurePumpMessageEnum.MESSAGE_LEVEL_QT_WJ_YXSC.getCode()),
ALL_START_QT_WJ("FHS_PressurePump_Start_ALL_START_QT_WJ", PressurePumpCheckEnum.LE.getCode(), "", "30",
PressurePumpValueEnum.LATELY_STOP.getCode(), PressurePumpMessageEnum.MESSAGE_LEVEL_QT_WJ.getCode()),
ALL_START_QT_YZ("FHS_PressurePump_Start_ALL_START_QT_YZ", PressurePumpCheckEnum.BE.getCode(), "30", "60",
PressurePumpValueEnum.LATELY_STOP.getCode(), PressurePumpMessageEnum.MESSAGE_LEVEL_YZ.getCode()),
ALL_START_QT_YB("FHS_PressurePump_Start_ALL_START_QT_YB", PressurePumpCheckEnum.BE.getCode(), "60", "240",
PressurePumpValueEnum.LATELY_STOP.getCode(), PressurePumpMessageEnum.MESSAGE_LEVEL_YB.getCode()),
ALL_STOP_QT_WJ("FHS_PressurePump_Stop_ALL_STOP_QT_WJ", PressurePumpCheckEnum.LE.getCode(), "", "30",
PressurePumpValueEnum.LATELY_START.getCode(), PressurePumpMessageEnum.MESSAGE_LEVEL_QT_WJ.getCode()),
ALL_STOP_QT_YZ("FHS_PressurePump_Stop_ALL_STOP_QT_YZ", PressurePumpCheckEnum.BE.getCode(), "30", "60",
PressurePumpValueEnum.LATELY_START.getCode(), PressurePumpMessageEnum.MESSAGE_LEVEL_YZ.getCode()),
ALL_STOP_QT_YB("FHS_PressurePump_Stop_ALL_STOP_QT_YB", PressurePumpCheckEnum.BE.getCode(), "60", "240",
PressurePumpValueEnum.LATELY_START.getCode(), PressurePumpMessageEnum.MESSAGE_LEVEL_YB.getCode());
private String code;
private String operator;
private String leftValue;
private String rightValue;
private String compareValue;
private String level;
private PressurePumpEnum(String code, String operator, String leftValue, String rightValue, String compareValue, String level) {
this.code = code;
this.operator = operator;
this.leftValue = leftValue;
this.rightValue = rightValue;
this.compareValue = compareValue;
this.level = level;
}
public static List<PressurePumpEnum> getEnumListByCode(String code) {
List<PressurePumpEnum> list = new ArrayList<>();
for(PressurePumpEnum e : PressurePumpEnum.values()) {
if (e.getCode().startsWith(code)) {
list.add(e);
}
}
return list;
}
public String getCode() {
return code;
}
public String getOperator() {
return operator;
}
public String getLeftValue() {
return leftValue;
}
public String getRightValue() {
return rightValue;
}
public String getCompareValue() { return compareValue; }
public String getLevel() { return level; }
}
package com.yeejoin.equipmanage.common.enums;
public enum PressurePumpMessageEnum {
MESSAGE_LEVEL_YB("YB", "【%s】分钟内,启停间隔较小", "","【%s】- 【%s】 - 【%s】分钟内,设备启停频繁,请及时查看处理"),
MESSAGE_LEVEL_YZ("YZ", "【%s】分钟内,启停间隔较小", "", "【%s】- 【%s】 - 【%s】分钟内,设备启停频繁,请及时查看处理"),
MESSAGE_LEVEL_QT_WJ("QT_WJ", "【%s】分钟内,设备启停频繁", "类型:漏水提醒 ;设备位置:【稳压泵设备位置】; 设备名称:【稳压泵设备名称】 ; 时间:系统推送时间", "【%s】- 【%s】 - 【%s】分钟内,设备启停频繁,可能存在漏水,请及时查看处理"),
MESSAGE_LEVEL_QT_WJ_YXSC("WJ_YXSC", "运行时长超过【%s】分钟,存在漏水可能", "类型:漏水提醒 ;设备位置:【稳压泵设备位置】; 设备名称:【稳压泵设备名称】 ; 时间:系统推送时间", "【%s】- 【%s】 - 运行时长超过【%s】分钟,存在漏水可能,请及时查看处理");
private String code;
private String allMessage;
private String marqueeMessage;
private String recordMessage;
private PressurePumpMessageEnum(String code, String allMessage, String marqueeMessage,String recordMessage) {
this.code = code;
this.allMessage = allMessage;
this.marqueeMessage = marqueeMessage;
this.recordMessage = recordMessage;
}
public String getCode() {
return code;
}
public String getAllMessage() {
return allMessage;
}
public String getMarqueeMessage() {
return marqueeMessage;
}
public String getRecordMessage() {
return recordMessage;
}
public static PressurePumpMessageEnum getByCode(String code) {
for (PressurePumpMessageEnum l : PressurePumpMessageEnum.values()) {
if (code.equals(l.getCode())) {
return l;
}
}
return null;
}
}
package com.yeejoin.equipmanage.common.enums;
public enum PressurePumpValueEnum {
LAST_STOP("lastStop", "上次停泵时间"),
LAST_START("lastStart", "上次启泵时间"),
LATELY_STOP("latelyStop", "所有泵最近一次停泵时间"),
PUMP_START_TIME("pumpStartTime", "计算启动时常"),
LATELY_START("latelyStart", "所有泵最近一次启泵时间");
private String code;
private String describe;
private PressurePumpValueEnum(String code, String describe) {
this.code = code;
this.describe = describe;
}
public String getCode() {
return code;
}
public String getDescribe() {
return describe;
}
public static PressurePumpValueEnum getByCode(String code) {
for (PressurePumpValueEnum l : PressurePumpValueEnum.values()) {
if (code.equals(l.getCode())) {
return l;
}
}
return null;
}
}
...@@ -221,7 +221,7 @@ public class OrgUsrController extends BaseController { ...@@ -221,7 +221,7 @@ public class OrgUsrController extends BaseController {
* @return * @return
*/ */
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/getUnit/{code}", method = RequestMethod.GET) @RequestMapping(value = "/getUnitByCode/{code}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取单位详情", notes = "获取单位详情") @ApiOperation(httpMethod = "GET", value = "获取单位详情", notes = "获取单位详情")
public ResponseModel<OrgUsrFormDto> selectByCode(HttpServletRequest request, @PathVariable String code) throws Exception { public ResponseModel<OrgUsrFormDto> selectByCode(HttpServletRequest request, @PathVariable String code) throws Exception {
LambdaQueryWrapper<OrgUsr> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<OrgUsr> queryWrapper = new LambdaQueryWrapper<>();
......
...@@ -137,12 +137,14 @@ public class WaterResourceController extends BaseController { ...@@ -137,12 +137,14 @@ public class WaterResourceController extends BaseController {
waterResourceNaturalService.createWithModel(waterResourceNaturalDto); waterResourceNaturalService.createWithModel(waterResourceNaturalDto);
break; break;
case "pool": case "pool":
case "waterTank":
case "industryPool": case "industryPool":
// 新增基础信息 // 新增基础信息
model.setIsIot(true); model.setIsIot(true);
waterResourceServiceImpl.createWithModel(model); waterResourceServiceImpl.createWithModel(model);
WaterResourcePoolDto waterResourcePoolDto = new WaterResourcePoolDto(); WaterResourcePoolDto waterResourcePoolDto = new WaterResourcePoolDto();
BeanUtils.copyProperties(model, waterResourcePoolDto); BeanUtils.copyProperties(model, waterResourcePoolDto);
// waterResourcePoolDto.setLevelDeviceId(String.join(",", model.getLevelDeviceId()));
waterResourcePoolDto.setSequenceNbr(null); waterResourcePoolDto.setSequenceNbr(null);
waterResourcePoolDto.setResourceId(model.getSequenceNbr()); waterResourcePoolDto.setResourceId(model.getSequenceNbr());
waterResourcePoolService.createWithModel(waterResourcePoolDto); waterResourcePoolService.createWithModel(waterResourcePoolDto);
...@@ -278,6 +280,7 @@ public class WaterResourceController extends BaseController { ...@@ -278,6 +280,7 @@ public class WaterResourceController extends BaseController {
waterResourceNaturalService.updateWithModel(waterResourceNaturalDto); waterResourceNaturalService.updateWithModel(waterResourceNaturalDto);
break; break;
case "industryPool": case "industryPool":
case "waterTank":
case "pool": case "pool":
WaterResourcePoolDto waterResourcePoolDto = new WaterResourcePoolDto(); WaterResourcePoolDto waterResourcePoolDto = new WaterResourcePoolDto();
WaterResourcePool waterResourcePool = WaterResourcePool waterResourcePool =
...@@ -285,6 +288,7 @@ public class WaterResourceController extends BaseController { ...@@ -285,6 +288,7 @@ public class WaterResourceController extends BaseController {
sequenceNbr)); sequenceNbr));
BeanUtils.copyProperties(model, waterResourcePoolDto); BeanUtils.copyProperties(model, waterResourcePoolDto);
waterResourcePoolDto.setSequenceNbr(waterResourcePool.getSequenceNbr()); waterResourcePoolDto.setSequenceNbr(waterResourcePool.getSequenceNbr());
waterResourcePoolDto.setResourceId(waterResourcePool.getResourceId());
waterResourcePoolService.updateWithModel(waterResourcePoolDto); waterResourcePoolService.updateWithModel(waterResourcePoolDto);
break; break;
default: default:
...@@ -403,11 +407,13 @@ public class WaterResourceController extends BaseController { ...@@ -403,11 +407,13 @@ public class WaterResourceController extends BaseController {
BeanUtils.copyProperties(waterResourceNatural, waterResourceDto); BeanUtils.copyProperties(waterResourceNatural, waterResourceDto);
break; break;
case "industryPool": case "industryPool":
case "waterTank":
case "pool": case "pool":
WaterResourcePool waterResourcePool = WaterResourcePool waterResourcePool =
waterResourcePoolService.getOne(new QueryWrapper<WaterResourcePool>().eq("resource_id", waterResourcePoolService.getOne(new QueryWrapper<WaterResourcePool>().eq("resource_id",
sequenceNbr)); sequenceNbr));
BeanUtils.copyProperties(waterResourcePool, waterResourceDto); BeanUtils.copyProperties(waterResourcePool, waterResourceDto);
// waterResourceDto.setLevelDeviceId(Arrays.asList(waterResourcePool.getLevelDeviceId().split(",")));
break; break;
default: default:
break; break;
......
package com.yeejoin.amos.boot.module.common.biz.enums;
public enum DataDictionaryTypeEnum {
PERSON_TYPE("人员类型", "DLRYLX");
private String name;
private String code;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
DataDictionaryTypeEnum(String name, String code) {
this.name = name;
this.code = code;
}
}
package com.yeejoin.amos.boot.module.common.biz.enums; package com.yeejoin.amos.boot.module.common.biz.enums;
public enum DynamicGroupCode { public enum DynamicGroupCodeEnum {
JCS_PERSON("机场人员", "246"); JCS_PERSON("机场人员", "246");
...@@ -23,7 +23,7 @@ public enum DynamicGroupCode { ...@@ -23,7 +23,7 @@ public enum DynamicGroupCode {
this.code = code; this.code = code;
} }
DynamicGroupCode(String name, String code) { DynamicGroupCodeEnum(String name, String code) {
this.name = name; this.name = name;
this.code = code; this.code = code;
} }
......
...@@ -19,7 +19,10 @@ import java.util.stream.Stream; ...@@ -19,7 +19,10 @@ import java.util.stream.Stream;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import com.yeejoin.amos.boot.module.common.biz.enums.DynamicGroupCode; import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.IDataDictionaryService;
import com.yeejoin.amos.boot.module.common.biz.enums.DataDictionaryTypeEnum;
import com.yeejoin.amos.boot.module.common.biz.enums.DynamicGroupCodeEnum;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.joda.time.DateTime; import org.joda.time.DateTime;
...@@ -82,6 +85,10 @@ public class DutyCommonServiceImpl implements IDutyCommonService { ...@@ -82,6 +85,10 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
@Autowired @Autowired
DutyPersonShiftMapper dutyPersonShiftMapper; DutyPersonShiftMapper dutyPersonShiftMapper;
@Autowired
IDataDictionaryService dataDictionaryService;
/** /**
* 每天单个班次执勤人数全部小于等于3人 * 每天单个班次执勤人数全部小于等于3人
*/ */
...@@ -122,7 +129,7 @@ public class DutyCommonServiceImpl implements IDutyCommonService { ...@@ -122,7 +129,7 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
}); });
} }
// 获取人员详细信息 // 获取人员详细信息
List<Map<String, Object>> personInfoList = dynamicFormInstanceService.personInfoList(DynamicGroupCode.JCS_PERSON.getCode(), userIdSet); List<Map<String, Object>> personInfoList = dynamicFormInstanceService.personInfoList(DynamicGroupCodeEnum.JCS_PERSON.getCode(), userIdSet);
if (!CollectionUtils.isEmpty(personInfoList)) { if (!CollectionUtils.isEmpty(personInfoList)) {
Map<String, List<Map<String, Object>>> listMap = personInfoList.stream().collect(Collectors.groupingBy((Map m) -> String.valueOf(m.get("userId")))); Map<String, List<Map<String, Object>>> listMap = personInfoList.stream().collect(Collectors.groupingBy((Map m) -> String.valueOf(m.get("userId"))));
records.forEach(x -> { records.forEach(x -> {
...@@ -559,9 +566,17 @@ public class DutyCommonServiceImpl implements IDutyCommonService { ...@@ -559,9 +566,17 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
List<DynamicFormInstance> instances = dynamicFormInstanceService List<DynamicFormInstance> instances = dynamicFormInstanceService
.list(new LambdaQueryWrapper<DynamicFormInstance>().eq(DynamicFormInstance::getFieldCode, "peopleType") .list(new LambdaQueryWrapper<DynamicFormInstance>().eq(DynamicFormInstance::getFieldCode, "peopleType")
.eq(DynamicFormInstance::getInstanceId, userId) .eq(DynamicFormInstance::getInstanceId, userId)
.eq(DynamicFormInstance::getGroupCode, DynamicGroupCode.JCS_PERSON.getCode())); .eq(DynamicFormInstance::getGroupCode, DynamicGroupCodeEnum.JCS_PERSON.getCode()));
if (!CollectionUtils.isEmpty(instances)) { if (!CollectionUtils.isEmpty(instances)) {
d.put("personType", instances.get(0).getFieldValue()); String fieldValue = instances.get(0).getFieldValue();
List<DataDictionary> dictionaryList = dataDictionaryService.getByType(DataDictionaryTypeEnum.PERSON_TYPE.getCode());
if (StringUtils.isNotBlank(fieldValue) && !CollectionUtils.isEmpty(dictionaryList)) {
Map<String, List<DataDictionary>> map = dictionaryList.stream().collect(Collectors.groupingBy(DataDictionary::getCode));
List<DataDictionary> list = map.get(fieldValue);
if (!CollectionUtils.isEmpty(list)) {
d.put("personType", list.get(0).getName());
}
}
} }
} }
return d; return d;
......
...@@ -167,9 +167,10 @@ public class BuildingController extends AbstractBaseController { ...@@ -167,9 +167,10 @@ public class BuildingController extends AbstractBaseController {
@ApiOperation(value = "通用保存") @ApiOperation(value = "通用保存")
public Object save( public Object save(
@RequestParam(value = "groupCode") String groupCode, @RequestParam(value = "groupCode") String groupCode,
@RequestParam(value = "instanceId", required = false) String instanceId,
@RequestBody Map<String, Object> map) { @RequestBody Map<String, Object> map) {
String orgCode = getOrgCode(); String orgCode = getOrgCode();
return buildService.saveForm(groupCode, orgCode, map); return buildService.saveForm(groupCode, orgCode, map, instanceId);
} }
@GetMapping(value = "/pointTree") @GetMapping(value = "/pointTree")
...@@ -217,9 +218,10 @@ public class BuildingController extends AbstractBaseController { ...@@ -217,9 +218,10 @@ public class BuildingController extends AbstractBaseController {
@PutMapping(value = "/commonUpdate") @PutMapping(value = "/commonUpdate")
public Object update( public Object update(
@RequestParam Long instanceId, @RequestParam Long instanceId,
@RequestParam(value = "groupCode", required = false) String groupCode,
@RequestBody Map<String, Object> map) { @RequestBody Map<String, Object> map) {
String orgCode = getOrgCode(); String orgCode = getOrgCode();
return buildService.updateForm(instanceId, orgCode, map); return buildService.updateForm(instanceId, orgCode, map, groupCode);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
......
...@@ -188,6 +188,10 @@ public class ConfigureController extends AbstractBaseController { ...@@ -188,6 +188,10 @@ public class ConfigureController extends AbstractBaseController {
if (!CollectionUtils.isEmpty(fireCarInfoByWL.getRecords())) { if (!CollectionUtils.isEmpty(fireCarInfoByWL.getRecords())) {
List<Map<String, Object>> records = fireCarInfoByWL.getRecords(); List<Map<String, Object>> records = fireCarInfoByWL.getRecords();
records.forEach(item -> { records.forEach(item -> {
String carId = item.get("id").toString();
Map<String, Object> fireCaStartBySeven = fireFightingSystemMapper.getFireCaStartBySeven(carId);
Object count = fireCaStartBySeven.get("count");
item.put("count",count.toString());
if (item.containsKey("carStateDate") && !ObjectUtils.isEmpty(item.get("carStateDate"))) { if (item.containsKey("carStateDate") && !ObjectUtils.isEmpty(item.get("carStateDate"))) {
try { try {
Date carStateDate = DateUtils.dateParse(item.get("carStateDate").toString(), "yyyy-MM-dd'T'HH:mm:ss"); Date carStateDate = DateUtils.dateParse(item.get("carStateDate").toString(), "yyyy-MM-dd'T'HH:mm:ss");
...@@ -632,7 +636,7 @@ public class ConfigureController extends AbstractBaseController { ...@@ -632,7 +636,7 @@ public class ConfigureController extends AbstractBaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/iotMonthReport") @GetMapping(value = "/iotMonthReport")
@ApiOperation(httpMethod = "GET", value = "物联报表-月", notes = "物联报表-月") @ApiOperation(httpMethod = "GET", value = "物联报表-月", notes = "物联报表-月")
public ResponseModel equipList(@RequestParam(value = "bizOrgCode", required = false) String bizOrgCode, public ResponseModel iotMonthReport(@RequestParam(value = "bizOrgCode", required = false) String bizOrgCode,
@RequestParam(value = "startDate") String startDate, @RequestParam(value = "startDate") String startDate,
@RequestParam(value = "endDate") String endDate) { @RequestParam(value = "endDate") String endDate) {
......
package com.yeejoin.equipmanage.controller; package com.yeejoin.equipmanage.controller;
import java.util.ArrayList; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.equipmanage.common.utils.*;
import com.yeejoin.equipmanage.common.vo.AlarmDataVO;
import com.yeejoin.equipmanage.common.vo.AlarmEquipMockDataVO;
import com.yeejoin.equipmanage.common.vo.AlarmListDataVO;
import com.yeejoin.equipmanage.mapper.EquipmentSpecificMapper; import com.yeejoin.equipmanage.mapper.EquipmentSpecificMapper;
import com.yeejoin.equipmanage.service.IEquipmentSpecificAlarmService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -23,20 +24,11 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil; ...@@ -23,20 +24,11 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import javax.servlet.http.HttpServletResponse;
import com.yeejoin.equipmanage.common.utils.CommonPageInfoParam; import java.util.ArrayList;
import com.yeejoin.equipmanage.common.utils.CommonPageParamUtil; import java.util.HashMap;
import com.yeejoin.equipmanage.common.utils.CommonPageable; import java.util.List;
import com.yeejoin.equipmanage.common.utils.CommonRequest; import java.util.Map;
import com.yeejoin.equipmanage.common.utils.CommonResponseUtil;
import com.yeejoin.equipmanage.common.utils.StringUtil;
import com.yeejoin.equipmanage.common.vo.AlarmDataVO;
import com.yeejoin.equipmanage.common.vo.AlarmEquipMockDataVO;
import com.yeejoin.equipmanage.common.vo.AlarmListDataVO;
import com.yeejoin.equipmanage.service.IEquipmentSpecificAlarmService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/** /**
* @author keyong * @author keyong
...@@ -181,6 +173,108 @@ public class EquipmentAlarmController extends AbstractBaseController { ...@@ -181,6 +173,108 @@ public class EquipmentAlarmController extends AbstractBaseController {
} }
/** /**
* 稳压泵跑马灯消息已读列表分页查询
*
* @return
*/
@RequestMapping(value = "/listPage", method = RequestMethod.GET)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "列表分页查询", produces = "application/json;charset=UTF-8", notes = "列表分页查询")
public ResponseModel list(@RequestParam(value = "beginDate", required = false) String beginDate,
@RequestParam(value = "endDate", required = false) String endDate,
@RequestParam(value = "warehouseStructureName", required = false) String warehouseStructureName,
@RequestParam(value = "equipCode", required = false) String equipCode,
@RequestParam(value = "handleStatus", required = false) String handleStatus,
@RequestParam(value = "system", required = false) String system,
@RequestParam(value = "alarmType", required = false) String alarmType,
@RequestParam(value = "type", required = false) String type,
@RequestParam(value = "buildIds", required = false) List<String> buildIds,
@RequestParam(value = "id", required = false) String id,
@RequestParam(value = "cleanStatus", required = false) String cleanStatus,
@RequestParam(value = "isRemoveShield", required = false) String isRemoveShield,
CommonPageable commonPageable) {
if (commonPageable.getPageNumber() == 0) {
commonPageable.setPageNumber(1);
}
ReginParams reginParams = getSelectedOrgInfo();
List<CommonRequest> queryRequests = new ArrayList<>();
CommonRequest request = new CommonRequest();
request.setName("beginDate");
request.setValue(StringUtil.isNotEmpty(beginDate) ? StringUtils.trimToNull(beginDate).substring(0, 10) + " 00:00:00" : null);
queryRequests.add(request);
CommonRequest request1 = new CommonRequest();
request1.setName("endDate");
request1.setValue(StringUtil.isNotEmpty(endDate) ? StringUtils.trimToNull(endDate).substring(0, 10) + " 23:59:59" : null);
queryRequests.add(request1);
CommonRequest request2 = new CommonRequest();
request2.setName("warehouseStructureName");
request2.setValue(StringUtil.isNotEmpty(warehouseStructureName) ? StringUtils.trimToNull(warehouseStructureName) : null);
queryRequests.add(request2);
CommonRequest request3 = new CommonRequest();
request3.setName("equipCode");
request3.setValue(StringUtil.isNotEmpty(equipCode) ? StringUtils.trimToNull(equipCode) : null);
queryRequests.add(request3);
CommonRequest request4 = new CommonRequest();
request4.setName("alarmType");
request4.setValue(StringUtil.isNotEmpty(alarmType) ? StringUtils.trimToNull(alarmType) : null);
queryRequests.add(request4);
CommonRequest request5 = new CommonRequest();
request5.setName("orgCode");
request5.setValue(null);
queryRequests.add(request5);
CommonRequest request6 = new CommonRequest();
request6.setName("handleStatus");
request6.setValue(StringUtil.isNotEmpty(handleStatus) ? StringUtils.trimToNull(handleStatus) : null);
queryRequests.add(request6);
CommonRequest request7 = new CommonRequest();
request7.setName("system");
request7.setValue(StringUtil.isNotEmpty(system) ? StringUtils.trimToNull(system) : null);
queryRequests.add(request7);
CommonRequest request8 = new CommonRequest();
request8.setName("type");
request8.setValue(StringUtil.isNotEmpty(type) ? StringUtils.trimToNull(type) : null);
queryRequests.add(request8);
CommonRequest request9 = new CommonRequest();
request9.setName("buildIds");
request9.setValue(ObjectUtils.isEmpty(buildIds) ? null : buildIds);
queryRequests.add(request9);
CommonRequest request10 = new CommonRequest();
request10.setName("id");
request10.setValue(StringUtil.isNotEmpty(id) ? StringUtils.trimToNull(id) : null);
queryRequests.add(request10);
CommonRequest request11 = new CommonRequest();
request11.setName("cleanStatus");
request11.setValue(StringUtil.isNotEmpty(cleanStatus) ? StringUtils.trimToNull(cleanStatus) : null);
queryRequests.add(request11);
CommonRequest request12 = new CommonRequest();
request12.setName("isRemoveShield");
request12.setValue(StringUtil.isNotEmpty(isRemoveShield) ? StringUtils.trimToNull(isRemoveShield) : null);
queryRequests.add(request12);
if (equioEnabled) {
if (!ValidationUtil.isEmpty(reginParams.getPersonIdentity())) {
CommonRequest request13 = new CommonRequest();
request13.setName("bizOrgCode");
request13.setValue(StringUtil.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null);
queryRequests.add(request13);
}
}else {
CommonRequest request13 = new CommonRequest();
request13.setName("bizOrgCode");
request13.setValue("");
}
CommonPageInfoParam param = CommonPageParamUtil.fillCommonPageInfoParam(queryRequests, commonPageable);
Page<Map<String, Object>> list = iEquipmentSpecificAlarmService.pageList(param);
return CommonResponseUtil.success(list);
}
@RequestMapping(value = "/updateReadStatus", method = RequestMethod.GET)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "修改消息已读状态", produces = "application/json;charset=UTF-8", notes = "修改消息已读状态")
public ResponseModel updateReadStatus(@RequestParam(value = "messageId") String messageId) {
return CommonResponseUtil.success(iEquipmentSpecificAlarmService.updateReadStatus(messageId));
}
/**
* 通过id获取告警详情 * 通过id获取告警详情
* *
* @return * @return
......
package com.yeejoin.equipmanage.controller;
import com.yeejoin.equipmanage.common.entity.FormGroupColumn;
import com.yeejoin.equipmanage.service.IFormGroupColumnService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import java.util.List;
/**
* 动态表单控制器
*
* @author gaojianqiang
* @date 2022-10-09
*/
@RestController
@Api(tags = "动态表单分组列Api")
@RequestMapping(value = "/form-group-column", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public class FormGroupColumnController extends AbstractBaseController {
@Autowired
IFormGroupColumnService formGroupColumnService;
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "通过分组code查询列信息", notes = "通过分组code查询列信息")
@RequestMapping(value = "/queryByGroup", method = RequestMethod.GET)
public List<FormGroupColumn> queryByGroup(@RequestParam String groupCode) {
return formGroupColumnService.queryByGroup(groupCode);
}
}
package com.yeejoin.equipmanage.controller;
import com.yeejoin.equipmanage.common.entity.FormGroupColumn;
import com.yeejoin.equipmanage.common.entity.dto.FormGroupColumnDto;
import com.yeejoin.equipmanage.service.IFormGroupColumnService;
import com.yeejoin.equipmanage.service.IFormInstanceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import java.util.List;
/**
* 动态表单控制器
*
* @author gaojianqiang
* @date 2022-10-09
*/
@RestController
@Api(tags = "动态表单实例Api")
@RequestMapping(value = "/form-instance", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public class FormInstanceController extends AbstractBaseController {
@Autowired
private IFormInstanceService formInstanceService;
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "通过分组code查询列及值信息", notes = "通过分组code查询列及值信息")
@RequestMapping(value = "/queryColumnAndValueByGroup", method = RequestMethod.GET)
public List<FormGroupColumnDto> queryColumnAndValueByGroup(@RequestParam String groupCode, @RequestParam(required = false) Long instanceId) {
return formInstanceService.queryColumnAndValueByGroup(groupCode, instanceId);
}
}
...@@ -219,4 +219,8 @@ public interface EquipmentSpecificAlarmMapper extends BaseMapper<EquipmentSpecif ...@@ -219,4 +219,8 @@ public interface EquipmentSpecificAlarmMapper extends BaseMapper<EquipmentSpecif
Map<String, Object> inspectionMessage(@Param("orgCode") String orgCode Map<String, Object> inspectionMessage(@Param("orgCode") String orgCode
, @Param("startTime") String startTime , @Param("startTime") String startTime
, @Param("endTime") String endTime); , @Param("endTime") String endTime);
Page<Map<String, Object>> fireAlarmLogPage(Page page, @Param("param") CommonPageInfoParam param);
List<Map<String, Object>> alarmTrend(String bizOrgCode);
} }
...@@ -110,4 +110,7 @@ public interface EquipmentSpecificIndexMapper extends BaseMapper<EquipmentSpecif ...@@ -110,4 +110,7 @@ public interface EquipmentSpecificIndexMapper extends BaseMapper<EquipmentSpecif
List<EquipmentSpecificIndex> getEquipmentSpeIndexByIotCodeTrend(String iotCode, Integer isTrend, String fieldKey); List<EquipmentSpecificIndex> getEquipmentSpeIndexByIotCodeTrend(String iotCode, Integer isTrend, String fieldKey);
List<Map<String, Object>> getEquipSpecificScrap();
List<EquipmentSpecificIndex> getEquipIndexInIndex(@Param("list") List<String> listIndex);
} }
...@@ -10,6 +10,7 @@ import com.yeejoin.equipmanage.common.entity.vo.*; ...@@ -10,6 +10,7 @@ import com.yeejoin.equipmanage.common.entity.vo.*;
import com.yeejoin.equipmanage.common.vo.*; import com.yeejoin.equipmanage.common.vo.*;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -300,12 +301,54 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE ...@@ -300,12 +301,54 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
Page<Map<String, Object>> getFireCarInfoByWL(Page page, @Param("bizOrgCode") String bizOrgCode); Page<Map<String, Object>> getFireCarInfoByWL(Page page, @Param("bizOrgCode") String bizOrgCode);
/** /**
* 物联监控页面消防车辆信息
*
* @param carId
* @return
*/
Map<String, Object> getFireCaStartBySeven(@Param("carId") String carId);
/**
* 获取水源信息 * 获取水源信息
* *
* @param bizOrgCode * @param bizOrgCode
* @return * @return
*/ */
Page<Map<String, Object>> getWaterInfo(Page page, @Param("bizOrgCode") String bizOrgCode, @Param("systemCode") String systemCode); Page<Map<String, Object>> getWaterInfo(Page page, @Param("bizOrgCode") String bizOrgCode, @Param("systemCode") String systemCode);
/**
* 获取水源信息(监盘概览)
*
* @param bizOrgCode
* @return
*/
Page<Map<String, Object>> getWaterInfoBySuper(Page page, @Param("bizOrgCode") String bizOrgCode);
/**
* 监盘概览泡沫罐和水箱信息(监盘概览)
* @param page
* @param bizOrgCode
* @return
*/
Page<Map<String, Object>> getFoamTankBySuper(Page page, @Param("bizOrgCode") String bizOrgCode);
/**
* 监盘概览管网压力信息(监盘概览)
* @param page
* @param bizOrgCode
* @return
*/
Page<Map<String, Object>> getPipeNetworkBySuper(Page page, @Param("bizOrgCode") String bizOrgCode);
/**
* 监盘概览水池装置进水流量信息(监盘概览)
* @param page
* @param bizOrgCode
* @return
*/
Page<Map<String, Object>> getInfluentFlowBySuper(Page page, @Param("bizOrgCode") String bizOrgCode);
/** /**
* 获取系统今日告警信息 * 获取系统今日告警信息
* *
...@@ -322,6 +365,13 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE ...@@ -322,6 +365,13 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
List<Map<String, Object>> getFireSystemInfo(HashMap<String, Object> hashMap); List<Map<String, Object>> getFireSystemInfo(HashMap<String, Object> hashMap);
/** /**
* 获取系统状态 大于0异常 小于0正常
* @param hashMap
* @return
*/
Integer getSystemStatus(HashMap<String, Object> hashMap);
/**
* 获取系统近一月告警设备top5 * 获取系统近一月告警设备top5
* *
* @param hashMap * @param hashMap
...@@ -338,6 +388,14 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE ...@@ -338,6 +388,14 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
String equipmentId(HashMap<String, Object> hashMap); String equipmentId(HashMap<String, Object> hashMap);
/** /**
* 获取设备id
*
* @param hashMap
* @return
*/
String equipmentIdBySuper(HashMap<String, Object> hashMap);
/**
* 获取系统设备状态 * 获取系统设备状态
* *
* @param page * @param page
...@@ -347,6 +405,15 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE ...@@ -347,6 +405,15 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
Page<Map<String, Object>> equipmentState(Page page, String id); Page<Map<String, Object>> equipmentState(Page page, String id);
/** /**
* 获取系统设备状态
*
* @param page
* @param id
* @return
*/
Page<Map<String, Object>> equipmentStateBySuper(Page page, String id);
/**
* 稳压泵信息 * 稳压泵信息
* *
* @param page * @param page
...@@ -387,18 +454,25 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE ...@@ -387,18 +454,25 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
List<Map<String, Object>> getSystemAlarmInfoNum(@Param("bizOrgCode") String bizOrgCode); List<Map<String, Object>> getSystemAlarmInfoNum(@Param("bizOrgCode") String bizOrgCode);
/** /**
* 消防水池或者工业水池信息 * 工业水池信息
* @param bizOrgCode * @param bizOrgCode
* @return * @return
*/ */
List<Map<String, Object>> getWaterPoolInfoNum(@Param("bizOrgCode") String bizOrgCode, @Param("poolType") String poolType); List<Map<String, Object>> getWaterIndustryPoolInfoNum(@Param("bizOrgCode") String bizOrgCode);
/** /**
* 消防水源总量统计 * 消防水池信息
* @param companyCode * @param bizOrgCode
* @return * @return
*/ */
Map<String, Object> getWaterPoolVolumeInfo(@Param("companyCode") String companyCode); List<Map<String, Object>> getWaterPoolInfoNum(@Param("bizOrgCode") String bizOrgCode);
// /**
// * 消防水源总量统计
// * @param companyCode
// * @return
// */
// Map<String, Object> getWaterPoolVolumeInfo(@Param("companyCode") String companyCode);
/** /**
* 获取车辆总数 * 获取车辆总数
...@@ -526,4 +600,18 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE ...@@ -526,4 +600,18 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
List<Map<String, Object>> selectDayEchart(@Param("systemId") String systemId, List<Map<String, Object>> selectDayEchart(@Param("systemId") String systemId,
@Param("date") String date, @Param("date") String date,
@Param("indicator") List<String> indicator); @Param("indicator") List<String> indicator);
List<Map<String, Object>> queryStartAndStopBySpecificId(@Param("ids")List<Long> ids);
List<Map<String, Object>> queryStateBySpecificId(@Param("id")long id);
Map<String, Object> getFoamTankLevel(@Param("equipSpeId") Long equipSpeId);
Map<String, Object> getPipeNetwork(@Param("equipSpeId") Long equipSpeId);
Map<String, Object> getWaterPoolLevel(@Param("equipSpeId") Long equipSpeId);
BigDecimal getWaterPoolLevelByEquipSpeId(@Param("equipSpeId") String equipSpeId);
} }
...@@ -212,4 +212,6 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> { ...@@ -212,4 +212,6 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> {
* @return * @return
*/ */
List<String> selectChildListdate(@Param("id")Long id); List<String> selectChildListdate(@Param("id")Long id);
int updateFormFieldValue(@Param("id") Long id, @Param("name") String name, @Param("value") String value);
} }
package com.yeejoin.equipmanage.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.equipmanage.common.entity.MarqueeData;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
@Mapper
public interface MarqueeDataMapper extends BaseMapper<MarqueeData> {
List<Map<String, Object>> selectAll();
}
package com.yeejoin.equipmanage.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.equipmanage.common.entity.SupervisionVideo;
import com.yeejoin.equipmanage.common.entity.vo.AlamVideoVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface SupervisionVideoMapper extends BaseMapper<SupervisionVideo> {
List<AlamVideoVO> getVideoByCompany(@Param("bizOrgCode") String bizOrgCode);
List<String> queryVideoAllId(@Param("bizOrgCode")String bizOrgCode);
}
...@@ -53,7 +53,7 @@ public enum SyncRiskOperator { ...@@ -53,7 +53,7 @@ public enum SyncRiskOperator {
newMap.put("parentId", item.get("parentId")); newMap.put("parentId", item.get("parentId"));
RiskSource riskSource1 = new RiskSource(); RiskSource riskSource1 = new RiskSource();
Map<String, Object> createMap = formInstanceService.createByMap(String.valueOf(item.get("groupCode")), Map<String, Object> createMap = formInstanceService.createByMap(String.valueOf(item.get("groupCode")),
String.valueOf(map.get("companyCode")), newMap); String.valueOf(map.get("companyCode")), newMap, null);
riskSource1.setParentId(Long.parseLong(String.valueOf(map.get("riskPointId")))); riskSource1.setParentId(Long.parseLong(String.valueOf(map.get("riskPointId"))));
riskSource1.setName(String.valueOf(item.get("buildName"))); riskSource1.setName(String.valueOf(item.get("buildName")));
riskSource1.setId(Long.parseLong(String.valueOf(createMap.get("instanceId")))); riskSource1.setId(Long.parseLong(String.valueOf(createMap.get("instanceId"))));
......
package com.yeejoin.equipmanage.quartz;
import com.yeejoin.amos.feign.systemctl.model.MessageModel;
import com.yeejoin.equipmanage.common.entity.EquipmentSpecific;
import com.yeejoin.equipmanage.common.entity.MarqueeData;
import com.yeejoin.equipmanage.common.enums.PressurePumpEnum;
import com.yeejoin.equipmanage.common.enums.PressurePumpMessageEnum;
import com.yeejoin.equipmanage.common.utils.DateUtils;
import com.yeejoin.equipmanage.common.utils.StringUtil;
import com.yeejoin.equipmanage.common.vo.Token;
import com.yeejoin.equipmanage.fegin.SystemctlFeign;
import com.yeejoin.equipmanage.mapper.MarqueeDataMapper;
import com.yeejoin.equipmanage.remote.RemoteSecurityService;
import lombok.extern.slf4j.Slf4j;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import java.text.SimpleDateFormat;
import java.util.*;
@Slf4j
public class PumpSendMessage implements Job {
@Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
try {
Map jobDataMap = (Map) jobExecutionContext.getJobDetail().getJobDataMap().get("parameterList");
String jobName = String.valueOf(jobDataMap.get("jobName"));
String triggerName = String.valueOf(jobDataMap.get("triggerName"));
String triggerGroupName = String.valueOf(jobDataMap.get("triggerGroupName"));
String jobGroupName = String.valueOf(jobDataMap.get("jobGroupName"));
EquipmentSpecific equipmentSpecific = (EquipmentSpecific)jobDataMap.get("equipmentSpecific");
PressurePumpEnum pressurePumpEnum = (PressurePumpEnum)jobDataMap.get("pressurePumpEnum");
SystemctlFeign systemctlFeign = (SystemctlFeign)jobDataMap.get("systemctlFeign");
RemoteSecurityService remoteSecurityService = (RemoteSecurityService)jobDataMap.get("remoteSecurityService");
MarqueeDataMapper marqueeDataMapper = (MarqueeDataMapper)jobDataMap.get("marqueeDataMapper");
MessageModel model = new MessageModel();
model.setSendTime(new Date());
String body = "";
Map<String, String> map = new HashMap<>(4);
String allMessage = PressurePumpMessageEnum.MESSAGE_LEVEL_QT_WJ_YXSC.getAllMessage();
if (StringUtil.isNotEmpty(allMessage)) {
String content = String.format(allMessage, pressurePumpEnum.getRightValue());
map.put("content", content);
map.put("type", "漏水提醒");
map.put("time", new SimpleDateFormat(DateUtils.DATE_TIME_PATTERN).format(new Date()));
map.put("name", equipmentSpecific.getName());
}
String recordMessage = PressurePumpMessageEnum.MESSAGE_LEVEL_QT_WJ_YXSC.getRecordMessage();
if (StringUtil.isNotEmpty(recordMessage)) {
body = String.format(recordMessage, equipmentSpecific.getName(), equipmentSpecific.getPosition(), pressurePumpEnum.getRightValue());
}
String marqueeMessage = PressurePumpMessageEnum.MESSAGE_LEVEL_QT_WJ_YXSC.getMarqueeMessage();
if (StringUtil.isNotEmpty(marqueeMessage)) {
MarqueeData marqueeData = new MarqueeData();
marqueeData.setIsRead(0);
marqueeData.setEquipmentSpecificId(equipmentSpecific.getId());
marqueeData.setMessageType("pressurePump");
marqueeData.setName(equipmentSpecific.getName());
marqueeData.setPosition(equipmentSpecific.getPosition());
marqueeData.setType("漏水提醒");
marqueeData.setCreateDate(new Date());
marqueeDataMapper.insert(marqueeData);
}
model.setBody(body);
model.setTitle("漏水提醒");
model.setExtras(map);
model.setRelationId(String.valueOf(equipmentSpecific.getId()));
model.setMsgType("pressurePump");
model.setIsSendApp(false);
model.setTerminal("WEB");
model.setIsSendWeb(true);
model.setCategory(1);
List<String> receive = new ArrayList<>();
receive.add("system");
model.setRecivers(receive);
Token token = remoteSecurityService.getServerToken();
systemctlFeign.create(token.getAppKey(), token.getProduct(), token.getToke(), model);
QuartzManager.removeJob(jobName,jobGroupName,triggerName,triggerGroupName);
} catch (Exception e) {
log.error("稳压泵运行时常消息发送失败"+ e.getMessage());
}
}
}
package com.yeejoin.equipmanage.quartz;
import org.quartz.*;
import org.quartz.impl.StdSchedulerFactory;
import java.util.Map;
public class QuartzManager {
private static SchedulerFactory gSchedulerFactory = new StdSchedulerFactory();
private static String JOB_GROUP_NAME = "EQUIP_JOBGROUP_NAME";
private static String TRIGGER_GROUP_NAME = "EQUIP_TRIGGERGROUP_NAME";
/**
* @Description: 添加一个定时任务,使用默认的任务组名,触发器名,触发器组名
* @param jobName 任务名
* @param cls 任务
* @param time 时间设置,参考quartz说明文档
*/
public static void addJob(String jobName, Class cls, String time,Object scheduleJob) {
try {
Scheduler sched = gSchedulerFactory.getScheduler();
JobDetail job = JobBuilder.newJob(cls)
.withIdentity(jobName, JOB_GROUP_NAME)
.build();
// 添加具体任务方法
job.getJobDataMap().put("scheduleJob", scheduleJob);
// 表达式调度构建器
CronScheduleBuilder scheduleBuilder = CronScheduleBuilder.cronSchedule(time);
// 按新的cronExpression表达式构建一个新的trigger
Trigger trigger = TriggerBuilder
.newTrigger()
.withIdentity(jobName, TRIGGER_GROUP_NAME)
.withSchedule(scheduleBuilder).build();
//交给scheduler去调度
sched.scheduleJob(job, trigger);
// 启动
if (!sched.isShutdown()) {
sched.start();
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
/**
* @Description: 添加一个定时任务
* @param jobName 任务名
* @param jobGroupName 任务组名
* @param triggerName 触发器名
* @param triggerGroupName 触发器组名
* @param jobClass 任务
* @param time 时间设置,参考quartz说明文档
*/
public static void addJob(String jobName, String jobGroupName,
String triggerName, String triggerGroupName, Class jobClass,
String time, Map<String,Object> parameter) {
try {
Scheduler sched = gSchedulerFactory.getScheduler();
JobDetail job = JobBuilder.newJob(jobClass)
.withIdentity(jobName, jobGroupName)
.build();
job.getJobDataMap().put("parameterList", parameter);
// 表达式调度构建器
CronScheduleBuilder scheduleBuilder = CronScheduleBuilder.cronSchedule(time);
// 按新的cronExpression表达式构建一个新的trigger
Trigger trigger = TriggerBuilder
.newTrigger()
.withIdentity(triggerName, triggerGroupName)
.withSchedule(scheduleBuilder).build();
sched.scheduleJob(job, trigger);
// 启动
if (!sched.isShutdown()) {
sched.start();
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
/**
* @Description: 修改一个任务的触发时间(使用默认的任务组名,触发器名,触发器组名)
* @param jobName
* @param time
*/
public static void modifyJobTime(String jobName, String time) {
TriggerKey triggerKey = TriggerKey.triggerKey(
jobName, TRIGGER_GROUP_NAME);
try {
Scheduler sched = gSchedulerFactory.getScheduler();
CronTrigger trigger =(CronTrigger) sched.getTrigger(triggerKey);
if (trigger == null) {
return;
}
String oldTime = trigger.getCronExpression();
if (!oldTime.equalsIgnoreCase(time)) {
CronScheduleBuilder scheduleBuilder =CronScheduleBuilder.cronSchedule(time);
//按新的cronExpression表达式重新构建trigger
trigger = trigger.getTriggerBuilder().withIdentity(triggerKey)
.withSchedule(scheduleBuilder).build();
//按新的trigger重新设置job执行
sched.rescheduleJob(triggerKey, trigger);
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
/**
* @Description: 修改一个任务的触发时间
* @param triggerName
* @param triggerGroupName
* @param time
* @author qgw
* @date 2016年1月27日 下午4:45:15 ^_^
*/
public static void modifyJobTime(String triggerName,String triggerGroupName, String time) {
TriggerKey triggerKey = TriggerKey.triggerKey(
triggerName, triggerGroupName);
try {
Scheduler sched = gSchedulerFactory.getScheduler();
CronTrigger trigger = (CronTrigger) sched.getTrigger(triggerKey);
if (trigger == null) {
return;
}
String oldTime = trigger.getCronExpression();
if (!oldTime.equalsIgnoreCase(time)) {
// trigger已存在,则更新相应的定时设置
CronScheduleBuilder scheduleBuilder = CronScheduleBuilder
.cronSchedule(time);
// 按新的cronExpression表达式重新构建trigger
trigger = trigger.getTriggerBuilder().withIdentity(triggerKey)
.withSchedule(scheduleBuilder).build();
// 按新的trigger重新设置job执行
sched.resumeTrigger(triggerKey);
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
/**
* @Description 移除一个任务(使用默认的任务组名,触发器名,触发器组名)
* @param jobName
* @author qgw
* @date 2016年1月29日 下午2:21:16 ^_^
*/
public static void removeJob(String jobName) {
TriggerKey triggerKey = TriggerKey.triggerKey(
jobName, TRIGGER_GROUP_NAME);
JobKey jobKey = JobKey.jobKey(jobName, JOB_GROUP_NAME);
try {
Scheduler sched = gSchedulerFactory.getScheduler();
Trigger trigger = (Trigger) sched.getTrigger(triggerKey);
if (trigger == null) {
return;
}
sched.pauseTrigger(triggerKey);;// 停止触发器
sched.unscheduleJob(triggerKey);// 移除触发器
sched.deleteJob(jobKey);// 删除任务
} catch (Exception e) {
throw new RuntimeException(e);
}
}
/**
* @Description: 移除一个任务
* @param jobName
* @param jobGroupName
* @param triggerName
* @param triggerGroupName
* @author qgw
* @date 2016年1月29日 下午2:21:16 ^_^
*/
public static void removeJob(String jobName, String jobGroupName,
String triggerName, String triggerGroupName) {
TriggerKey triggerKey = TriggerKey.triggerKey(
jobName, triggerGroupName);
JobKey jobKey = JobKey.jobKey(jobName, jobGroupName);
try {
Scheduler sched = gSchedulerFactory.getScheduler();
sched.pauseTrigger(triggerKey);// 停止触发器
sched.unscheduleJob(triggerKey);// 移除触发器
sched.deleteJob(jobKey);// 删除任务
} catch (Exception e) {
throw new RuntimeException(e);
}
}
/**
* @Description:暂停一个任务
* @param jobName
* @param jobGroupName
*/
public static void pauseJob(String jobName, String jobGroupName) {
JobKey jobKey =JobKey.jobKey(jobName, jobName);
try {
Scheduler sched = gSchedulerFactory.getScheduler();
sched.pauseJob(jobKey);
} catch (SchedulerException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* @Description:暂停一个任务(使用默认组名)
* @param jobName
*/
public static void pauseJob(String jobName) {
JobKey jobKey =JobKey.jobKey(jobName, JOB_GROUP_NAME);
try {
Scheduler sched = gSchedulerFactory.getScheduler();
sched.pauseJob(jobKey);
} catch (SchedulerException e) {
e.printStackTrace();
}
}
/**
* @Description:启动所有定时任务
* @author qgw
* @date 2016年1月29日 下午2:21:16 ^_^
*/
public static void startJobs() {
try {
Scheduler sched = gSchedulerFactory.getScheduler();
sched.start();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
/**
* @Description 关闭所有定时任务
* @author qgw
* @date 2016年1月25日 下午2:26:54 ^_^
*/
public static void shutdownJobs() {
try {
Scheduler sched = gSchedulerFactory.getScheduler();
if (!sched.isShutdown()) {
sched.shutdown();
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
/**
* 任务是否存在
* @param jobName 任务名
* @param jobGroupName 任务组名
* @return 是否存在
*/
public static boolean checkExists(String jobName, String jobGroupName){
try {
Scheduler sched = gSchedulerFactory.getScheduler();
return sched.checkExists( new JobKey(jobName,
jobGroupName));
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
...@@ -98,7 +98,7 @@ public interface IBuilldService extends IService<Building> { ...@@ -98,7 +98,7 @@ public interface IBuilldService extends IService<Building> {
* @param map form * @param map form
* @return Object * @return Object
*/ */
Object saveForm(String groupCode, String companyCode, Map<String, Object> map); Object saveForm(String groupCode, String companyCode, Map<String, Object> map, String caseId);
/** /**
* 通用表单更新 * 通用表单更新
...@@ -108,7 +108,7 @@ public interface IBuilldService extends IService<Building> { ...@@ -108,7 +108,7 @@ public interface IBuilldService extends IService<Building> {
* @param map form * @param map form
* @return Object * @return Object
*/ */
Object updateForm(Long instanceId, String companyCode, Map<String, Object> map); Object updateForm(Long instanceId, String companyCode, Map<String, Object> map, String groupCode);
/** /**
* 获取 建筑装备树 * 获取 建筑装备树
......
...@@ -91,4 +91,12 @@ public interface IEquipmentSpecificAlarmService extends IService<EquipmentSpecif ...@@ -91,4 +91,12 @@ public interface IEquipmentSpecificAlarmService extends IService<EquipmentSpecif
List<Map<String, Object>> fireFacilitiesList(String bizOrgCode, String startTime, String endTime); List<Map<String, Object>> fireFacilitiesList(String bizOrgCode, String startTime, String endTime);
Map<String, Object> dailyMaintenance(String bizOrgCode,String orgCode, String startTime, String endTime); Map<String, Object> dailyMaintenance(String bizOrgCode,String orgCode, String startTime, String endTime);
Map<String, Object> inspectionMessage(String orgCode, String startTime, String endTime); Map<String, Object> inspectionMessage(String orgCode, String startTime, String endTime);
Page<Map<String, Object>> fireAlarmLogPage(CommonPageInfoParam param);
List<Map<String, Object>> alarmTrend(String bizOrgCode);
Page<Map<String, Object>> pageList(CommonPageInfoParam param);
int updateReadStatus(String messageId);
} }
...@@ -27,4 +27,11 @@ public interface IEquipmentSpecificIndexService extends IService<EquipmentSpecif ...@@ -27,4 +27,11 @@ public interface IEquipmentSpecificIndexService extends IService<EquipmentSpecif
* @Date 2020/11/3 17:58 * @Date 2020/11/3 17:58
*/ */
List<EquipmentSpecificIndex> getEquipmentSpeIndexBySpeIotCode(String iotCode); List<EquipmentSpecificIndex> getEquipmentSpeIndexBySpeIotCode(String iotCode);
/**
* 根据指标key查询列表
* @param listIndex keys
* @return 列表
*/
List<EquipmentSpecificIndex> getEquipmentSpeIndexByIndex(List<String> listIndex);
} }
...@@ -242,12 +242,16 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE ...@@ -242,12 +242,16 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
Map<String, Object> getSystemStatus(HashMap<String, Object> hashMap); Map<String, Object> getSystemStatus(HashMap<String, Object> hashMap);
Integer getSystemStatusBySuper(HashMap<String, Object> hashMap);
Map<String, Object> equipAlarmTOP(HashMap<String, Object> hashMap); Map<String, Object> equipAlarmTOP(HashMap<String, Object> hashMap);
Page<Map<String, Object>> getSmallWaterInfo(Page page, HashMap<String, Object> hashMap); Page<Map<String, Object>> getSmallWaterInfo(Page page, HashMap<String, Object> hashMap);
Page<Map<String, Object>> equipmentState(Page result, HashMap<String, Object> hashMap); Page<Map<String, Object>> equipmentState(Page result, HashMap<String, Object> hashMap);
Page<Map<String, Object>> equipmentStateBySuper(Page result, HashMap<String, Object> hashMap);
Map<String, Object> statisticsByStation(String bizOrgCode); Map<String, Object> statisticsByStation(String bizOrgCode);
Map<String, Object> todayAlarmEquipment(String bizOrgCode); Map<String, Object> todayAlarmEquipment(String bizOrgCode);
......
...@@ -4,8 +4,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -4,8 +4,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.equipmanage.common.entity.FormInstance; import com.yeejoin.equipmanage.common.entity.FormInstance;
import com.yeejoin.equipmanage.common.entity.dto.BuildSearchDTO; import com.yeejoin.equipmanage.common.entity.dto.BuildSearchDTO;
import com.yeejoin.equipmanage.common.entity.dto.FormGroupColumnDto;
import com.yeejoin.equipmanage.common.entity.vo.BuildingVideoListVO; import com.yeejoin.equipmanage.common.entity.vo.BuildingVideoListVO;
import com.yeejoin.equipmanage.common.vo.AreaTreeVo;
import com.yeejoin.equipmanage.common.vo.UnitAreaTreeVo; import com.yeejoin.equipmanage.common.vo.UnitAreaTreeVo;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
...@@ -35,7 +35,7 @@ public interface IFormInstanceService extends IService<FormInstance> { ...@@ -35,7 +35,7 @@ public interface IFormInstanceService extends IService<FormInstance> {
* @param map 字段值对象 * @param map 字段值对象
* @return Map<String, Object> * @return Map<String, Object>
*/ */
Map<String, Object> createByMap(String groupCode, String companyCode, Map<String, Object> map); Map<String, Object> createByMap(String groupCode, String companyCode, Map<String, Object> map, String caseId);
/** /**
* 更新 * 更新
...@@ -172,4 +172,6 @@ public interface IFormInstanceService extends IService<FormInstance> { ...@@ -172,4 +172,6 @@ public interface IFormInstanceService extends IService<FormInstance> {
* @return List<Map < String, Object>> * @return List<Map < String, Object>>
*/ */
List<Map<String, Object>> getSpecialChildrenListByName(String parentId, String bizOrgCode, String name); List<Map<String, Object>> getSpecialChildrenListByName(String parentId, String bizOrgCode, String name);
List<FormGroupColumnDto> queryColumnAndValueByGroup(String groupCode, Long instanceId);
} }
package com.yeejoin.equipmanage.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.equipmanage.common.entity.SupervisionVideo;
import java.util.List;
import java.util.Map;
/**
* @author ZeHua Li
* @date 2020/11/23 15:28
* @since v2.0
*/
public interface ISupervisionVideoService extends IService<SupervisionVideo> {
List queryVideoList(String bizOrgCode);
boolean replaceVideo(Map<String,String> ids, String bizOrgCode);
List<String> queryVideoAllId(String bizOrgCode);
}
...@@ -19,6 +19,7 @@ import com.yeejoin.equipmanage.common.entity.dto.BuildIsRiskDTO; ...@@ -19,6 +19,7 @@ import com.yeejoin.equipmanage.common.entity.dto.BuildIsRiskDTO;
import com.yeejoin.equipmanage.common.entity.dto.BuildSearchDTO; import com.yeejoin.equipmanage.common.entity.dto.BuildSearchDTO;
import com.yeejoin.equipmanage.common.entity.vo.*; import com.yeejoin.equipmanage.common.entity.vo.*;
import com.yeejoin.equipmanage.common.enums.*; import com.yeejoin.equipmanage.common.enums.*;
import com.yeejoin.equipmanage.common.utils.CommonResponseUtil;
import com.yeejoin.equipmanage.common.utils.EnumsUtils; import com.yeejoin.equipmanage.common.utils.EnumsUtils;
import com.yeejoin.equipmanage.common.utils.StringUtil; import com.yeejoin.equipmanage.common.utils.StringUtil;
import com.yeejoin.equipmanage.common.vo.AlarmDataVO; import com.yeejoin.equipmanage.common.vo.AlarmDataVO;
...@@ -45,6 +46,7 @@ import org.springframework.util.CollectionUtils; ...@@ -45,6 +46,7 @@ import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.exception.BaseException; import org.typroject.tyboot.core.foundation.exception.BaseException;
import org.typroject.tyboot.core.foundation.utils.Bean; import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.CommonUtil;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest; import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
...@@ -164,6 +166,8 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -164,6 +166,8 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
final String ALL_BUILDING = "allBuilding"; final String ALL_BUILDING = "allBuilding";
final static String[] list = {"92031900", "92011000", "92010700"};
/** /**
* @param groupCode * @param groupCode
* @Description 根据groupCode查询allowOperation对应的操作菜单 * @Description 根据groupCode查询allowOperation对应的操作菜单
...@@ -298,7 +302,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -298,7 +302,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
} }
@Override @Override
public Object saveForm(String groupCode, String companyCode, Map<String, Object> map) { public Object saveForm(String groupCode, String companyCode, Map<String, Object> map, String caseId) {
final String instanceId = "instanceId"; final String instanceId = "instanceId";
//1.保存表单数据 //1.保存表单数据
//前端的address中携带了经纬度,后台切割保存 //前端的address中携带了经纬度,后台切割保存
...@@ -324,7 +328,10 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -324,7 +328,10 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
// } // }
} }
Map<String, Object> formKeyMap = iFormInstanceService.createByMap(groupCode, companyCode, map); Map<String, Object> formKeyMap = iFormInstanceService.createByMap(groupCode, companyCode, map, caseId);
if (StringUtil.isNotEmpty(caseId)) {
return CommonResponseUtil.success(formKeyMap);
}
if (formKeyMap.get(instanceId) != null) { if (formKeyMap.get(instanceId) != null) {
//2.保存图片 //2.保存图片
this.saveFiles(Long.parseLong(formKeyMap.get("instanceId").toString()), map); this.saveFiles(Long.parseLong(formKeyMap.get("instanceId").toString()), map);
...@@ -356,7 +363,13 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -356,7 +363,13 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
@Override @Override
@Transactional(rollbackFor = {Exception.class, BaseException.class}) @Transactional(rollbackFor = {Exception.class, BaseException.class})
public Object updateForm(Long instanceId, String orgCode, Map<String, Object> map) { public Object updateForm(Long instanceId, String orgCode, Map<String, Object> map, String groupCode) {
if (StringUtil.isNotEmpty(groupCode)) {
map.keySet().forEach(x -> {
formInstanceMapper.updateFormFieldValue(instanceId, x, String.valueOf(map.get(x)));
});
return CommonResponseUtil.success();
}
Long id = formInstanceMapper.getStructureParentId(String.valueOf(instanceId)); Long id = formInstanceMapper.getStructureParentId(String.valueOf(instanceId));
//1.保存图片 //1.保存图片
this.saveFiles(instanceId, map); this.saveFiles(instanceId, map);
...@@ -680,6 +693,15 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -680,6 +693,15 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
@Override @Override
@Transactional @Transactional
public Boolean deleteBuilding(Long instanceId) { public Boolean deleteBuilding(Long instanceId) {
List<FormInstance> lists = formInstanceMapper.selectList(new QueryWrapper<FormInstance>().eq("instance_id", instanceId));
if (0 < lists.size()) {
String groupCode = lists.get(0).getGroupCode();
if (!ValidationUtil.isEmpty(Arrays.stream(list).filter(x -> x.equals(groupCode)).collect(Collectors.toList()))) {
formInstanceMapper.delete(new QueryWrapper<FormInstance>().eq("group_code", groupCode).eq("instance_id", instanceId));
return true;
}
}
List<StockDetail> list = stockDetailMapper.selectList(new QueryWrapper<StockDetail>().eq("warehouse_structure_id", instanceId)); List<StockDetail> list = stockDetailMapper.selectList(new QueryWrapper<StockDetail>().eq("warehouse_structure_id", instanceId));
if (list != null && list.size() > 0) { if (list != null && list.size() > 0) {
throw new BadRequest("该建筑存在入库装备,无法直接删除"); throw new BadRequest("该建筑存在入库装备,无法直接删除");
......
...@@ -143,6 +143,8 @@ public class EquipmentDetailServiceImpl extends ServiceImpl<EquipmentDetailMappe ...@@ -143,6 +143,8 @@ public class EquipmentDetailServiceImpl extends ServiceImpl<EquipmentDetailMappe
equipmentDetail.setVideo(getEquipFileList(id, FileTypeEnum.video.toString())); equipmentDetail.setVideo(getEquipFileList(id, FileTypeEnum.video.toString()));
equipmentDetail.setCertification(getEquipFileList(id, FileTypeEnum.certificate.toString())); equipmentDetail.setCertification(getEquipFileList(id, FileTypeEnum.certificate.toString()));
equipmentDetail.setInstruction(getEquipFileList(id, FileTypeEnum.instruction.toString())); equipmentDetail.setInstruction(getEquipFileList(id, FileTypeEnum.instruction.toString()));
equipmentDetail.setQuality(getEquipFileList(id, FileTypeEnum.quality.toString()));
equipmentDetail.setOperation(getEquipFileList(id, FileTypeEnum.operation.toString()));
if (equipmentDetail.getCountry() != null) { if (equipmentDetail.getCountry() != null) {
equipmentDetail.setCountryName( equipmentDetail.setCountryName(
iSystemDicService.getOne(new QueryWrapper<SystemDic>().eq("id", equipmentDetail.getCountry())).getName()); iSystemDicService.getOne(new QueryWrapper<SystemDic>().eq("id", equipmentDetail.getCountry())).getName());
...@@ -225,6 +227,8 @@ public class EquipmentDetailServiceImpl extends ServiceImpl<EquipmentDetailMappe ...@@ -225,6 +227,8 @@ public class EquipmentDetailServiceImpl extends ServiceImpl<EquipmentDetailMappe
fileList.addAll(fillFileList(equipmentDetail.getVideo(), equipmentDetail.getId(), FileTypeEnum.video.toString())); fileList.addAll(fillFileList(equipmentDetail.getVideo(), equipmentDetail.getId(), FileTypeEnum.video.toString()));
fileList.addAll(fillFileList(equipmentDetail.getCertification(), equipmentDetail.getId(), FileTypeEnum.certificate.toString())); fileList.addAll(fillFileList(equipmentDetail.getCertification(), equipmentDetail.getId(), FileTypeEnum.certificate.toString()));
fileList.addAll(fillFileList(equipmentDetail.getInstruction(), equipmentDetail.getId(), FileTypeEnum.instruction.toString())); fileList.addAll(fillFileList(equipmentDetail.getInstruction(), equipmentDetail.getId(), FileTypeEnum.instruction.toString()));
fileList.addAll(fillFileList(equipmentDetail.getQuality(), equipmentDetail.getId(), FileTypeEnum.quality.toString()));
fileList.addAll(fillFileList(equipmentDetail.getOperation(), equipmentDetail.getId(), FileTypeEnum.operation.toString()));
iUploadFileService.saveBatch(fileList); iUploadFileService.saveBatch(fileList);
} }
......
...@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; ...@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.yeejoin.amos.boot.biz.common.excel.ExcelUtil; import com.yeejoin.amos.boot.biz.common.excel.ExcelUtil;
import com.yeejoin.amos.feign.systemctl.model.MessageModel;
import com.yeejoin.equipmanage.common.datasync.entity.FireEquipmentFireAlarm; import com.yeejoin.equipmanage.common.datasync.entity.FireEquipmentFireAlarm;
import com.yeejoin.equipmanage.common.dto.OrgUsrDto; import com.yeejoin.equipmanage.common.dto.OrgUsrDto;
import com.yeejoin.equipmanage.common.entity.*; import com.yeejoin.equipmanage.common.entity.*;
...@@ -21,7 +22,9 @@ import com.yeejoin.equipmanage.common.utils.DateUtils; ...@@ -21,7 +22,9 @@ import com.yeejoin.equipmanage.common.utils.DateUtils;
import com.yeejoin.equipmanage.common.utils.StringUtil; import com.yeejoin.equipmanage.common.utils.StringUtil;
import com.yeejoin.equipmanage.common.vo.*; import com.yeejoin.equipmanage.common.vo.*;
import com.yeejoin.equipmanage.fegin.JcsFeign; import com.yeejoin.equipmanage.fegin.JcsFeign;
import com.yeejoin.equipmanage.fegin.SystemctlFeign;
import com.yeejoin.equipmanage.mapper.*; import com.yeejoin.equipmanage.mapper.*;
import com.yeejoin.equipmanage.remote.RemoteSecurityService;
import com.yeejoin.equipmanage.service.*; import com.yeejoin.equipmanage.service.*;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -38,8 +41,6 @@ import java.net.NetworkInterface; ...@@ -38,8 +41,6 @@ import java.net.NetworkInterface;
import java.net.SocketException; import java.net.SocketException;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalAccessor;
import java.util.*; import java.util.*;
...@@ -81,6 +82,13 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec ...@@ -81,6 +82,13 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
@Autowired @Autowired
private ISignalClassifyService signalClassifyService; private ISignalClassifyService signalClassifyService;
@Autowired
MarqueeDataMapper marqueeDataMapper;
@Autowired
private RemoteSecurityService remoteSecurityService;
@Autowired
private SystemctlFeign systemctlFeign;
@Value("${window.vedioFormat}") @Value("${window.vedioFormat}")
String vedioFormat; String vedioFormat;
...@@ -182,8 +190,8 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec ...@@ -182,8 +190,8 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
Page<Map<String, Object>> resultPage = this.baseMapper.page(result, param); Page<Map<String, Object>> resultPage = this.baseMapper.page(result, param);
if (resultPage.getTotal() > 0) { if (resultPage.getTotal() > 0) {
for (Map<String, Object> x : resultPage.getRecords()) { for (Map<String, Object> x : resultPage.getRecords()) {
LocalDateTime createDate = (LocalDateTime) x.get("createDate"); // LocalDateTime createDate = (LocalDateTime) x.get("createDate");
x.put("createDate", Date.from(createDate.atZone(ZoneId.systemDefault()).toInstant())); // x.put("createDate", Date.from(createDate.atZone(ZoneId.systemDefault()).toInstant()));
if (ObjectUtils.isEmpty(x.get("handleType"))) { if (ObjectUtils.isEmpty(x.get("handleType"))) {
x.put("handleType", null); x.put("handleType", null);
} else { } else {
...@@ -728,4 +736,66 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec ...@@ -728,4 +736,66 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
public Map<String, Object> inspectionMessage(String orgCode, String startTime, String endTime) { public Map<String, Object> inspectionMessage(String orgCode, String startTime, String endTime) {
return equipmentSpecificAlarmMapper.inspectionMessage(orgCode, startTime, endTime); return equipmentSpecificAlarmMapper.inspectionMessage(orgCode, startTime, endTime);
} }
@Override
public Page<Map<String, Object>> fireAlarmLogPage(CommonPageInfoParam param) {
Page result = new Page<>(param.getPageNumber(), param.getPageSize());
return this.baseMapper.fireAlarmLogPage(result, param);
}
@Override
public List<Map<String, Object>> alarmTrend(String bizOrgCode) {
return this.baseMapper.alarmTrend(bizOrgCode);
}
@Override
public Page<Map<String, Object>> pageList(CommonPageInfoParam param) {
Page result = new Page<>(param.getPageNumber(), param.getPageSize());
if (AlarmTypeEnum.GZGJ.getCode().equals(param.getAlarmType())) {
param.setAlarmType("");
param.setIsFireAlarm("false");
}
Page<Map<String, Object>> resultPage = this.baseMapper.page(result, param);
if (resultPage.getTotal() > 0) {
for (Map<String, Object> x : resultPage.getRecords()) {
// LocalDateTime createDate = (LocalDateTime) x.get("createDate");
// x.put("createDate", Date.from(createDate.atZone(ZoneId.systemDefault()).toInstant()));
if (ObjectUtils.isEmpty(x.get("handleType"))) {
x.put("handleType", null);
} else {
String handleType = ConfirmAlamEnum.getTypeByCode(String.valueOf(x.get("handleType")));
x.put("handleType", StringUtil.isNotEmpty(handleType) ? handleType : signalClassifyService.getTypeNameByCode(String.valueOf(x.get("handleType"))).getTypeName());
}
// 冗余统一跑马灯显示字段取值
x.put("equipmentSpecificIndexName", x.get("fireEquipmentSpecificIndexName"));
}
}
List<Map<String, Object>> list = marqueeDataMapper.selectAll();
List<Map<String, Object>> records = resultPage.getRecords();
for (Map<String, Object> stringObjectMap : list) {
records.add(stringObjectMap);
}
records.sort((t1, t2) -> t2.get("createDate").toString().compareTo(t1.get("createDate").toString()));
return resultPage;
}
@Override
public int updateReadStatus(String messageId) {
MarqueeData marqueeData = marqueeDataMapper.selectById(messageId);
marqueeData.setIsRead(1);
int i = marqueeDataMapper.updateById(marqueeData);
MessageModel model = new MessageModel();
model.setMsgType("pressurePump");
model.setSendTime(new Date());
model.setIsSendWeb(true);
model.setCategory(1);
model.setIsSendApp(false);
model.setTerminal("WEB");
Map<String, String> ext = new HashMap<>();
ext.put("isRead", "1");
model.setExtras(ext);
Token token = remoteSecurityService.getServerToken();
systemctlFeign.create(token.getAppKey(), token.getProduct(), token.getToke(), model);
return i;
}
} }
package com.yeejoin.equipmanage.service.impl; package com.yeejoin.equipmanage.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yeejoin.equipmanage.common.entity.EquipmentSpecificIndex; import com.yeejoin.equipmanage.common.entity.EquipmentSpecificIndex;
import com.yeejoin.equipmanage.mapper.EquipmentSpecificIndexMapper; import com.yeejoin.equipmanage.mapper.EquipmentSpecificIndexMapper;
...@@ -23,4 +24,9 @@ public class EquipmentSpecificIndexServiceImpl extends ServiceImpl<EquipmentSpec ...@@ -23,4 +24,9 @@ public class EquipmentSpecificIndexServiceImpl extends ServiceImpl<EquipmentSpec
public List<EquipmentSpecificIndex> getEquipmentSpeIndexBySpeIotCode(String iotCode) { public List<EquipmentSpecificIndex> getEquipmentSpeIndexBySpeIotCode(String iotCode) {
return this.baseMapper.getEquipmentSpeIndexBySpeIotCode(iotCode); return this.baseMapper.getEquipmentSpeIndexBySpeIotCode(iotCode);
} }
@Override
public List<EquipmentSpecificIndex> getEquipmentSpeIndexByIndex(List<String> listIndex) {
return this.baseMapper.getEquipIndexInIndex(listIndex);
}
} }
...@@ -6,11 +6,14 @@ import java.util.*; ...@@ -6,11 +6,14 @@ import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.yeejoin.amos.feign.systemctl.Systemctl;
import com.yeejoin.amos.feign.systemctl.model.MessageModel;
import com.yeejoin.equipmanage.common.entity.vo.*; import com.yeejoin.equipmanage.common.entity.vo.*;
import com.yeejoin.equipmanage.common.utils.CommonResponseUtil;
import com.yeejoin.equipmanage.common.vo.*; import com.yeejoin.equipmanage.common.vo.*;
import com.yeejoin.equipmanage.fegin.IotFeign; import com.yeejoin.equipmanage.fegin.SystemctlFeign;
import com.yeejoin.equipmanage.mapper.*; import com.yeejoin.equipmanage.mapper.*;
import com.yeejoin.equipmanage.remote.RemoteSecurityService;
import com.yeejoin.equipmanage.service.*;
import org.apache.catalina.util.IOTools; import org.apache.catalina.util.IOTools;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -18,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -18,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
...@@ -73,28 +77,6 @@ import com.yeejoin.equipmanage.common.exception.BaseException; ...@@ -73,28 +77,6 @@ import com.yeejoin.equipmanage.common.exception.BaseException;
import com.yeejoin.equipmanage.common.utils.DateUtils; import com.yeejoin.equipmanage.common.utils.DateUtils;
import com.yeejoin.equipmanage.common.utils.QRCodeUtil; import com.yeejoin.equipmanage.common.utils.QRCodeUtil;
import com.yeejoin.equipmanage.common.utils.StringUtil; import com.yeejoin.equipmanage.common.utils.StringUtil;
import com.yeejoin.equipmanage.service.ICarService;
import com.yeejoin.equipmanage.service.IEquPropertyService;
import com.yeejoin.equipmanage.service.IEquipmentCategoryService;
import com.yeejoin.equipmanage.service.IEquipmentDetailService;
import com.yeejoin.equipmanage.service.IEquipmentIndexService;
import com.yeejoin.equipmanage.service.IEquipmentService;
import com.yeejoin.equipmanage.service.IEquipmentSpecificAlarmService;
import com.yeejoin.equipmanage.service.IEquipmentSpecificIndexSerivce;
import com.yeejoin.equipmanage.service.IEquipmentSpecificSerivce;
import com.yeejoin.equipmanage.service.IEquipmentSystemSourceStatisticsService;
import com.yeejoin.equipmanage.service.IFireFightingSystemService;
import com.yeejoin.equipmanage.service.IStockBillDetailService;
import com.yeejoin.equipmanage.service.IStockBillService;
import com.yeejoin.equipmanage.service.IStockDetailService;
import com.yeejoin.equipmanage.service.IStockService;
import com.yeejoin.equipmanage.service.ISyncDataService;
import com.yeejoin.equipmanage.service.ISystemDicService;
import com.yeejoin.equipmanage.service.IUploadFileService;
import com.yeejoin.equipmanage.service.IVideoEquipmentSpecificService;
import com.yeejoin.equipmanage.service.IVideoService;
import com.yeejoin.equipmanage.service.IWarehouseService;
import com.yeejoin.equipmanage.service.IWarehouseStructureService;
import com.yeejoin.equipmanage.utils.RelationRedisUtil; import com.yeejoin.equipmanage.utils.RelationRedisUtil;
import org.typroject.tyboot.core.foundation.utils.DateTimeUtil; import org.typroject.tyboot.core.foundation.utils.DateTimeUtil;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
...@@ -118,6 +100,10 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -118,6 +100,10 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
@Autowired @Autowired
IEquPropertyService equPropertyService; IEquPropertyService equPropertyService;
@Autowired @Autowired
private RemoteSecurityService remoteSecurityService;
@Autowired
private SystemctlFeign systemctlFeign;
@Autowired
@Lazy @Lazy
IEquipmentSpecificIndexSerivce equipmentSpecificIndexSerivce; IEquipmentSpecificIndexSerivce equipmentSpecificIndexSerivce;
@Autowired @Autowired
...@@ -173,6 +159,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -173,6 +159,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
@Autowired @Autowired
private IVideoEquipmentSpecificService videoEquipmentSpecificService; private IVideoEquipmentSpecificService videoEquipmentSpecificService;
@Autowired
private IFormInstanceService formInstanceService;
@Value("${systemctl.dict.iot-core-param}") @Value("${systemctl.dict.iot-core-param}")
private String iotCoreParam; private String iotCoreParam;
...@@ -182,6 +171,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -182,6 +171,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
@Value("${equipment.type}") @Value("${equipment.type}")
String equipmentCategoryLeftTypeCode; String equipmentCategoryLeftTypeCode;
@Value("${equipment.scrap.day}")
String equipmentScrapDay;
@Autowired @Autowired
private ISyncDataService syncDataService; private ISyncDataService syncDataService;
...@@ -447,6 +439,8 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -447,6 +439,8 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
fileList.addAll(fillFileList(equipmentDetail.getVideo(), equipmentDetail.getId(), FileTypeEnum.video.toString())); fileList.addAll(fillFileList(equipmentDetail.getVideo(), equipmentDetail.getId(), FileTypeEnum.video.toString()));
fileList.addAll(fillFileList(equipmentDetail.getCertification(), equipmentDetail.getId(), FileTypeEnum.certificate.toString())); fileList.addAll(fillFileList(equipmentDetail.getCertification(), equipmentDetail.getId(), FileTypeEnum.certificate.toString()));
fileList.addAll(fillFileList(equipmentDetail.getInstruction(), equipmentDetail.getId(), FileTypeEnum.instruction.toString())); fileList.addAll(fillFileList(equipmentDetail.getInstruction(), equipmentDetail.getId(), FileTypeEnum.instruction.toString()));
fileList.addAll(fillFileList(equipmentDetail.getQuality(), equipmentDetail.getId(), FileTypeEnum.quality.toString()));
fileList.addAll(fillFileList(equipmentDetail.getOperation(), equipmentDetail.getId(), FileTypeEnum.operation.toString()));
iUploadFileService.saveBatch(fileList); iUploadFileService.saveBatch(fileList);
} }
equipmentDetailService.saveOrUpdateBatch(equipmentDetails); equipmentDetailService.saveOrUpdateBatch(equipmentDetails);
...@@ -1023,7 +1017,8 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -1023,7 +1017,8 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
equipmentDetailService.removeById(equipmentSpecific.getEquipmentDetailId()); equipmentDetailService.removeById(equipmentSpecific.getEquipmentDetailId());
} }
if (res > 0) { if (res > 0) {
return true; // 删除设备动态表单扩展属性
return formInstanceService.deleteInstanceById(id);
} else { } else {
return false; return false;
} }
...@@ -1822,4 +1817,75 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -1822,4 +1817,75 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
return infoVoList; return infoVoList;
} }
/**
* 在设备报废前30日 每日9点执行 系统推送提醒。设备报废后停止消息推送提醒。。
*
* @throws Exception
*/
@Scheduled(cron = "${equipment.scrap.cron}")
@Transactional(rollbackFor = Exception.class)
public void equipmentScrap() throws Exception {
List<Map<String, Object>> equipSpecificScrap = equipmentSpecificIndexMapper.getEquipSpecificScrap();
equipSpecificScrap.forEach(e->{
try {
int year = e.get("weExpiry") != null ? Integer.parseInt(e.get("weExpiry").toString()) : Integer.parseInt(e.get("wesExpiry").toString());
Date productDate = DateUtils.dateParse(e.get("product").toString(),"yyyy-MM-dd'T'HH:mm");
Calendar calendar = Calendar.getInstance();
calendar.setTime(productDate);
calendar.add(Calendar.YEAR, year);
Date now = new Date();
String scrapTime = new SimpleDateFormat(DateUtils.DATE_TIME_PATTERN).format(calendar.getTime());
int i = -1;
while (now.after(calendar.getTime())) {
calendar.add(Calendar.DAY_OF_MONTH,1);
i++;
}
if(i < Integer.parseInt(equipmentScrapDay) && i > -1) {
syncSystemctlMsg(e, scrapTime,i);
}
} catch (ParseException parseException) {
parseException.printStackTrace();
}
});
}
void syncSystemctlMsg(Map<String, Object> map,String scrapTime, int i) {
try {
MessageModel model = new MessageModel();
model.setTitle("报废到期提醒");
String equipName = map.get("name").toString();
String location = map.get("sname").toString() + map.get("position").toString() ;
String body = String.format("%s-%s于%s报废,请提前更换处理", equipName, location, scrapTime);
String join = String.format("设备还剩%s天报废,请提前更换", i);
model.setBody(body);
model.setMsgType("scrapWarning");
model.setSendTime(new Date());
model.setIsSendApp(false);
model.setTerminal("WEB");
model.setIsSendWeb(true);
model.setRelationId(map.get("id").toString());
model.setCategory(1);
List<String> receive = new ArrayList<>();
receive.add("system");
Map<String, String> ext = new HashMap<>();
ext.put("content", join);
ext.put("type", "报废到期");
ext.put("name", map.get("name").toString());
ext.put("time", new SimpleDateFormat(DateUtils.DATE_TIME_PATTERN).format(new Date()));
model.setExtras(ext);
model.setRecivers(receive);
// Systemctl.messageClient.create(model);
Token token = remoteSecurityService.getServerToken();
systemctlFeign.create(token.getAppKey(), token.getProduct(), token.getToke(), model);
} catch (Exception e) {
e.printStackTrace();
}
}
} }
...@@ -1290,6 +1290,12 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -1290,6 +1290,12 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
} }
@Override @Override
public Integer getSystemStatusBySuper(HashMap<String, Object> hashMap) {
Integer systemStatus = fireFightingSystemMapper.getSystemStatus(hashMap);
return systemStatus;
}
@Override
public Map<String, Object> getSystemName(HashMap<String, Object> hashMap) { public Map<String, Object> getSystemName(HashMap<String, Object> hashMap) {
Map<String, Object> resultMap = new HashMap<>(); Map<String, Object> resultMap = new HashMap<>();
List<Map<String, Object>> map = fireFightingSystemMapper.getFireSystemInfo(hashMap); List<Map<String, Object>> map = fireFightingSystemMapper.getFireSystemInfo(hashMap);
...@@ -1332,6 +1338,17 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -1332,6 +1338,17 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
} }
@Override @Override
public Page<Map<String, Object>> equipmentStateBySuper(Page res, HashMap<String, Object> hashMap) {
Page result = new Page<>(res.getCurrent(), res.getSize());
String id = fireFightingSystemMapper.equipmentIdBySuper(hashMap);
if (!StringUtil.isNotEmpty(id)) {
return null;
}
Page<Map<String, Object>> mapPage = fireFightingSystemMapper.equipmentStateBySuper(result, id);
return mapPage;
}
@Override
public Page<Map<String, Object>> getSmallWaterInfo(Page page, HashMap<String, Object> hashMap) { public Page<Map<String, Object>> getSmallWaterInfo(Page page, HashMap<String, Object> hashMap) {
String bizOrgCode = null; String bizOrgCode = null;
String systemCode = null; String systemCode = null;
...@@ -1442,8 +1459,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -1442,8 +1459,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
List<Map<String, Object>> carInfo = fireFightingSystemMapper.getCarInfo(bizOrgCode); List<Map<String, Object>> carInfo = fireFightingSystemMapper.getCarInfo(bizOrgCode);
bigScreenVo.setCarNumInfo(carInfo); bigScreenVo.setCarNumInfo(carInfo);
List<Map<String, Object>> systemAlarmInfoNum = fireFightingSystemMapper.getSystemAlarmInfoNum(bizOrgCode); List<Map<String, Object>> systemAlarmInfoNum = fireFightingSystemMapper.getSystemAlarmInfoNum(bizOrgCode);
List<Map<String, Object>> pool = fireFightingSystemMapper.getWaterPoolInfoNum(bizOrgCode, "pool"); List<Map<String, Object>> pool = fireFightingSystemMapper.getWaterPoolInfoNum(bizOrgCode);
List<Map<String, Object>> industryPool = fireFightingSystemMapper.getWaterPoolInfoNum(bizOrgCode, "industryPool"); List<Map<String, Object>> industryPool = fireFightingSystemMapper.getWaterIndustryPoolInfoNum(bizOrgCode);
bigScreenVo.setSystemAlarmInfoNum(systemAlarmInfoNum); bigScreenVo.setSystemAlarmInfoNum(systemAlarmInfoNum);
bigScreenVo.setIndustryPool(industryPool); bigScreenVo.setIndustryPool(industryPool);
bigScreenVo.setPool(pool); bigScreenVo.setPool(pool);
......
...@@ -13,6 +13,7 @@ import com.yeejoin.equipmanage.common.entity.FormGroupColumn; ...@@ -13,6 +13,7 @@ import com.yeejoin.equipmanage.common.entity.FormGroupColumn;
import com.yeejoin.equipmanage.common.entity.FormInstance; import com.yeejoin.equipmanage.common.entity.FormInstance;
import com.yeejoin.equipmanage.common.entity.SourceFile; import com.yeejoin.equipmanage.common.entity.SourceFile;
import com.yeejoin.equipmanage.common.entity.dto.BuildSearchDTO; import com.yeejoin.equipmanage.common.entity.dto.BuildSearchDTO;
import com.yeejoin.equipmanage.common.entity.dto.FormGroupColumnDto;
import com.yeejoin.equipmanage.common.entity.vo.BuildingVideoListVO; import com.yeejoin.equipmanage.common.entity.vo.BuildingVideoListVO;
import com.yeejoin.equipmanage.common.enums.GroupCodeEnum; import com.yeejoin.equipmanage.common.enums.GroupCodeEnum;
import com.yeejoin.equipmanage.common.enums.GroupColumnDataType; import com.yeejoin.equipmanage.common.enums.GroupColumnDataType;
...@@ -23,6 +24,7 @@ import com.yeejoin.equipmanage.mapper.FormInstanceMapper; ...@@ -23,6 +24,7 @@ import com.yeejoin.equipmanage.mapper.FormInstanceMapper;
import com.yeejoin.equipmanage.remote.RemoteSecurityService; import com.yeejoin.equipmanage.remote.RemoteSecurityService;
import com.yeejoin.equipmanage.service.*; import com.yeejoin.equipmanage.service.*;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -81,12 +83,14 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For ...@@ -81,12 +83,14 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For
private final String ORGCODE = "orgCode"; private final String ORGCODE = "orgCode";
final static String[] list = {"92031900", "92011000", "92010700"};
@Value("${systemctl.sync.switch}") @Value("${systemctl.sync.switch}")
private Boolean syncSwitch; private Boolean syncSwitch;
@Override @Override
@Transactional(rollbackFor = {BaseException.class, Exception.class}) @Transactional(rollbackFor = {BaseException.class, Exception.class})
public Map<String, Object> createByMap(String groupCode, String companyCode, Map<String, Object> map) { public Map<String, Object> createByMap(String groupCode, String companyCode, Map<String, Object> map, String caseId) {
//1.查询分组表数据,数据准备用 //1.查询分组表数据,数据准备用
Map<String, Object> returnMap = new HashMap<>(); Map<String, Object> returnMap = new HashMap<>();
FormGroup formGroup = iFormGroupService.getByUniqueKey(groupCode); FormGroup formGroup = iFormGroupService.getByUniqueKey(groupCode);
...@@ -96,6 +100,10 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For ...@@ -96,6 +100,10 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For
return returnMap; return returnMap;
} }
Long instanceId = sequence.nextId(); Long instanceId = sequence.nextId();
if (!ValidationUtil.isEmpty(Arrays.stream(list).filter(x -> x.equals(groupCode)).collect(Collectors.toList()))) {
instanceId = Long.valueOf(caseId);
returnMap.put("code", sequence.nextId());
}
String groupType = formGroup.getGroupType(); String groupType = formGroup.getGroupType();
List<FormInstance> entities = new ArrayList<>(); List<FormInstance> entities = new ArrayList<>();
//3.以数据库现在配置的动态表单字段为准,进行数据插入的准备 //3.以数据库现在配置的动态表单字段为准,进行数据插入的准备
...@@ -564,4 +572,22 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For ...@@ -564,4 +572,22 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For
public List<Map<String, Object>> getSpecialChildrenListByName(String parentId, String bizOrgCode, String name) { public List<Map<String, Object>> getSpecialChildrenListByName(String parentId, String bizOrgCode, String name) {
return this.baseMapper.querySpecialChildrenListByName(parentId, bizOrgCode, name); return this.baseMapper.querySpecialChildrenListByName(parentId, bizOrgCode, name);
} }
@Override
public List<FormGroupColumnDto> queryColumnAndValueByGroup(String groupCode, Long instanceId) {
List<FormGroupColumnDto> list = new ArrayList<>();
List<FormGroupColumn> columnList = iFormGroupColumnService.queryByGroup(groupCode);
if (!CollectionUtils.isEmpty(columnList)) {
Map<String, Object> map = queryForMap(instanceId);
columnList.forEach(x -> {
FormGroupColumnDto dto = new FormGroupColumnDto();
BeanUtils.copyProperties(x, dto);
if (!map.isEmpty()) {
dto.setFieldValue(map.get(dto.getFieldName()).toString());
}
list.add(dto);
});
}
return list;
}
} }
package com.yeejoin.equipmanage.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yeejoin.equipmanage.common.entity.SupervisionVideo;
import com.yeejoin.equipmanage.common.entity.vo.AlamVideoVO;
import com.yeejoin.equipmanage.mapper.SupervisionVideoMapper;
import com.yeejoin.equipmanage.service.ISupervisionVideoService;
import com.yeejoin.equipmanage.service.IVideoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.UUID;
@Slf4j
@Service
//@EnableAsync
public class SupervisionVideoServiceImpl extends ServiceImpl<SupervisionVideoMapper, SupervisionVideo> implements ISupervisionVideoService {
@Autowired
SupervisionVideoMapper supervisionVideoMapper;
@Value("${window.vedioFormat}")
String vedioFormat;
@Autowired
private IVideoService videoService;
@Override
public List<List<AlamVideoVO>> queryVideoList(String bizOrgCode) {
List<List<AlamVideoVO>> resList = new ArrayList<>();
List<AlamVideoVO> list = supervisionVideoMapper.getVideoByCompany(bizOrgCode);
list.forEach(action -> {
action.setVedioFormat(vedioFormat);
action.setUrl(videoService.getVideoUrl(action.getName(), action.getPresetPosition(), action.getUrl(), action.getCode()));
});
List<AlamVideoVO> mapList = new ArrayList<>();
for (int i = 0; i < list.size(); i++) {
if (list.size() > 1 && ((i+1) % 2) - 1 != 0 && i != 0) {
mapList.add(list.get(i));
resList.add(mapList);
mapList = new ArrayList<>();
} else {
mapList.add(list.get(i));
if (i == list.size() - 1) {
resList.add(mapList);
}
}
}
return resList;
}
@Override
public boolean replaceVideo(Map<String,String> map, String bizOrgCode) {
supervisionVideoMapper.delete(new QueryWrapper<SupervisionVideo>().eq("biz_org_code",bizOrgCode));
List<SupervisionVideo> list = new ArrayList<>();
String ids = map.get("ids");
for (String s : ids.split(",")) {
SupervisionVideo supervisionVideo = new SupervisionVideo();
supervisionVideo.setCameraId(s);
supervisionVideo.setBizOrgCode(bizOrgCode);
supervisionVideo.setId(Long.valueOf(String.valueOf(UUID.randomUUID().getLeastSignificantBits()).replace("-", "")));
list.add(supervisionVideo);
}
return saveBatch(list);
}
@Override
public List<String> queryVideoAllId(String bizOrgCode) {
return supervisionVideoMapper.queryVideoAllId(bizOrgCode);
}
}
...@@ -1340,7 +1340,7 @@ public class ExcelServiceImpl { ...@@ -1340,7 +1340,7 @@ public class ExcelServiceImpl {
if (item.getLevelDeviceName() != null) { if (item.getLevelDeviceName() != null) {
String[] type = item.getLevelDeviceName().split("@"); String[] type = item.getLevelDeviceName().split("@");
item.setLevelDeviceName(type[0]); item.setLevelDeviceName(type[0]);
item.setLevelDeviceId(Long.valueOf(type[1])); item.setLevelDeviceId(type[1]);
} }
// BUG 2935 优化项 分类从93060000 取得字典数据 by kongfm 2021-09-17 // BUG 2935 优化项 分类从93060000 取得字典数据 by kongfm 2021-09-17
if (item.getEquipCategoryName() != null) { if (item.getEquipCategoryName() != null) {
......
package com.yeejoin.amos;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
@Configuration
@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
// 授权
@Override
protected void configure(HttpSecurity http) throws Exception {
http.csrf().disable()
.headers()
.frameOptions()
.disable()
.and()
.authorizeRequests()
.regexMatchers("^(?!/actuator).*$").permitAll()
.regexMatchers("/actuator/health").permitAll()
.regexMatchers("/actuator/info").permitAll()
.anyRequest().authenticated().and()
.formLogin();
}
}
...@@ -101,3 +101,12 @@ iot.code.prefix.have.used= ...@@ -101,3 +101,12 @@ iot.code.prefix.have.used=
#是否向iot推送消息 #是否向iot推送消息
isSendIot=false isSendIot=false
#报废前30日 发起提醒
equipment.scrap.day=30
#提醒时间
equipment.scrap.cron=0 0 9 * * ?
# 稳压泵启动信号
equipment.pressurepump.start=FHS_PressurePump_Start
# 稳压泵停止信号
equipment.pressurepump.stop=FHS_PressurePump_Stop
...@@ -118,4 +118,9 @@ redis_equip_type_count = equipTypeAndCount ...@@ -118,4 +118,9 @@ redis_equip_type_count = equipTypeAndCount
auth-key-fire-iot-equip=fire_iot-equip_info auth-key-fire-iot-equip=fire_iot-equip_info
# app离线同步装备数据开关 # app离线同步装备数据开关
auth-open-fire-equip=false auth-open-fire-equip=false
\ No newline at end of file
management.security.enabled=true
management.endpoint.health.show-details=always
spring.security.user.name=admin
spring.security.user.password=a1234560
\ No newline at end of file
...@@ -3013,4 +3013,42 @@ ...@@ -3013,4 +3013,42 @@
ALTER TABLE `wl_equipment_specific_alarm` DROP COLUMN `confirm_date`; ALTER TABLE `wl_equipment_specific_alarm` DROP COLUMN `confirm_date`;
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="tianyiming" id="20221011tianyiming" runAlways="true">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="wl_supervision_video"/>
</not>
</preConditions>
<comment>add wl_supervision_video</comment>
<sql>
CREATE TABLE `wl_supervision_video` (
`id` bigint(20) NOT NULL,
`biz_org_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '所属公司',
`camera_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '摄像头id',
`create_date` datetime DEFAULT NULL COMMENT '添加时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
</sql>
</changeSet>
<changeSet author="xxz" id="20221013xxz" runAlways="true">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="wl_marquee_data"/>
</not>
</preConditions>
<comment>add wl_marquee_data</comment>
<sql>
CREATE TABLE `wl_marquee_data` (
`id` bigint(20) NOT NULL,
`type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类型',
`position` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '位置',
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备名称',
`create_date` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`message_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '消息类型',
`is_read` int(10) NULL DEFAULT NULL COMMENT '是否已读【0:未读;1:已读】',
`equipment_specific_id` bigint(20) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
\ No newline at end of file
...@@ -193,4 +193,62 @@ ...@@ -193,4 +193,62 @@
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', 'address', '地址', 'String', '132828674817', 'eq', b'0', 'r_fireControlRoom', '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 ('133000000319', 'address', '地址', 'String', '132828674817', 'eq', b'0', 'r_fireControlRoom', '2581805', '2022-03-01 12:01:04');
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="zs" id="202210101651">
<preConditions onFail="MARK_RAN">
<tableExists tableName="cb_water_resource_pool"/>
</preConditions>
<comment>修改液位显示装置字段类型->需求2022 一个水池可选多个 装置</comment>
<sql>
ALTER TABLE `cb_water_resource_pool` MODIFY COLUMN `level_device_id` varchar(255) NULL DEFAULT NULL COMMENT '水池液位显示装置id';
</sql>
</changeSet>
<changeSet author="ltw" id="202210111354-1">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="wl_equipment_specific" columnName="warranty_info"/>
</not>
</preConditions>
<comment>新增字段 warranty_info,warranty_period</comment>
<sql>
alter table `wl_equipment_specific` add column `warranty_info` varchar(500) DEFAULT NULL COMMENT '质保信息';
alter table `wl_equipment_specific` add column `warranty_period` datetime DEFAULT NULL COMMENT '质保周期';
</sql>
</changeSet>
<changeSet author="ltw" id="202210111354-2">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="wl_equipment" columnName="expiry_date"/>
</not>
</preConditions>
<comment>新增字段 expiry_date 报废期限</comment>
<sql>
alter table `wl_equipment` add column `expiry_date` decimal(12,0) DEFAULT NULL COMMENT '报废期限';
</sql>
</changeSet>
<changeSet author="gaojianqiang" id="20221011-1729-1">
<preConditions onFail="MARK_RAN">
<tableExists tableName="wl_equipment_category"/>
</preConditions>
<comment>消防水箱分类扩展 wl_equipment_category</comment>
<sql>
REPLACE INTO `wl_equipment_category`(`id`, `parent_id`, `code`, `name`, `is_consumptive`, `description`, `remark`, `create_date`, `industry_code`, `image`) VALUES (1547790305762250754, '1438771726480601090', '93060600', '消防水箱', 0, NULL, NULL, '2022-07-15 11:49:00', '2', 'upload/equipment_category_icon/industryPool.png');
</sql>
</changeSet>
<changeSet author="gaojianqiang" id="20221011-1729-2">
<preConditions onFail="MARK_RAN">
<tableExists tableName="wl_form_group_column"/>
</preConditions>
<comment>物联设备增加模拟量阈值 wl_form_group_column</comment>
<sql>
REPLACE 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 (133000000350, 'minLevel', '最低报警液位(m)', 'inputNumber', 132828674825, 'eq', b'0', '92031900', 2581805, '2022-10-09 09:24:35');
REPLACE 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 (133000000351, 'maxLevel', '最高报警液位(m)', 'inputNumber', 132828674825, 'eq', b'0', '92031900', 2581805, '2022-10-09 09:24:36');
REPLACE 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 (133000000352, 'volume', '泡沫液罐容积(m³)', 'inputNumber', 132828674825, 'eq', b'0', '92031900', 2581805, '2022-10-09 09:24:37');
REPLACE 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 (133000000353, 'minPressure', '最低报警压力(Mpa)', 'inputNumber', 132828674826, 'eq', b'0', '92011000', 2581805, '2022-10-09 09:24:38');
REPLACE 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 (133000000354, 'maxPressure', '最高报警压力(Mpa)', 'inputNumber', 132828674826, 'eq', b'0', '92011000', 2581805, '2022-10-09 09:24:39');
REPLACE 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 (133000000355, 'minFlow', '最低报警流量(L/S)', 'inputNumber', 132828674827, 'eq', b'0', '92010700', 2581805, '2022-10-09 09:24:39');
REPLACE 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 (133000000356, 'maxFlow', '最高报警流量(L/S)', 'inputNumber', 132828674827, 'eq', b'0', '92010700', 2581805, '2022-10-09 09:24:40');
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
\ No newline at end of file
...@@ -195,7 +195,10 @@ ...@@ -195,7 +195,10 @@
AS fireEquipmentPointValue, AS fireEquipmentPointValue,
wlesal.type AS typeCode, wlesal.type AS typeCode,
(select type_name from wl_signal_classify sc where sc.type_code = wlesal.type limit 1) as type, (select type_name from wl_signal_classify sc where sc.type_code = wlesal.type limit 1) as type,
wlesal.create_date AS createDate, date_format(
wlesal.create_date,
'%Y-%m-%d %H:%i:%s'
) createDate,
CONCAT_WS(' ', wles.position,wled.area) AS warehouseStructureName, /*告警列表拼接详细地址*/ CONCAT_WS(' ', wles.position,wled.area) AS warehouseStructureName, /*告警列表拼接详细地址*/
(select (select
group_concat(fet.`name`) group_concat(fet.`name`)
...@@ -1326,4 +1329,161 @@ ...@@ -1326,4 +1329,161 @@
LEFT JOIN p_point_classify ppc on pci.point_classify_id = ppc.id LEFT JOIN p_point_classify ppc on pci.point_classify_id = ppc.id
)AS missedCheck )AS missedCheck
</select> </select>
<select id="fireAlarmLogPage" resultType="java.util.HashMap">
SELECT
equipment_specific_index_name,
equipment_specific_name,
DATE_FORMAT(`wlesal`.`create_date`,'%m-%d %H:%i:%s') alarm_time,
location,
emergency_level_color,
IF
( `wlesal`.`clean_time` IS NOT NULL, '已消除', '未消除' ) AS `cleanStatus`
FROM
`wl_equipment_specific_alarm_log` `wlesal`
LEFT JOIN `wl_equipment_specific` `wles` ON `wlesal`.`equipment_specific_id` = `wles`.`id`
<where>
<if test="param.system != null and param.system != ''">
find_in_set( #{param.system}, `wlesal`.`system_codes` )
</if>
<if test="param.fireEquipmentSpecificIndexKey != null and param.fireEquipmentSpecificIndexKey != ''">
AND wles.type = #{param.fireEquipmentSpecificIndexKey}
</if>
<if test="param.bizOrgCode != null and param.bizOrgCode != ''">
AND wles.biz_org_code like concat (#{param.bizOrgCode},'%')
</if>
</where>
ORDER BY
`wlesal`.`create_date` DESC
</select>
<select id="alarmTrend" resultType="java.util.Map">
SELECT
`result`.`click_date` AS `click_date`,
`a`.`fireAlarmNum` AS `fireAlarmNum`,
`b`.`breakdownNum` AS `breakdownNum`,
`c`.`shieldNum` AS `shieldNum`,
`d`.`otherNum` AS `otherNum`
FROM
((((
`v_monitor_event_utils_week` `result`
LEFT JOIN (
SELECT
`weekUtil`.`click_date` AS `click_date`,
ifnull( count( `fireAlarm`.`id` ), 0 ) AS `fireAlarmNum`
FROM
(
`v_monitor_event_utils_week` `weekUtil`
LEFT JOIN (
SELECT
log.*
FROM
`wl_equipment_specific_alarm_log` `log`
LEFT JOIN wl_equipment_specific wes ON `log`.equipment_specific_id = wes.id
<where>
<if test="bizOrgCode != null and bizOrgCode != ''">
wes.biz_org_code like concat (#{bizOrgCode},'%')
</if>
</where>
) fireAlarm ON (((
date_format( `fireAlarm`.`create_date`, '%Y-%m-%d' ) = `weekUtil`.`click_date`
)
AND ( `fireAlarm`.`equipment_specific_index_name` = '火警' )
)))
GROUP BY
`weekUtil`.`click_date`
ORDER BY
`weekUtil`.`click_date`
) `a` ON ((
`a`.`click_date` = `result`.`click_date`
)))
LEFT JOIN (
SELECT
`weekUtil`.`click_date` AS `click_date`,
ifnull( count( `breakdown`.`id` ), 0 ) AS `breakdownNum`
FROM
(
`v_monitor_event_utils_week` `weekUtil`
LEFT JOIN (
SELECT
log.*
FROM
`wl_equipment_specific_alarm_log` `log`
LEFT JOIN wl_equipment_specific wes ON `log`.equipment_specific_id = wes.id
<where>
<if test="bizOrgCode != null and bizOrgCode != ''">
wes.biz_org_code like concat (#{bizOrgCode},'%')
</if>
</where>
) `breakdown` ON (((
`weekUtil`.`click_date` = date_format( `breakdown`.`create_date`, '%Y-%m-%d' ))
AND ( `breakdown`.`equipment_specific_index_name` = '故障' ))))
GROUP BY
`weekUtil`.`click_date`
ORDER BY
`weekUtil`.`click_date`
) `b` ON ((
`b`.`click_date` = `result`.`click_date`
)))
LEFT JOIN (
SELECT
`weekUtil`.`click_date` AS `click_date`,
ifnull( count( `shield`.`id` ), 0 ) AS `shieldNum`
FROM
(
`v_monitor_event_utils_week` `weekUtil`
LEFT JOIN (
SELECT
log.*
FROM
`wl_equipment_specific_alarm_log` `log`
LEFT JOIN wl_equipment_specific wes ON `log`.equipment_specific_id = wes.id
<where>
<if test="bizOrgCode != null and bizOrgCode != ''">
wes.biz_org_code like concat (#{bizOrgCode},'%')
</if>
</where>
) `shield` ON (((
date_format( `shield`.`create_date`, '%Y-%m-%d' ) = `weekUtil`.`click_date`
)
AND ( `shield`.`equipment_specific_index_name` = '屏蔽' ))))
GROUP BY
`weekUtil`.`click_date`
ORDER BY
`weekUtil`.`click_date`
) `c` ON ((
`c`.`click_date` = `result`.`click_date`
)))
LEFT JOIN (
SELECT
`weekUtil`.`click_date` AS `click_date`,
ifnull( count( `other`.`id` ), 0 ) AS `otherNum`
FROM
(
`v_monitor_event_utils_week` `weekUtil`
LEFT JOIN (
SELECT
log.*
FROM
`wl_equipment_specific_alarm_log` `log`
LEFT JOIN wl_equipment_specific wes ON `log`.equipment_specific_id = wes.id
<where>
<if test="bizOrgCode != null and bizOrgCode != ''">
wes.biz_org_code like concat (#{bizOrgCode},'%')
</if>
</where>
) `other` ON (((
date_format( `other`.`create_date`, '%Y-%m-%d' ) = `weekUtil`.`click_date`
)
AND (
`other`.`equipment_specific_index_name` NOT IN ( '火警', '故障', '屏蔽' )))))
GROUP BY
`weekUtil`.`click_date`
ORDER BY
`weekUtil`.`click_date`
) `d` ON ((
`d`.`click_date` = `result`.`click_date`
)))
ORDER BY
`result`.`click_date` DESC
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -456,6 +456,12 @@ ...@@ -456,6 +456,12 @@
biz_org_name= #{bizOrgName} biz_org_name= #{bizOrgName}
where id = #{id} where id = #{id}
</update> </update>
<update id="updateFormFieldValue">
update wl_form_instance
set
field_value = #{value}
where instance_id = #{id} AND field_name = #{name}
</update>
<update id="updateStrFullName"> <update id="updateStrFullName">
update wl_warehouse_structure update wl_warehouse_structure
set full_name=replace(full_name,#{name},#{fullName}) set full_name=replace(full_name,#{name},#{fullName})
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.MarqueeDataMapper">
<select id="selectAll" resultType="java.util.Map">
select
id messageId,
type equipmentSpecificIndexName,
position,
name equipmentSpecificName,
date_format(
create_date,
'%Y-%m-%d %H:%i:%s'
) createDate,
message_type messageType,
is_read isRead,
equipment_specific_id id
from
wl_marquee_data
where
is_read = '0'
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.SupervisionVideoMapper">
<select id="getVideoByCompany" resultType="com.yeejoin.equipmanage.common.entity.vo.AlamVideoVO">
select
wv.id,
wv.token,
wv.name as name,
wv.url,
wv.code,
wv.preset_position as presetPosition,
wv.name
from wl_supervision_video wsv left join wl_video wv on wsv.camera_id = wv.id
where wsv.biz_org_code like concat(#{bizOrgCode},'%');
</select>
<select id="queryVideoAllId" resultType="java.lang.String">
select wsv.camera_id
from wl_supervision_video wsv
where wsv.biz_org_code like concat(#{bizOrgCode},'%');
</select>
</mapper>
package com.yeejoin.amos;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
@Configuration
@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
// 授权
@Override
protected void configure(HttpSecurity http) throws Exception {
http.csrf().disable()
.headers()
.frameOptions()
.disable()
.and()
.authorizeRequests()
.regexMatchers("^(?!/actuator).*$").permitAll()
.regexMatchers("/actuator/health").permitAll()
.regexMatchers("/actuator/info").permitAll()
.anyRequest().authenticated().and()
.formLogin();
}
}
...@@ -127,4 +127,8 @@ management.endpoints.enabled-by-default=false ...@@ -127,4 +127,8 @@ management.endpoints.enabled-by-default=false
#阿里云实时语音识别参数 #阿里云实时语音识别参数
speech-config.access-key-id=LTAI5t62oH95jgbjRiNXPsho speech-config.access-key-id=LTAI5t62oH95jgbjRiNXPsho
speech-config.access-key-secret=shy9SpogYgcdDoyTB3bvP21VSRmz8n speech-config.access-key-secret=shy9SpogYgcdDoyTB3bvP21VSRmz8n
speech-config.app-key=FC84bGUpbNFrexoL speech-config.app-key=FC84bGUpbNFrexoL
\ No newline at end of file
management.security.enabled=true
spring.security.user.name=admin
spring.security.user.password=a1234560
\ No newline at end of file
...@@ -3448,5 +3448,15 @@ ...@@ -3448,5 +3448,15 @@
CHANGE COLUMN `user_name` `usr_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户名' AFTER `sequence_nbr` CHANGE COLUMN `user_name` `usr_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户名' AFTER `sequence_nbr`
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="zs" id="202210101353">
<preConditions onFail="MARK_RAN">
<tableExists tableName="cb_water_resource_pool"/>
</preConditions>
<comment>修改液位显示装置字段类型->需求2022 一个水池可选多个 装置</comment>
<sql>
ALTER TABLE `cb_water_resource_pool` MODIFY COLUMN `level_device_id` varchar(255) NULL DEFAULT NULL COMMENT '水池液位显示装置id';
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
...@@ -2257,7 +2257,7 @@ ...@@ -2257,7 +2257,7 @@
<w:sz-cs w:val="28"/> <w:sz-cs w:val="28"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN"/> <w:lang w:val="EN-US" w:fareast="ZH-CN"/>
</w:rPr> </w:rPr>
<w:t>是否合格</w:t> <w:t>检验结果</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -2291,7 +2291,7 @@ ...@@ -2291,7 +2291,7 @@
<w:sz-cs w:val="28"/> <w:sz-cs w:val="28"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN"/> <w:lang w:val="EN-US" w:fareast="ZH-CN"/>
</w:rPr> </w:rPr>
<w:t>标准原文</w:t> <w:t>规范标准值</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
......
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