Commit 6e011ed4 authored by zhangsen's avatar zhangsen

Merge remote-tracking branch 'origin/develop_dl_plan6' into develop_dl_plan6_temp

# Conflicts: # amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/WaterResourceController.java
parents 5f05594b 9d67bc0e
...@@ -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 List<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_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", "ge", "5", "", "aaa", "bbb", "last"),
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】 - 【%s】分钟内,设备启停频繁,请及时查看处理"),
MESSAGE_LEVEL_YZ("YZ", "【%s】分钟内,启停间隔较小", "", "名称:稳压泵启停异常提醒;时间:%s;内容:【%s】- 【%s】 - 【%s】分钟内,设备启停频繁,请及时查看处理"),
MESSAGE_LEVEL_QT_WJ("QT_WJ", "【%s】分钟内,设备启停频繁", "", "名称:漏水提醒; 时间:%s;内容:【%s】- 【%s】 - 【%s】分钟内,设备启停频繁,可能存在漏水,请及时查看处理"),
MESSAGE_LEVEL_QT_WJ_YXSC("WJ_YXSC", "运行时长超过【%s】分钟,存在漏水可能", "", "名称:漏水提醒; 时间:%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", "所有泵最近一次停泵时间"),
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;
}
}
...@@ -216,7 +216,7 @@ public class OrgUsrController extends BaseController { ...@@ -216,7 +216,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<>();
......
...@@ -138,12 +138,14 @@ public class WaterResourceController extends BaseController { ...@@ -138,12 +138,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, "levelDeviceId");
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);
...@@ -282,6 +284,7 @@ public class WaterResourceController extends BaseController { ...@@ -282,6 +284,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 =
...@@ -408,11 +411,13 @@ public class WaterResourceController extends BaseController { ...@@ -408,11 +411,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, "levelDeviceId");
waterResourceDto.setLevelDeviceId(Arrays.asList(waterResourcePool.getLevelDeviceId().split(",")));
break; break;
default: default:
break; break;
......
...@@ -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")
......
...@@ -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;
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);
} }
...@@ -300,12 +300,54 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE ...@@ -300,12 +300,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 +364,13 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE ...@@ -322,6 +364,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 +387,14 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE ...@@ -338,6 +387,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 +404,15 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE ...@@ -347,6 +404,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 +453,25 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE ...@@ -387,18 +453,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 +599,14 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE ...@@ -526,4 +599,14 @@ 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);
} }
package com.yeejoin.equipmanage.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.equipmanage.common.entity.SupervisionVideo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
@Mapper
public interface SupervisionVideoMapper extends BaseMapper<SupervisionVideo> {
List<Map<String, Object>> getVideoByCompany(@Param("bizOrgCode") String bizOrgCode);
List<Map<String, Object>> 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"))));
......
...@@ -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);
/** /**
* 通用表单更新 * 通用表单更新
......
...@@ -91,4 +91,8 @@ public interface IEquipmentSpecificAlarmService extends IService<EquipmentSpecif ...@@ -91,4 +91,8 @@ 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);
} }
...@@ -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);
int deleteVideo(String id);
boolean addVide(String ids,String bizOrgCode);
List<Map<String,Object>> queryVideoAllId(String bizOrgCode);
}
...@@ -299,7 +299,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -299,7 +299,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中携带了经纬度,后台切割保存
...@@ -325,7 +325,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -325,7 +325,7 @@ 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 (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);
......
...@@ -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);
} }
......
...@@ -728,4 +728,15 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec ...@@ -728,4 +728,15 @@ 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);
}
} }
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,12 @@ import java.util.*; ...@@ -6,11 +6,12 @@ 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.mapper.*; import com.yeejoin.equipmanage.mapper.*;
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 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -18,6 +19,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 +75,6 @@ import com.yeejoin.equipmanage.common.exception.BaseException; ...@@ -73,28 +75,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;
...@@ -173,6 +153,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -173,6 +153,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 +165,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -182,6 +165,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 +433,8 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -447,6 +433,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 +1011,8 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -1023,7 +1011,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;
} }
...@@ -1877,4 +1866,73 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -1877,4 +1866,73 @@ 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(),DateUtils.DATE_TIME_PATTERN);
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 = 0;
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);
} 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.mapper.SupervisionVideoMapper;
import com.yeejoin.equipmanage.service.ISupervisionVideoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
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;
@Override
public List<List<Map<String, Object>>> queryVideoList(String bizOrgCode) {
List<List<Map<String, Object>>> resList = new ArrayList<>();
List<Map<String, Object>> list = supervisionVideoMapper.getVideoByCompany(bizOrgCode);
List<Map<String, Object>> mapList = new ArrayList<>();
for (int i = 0; i < list.size(); i++) {
if (list.size() > 1 && (i / 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 int deleteVideo(String id) {
return supervisionVideoMapper.delete(new QueryWrapper<SupervisionVideo>().eq("camera_id", id));
}
@Override
public boolean addVide(String ids, String bizOrgCode) {
List<SupervisionVideo> list = new ArrayList<>();
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<Map<String, Object>> 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(Arrays.asList(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) {
......
...@@ -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
...@@ -3013,4 +3013,21 @@ ...@@ -3013,4 +3013,21 @@
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>
</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
...@@ -1326,4 +1326,161 @@ ...@@ -1326,4 +1326,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.equipment_specific_index_key like concat (#{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
<?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="java.util.Map">
select wv.*
from wl_supervision_video wsv left join wl_video wv on wsv.camera_id = wv.id
where wsv.biz_org_code = #{bizOrgCode}
</select>
<select id="queryVideoAllId" resultType="java.util.Map">
select wsv.camera_id
from wl_supervision_video wsv
where wsv.biz_org_code = #{bizOrgCode}
</select>
</mapper>
...@@ -3596,5 +3596,15 @@ ...@@ -3596,5 +3596,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>
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