Commit 80c7283c authored by helinlin's avatar helinlin

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

parents 78f4d386 dc61a0e9
...@@ -101,4 +101,10 @@ public class Equipment extends BaseEntity { ...@@ -101,4 +101,10 @@ public class Equipment extends BaseEntity {
*/ */
@TableField(value = "is_iot") @TableField(value = "is_iot")
private String isIot = "0"; private String isIot = "0";
/**
* 警情消除策略 【0:收到复位信号自动消除;1:警情处理确认后消除】
*/
@TableField(value = "clean_type")
private String cleanType = "0";
} }
...@@ -180,4 +180,8 @@ public class EquipmentSpecificAlarmLog extends BaseEntity { ...@@ -180,4 +180,8 @@ public class EquipmentSpecificAlarmLog extends BaseEntity {
@TableField("build_id") @TableField("build_id")
@ApiModelProperty(value = "建筑id") @ApiModelProperty(value = "建筑id")
private String buildId; private String buildId;
@TableField("clean_time")
@ApiModelProperty(value = "消除时间")
private Date cleanTime;
} }
...@@ -23,4 +23,6 @@ public class AlamVideoVO { ...@@ -23,4 +23,6 @@ public class AlamVideoVO {
private String presetPosition; private String presetPosition;
private String vedioFormat;
} }
package com.yeejoin.equipmanage.common.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* @author keyong
* @title: AlarmCleanTypeEnum
* <pre>
* @description: TODO
* </pre>
* @date 2022/01/05 12:04
*/
@AllArgsConstructor
@Getter
public enum AlarmCleanTypeEnum {
ZDXC("0", "收到复位信号自动消除"), QRXC("1", "警情处理确认后消除");
private String code;
private String name;
}
...@@ -111,6 +111,16 @@ public class CommonPageInfoParam extends CommonPageable { ...@@ -111,6 +111,16 @@ public class CommonPageInfoParam extends CommonPageable {
private String status; private String status;
public void setCleanStatus(String cleanStatus) {
this.cleanStatus = cleanStatus;
}
public String getCleanStatus() {
return cleanStatus;
}
private String cleanStatus;
public void setStatus(String status) { public void setStatus(String status) {
this.status = status; this.status = status;
} }
......
...@@ -57,6 +57,8 @@ public class CommonPageParamUtil { ...@@ -57,6 +57,8 @@ public class CommonPageParamUtil {
param.setBuildIds((List<String>)queryRequests.get(i).getValue()); param.setBuildIds((List<String>)queryRequests.get(i).getValue());
} else if("status".equals(name)){ } else if("status".equals(name)){
param.setStatus(toString(queryRequests.get(i).getValue())); param.setStatus(toString(queryRequests.get(i).getValue()));
} else if("cleanStatus".equals(name)){
param.setCleanStatus(toString(queryRequests.get(i).getValue()));
} }
} }
if(commonPageable !=null){ if(commonPageable !=null){
......
...@@ -32,4 +32,6 @@ public class AlarmListDataVO { ...@@ -32,4 +32,6 @@ public class AlarmListDataVO {
private Long alarmId; private Long alarmId;
private String alarmTypeCode; private String alarmTypeCode;
private String cleanStatus;
} }
package com.yeejoin.amos.boot.module.tzs.flc.api.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 设备使用信息表
*
* @author system_generator
* @date 2022-01-05
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="EquipmentUseInfoDto", description="设备使用信息表")
public class EquipmentUseInfoDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "使用单位名称")
private String useUnitName;
@ApiModelProperty(value = "使用单位id")
private Long useUnitId;
@ApiModelProperty(value = "使用单位统一信用代码")
private String useOrganizationCode;
@ApiModelProperty(value = "产权单位名称")
private String propertyUnitName;
@ApiModelProperty(value = "产权单位id")
private Long propertyUnitId;
@ApiModelProperty(value = "产权统一信用代码")
private String propertyOrganizationCode;
@ApiModelProperty(value = "使用地址")
private String useAddress;
@ApiModelProperty(value = "经度")
private String longitude;
@ApiModelProperty(value = "纬度")
private String latitude;
@ApiModelProperty(value = "使用场所")
private String useSite;
@ApiModelProperty(value = "使用场所编码")
private String useSiteCode;
@ApiModelProperty(value = "特设编码")
private String specialCode;
@ApiModelProperty(value = "设备注册代码")
private String registerCode;
@ApiModelProperty(value = "96333识别码")
private String rescueCode;
@ApiModelProperty(value = "使用登记证编码")
private String registerLicenceCode;
@ApiModelProperty(value = "登记机关")
private String registerOrg;
@ApiModelProperty(value = "登记机关id")
private Long registerOrgId;
@ApiModelProperty(value = "登记日期")
private Date registerTime;
@ApiModelProperty(value = "发证日期")
private Date issueLicenceTime;
@ApiModelProperty(value = "投入使用日期")
private Date startUseTime;
@ApiModelProperty(value = "设备id")
private Long equipmentId;
}
package com.yeejoin.amos.boot.module.tzs.flc.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
/**
* 设备使用信息表
*
* @author system_generator
* @date 2022-01-05
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tcb_equipment_use_info")
public class EquipmentUseInfo extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 使用单位名称
*/
@TableField("use_unit_name")
private String useUnitName;
/**
* 使用单位id
*/
@TableField("use_unit_id")
private Long useUnitId;
/**
* 使用单位统一信用代码
*/
@TableField("use_organization_code")
private String useOrganizationCode;
/**
* 产权单位名称
*/
@TableField("property_unit_name")
private String propertyUnitName;
/**
* 产权单位id
*/
@TableField("property_unit_id")
private Long propertyUnitId;
/**
* 产权统一信用代码
*/
@TableField("property_organization_code")
private String propertyOrganizationCode;
/**
* 使用地址
*/
@TableField("use_address")
private String useAddress;
/**
* 经度
*/
@TableField("longitude")
private String longitude;
/**
* 纬度
*/
@TableField("latitude")
private String latitude;
/**
* 使用场所
*/
@TableField("use_site")
private String useSite;
/**
* 使用场所编码
*/
@TableField("use_site_code")
private String useSiteCode;
/**
* 特设编码
*/
@TableField("special_code")
private String specialCode;
/**
* 设备注册代码
*/
@TableField("register_code")
private String registerCode;
/**
* 96333识别码
*/
@TableField("rescue_code")
private String rescueCode;
/**
* 使用登记证编码
*/
@TableField("register_licence_code")
private String registerLicenceCode;
/**
* 登记机关
*/
@TableField("register_org")
private String registerOrg;
/**
* 登记机关id
*/
@TableField("register_org_id")
private Long registerOrgId;
/**
* 登记日期
*/
@TableField("register_time")
private Date registerTime;
/**
* 发证日期
*/
@TableField("issue_licence_time")
private Date issueLicenceTime;
/**
* 投入使用日期
*/
@TableField("start_use_time")
private Date startUseTime;
/**
* 设备id
*/
@TableField("equipment_id")
private Long equipmentId;
}
package com.yeejoin.amos.boot.module.tzs.flc.api.mapper;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.EquipmentUseInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 设备使用信息表 Mapper 接口
*
* @author system_generator
* @date 2022-01-05
*/
public interface EquipmentUseInfoMapper extends BaseMapper<EquipmentUseInfo> {
}
package com.yeejoin.amos.boot.module.tzs.flc.api.service;
/**
* 设备使用信息表接口类
*
* @author system_generator
* @date 2022-01-05
*/
public interface IEquipmentUseInfoService {
}
<?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.amos.boot.module.tzs.flc.api.mapper.EquipmentUseInfoMapper">
</mapper>
...@@ -157,8 +157,8 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID ...@@ -157,8 +157,8 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID
}); });
if( firstAidSimpleList != null && firstAidSimpleList.size() >= 1 ) { if( firstAidSimpleList != null && firstAidSimpleList.size() >= 1 ) {
detailMap.put("firstAidName", firstAidSimpleList); detailMap.put("firstAidName", firstAidSimpleList);
resultList.add(detailMap);
} }
resultList.add(detailMap);
}); });
result.add(resultList.get(0)); result.add(resultList.get(0));
return result; return result;
......
...@@ -94,6 +94,8 @@ public class EquipmentAlarmController extends AbstractBaseController { ...@@ -94,6 +94,8 @@ public class EquipmentAlarmController extends AbstractBaseController {
@RequestParam(value = "alarmType", required = false) String alarmType, @RequestParam(value = "alarmType", required = false) String alarmType,
@RequestParam(value = "type", required = false) String type, @RequestParam(value = "type", required = false) String type,
@RequestParam(value = "buildIds", required = false) List<String> buildIds, @RequestParam(value = "buildIds", required = false) List<String> buildIds,
@RequestParam(value = "id", required = false) String id,
@RequestParam(value = "cleanStatus", required = false) String cleanStatus,
CommonPageable commonPageable) { CommonPageable commonPageable) {
if (commonPageable.getPageNumber() == 0) { if (commonPageable.getPageNumber() == 0) {
commonPageable.setPageNumber(1); commonPageable.setPageNumber(1);
...@@ -139,6 +141,14 @@ public class EquipmentAlarmController extends AbstractBaseController { ...@@ -139,6 +141,14 @@ public class EquipmentAlarmController extends AbstractBaseController {
request9.setName("buildIds"); request9.setName("buildIds");
request9.setValue(ObjectUtils.isEmpty(buildIds) ? null : buildIds); request9.setValue(ObjectUtils.isEmpty(buildIds) ? null : buildIds);
queryRequests.add(request9); 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);
CommonPageInfoParam param = CommonPageParamUtil.fillCommonPageInfoParam(queryRequests, commonPageable); CommonPageInfoParam param = CommonPageParamUtil.fillCommonPageInfoParam(queryRequests, commonPageable);
Page<Map<String, Object>> list = iEquipmentSpecificAlarmService.listPage(param); Page<Map<String, Object>> list = iEquipmentSpecificAlarmService.listPage(param);
return CommonResponseUtil.success(list); return CommonResponseUtil.success(list);
...@@ -200,6 +210,7 @@ public class EquipmentAlarmController extends AbstractBaseController { ...@@ -200,6 +210,7 @@ public class EquipmentAlarmController extends AbstractBaseController {
@RequestParam(value = "systemCode", required = false) String systemCode, @RequestParam(value = "systemCode", required = false) String systemCode,
@RequestParam(value = "buildId", required = false) String buildId, @RequestParam(value = "buildId", required = false) String buildId,
// @RequestParam(value = "equipmentCode", required = false) String equipmentCode, // @RequestParam(value = "equipmentCode", required = false) String equipmentCode,
@RequestParam(value = "id", required = false) String id,
CommonPageable commonPageable) { CommonPageable commonPageable) {
List<CommonRequest> queryRequests = new ArrayList<>(); List<CommonRequest> queryRequests = new ArrayList<>();
CommonRequest request = new CommonRequest(); CommonRequest request = new CommonRequest();
...@@ -235,6 +246,10 @@ public class EquipmentAlarmController extends AbstractBaseController { ...@@ -235,6 +246,10 @@ public class EquipmentAlarmController extends AbstractBaseController {
request9.setName("buildId"); request9.setName("buildId");
request9.setValue(StringUtil.isNotEmpty(buildId) ? StringUtils.trimToNull(buildId) : null); request9.setValue(StringUtil.isNotEmpty(buildId) ? StringUtils.trimToNull(buildId) : null);
queryRequests.add(request9); queryRequests.add(request9);
CommonRequest request10 = new CommonRequest();
request10.setName("id");
request10.setValue(StringUtil.isNotEmpty(id) ? StringUtils.trimToNull(id) : null);
queryRequests.add(request10);
CommonPageInfoParam param = CommonPageParamUtil.fillCommonPageInfoParam(queryRequests, commonPageable); CommonPageInfoParam param = CommonPageParamUtil.fillCommonPageInfoParam(queryRequests, commonPageable);
org.springframework.data.domain.Page<AlarmListDataVO> list = iEquipmentSpecificAlarmService.listAlarmsPage(param); org.springframework.data.domain.Page<AlarmListDataVO> list = iEquipmentSpecificAlarmService.listAlarmsPage(param);
return CommonResponseUtil.success(list); return CommonResponseUtil.success(list);
......
...@@ -6,10 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -6,10 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.equipmanage.common.datasync.entity.FireEquipment; import com.yeejoin.equipmanage.common.datasync.entity.FireEquipment;
import com.yeejoin.equipmanage.common.dto.EquipmentSpecificDto; import com.yeejoin.equipmanage.common.dto.EquipmentSpecificDto;
import com.yeejoin.equipmanage.common.dto.UserDto; import com.yeejoin.equipmanage.common.dto.UserDto;
import com.yeejoin.equipmanage.common.entity.EquipmentCategory; import com.yeejoin.equipmanage.common.entity.*;
import com.yeejoin.equipmanage.common.entity.EquipmentSpecific;
import com.yeejoin.equipmanage.common.entity.EquipmentSpecificIndex;
import com.yeejoin.equipmanage.common.entity.MaintenanceResourceData;
import com.yeejoin.equipmanage.common.entity.dto.EquipmentSpecificDTO; import com.yeejoin.equipmanage.common.entity.dto.EquipmentSpecificDTO;
import com.yeejoin.equipmanage.common.entity.vo.ComplementCodeVO; import com.yeejoin.equipmanage.common.entity.vo.ComplementCodeVO;
import com.yeejoin.equipmanage.common.entity.vo.EquipmentSpecificVo; import com.yeejoin.equipmanage.common.entity.vo.EquipmentSpecificVo;
...@@ -200,4 +197,6 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> { ...@@ -200,4 +197,6 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
* @return 指标详情 * @return 指标详情
*/ */
List<Map<String, String>> getBoxTropicsIndexDetails(); List<Map<String, String>> getBoxTropicsIndexDetails();
String getEquipmentBySpecificId(@Param("specificId") Long specificId);
} }
...@@ -2,6 +2,7 @@ package com.yeejoin.equipmanage.service.impl; ...@@ -2,6 +2,7 @@ package com.yeejoin.equipmanage.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
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.amos.boot.module.jcs.api.dto.IotSystemAlarmRo; import com.yeejoin.amos.boot.module.jcs.api.dto.IotSystemAlarmRo;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
...@@ -11,16 +12,22 @@ import com.yeejoin.equipmanage.common.entity.EquipmentSpecific; ...@@ -11,16 +12,22 @@ import com.yeejoin.equipmanage.common.entity.EquipmentSpecific;
import com.yeejoin.equipmanage.common.entity.EquipmentSpecificAlarm; import com.yeejoin.equipmanage.common.entity.EquipmentSpecificAlarm;
import com.yeejoin.equipmanage.common.entity.EquipmentSpecificAlarmLog; import com.yeejoin.equipmanage.common.entity.EquipmentSpecificAlarmLog;
import com.yeejoin.equipmanage.common.entity.vo.AlamVideoVO; import com.yeejoin.equipmanage.common.entity.vo.AlamVideoVO;
import com.yeejoin.equipmanage.common.enums.AlarmCleanTypeEnum;
import com.yeejoin.equipmanage.common.enums.AlarmStatusEnum;
import com.yeejoin.equipmanage.common.enums.AlarmTypeEnum; import com.yeejoin.equipmanage.common.enums.AlarmTypeEnum;
import com.yeejoin.equipmanage.common.enums.TopicEnum; import com.yeejoin.equipmanage.common.enums.TopicEnum;
import com.yeejoin.equipmanage.common.utils.StringUtil;
import com.yeejoin.equipmanage.fegin.JcsFeign; import com.yeejoin.equipmanage.fegin.JcsFeign;
import com.yeejoin.equipmanage.mapper.ConfirmAlarmMapper; import com.yeejoin.equipmanage.mapper.ConfirmAlarmMapper;
import com.yeejoin.equipmanage.mapper.EquipmentSpecificAlarmMapper;
import com.yeejoin.equipmanage.mapper.EquipmentSpecificMapper;
import com.yeejoin.equipmanage.mapper.VideoMapper; import com.yeejoin.equipmanage.mapper.VideoMapper;
import com.yeejoin.equipmanage.remote.RemoteSecurityService; import com.yeejoin.equipmanage.remote.RemoteSecurityService;
import com.yeejoin.equipmanage.remote.WebMqttHandler; import com.yeejoin.equipmanage.remote.WebMqttHandler;
import com.yeejoin.equipmanage.service.*; import com.yeejoin.equipmanage.service.*;
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.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;
...@@ -28,6 +35,7 @@ import org.springframework.util.ObjectUtils; ...@@ -28,6 +35,7 @@ import org.springframework.util.ObjectUtils;
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;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -74,9 +82,20 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ ...@@ -74,9 +82,20 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
@Value("${systemctl.jcs.switch}") @Value("${systemctl.jcs.switch}")
private Boolean jcsSwitch; private Boolean jcsSwitch;
@Value("${window.vedioFormat}")
String vedioFormat;
@Autowired @Autowired
private RuleConfirmAlarmService ruleConfirmAlamService; private RuleConfirmAlarmService ruleConfirmAlamService;
@Autowired
private EquipmentSpecificMapper equipmentSpecificMapper;
@Autowired
private EquipmentSpecificAlarmMapper equipmentSpecificAlarmMapper;
@Override @Override
public Map<String, Object> getDetailsById(Long alarmId, Long equipId, String type, String area) { public Map<String, Object> getDetailsById(Long alarmId, Long equipId, String type, String area) {
final String videoType = "video"; final String videoType = "video";
...@@ -85,6 +104,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ ...@@ -85,6 +104,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
if (videoType.equals(type)) { if (videoType.equals(type)) {
List<AlamVideoVO> video = videoMapper.getVideoBySpeId(equipId); List<AlamVideoVO> video = videoMapper.getVideoBySpeId(equipId);
video.forEach(action -> { video.forEach(action -> {
action.setVedioFormat(vedioFormat);
action.setUrl(videoService.getVideoUrl(action.getName(), action.getPresetPosition(), action.getUrl(), action.getCode())); action.setUrl(videoService.getVideoUrl(action.getName(), action.getPresetPosition(), action.getUrl(), action.getCode()));
}); });
res.put("video", video); res.put("video", video);
...@@ -122,6 +142,27 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ ...@@ -122,6 +142,27 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
if (!ObjectUtils.isEmpty(alarmLog)) { if (!ObjectUtils.isEmpty(alarmLog)) {
Long equipmentSpecificAlarmId = alarmLog.getEquipmentSpecificAlarmId(); Long equipmentSpecificAlarmId = alarmLog.getEquipmentSpecificAlarmId();
ent.setEquipmentSpecificAlarmId(equipmentSpecificAlarmId); ent.setEquipmentSpecificAlarmId(equipmentSpecificAlarmId);
String cleanType = equipmentSpecificMapper.getEquipmentBySpecificId(alarmLog.getEquipmentSpecificId());
if (StringUtil.isNotEmpty(cleanType) && AlarmCleanTypeEnum.QRXC.getCode().equals(cleanType)) {
EquipmentSpecificAlarm alarm = equipmentSpecificAlarmMapper.selectById(alarmLog.getEquipmentSpecificAlarmId());
alarm.setStatus(AlarmStatusEnum.HF.getCode());
equipmentSpecificAlarmMapper.updateById(alarm);
if (isBatch == 1) {
List<EquipmentSpecificAlarmLog> logs = equipmentSpecificAlarmLogService.getIsConfirmByAlarmId(equipmentSpecificAlarmId, "0");
logs = logs.stream().map(x -> {
BeanUtils.copyProperties(ent, x);
x.setCleanTime(new Date());
x.setStatus(AlarmStatusEnum.HF.getCode());
return x;
}).collect(Collectors.toList());
equipmentSpecificAlarmLogService.updateBatchById(logs);
} else {
ent.setCleanTime(new Date());
ent.setStatus(AlarmStatusEnum.HF.getCode());
equipmentSpecificAlarmLogService.updateById(ent);
}
return;
}
// 如果是批量确警,先查询,再确警,用于批量消息推送 // 如果是批量确警,先查询,再确警,用于批量消息推送
isBatch = ent.getIsBatch(); isBatch = ent.getIsBatch();
if (isBatch == 1) { if (isBatch == 1) {
......
...@@ -126,8 +126,6 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment ...@@ -126,8 +126,6 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
@Override @Override
public boolean addEquipmentDef(Equipment equipment) throws IllegalArgumentException { public boolean addEquipmentDef(Equipment equipment) throws IllegalArgumentException {
try {
// 查询装备定义名陈是否重复 // 查询装备定义名陈是否重复
nameDuplicate(equipment); nameDuplicate(equipment);
// 设置code属性 // 设置code属性
...@@ -138,19 +136,20 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment ...@@ -138,19 +136,20 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
equipment.setCode(code); equipment.setCode(code);
} }
int num = equipmentMapper.insert(equipment); int num = equipmentMapper.insert(equipment);
// saveEquipmentQRCodes(equipment); // saveEquipmentQRCodes(equipment);
JSONObject equipRuleParams = new JSONObject(); JSONObject equipRuleParams = new JSONObject();
equipRuleParams.put("name", equipment.getName()); equipRuleParams.put("name", equipment.getName());
equipRuleParams.put("inspectionSpecId", equipment.getInspectionSpec()); equipRuleParams.put("inspectionSpecId", equipment.getInspectionSpec());
patrolFeign.getEquipDetail(equipRuleParams.toJSONString()); try {
patrolFeign.getEquipDetail(equipRuleParams.toJSONString());
} catch (Exception e) {
log.error("新增装备定义操作中,检测到巡检服务未启动或启动出错!");
}
if (num > 0) { if (num > 0) {
return true; return true;
} }
} catch (Exception e) { return false;
e.printStackTrace();
throw new RuntimeException("录入的装备名称重复!");
}
return false;
} }
// public void saveEquipmentQRCodes(Equipment equipment) { // public void saveEquipmentQRCodes(Equipment equipment) {
...@@ -232,7 +231,11 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment ...@@ -232,7 +231,11 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
JSONObject equipRuleParams = new JSONObject(); JSONObject equipRuleParams = new JSONObject();
equipRuleParams.put("name", equipment1.getName()); equipRuleParams.put("name", equipment1.getName());
equipRuleParams.put("inspectionSpecId", equipment1.getInspectionSpec()); equipRuleParams.put("inspectionSpecId", equipment1.getInspectionSpec());
patrolFeign.getEquipDetail(equipRuleParams.toJSONString()); try {
patrolFeign.getEquipDetail(equipRuleParams.toJSONString());
} catch (Exception e) {
log.error("编辑装备定义操作中,检测到巡检服务未启动或启动出错!");
}
if (savedEquipment > 0) { if (savedEquipment > 0) {
return true; return true;
} }
......
...@@ -212,6 +212,7 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec ...@@ -212,6 +212,7 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
dataVO.setEquipSpeId(Long.valueOf(String.valueOf(x.get("fireEquipmentId")))); dataVO.setEquipSpeId(Long.valueOf(String.valueOf(x.get("fireEquipmentId"))));
dataVO.setAlarmId(Long.valueOf(String.valueOf(x.get("alarmId")))); dataVO.setAlarmId(Long.valueOf(String.valueOf(x.get("alarmId"))));
dataVO.setAlarmTypeCode(String.valueOf(x.get("fireEquipmentSpecificIndexKey"))); dataVO.setAlarmTypeCode(String.valueOf(x.get("fireEquipmentSpecificIndexKey")));
dataVO.setCleanStatus(String.valueOf(x.get("cleanStatus")));
res.add(dataVO); res.add(dataVO);
}); });
} }
......
...@@ -97,8 +97,8 @@ public class VideoServiceImpl extends ServiceImpl<VideoMapper, Video> implements ...@@ -97,8 +97,8 @@ public class VideoServiceImpl extends ServiceImpl<VideoMapper, Video> implements
@Value("${equip.security.code}") @Value("${equip.security.code}")
String securityMonitorCode; String securityMonitorCode;
@Value("${param.isUseVideoTranscoding}") @Value("${window.vedioFormat}")
String isUseVideoTranscoding; String vedioFormat;
@Autowired @Autowired
VideoMapper videoMapper; VideoMapper videoMapper;
...@@ -522,7 +522,7 @@ public class VideoServiceImpl extends ServiceImpl<VideoMapper, Video> implements ...@@ -522,7 +522,7 @@ public class VideoServiceImpl extends ServiceImpl<VideoMapper, Video> implements
@Override @Override
public String getVideoUrl(String videoId, String presetIndex, String defaultUrl, String code) { public String getVideoUrl(String videoId, String presetIndex, String defaultUrl, String code) {
if ("off".equals(isUseVideoTranscoding)) { if ("hls".equals(vedioFormat)) {
String url = getVideoUrl(code); String url = getVideoUrl(code);
return ObjectUtils.isEmpty(url) ? defaultUrl : url; return ObjectUtils.isEmpty(url) ? defaultUrl : url;
} }
......
...@@ -1154,7 +1154,8 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD ...@@ -1154,7 +1154,8 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
return executeSubmitDto; return executeSubmitDto;
} }
String planType = bizInfo.get("planType").toString(); String planType = bizInfo.get("planType").toString();
AgencyUserModel userModel = jcsFeignClient.getAmosIdByUserId((String) bizInfo.get("accompanyingUserId")).getResult(); // 获取检查组长
AgencyUserModel userModel = jcsFeignClient.getAmosIdByUserId((String) bizInfo.get("leadPeopleId")).getResult();
if (ValidationUtil.isEmpty(userModel)) { if (ValidationUtil.isEmpty(userModel)) {
executeSubmitDto.setIsOk(false); executeSubmitDto.setIsOk(false);
executeSubmitDto.setMsg("业务信息错误"); executeSubmitDto.setMsg("业务信息错误");
......
...@@ -288,10 +288,8 @@ public class HiddenDangerServiceImpl implements IHiddenDangerService { ...@@ -288,10 +288,8 @@ public class HiddenDangerServiceImpl implements IHiddenDangerService {
result.put("bizId", hiddenDangerDto.getCheckInputId()); result.put("bizId", hiddenDangerDto.getCheckInputId());
result.put("bizName", hiddenDangerDto.getInputItemName()); result.put("bizName", hiddenDangerDto.getInputItemName());
result.put("routeId", plan.getRouteId()); result.put("routeId", plan.getRouteId());
result.put("accompanyingUserId", plan.getLeadPeopleIds()); // 检查陪同人id result.put("checkUnitId",plan.getCheckUnitId()); // 检查人所在单位id逗号隔开
result.put("accompanyingUserName", plan.getLeadPeopleNames()); // 检查陪同人名称 result.put("checkUnitName",plan.getCheckUnitName());// 检查人所在单位名称逗号隔开
result.put("checkUnitId",plan.getCheckUnitId());
result.put("checkUnitName",plan.getCheckUnitName());
result.put("leadPeopleId", plan.getLeadPeopleIds()); // 牵头人id result.put("leadPeopleId", plan.getLeadPeopleIds()); // 牵头人id
result.put("leadPeopleName", plan.getLeadPeopleNames()); // 牵头人名称 result.put("leadPeopleName", plan.getLeadPeopleNames()); // 牵头人名称
result.put("makerUserId", plan.getMakerUserId()); // 计划制定人id result.put("makerUserId", plan.getMakerUserId()); // 计划制定人id
...@@ -313,13 +311,11 @@ public class HiddenDangerServiceImpl implements IHiddenDangerService { ...@@ -313,13 +311,11 @@ public class HiddenDangerServiceImpl implements IHiddenDangerService {
return; return;
} }
List<CheckShot> shotList = iCheckShotDao.findAllByCheckIdAndCheckInputId(checkInput.getCheckId(), checkInput.getId()); List<CheckShot> shotList = iCheckShotDao.findAllByCheckIdAndCheckInputId(checkInput.getCheckId(), checkInput.getId());
result.put("checkUserId", checkInput.getUserId()); result.put("checkUserId", checkInput.getUserId()); // 任务执行人id
result.put("checkUserName", checkInput.getUserName()); result.put("checkUserName", checkInput.getUserName()); // 任务执行人名称
result.put("accompanyUserId", checkInput.getAccompanyUserId()); result.put("accompanyingUserId", checkInput.getAccompanyUserId()); // 检查陪同人id
result.put("accompanyUserName", checkInput.getAccompanyUserName()); result.put("accompanyingUserName",checkInput.getAccompanyUserName()); // 检查陪同人名称
result.put("accompanyingUserId", checkInput.getAccompanyUserId()); result.put("planExecuteTime", checkInput.getCreateDate()); // 计划任务执行时间
result.put("accompanyingUserName",checkInput.getAccompanyUserName());
result.put("planExecuteTime", checkInput.getCreateDate());
result.put("checkPhotoUrl", shotList.stream().map(CheckShot::getPhotoData).collect(Collectors.joining(","))); result.put("checkPhotoUrl", shotList.stream().map(CheckShot::getPhotoData).collect(Collectors.joining(",")));
} }
} }
package com.yeejoin.amos.boot.module.tzs.flc.biz.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List;
import com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl.EquipmentUseInfoServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentUseInfoDto;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
/**
* 设备使用信息表
*
* @author system_generator
* @date 2022-01-05
*/
@RestController
@Api(tags = "设备使用信息表Api")
@RequestMapping(value = "/equipment-use-info")
public class EquipmentUseInfoController extends BaseController {
@Autowired
EquipmentUseInfoServiceImpl equipmentUseInfoServiceImpl;
/**
* 新增设备使用信息表
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增设备使用信息表", notes = "新增设备使用信息表")
public ResponseModel<EquipmentUseInfoDto> save(@RequestBody EquipmentUseInfoDto model) {
model = equipmentUseInfoServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新设备使用信息表", notes = "根据sequenceNbr更新设备使用信息表")
public ResponseModel<EquipmentUseInfoDto> updateBySequenceNbrEquipmentUseInfo(@RequestBody EquipmentUseInfoDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(equipmentUseInfoServiceImpl.updateWithModel(model));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除设备使用信息表", notes = "根据sequenceNbr删除设备使用信息表")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
return ResponseHelper.buildResponse(equipmentUseInfoServiceImpl.removeById(sequenceNbr));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个设备使用信息表", notes = "根据sequenceNbr查询单个设备使用信息表")
public ResponseModel<EquipmentUseInfoDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(equipmentUseInfoServiceImpl.queryBySeq(sequenceNbr));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "设备使用信息表分页查询", notes = "设备使用信息表分页查询")
public ResponseModel<Page<EquipmentUseInfoDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) {
Page<EquipmentUseInfoDto> page = new Page<EquipmentUseInfoDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(equipmentUseInfoServiceImpl.queryForEquipmentUseInfoPage(page));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "设备使用信息表列表全部数据查询", notes = "设备使用信息表列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<EquipmentUseInfoDto>> selectForList() {
return ResponseHelper.buildResponse(equipmentUseInfoServiceImpl.queryForEquipmentUseInfoList());
}
}
...@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService; import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto; import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto; import com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto;
...@@ -16,11 +17,14 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto; ...@@ -16,11 +17,14 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto;
import com.yeejoin.amos.boot.module.tzs.api.enums.InformWorkFlowEnum; import com.yeejoin.amos.boot.module.tzs.api.enums.InformWorkFlowEnum;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentDto; import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentIndexDto; import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentIndexDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentUseInfoDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.InformEquipmentDto; import com.yeejoin.amos.boot.module.tzs.flc.api.dto.InformEquipmentDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.Equipment; import com.yeejoin.amos.boot.module.tzs.flc.api.entity.Equipment;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.EquipmentIndex; import com.yeejoin.amos.boot.module.tzs.flc.api.entity.EquipmentIndex;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.EquipmentIndexInform; import com.yeejoin.amos.boot.module.tzs.flc.api.entity.EquipmentIndexInform;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.EquipmentInform; import com.yeejoin.amos.boot.module.tzs.flc.api.entity.EquipmentInform;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.EquipmentUseInfo;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfo;
import com.yeejoin.amos.boot.module.tzs.flc.api.enums.EquipmentInformStatusEnum; import com.yeejoin.amos.boot.module.tzs.flc.api.enums.EquipmentInformStatusEnum;
import com.yeejoin.amos.boot.module.tzs.flc.api.enums.EquipmentStatusEnum; import com.yeejoin.amos.boot.module.tzs.flc.api.enums.EquipmentStatusEnum;
import com.yeejoin.amos.boot.module.tzs.flc.api.mapper.EquipmentInformMapper; import com.yeejoin.amos.boot.module.tzs.flc.api.mapper.EquipmentInformMapper;
...@@ -51,6 +55,7 @@ import java.util.HashMap; ...@@ -51,6 +55,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Random; import java.util.Random;
import java.util.UUID;
/** /**
* 设备告知单服务实现类 * 设备告知单服务实现类
...@@ -89,7 +94,11 @@ public class EquipmentInformServiceImpl extends BaseService<EquipmentInformDto,E ...@@ -89,7 +94,11 @@ public class EquipmentInformServiceImpl extends BaseService<EquipmentInformDto,E
@Autowired @Autowired
EquipmentIndexInformServiceImpl iEquipmentIndexInformService; EquipmentIndexInformServiceImpl iEquipmentIndexInformService;
@Autowired
EquipmentUseInfoServiceImpl equipmentUseInfoServiceImpl;
@Autowired
UnitInfoServiceImpl unitInfoServiceImpl;
/** /**
* 分页查询 * 分页查询
...@@ -199,7 +208,9 @@ public class EquipmentInformServiceImpl extends BaseService<EquipmentInformDto,E ...@@ -199,7 +208,9 @@ public class EquipmentInformServiceImpl extends BaseService<EquipmentInformDto,E
public Boolean acceptInform(Long sequenceNbr) { public Boolean acceptInform(Long sequenceNbr) {
// 接收告知书 更新告知书状态 // 接收告知书 更新告知书状态
Boolean flag = false; Boolean flag = false;
flag = this.update(new LambdaUpdateWrapper<EquipmentInform>().eq(EquipmentInform::getSequenceNbr,sequenceNbr).set(EquipmentInform::getInformStatus,"9")); EquipmentInform inform = this.getById(sequenceNbr);
inform.setInformStatus("9");
flag = this.updateById(inform);
if(flag) { if(flag) {
// 更新设备相关参数 // 更新设备相关参数
List<InformEquipmentDto> equipmentList = informEquipmentServiceImpl.getEquipListByInformId(sequenceNbr); List<InformEquipmentDto> equipmentList = informEquipmentServiceImpl.getEquipListByInformId(sequenceNbr);
...@@ -209,6 +220,44 @@ public class EquipmentInformServiceImpl extends BaseService<EquipmentInformDto,E ...@@ -209,6 +220,44 @@ public class EquipmentInformServiceImpl extends BaseService<EquipmentInformDto,E
BeanUtils.copyProperties(t,sourceEquip); BeanUtils.copyProperties(t,sourceEquip);
sourceEquip.setSequenceNbr(t.getSourceEquipmentId()); sourceEquip.setSequenceNbr(t.getSourceEquipmentId());
equipmentServiceImpl.updateById(sourceEquip); equipmentServiceImpl.updateById(sourceEquip);
// 保存设备相关使用信息
EquipmentUseInfo useInfo = equipmentUseInfoServiceImpl.getOne(new LambdaQueryWrapper<EquipmentUseInfo>().eq(EquipmentUseInfo::getEquipmentId,t.getSourceEquipmentId()));
if(useInfo == null) {
useInfo = new EquipmentUseInfo();
}
useInfo.setLatitude(t.getLatitude());
useInfo.setLongitude(t.getLongitude());
useInfo.setUseAddress(t.getAddress());
useInfo.setUseSite(inform.getUseSite());
useInfo.setUseSiteCode(inform.getUseSiteCode());
//useInfo.setSpecialCode(UUID.randomUUID().toString().replaceAll("-",""));
//if(StringUtils.isEmpty(useInfo.getRegisterCode())) {
// useInfo.setRegisterCode(sourceEquip.getTypeId()+inform.getRegionCode()+ DateUtils.getYear(new Date())+"01");
//}
//useInfo.setRescueCode(UUID.randomUUID().toString().replaceAll("-",""));
//useInfo.setRegisterLicenceCode(UUID.randomUUID().toString().replaceAll("-",""));
if(useInfo.getRegisterTime() != null) {
useInfo.setRegisterTime(new Date());
}
useInfo.setStartUseTime(new Date());
useInfo.setIssueLicenceTime(new Date());
useInfo.setEquipmentId(t.getSourceEquipmentId());
useInfo.setUseUnitName(inform.getUseUnit());
useInfo.setUseUnitId(inform.getUseUnitId());
UnitInfo useUnit = unitInfoServiceImpl.getOne(new LambdaQueryWrapper<UnitInfo>().eq(UnitInfo::getIsDelete,false).eq(UnitInfo::getOrgUserId,inform.getUseUnitId()));
useInfo.setUseOrganizationCode(useUnit.getOrganizationCode());
useInfo.setPropertyUnitName(inform.getPropertyUnit());
useInfo.setPropertyUnitId(inform.getPropertyUnitId());
UnitInfo propertyUnit = unitInfoServiceImpl.getOne(new LambdaQueryWrapper<UnitInfo>().eq(UnitInfo::getIsDelete,false).eq(UnitInfo::getOrgUserId,inform.getPropertyUnitId()));
useInfo.setPropertyOrganizationCode(propertyUnit.getOrganizationCode());
equipmentUseInfoServiceImpl.saveOrUpdate(useInfo);
// 获取设备附件信息 保存附件信息 // 获取设备附件信息 保存附件信息
// 原附件信息 // 原附件信息
Map<String, List<AttachmentDto>> sourceAttach = sourceFileService.getAttachments(t.getSequenceNbr()); Map<String, List<AttachmentDto>> sourceAttach = sourceFileService.getAttachments(t.getSequenceNbr());
...@@ -283,6 +332,7 @@ public class EquipmentInformServiceImpl extends BaseService<EquipmentInformDto,E ...@@ -283,6 +332,7 @@ public class EquipmentInformServiceImpl extends BaseService<EquipmentInformDto,E
} }
} }
} }
model.setProcessStatus("0");
return model; return model;
} }
......
package com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.EquipmentUseInfo;
import com.yeejoin.amos.boot.module.tzs.flc.api.mapper.EquipmentUseInfoMapper;
import com.yeejoin.amos.boot.module.tzs.flc.api.service.IEquipmentUseInfoService;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentUseInfoDto;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
/**
* 设备使用信息表服务实现类
*
* @author system_generator
* @date 2022-01-05
*/
@Service
public class EquipmentUseInfoServiceImpl extends BaseService<EquipmentUseInfoDto,EquipmentUseInfo,EquipmentUseInfoMapper> implements IEquipmentUseInfoService {
/**
* 分页查询
*/
public Page<EquipmentUseInfoDto> queryForEquipmentUseInfoPage(Page<EquipmentUseInfoDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<EquipmentUseInfoDto> queryForEquipmentUseInfoList() {
return this.queryForList("" , false);
}
}
\ No newline at end of file
...@@ -65,8 +65,8 @@ dcs.url.sendalarm=http://198.87.103.158:8001/alarm-service/appalarm/sendalarm ...@@ -65,8 +65,8 @@ dcs.url.sendalarm=http://198.87.103.158:8001/alarm-service/appalarm/sendalarm
#系统上线时间 #系统上线时间
param.system.online.date = 2019-02-12 param.system.online.date = 2019-02-12
# 视频转码服务开关 off/on,默认关闭,数字换流站使用时开启 # 视频转码服务开关 hls(关)/flv(开),默认关闭,数字换流站使用时开启
param.isUseVideoTranscoding = off window.vedioFormat = hls
# 航天视频服务地址 # 航天视频服务地址
param.htvideo.url="http://192.168.4.174:9001"; param.htvideo.url="http://192.168.4.174:9001";
# 南瑞视频转码服务地址 # 南瑞视频转码服务地址
......
...@@ -65,8 +65,8 @@ dcs.url.sendalarm=http://198.87.103.158:8001/alarm-service/appalarm/sendalarm ...@@ -65,8 +65,8 @@ dcs.url.sendalarm=http://198.87.103.158:8001/alarm-service/appalarm/sendalarm
#系统上线时间 #系统上线时间
param.system.online.date = 2019-02-12 param.system.online.date = 2019-02-12
# 视频转码服务开关 off/on,默认关闭,数字换流站使用时开启 # 视频转码服务开关 hls(关)/flv(开),默认关闭,数字换流站使用时开启
param.isUseVideoTranscoding = off window.vedioFormat = hls
# 航天视频服务地址 # 航天视频服务地址
param.htvideo.url=""; param.htvideo.url="";
# 南瑞视频转码服务地址 # 南瑞视频转码服务地址
......
...@@ -71,8 +71,8 @@ dcs.url.sendalarm=http://198.87.103.158:8001/alarm-service/appalarm/sendalarm ...@@ -71,8 +71,8 @@ dcs.url.sendalarm=http://198.87.103.158:8001/alarm-service/appalarm/sendalarm
#系统上线时间 #系统上线时间
param.system.online.date = 2019-02-12 param.system.online.date = 2019-02-12
# 视频转码服务开关 off/on,默认关闭,数字换流站使用时开启 # 视频转码服务开关 hls(关)/flv(开),默认关闭,数字换流站使用时开启
param.isUseVideoTranscoding = off window.vedioFormat = hls
# 航天视频服务地址 # 航天视频服务地址
param.htvideo.url=""; param.htvideo.url="";
# 南瑞视频转码服务地址 # 南瑞视频转码服务地址
......
...@@ -65,8 +65,8 @@ dcs.url.sendalarm=http://198.87.103.158:8001/alarm-service/appalarm/sendalarm ...@@ -65,8 +65,8 @@ dcs.url.sendalarm=http://198.87.103.158:8001/alarm-service/appalarm/sendalarm
#系统上线时间 #系统上线时间
param.system.online.date = 2019-02-12 param.system.online.date = 2019-02-12
# 视频转码服务开关 off/on,默认关闭,数字换流站使用时开启 # 视频转码服务开关 hls(关)/flv(开),默认关闭,数字换流站使用时开启
param.isUseVideoTranscoding = off window.vedioFormat = hls
# 航天视频服务地址 # 航天视频服务地址
param.htvideo.url=""; param.htvideo.url="";
# 南瑞视频转码服务地址 # 南瑞视频转码服务地址
......
...@@ -58,8 +58,8 @@ dcs.url.sendalarm=http://198.87.103.158:8001/alarm-service/appalarm/sendalarm ...@@ -58,8 +58,8 @@ dcs.url.sendalarm=http://198.87.103.158:8001/alarm-service/appalarm/sendalarm
#系统上线时间 #系统上线时间
param.system.online.date = 2019-02-12 param.system.online.date = 2019-02-12
# 视频转码服务开关 off/on,默认关闭,数字换流站使用时开启 # 视频转码服务开关 hls(关)/flv(开),默认关闭,数字换流站使用时开启
param.isUseVideoTranscoding = off window.vedioFormat = hls
# 航天视频服务地址 # 航天视频服务地址
param.htvideo.url=""; param.htvideo.url="";
# 南瑞视频转码服务地址 # 南瑞视频转码服务地址
......
...@@ -2049,4 +2049,26 @@ ...@@ -2049,4 +2049,26 @@
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="keyong" id="1641367742-1">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="wl_equipment_specific_alarm_log" columnName="clean_time"/>
</not>
</preConditions>
<comment>wl_equipment_specific_alarm_log add column clean_time</comment>
<sql>
alter table `wl_equipment_specific_alarm_log` add column `clean_time` datetime DEFAULT NULL COMMENT '消除时间';
</sql>
</changeSet>
<changeSet author="keyong" id="1641367742-2">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="wl_equipment" columnName="clean_type"/>
</not>
</preConditions>
<comment>wl_equipment add column clean_type</comment>
<sql>
ALTER TABLE wl_equipment ADD COLUMN clean_type varchar(50) DEFAULT NULL COMMENT '警情消除方式(0:收到复位信号自动消除;1:警情处理确认后消除)';
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
\ No newline at end of file
...@@ -180,6 +180,11 @@ ...@@ -180,6 +180,11 @@
fireEquipmentName, fireEquipmentName,
concat(wlesal.equipment_specific_name,wlesal.equipment_specific_index_name) as alamContent, concat(wlesal.equipment_specific_name,wlesal.equipment_specific_index_name) as alamContent,
if(confirm_type is null,'未处理','已处理') handleStatus, if(confirm_type is null,'未处理','已处理') handleStatus,
IF (
wlesal.clean_time <![CDATA[<>]]> '',
'已消除',
'未消除'
) cleanStatus,
confirm_type as handleType, confirm_type as handleType,
wlesal.equipment_index_id AS fireEquipmentIndexId, wlesal.equipment_index_id AS fireEquipmentIndexId,
wlesal.equipment_specific_index_key AS fireEquipmentSpecificIndexKey, wlesal.equipment_specific_index_key AS fireEquipmentSpecificIndexKey,
...@@ -237,6 +242,13 @@ ...@@ -237,6 +242,13 @@
open="(" close=")" index="">#{item} open="(" close=")" index="">#{item}
</foreach> </foreach>
</if> </if>
<if test="param.id!=null and param.id!=''">AND d.fireEquipmentId = #{param.id}</if>
<if test="param.cleanStatus != null and param.cleanStatus != '' and param.cleanStatus == 1">AND
d.cleanStatus = '已消除'
</if>
<if test="param.cleanStatus != null and param.cleanStatus != '' and param.cleanStatus == 2">AND
d.cleanStatus = '未消除'
</if>
</where> </where>
ORDER BY d.createDate DESC ORDER BY d.createDate DESC
</select> </select>
...@@ -294,6 +306,11 @@ ...@@ -294,6 +306,11 @@
'已处理', '已处理',
'去确认' '去确认'
) handleStatus, ) handleStatus,
IF (
wlesal.clean_time <![CDATA[<>]]> '',
'已消除',
'未消除'
) cleanStatus,
wlesal.confirm_type AS handleType, wlesal.confirm_type AS handleType,
wlesal.system_codes AS systemCodes, wlesal.system_codes AS systemCodes,
wlesal.equipment_index_id AS fireEquipmentIndexId, wlesal.equipment_index_id AS fireEquipmentIndexId,
......
...@@ -1439,4 +1439,15 @@ ...@@ -1439,4 +1439,15 @@
WHERE WHERE
s.equipment_code = '92251100TZE44' s.equipment_code = '92251100TZE44'
</select> </select>
<select id="getEquipmentBySpecificId" resultType="String">
select
we.clean_type
from
wl_Equipment we
LEFT JOIN `wl_equipment_detail` wed ON wed.equipment_id = we.id
LEFT JOIN `wl_equipment_specific` wes ON wes.equipment_detail_id = wed.id
where
wes.id = #{specificId}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -805,5 +805,55 @@ ...@@ -805,5 +805,55 @@
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="kongfm" id="2022-01-05-01">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="tcb_equipment_use_info"/>
</not>
</preConditions>
<comment>add tcb_equipment_use_info table </comment>
<sql>
CREATE TABLE `tcb_equipment_use_info` (
`sequence_nbr` bigint(30) NOT NULL,
`use_unit_name` varchar(200) DEFAULT NULL COMMENT '使用单位名称',
`use_unit_id` bigint(30) DEFAULT NULL COMMENT '使用单位id',
`use_organization_code` varchar(30) DEFAULT NULL COMMENT '使用单位统一信用代码',
`property_unit_name` varchar(50) DEFAULT NULL COMMENT '产权单位名称',
`property_unit_id` bigint(30) DEFAULT NULL COMMENT '产权单位id',
`property_organization_code` varchar(30) DEFAULT NULL COMMENT '产权统一信用代码',
`use_address` varchar(300) DEFAULT NULL COMMENT '使用地址',
`longitude` varchar(50) DEFAULT NULL COMMENT '经度',
`latitude` varchar(255) DEFAULT NULL COMMENT '纬度',
`use_site` varchar(30) DEFAULT NULL COMMENT '使用场所',
`use_site_code` varchar(30) DEFAULT NULL COMMENT '使用场所编码',
`special_code` varchar(50) DEFAULT NULL COMMENT '特设编码',
`register_code` varchar(50) DEFAULT NULL COMMENT '设备注册代码',
`rescue_code` varchar(50) DEFAULT NULL COMMENT '96333识别码',
`register_licence_code` varchar(50) DEFAULT NULL COMMENT '使用登记证编码',
`register_org` varchar(30) DEFAULT NULL COMMENT '登记机关',
`register_org_id` bigint(30) DEFAULT NULL COMMENT '登记机关id',
`register_time` datetime DEFAULT NULL COMMENT '登记日期',
`issue_licence_time` datetime DEFAULT NULL COMMENT '发证日期',
`start_use_time` datetime DEFAULT NULL COMMENT '投入使用日期',
`rec_user_id` bigint(30) DEFAULT NULL COMMENT '更新人id',
`rec_user_name` varchar(100) DEFAULT NULL COMMENT '更新人名称',
`rec_date` datetime DEFAULT NULL COMMENT '更新时间',
`is_delete` bit(1) DEFAULT b'0' COMMENT '是否删除(0:未删除,1:已删除)',
PRIMARY KEY (`sequence_nbr`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='设备使用信息表';
</sql>
</changeSet>
<changeSet author="kongfm" id="2022-01-05-02">
<preConditions onFail="MARK_RAN">
<tableExists tableName="tcb_equipment_use_info"/>
</preConditions>
<comment>modify table tcb_equipment_use_info add equipment_id columns</comment>
<sql>
ALTER TABLE `tcb_equipment_use_info` add equipment_id bigint(50) 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