Commit 1637ebb3 authored by 王鹿鹿's avatar 王鹿鹿

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

parents a6397f3e 2b65dc4e
...@@ -206,40 +206,46 @@ public class OrgUsrExcelDto extends BaseDto { ...@@ -206,40 +206,46 @@ public class OrgUsrExcelDto extends BaseDto {
@ExcelProperty(value = "岗位资质", index = 29) @ExcelProperty(value = "岗位资质", index = 29)
private String postQualification; private String postQualification;
@ApiModelProperty(value = "持证时间")
@ExcelProperty(value = "持证时间", index = 30)
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date holdingTime;
/*************************学历教育***********************/ /*************************学历教育***********************/
@ApiModelProperty(value = "第一学历") @ApiModelProperty(value = "第一学历")
@ExplicitConstraint(type = "XLLX", indexNum = 30, sourceClass = CommonExplicitConstraint.class) //动态下拉内容 @ExplicitConstraint(type = "XLLX", indexNum = 31, sourceClass = CommonExplicitConstraint.class) //动态下拉内容
@ExcelProperty(value = "第一学历", index = 30) @ExcelProperty(value = "第一学历", index = 31)
private String firstDegree; private String firstDegree;
@ApiModelProperty(value = "最高学历") @ApiModelProperty(value = "最高学历")
@ExplicitConstraint(type = "XLLX", indexNum = 31, sourceClass = CommonExplicitConstraint.class) //动态下拉内容 @ExplicitConstraint(type = "XLLX", indexNum = 32, sourceClass = CommonExplicitConstraint.class) //动态下拉内容
@ExcelProperty(value = "最高学历", index = 31) @ExcelProperty(value = "最高学历", index = 32)
private String highestEducation; private String highestEducation;
@ApiModelProperty(value = "学位") @ApiModelProperty(value = "学位")
@ExplicitConstraint(type = "XWLX", indexNum = 32, sourceClass = CommonExplicitConstraint.class) //动态下拉内容 @ExplicitConstraint(type = "XWLX", indexNum = 33, sourceClass = CommonExplicitConstraint.class) //动态下拉内容
@ExcelProperty(value = "学位", index = 32) @ExcelProperty(value = "学位", index = 33)
private String academicDegree; private String academicDegree;
@ApiModelProperty(value = "毕业院校") @ApiModelProperty(value = "毕业院校")
@ExcelProperty(value = "毕业院校", index = 33) @ExcelProperty(value = "毕业院校", index = 34)
private String school; private String school;
@ApiModelProperty(value = "毕业专业名称") @ApiModelProperty(value = "毕业专业名称")
@ExcelProperty(value = "毕业专业名称", index = 34) @ExcelProperty(value = "毕业专业名称", index = 35)
private String professionalName; private String professionalName;
/*************************工作履历岗***********************/ /*************************工作履历岗***********************/
@ApiModelProperty(value = "参加工作时间") @ApiModelProperty(value = "参加工作时间")
@ExcelProperty(value = "参加工作时间", index = 35) @ExcelProperty(value = "参加工作时间", index = 36)
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
private Date workingHours; private Date workingHours;
@ApiModelProperty(value = "参加消防部门工作时间") @ApiModelProperty(value = "参加消防部门工作时间")
@ExcelProperty(value = "参加消防部门工作时间", index = 36) @ExcelProperty(value = "参加消防部门工作时间", index = 37)
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
private Date fireWorkingHours; private Date fireWorkingHours;
......
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
IFNULL(b.employee_hierarchy, '无') IFNULL(b.employee_hierarchy, '无')
employeeHierarchy, employeeHierarchy,
IFNULL(b.areas_expertise, '无') areasExpertise, IFNULL(b.areas_expertise, '无') areasExpertise,
IFNULL(a.gender, '无') gender, IFNULL((SELECT NAME FROM cb_data_dictionary WHERE CODE = a.gender AND type = 'XB'), a.gender) gender,
IFNULL(b.post_qualification, '无') IFNULL(b.post_qualification, '无')
postQualification, year ( from_days( datediff( now( ), postQualification, year ( from_days( datediff( now( ),
a.birthday_time))) age a.birthday_time))) age
......
...@@ -146,4 +146,8 @@ public class EquipmentSpecificIndex extends BaseEntity { ...@@ -146,4 +146,8 @@ public class EquipmentSpecificIndex extends BaseEntity {
@TableField(exist = false) @TableField(exist = false)
private String buildId; private String buildId;
@ApiModelProperty(value = "是否遥测")
@TableField(exist = false)
private Integer isTrend;
} }
package com.yeejoin.equipmanage.common.entity.vo;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.util.Date;
/**
* 物联指标日志实体
* @author xxz
*/
@Data
@ApiModel(description = "物联指标日志实体")
public class IotIndexInfoVo {
/**
* 指标类型
*/
private String type;
/**
* 上报内容
*/
private String content;
/**
* 日志编号
*/
private String number;
/**
* 上报时间
*/
private String sendTime;
}
...@@ -3,8 +3,10 @@ package com.yeejoin.equipmanage.controller; ...@@ -3,8 +3,10 @@ package com.yeejoin.equipmanage.controller;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.yeejoin.equipmanage.common.constant.Constant;
import com.yeejoin.equipmanage.common.entity.vo.EquiplistSpecificBySystemVO; import com.yeejoin.equipmanage.common.entity.vo.EquiplistSpecificBySystemVO;
import com.yeejoin.equipmanage.common.utils.SpringUtils; import com.yeejoin.equipmanage.common.utils.*;
import com.yeejoin.equipmanage.fegin.IotFeign;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
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;
...@@ -31,7 +33,6 @@ import com.yeejoin.equipmanage.common.entity.dto.EquipmentSpecificDTO; ...@@ -31,7 +33,6 @@ import com.yeejoin.equipmanage.common.entity.dto.EquipmentSpecificDTO;
import com.yeejoin.equipmanage.common.entity.dto.SourceNameListDTO; import com.yeejoin.equipmanage.common.entity.dto.SourceNameListDTO;
import com.yeejoin.equipmanage.common.entity.vo.ComplementCodeVO; import com.yeejoin.equipmanage.common.entity.vo.ComplementCodeVO;
import com.yeejoin.equipmanage.common.entity.vo.SourceNameByEquipSpeIdVO; import com.yeejoin.equipmanage.common.entity.vo.SourceNameByEquipSpeIdVO;
import com.yeejoin.equipmanage.common.utils.CommonResponseUtil;
import com.yeejoin.equipmanage.common.vo.EquipmentOnCarVo; import com.yeejoin.equipmanage.common.vo.EquipmentOnCarVo;
import com.yeejoin.equipmanage.common.vo.VideoOnEquipmentSpecificVo; import com.yeejoin.equipmanage.common.vo.VideoOnEquipmentSpecificVo;
import com.yeejoin.equipmanage.mapper.EquipmentSpecificMapper; import com.yeejoin.equipmanage.mapper.EquipmentSpecificMapper;
...@@ -66,6 +67,8 @@ import java.util.stream.Collectors; ...@@ -66,6 +67,8 @@ import java.util.stream.Collectors;
@RequestMapping(value = "/equipSpecific") @RequestMapping(value = "/equipSpecific")
public class EquipmentSpecificController extends AbstractBaseController { public class EquipmentSpecificController extends AbstractBaseController {
public static final int RESULT_SUCCESS_CODE = 200;
@Autowired @Autowired
IEquipmentSpecificSerivce equipmentSpecificSerivce; IEquipmentSpecificSerivce equipmentSpecificSerivce;
...@@ -81,6 +84,9 @@ public class EquipmentSpecificController extends AbstractBaseController { ...@@ -81,6 +84,9 @@ public class EquipmentSpecificController extends AbstractBaseController {
@Autowired @Autowired
FireFightingSystemServiceImpl fireFightingSystemServiceImpl; FireFightingSystemServiceImpl fireFightingSystemServiceImpl;
@Autowired
IotFeign iotFeign;
/** /**
* 补码页面分页 * 补码页面分页
* *
...@@ -355,4 +361,41 @@ public class EquipmentSpecificController extends AbstractBaseController { ...@@ -355,4 +361,41 @@ public class EquipmentSpecificController extends AbstractBaseController {
return equipmentSpecificSerivce.getListByEquipmentCode(code); return equipmentSpecificSerivce.getListByEquipmentCode(code);
} }
@RequestMapping(value = "/equipment/iotIndexInfo/{equipSpeId}", method = RequestMethod.GET)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "根据装备id获取物联日志", notes = "根据装备id获取物联日志")
public ResponseModel getEquipmentIotIndexInfo(@PathVariable String equipSpeId, @RequestParam String beginDate, @RequestParam String endDate,
@RequestParam(required = false) Integer isTrend, @RequestParam(required = false) String fieldKey) {
// 1.根据 equipSpeId 查询装备iotCode
EquipmentSpecific equipmentSpecific = equipmentSpecificMapper.selectById(equipSpeId);
if (ObjectUtils.isEmpty(equipmentSpecific)) {
return CommonResponseUtil.failure("未查询到装备信息!");
}
String iotCode = equipmentSpecific.getIotCode();
String prefix = null;
String suffix = null;
if (StringUtil.isNotEmpty(iotCode) && iotCode.length() > 8) {
prefix = iotCode.substring(0, 8);
suffix = iotCode.substring(8);
} else {
return CommonResponseUtil.failure("装备物联编码错误,请确认!");
}
ResponseModel entity = null;
try {
entity = iotFeign.selectList(getAppKey(), getProduct(), getToken(), beginDate, endDate, prefix, suffix);
} catch (Exception e) {
e.printStackTrace();
log.error("调用iot服务出错");
return CommonResponseUtil.failure("请求失败");
}
if (RESULT_SUCCESS_CODE != entity.getStatus() && ObjectUtils.isEmpty(entity.getResult())) {
log.error("查询物联日志数据为空或iotCode为 (" + iotCode + ") 的装备不存在于物联系统中!");
return CommonResponseUtil.failure("物联日志数据为空");
}
return CommonResponseUtil.success(equipmentSpecificSerivce.getIndexInfoList(iotCode, entity, isTrend, fieldKey));
}
} }
...@@ -108,4 +108,6 @@ public interface EquipmentSpecificIndexMapper extends BaseMapper<EquipmentSpecif ...@@ -108,4 +108,6 @@ public interface EquipmentSpecificIndexMapper extends BaseMapper<EquipmentSpecif
List<Map<String, Object>> getEquipSpecificIndexByUpdateDateDesc(); List<Map<String, Object>> getEquipSpecificIndexByUpdateDateDesc();
List<EquipmentSpecificIndex> getEquipmentSpeIndexByIotCodeTrend(String iotCode, Integer isTrend, String fieldKey);
} }
...@@ -14,9 +14,11 @@ import com.yeejoin.equipmanage.common.entity.EquipmentSpecificIndex; ...@@ -14,9 +14,11 @@ import com.yeejoin.equipmanage.common.entity.EquipmentSpecificIndex;
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;
import com.yeejoin.equipmanage.common.entity.vo.IotIndexInfoVo;
import com.yeejoin.equipmanage.common.entity.vo.SourceNameByEquipSpeIdVO; import com.yeejoin.equipmanage.common.entity.vo.SourceNameByEquipSpeIdVO;
import com.yeejoin.equipmanage.common.vo.*; import com.yeejoin.equipmanage.common.vo.*;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
...@@ -224,4 +226,15 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> { ...@@ -224,4 +226,15 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
* @return 装备list * @return 装备list
*/ */
List<Map<String, Object>> getListByEquipmentCode(String code); List<Map<String, Object>> getListByEquipmentCode(String code);
/**
* 根据装备id获取物联日志
* @param iotCode code
* @param entity 日志
* @param isTrend 是否遥测 不传默认查遥测遥信
* @param fieldKey 指标key 不传默认查全部指标
* @return 物联日志list
*/
List<IotIndexInfoVo> getIndexInfoList(String iotCode, ResponseModel entity, Integer isTrend, String fieldKey);
} }
...@@ -5,6 +5,13 @@ import java.text.SimpleDateFormat; ...@@ -5,6 +5,13 @@ import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONArray;
import com.yeejoin.equipmanage.common.entity.vo.*;
import com.yeejoin.equipmanage.common.utils.CommonResponseUtil;
import com.yeejoin.equipmanage.common.vo.*;
import com.yeejoin.equipmanage.fegin.IotFeign;
import com.yeejoin.equipmanage.mapper.*;
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;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -55,25 +62,6 @@ import com.yeejoin.equipmanage.common.entity.VideoEquipmentSpecific; ...@@ -55,25 +62,6 @@ import com.yeejoin.equipmanage.common.entity.VideoEquipmentSpecific;
import com.yeejoin.equipmanage.common.entity.Warehouse; import com.yeejoin.equipmanage.common.entity.Warehouse;
import com.yeejoin.equipmanage.common.entity.WarehouseStructure; import com.yeejoin.equipmanage.common.entity.WarehouseStructure;
import com.yeejoin.equipmanage.common.entity.dto.EquipmentSpecificDTO; import com.yeejoin.equipmanage.common.entity.dto.EquipmentSpecificDTO;
import com.yeejoin.equipmanage.common.entity.vo.AlamVideoVO;
import com.yeejoin.equipmanage.common.entity.vo.AlarmInfoVO;
import com.yeejoin.equipmanage.common.entity.vo.AlarmVO;
import com.yeejoin.equipmanage.common.entity.vo.ComplementCodeVO;
import com.yeejoin.equipmanage.common.entity.vo.CurrAlaramVO;
import com.yeejoin.equipmanage.common.entity.vo.DetailPaneVO;
import com.yeejoin.equipmanage.common.entity.vo.DevInfoVO;
import com.yeejoin.equipmanage.common.entity.vo.DevOverviewVO;
import com.yeejoin.equipmanage.common.entity.vo.EquipmentIndexVO;
import com.yeejoin.equipmanage.common.entity.vo.EquipmentSecificDetailVO;
import com.yeejoin.equipmanage.common.entity.vo.EquipmentSpecificVo;
import com.yeejoin.equipmanage.common.entity.vo.ManufacturerVO;
import com.yeejoin.equipmanage.common.entity.vo.PartDetailVO;
import com.yeejoin.equipmanage.common.entity.vo.ProductInfoVO;
import com.yeejoin.equipmanage.common.entity.vo.SourceNameByEquipSpeIdVO;
import com.yeejoin.equipmanage.common.entity.vo.SurrVideoVO;
import com.yeejoin.equipmanage.common.entity.vo.TechInfoListVO;
import com.yeejoin.equipmanage.common.entity.vo.TechInfoVO;
import com.yeejoin.equipmanage.common.entity.vo.VideoVO;
import com.yeejoin.equipmanage.common.enums.AlarmStatusEnum; import com.yeejoin.equipmanage.common.enums.AlarmStatusEnum;
import com.yeejoin.equipmanage.common.enums.BillContentEnum; import com.yeejoin.equipmanage.common.enums.BillContentEnum;
import com.yeejoin.equipmanage.common.enums.BitmapEnum; import com.yeejoin.equipmanage.common.enums.BitmapEnum;
...@@ -85,21 +73,6 @@ import com.yeejoin.equipmanage.common.exception.BaseException; ...@@ -85,21 +73,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.common.vo.EquipFor3DVO;
import com.yeejoin.equipmanage.common.vo.EquipmentDate;
import com.yeejoin.equipmanage.common.vo.EquipmentDetailVo;
import com.yeejoin.equipmanage.common.vo.EquipmentOnCarVo;
import com.yeejoin.equipmanage.common.vo.EquipmentSpecific3dVo;
import com.yeejoin.equipmanage.common.vo.VideoOnEquipmentSpecificVo;
import com.yeejoin.equipmanage.mapper.EquipmentIndexMapper;
import com.yeejoin.equipmanage.mapper.EquipmentSpecificAlarmMapper;
import com.yeejoin.equipmanage.mapper.EquipmentSpecificMapper;
import com.yeejoin.equipmanage.mapper.FireFightingSystemMapper;
import com.yeejoin.equipmanage.mapper.FormInstanceMapper;
import com.yeejoin.equipmanage.mapper.SignalClassifyMapper;
import com.yeejoin.equipmanage.mapper.UploadFileMapper;
import com.yeejoin.equipmanage.mapper.VideoMapper;
import com.yeejoin.equipmanage.mapper.WarehouseStructureMapper;
import com.yeejoin.equipmanage.service.ICarService; import com.yeejoin.equipmanage.service.ICarService;
import com.yeejoin.equipmanage.service.IEquPropertyService; import com.yeejoin.equipmanage.service.IEquPropertyService;
import com.yeejoin.equipmanage.service.IEquipmentCategoryService; import com.yeejoin.equipmanage.service.IEquipmentCategoryService;
...@@ -123,6 +96,10 @@ import com.yeejoin.equipmanage.service.IVideoService; ...@@ -123,6 +96,10 @@ import com.yeejoin.equipmanage.service.IVideoService;
import com.yeejoin.equipmanage.service.IWarehouseService; import com.yeejoin.equipmanage.service.IWarehouseService;
import com.yeejoin.equipmanage.service.IWarehouseStructureService; 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.restful.utils.ResponseModel;
import static org.typroject.tyboot.core.foundation.utils.DateTimeUtil.ISO8601_DATE_HOUR_MIN_SEC;
/** /**
* @author ZeHua Li * @author ZeHua Li
...@@ -233,6 +210,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -233,6 +210,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
@Autowired @Autowired
FormInstanceMapper formInstanceMapper; FormInstanceMapper formInstanceMapper;
@Autowired
EquipmentSpecificIndexMapper equipmentSpecificIndexMapper;
@Value("${systemctl.sync.switch}") @Value("${systemctl.sync.switch}")
private Boolean syncSwitch; private Boolean syncSwitch;
...@@ -1792,4 +1772,48 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -1792,4 +1772,48 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
return list; return list;
} }
@Override
public List<IotIndexInfoVo> getIndexInfoList(String iotCode, ResponseModel entity, Integer isTrend, String fieldKey) {
List<IotIndexInfoVo> infoVoList = new ArrayList<>();
String json = JSON.toJSONString(entity.getResult());
List<Map<String, String>> listObject = (List<Map<String, String>>) JSONArray.parse(json);
List<EquipmentSpecificIndex> indexes = equipmentSpecificIndexMapper.getEquipmentSpeIndexByIotCodeTrend(iotCode, isTrend, fieldKey);
if (!ObjectUtils.isEmpty(indexes)) {
Map<String, EquipmentSpecificIndex> collect = indexes.stream().collect(Collectors.toMap(EquipmentSpecificIndex::getNameKey, equipmentSpecificIndex -> equipmentSpecificIndex));
for(Map<String, String> mapList : listObject){
String dateStr = null;
String deviceName = String.valueOf(mapList.get("deviceName"));
try {
String value = String.valueOf(mapList.get("time"));
String strDate = value.substring(0, 19);
SimpleDateFormat sdf = new SimpleDateFormat(ISO8601_DATE_HOUR_MIN_SEC);
sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
Date date =sdf.parse(strDate);
dateStr = DateTimeUtil.format(date, DateTimeUtil.ISO_DATE_HOUR24_MIN_SEC);
} catch (Exception e) {
log.error("日期转换失败");
}
for (Map.Entry entry : mapList.entrySet()){
if (!ObjectUtils.isEmpty(entry.getValue()) && !"null".equals(entry.getValue())) {
EquipmentSpecificIndex equipmentSpecificIndex = collect.get(entry.getKey());
if (!ObjectUtils.isEmpty(equipmentSpecificIndex)) {
IotIndexInfoVo iotIndexInfoVo = new IotIndexInfoVo();
iotIndexInfoVo.setType(equipmentSpecificIndex.getIndexName());
iotIndexInfoVo.setNumber(deviceName);
if (equipmentSpecificIndex.getIsTrend() == 1) {
iotIndexInfoVo.setContent(equipmentSpecificIndex.getIndexName() + entry.getValue() + equipmentSpecificIndex.getIndexUnitName());
} else {
iotIndexInfoVo.setContent(equipmentSpecificIndex.getEquipmentIndexName());
}
iotIndexInfoVo.setSendTime(dateStr);
infoVoList.add(iotIndexInfoVo);
}
}
}
}
}
return infoVoList;
}
} }
...@@ -264,8 +264,7 @@ public class ExcelServiceImpl { ...@@ -264,8 +264,7 @@ public class ExcelServiceImpl {
AircraftDto.class, dataSourcesImpl, false); AircraftDto.class, dataSourcesImpl, false);
break; break;
case "XFDW": case "XFDW":
// 暂时先还原代码不加 “非” ,由此原因导致导出队伍没有数据,后续若需修改请排查加了此逻辑的相关导出功能 if(!authFalg) {
if(authFalg) {
ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), null, ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), null,
FireTeamDto.class, dataSourcesImpl, false); FireTeamDto.class, dataSourcesImpl, false);
break; break;
......
spring.application.name=AMOS-EQUIPMANAGE-WJ spring.application.name=AMOS-EQUIPMANAGE-KY
server.servlet.context-path=/equip server.servlet.context-path=/equip
server.port=8100 server.port=8100
#server.servlet.context-path=/case #server.servlet.context-path=/case
spring.profiles.active=dev2 spring.profiles.active=dev
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#mybatis mapper file #mybatis mapper file
mybatis.mapper-locations=classpath:mapper/*.xml mybatis.mapper-locations=classpath:mapper/*.xml
...@@ -20,7 +20,7 @@ pagehelper.support-methods-arguments=true ...@@ -20,7 +20,7 @@ pagehelper.support-methods-arguments=true
spring.main.allow-bean-definition-overriding=true spring.main.allow-bean-definition-overriding=true
#liquibase #liquibase
spring.liquibase.change-log=classpath:/changelog/changelog-master.xml spring.liquibase.change-log=classpath:/changelog/changelog-master.xml
spring.liquibase.enabled=true spring.liquibase.enabled=false
#\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u5927\u5C0F #\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u5927\u5C0F
spring.servlet.multipart.maxFileSize=100MB spring.servlet.multipart.maxFileSize=100MB
spring.servlet.multipart.maxRequestSize=100MB spring.servlet.multipart.maxRequestSize=100MB
......
...@@ -66,4 +66,93 @@ ...@@ -66,4 +66,93 @@
alter table `cb_org_usr` add column `is_certificate` int(10) DEFAULT 0 COMMENT '是否持证'; alter table `cb_org_usr` add column `is_certificate` int(10) DEFAULT 0 COMMENT '是否持证';
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="zs" id="202207220937-1">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="cb_water_resource"/>
</not>
</preConditions>
<comment>create table cb_water_resource 水源表</comment>
<sql>
CREATE TABLE `cb_water_resource` (
`sequence_nbr` bigint(32) NOT NULL COMMENT '唯一主键',
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '资源名称',
`address` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地址',
`resource_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资源类型(消火栓、消防水鹤、天然水源、消防水池)',
`resource_type_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资源类型(消火栓、消防水鹤、天然水源、消防水池)',
`belong_building_id` bigint(32) NULL DEFAULT NULL COMMENT '所在建筑id',
`belong_building` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所在建筑',
`belong_fighting_system_id` bigint(32) NULL DEFAULT NULL COMMENT '所属消防系统id',
`belong_fighting_system` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属消防系统',
`management_unit_id` bigint(32) NULL DEFAULT NULL COMMENT '管理单位id',
`management_unit` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '管理单位',
`maintenance_unit_id` bigint(32) NULL DEFAULT NULL COMMENT '维保单位id',
`maintenance_unit` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '维保单位',
`build_date` datetime(0) NULL DEFAULT NULL COMMENT '建造日期',
`enable_date` datetime(0) NULL DEFAULT NULL COMMENT '启用日期',
`orientation_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '方位图',
`reality_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '实景图',
`contact_user` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系人姓名',
`contact_phone` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系人电话',
`is_iot` bit(1) NULL DEFAULT b'1' COMMENT '是否有物联参数(1有,0没有)',
`rescue_org_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '消防救援机构_通用唯一识别码',
`administrative_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '行政区划代码',
`rec_user_id` bigint(32) NULL DEFAULT NULL COMMENT '更新人员id',
`rec_user_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人员',
`rec_date` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`is_delete` bit(1) NULL DEFAULT b'1' COMMENT '是否启用(1启用、0未启用)',
`org_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组织机构代码',
`longitude` double(18, 14) NULL DEFAULT NULL COMMENT '经度',
`latitude` double(18, 14) NULL DEFAULT NULL COMMENT '纬度',
`equip_id` bigint(20) NULL DEFAULT NULL COMMENT '设施定义',
`equip_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设施定义名称',
`equip_category_id` bigint(20) NULL DEFAULT NULL COMMENT '设施分类',
`equip_category_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设施分类名称',
`equip_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设施编码',
`maintenance_period` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '维保周期',
`biz_org_code` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机构编码',
`equip_category_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设施分类编码',
`biz_org_name` varchar(104) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机构/部门名称',
`contact_user_id` bigint(20) NULL DEFAULT NULL COMMENT '联系人id',
PRIMARY KEY (`sequence_nbr`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '水源基本信息' ROW_FORMAT = Dynamic;
</sql>
</changeSet>
<changeSet author="zs" id="202207220937-2">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="cb_water_resource_pool"/>
</not>
</preConditions>
<comment>create table cb_water_resource_pool 水源关联的水池表</comment>
<sql>
CREATE TABLE `cb_water_resource_pool` (
`sequence_nbr` bigint(32) NOT NULL COMMENT '主键',
`resource_id` bigint(32) NOT NULL COMMENT '资源id',
`volume` float(10, 2) NULL DEFAULT NULL COMMENT '容积(m³)',
`status_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '水源可用状态类别代码',
`status` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '水源可用状态类别名称',
`section` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属路段',
`intake_form` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '取水方式',
`intake_height` float(10, 1) NULL DEFAULT NULL COMMENT '取水高度(cm)',
`elevation_difference` float(10, 1) NULL DEFAULT NULL COMMENT '水源标高差(cm)',
`parking_position` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '停车位置',
`parking_num` int(11) NULL DEFAULT NULL COMMENT '停车数量(个)',
`pipe_type_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '消防给水管网形式类型代码',
`pipe_type_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '消防给水管网形式类型名称',
`water_supply_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '供水单位名称',
`rec_user_id` bigint(32) NULL DEFAULT NULL COMMENT '更新人员id',
`rec_user_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人员',
`rec_date` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`is_delete` bit(1) NULL DEFAULT b'0' COMMENT '是否删除(1删除、0未删除)',
`min_water_level` float(10, 2) NULL DEFAULT NULL COMMENT '最低报警水位',
`max_water_level` float(10, 2) NULL DEFAULT NULL COMMENT '最高报警水位',
`level_device_id` bigint(32) NULL DEFAULT NULL COMMENT '水池液位显示装置id',
`level_device_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '水池液位显示装置名称',
PRIMARY KEY (`sequence_nbr`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '消防水池' ROW_FORMAT = Dynamic;
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
\ No newline at end of file
...@@ -456,4 +456,35 @@ WHERE wles.id=#{id} ...@@ -456,4 +456,35 @@ WHERE wles.id=#{id}
esi.update_date DESC esi.update_date DESC
LIMIT 50 LIMIT 50
</select> </select>
<select id="getEquipmentSpeIndexByIotCodeTrend" resultType="com.yeejoin.equipmanage.common.entity.EquipmentSpecificIndex">
SELECT
wei.id AS id,
wei.name_key AS nameKey,
wesi.value AS value,
wesi.equipment_specific_id AS equipmentSpecificId,
wesi.equipment_index_id AS equipmentIndexId,
wes.org_code AS code,
wes.iot_code AS iotCode,
wes.org_code AS orgCode,
wei.type_code AS typeCode,
wei.name AS indexName,
wei.unit AS indexUnitName,
wei.is_trend isTrend,
wesi.value_label,
wesi.equipment_index_name,
wesi.update_date AS updateDate
FROM
wl_equipment_specific_index AS wesi
LEFT JOIN wl_equipment_specific AS wes ON wes.id = wesi.equipment_specific_id
LEFT JOIN wl_equipment_index AS wei ON wei.id = wesi.equipment_index_id
WHERE
wes.iot_code = #{iotCode}
<if test="isTrend != null">
AND wei.is_trend = #{isTrend}
</if>
<if test="fieldKey != null">
AND wei.name_key = #{fieldKey}
</if>
</select>
</mapper> </mapper>
\ No newline at end of file
## DB properties: ## DB properties:
spring.datasource.url=jdbc:mysql://172.16.6.60:3306/xiy_amos_jcs_biz?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8 spring.datasource.url=jdbc:mysql://172.16.11.201:3306/dl_amos_common_biz?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username=root spring.datasource.username=root
spring.datasource.password=root_123 spring.datasource.password=Yeejoin@2020
## eureka properties: ## eureka properties:
eureka.client.serviceUrl.defaultZone=http://172.16.3.97:10001/eureka/ eureka.client.serviceUrl.defaultZone=http://172.16.11.201:10001/eureka/
## redis properties:danger/list ## redis properties:danger/list
spring.redis.database=1 spring.redis.database=1
spring.redis.host=172.16.3.35 spring.redis.host=172.16.11.201
spring.redis.port=6379 spring.redis.port=6379
spring.redis.password=yeejoin@2020 spring.redis.password=1234560
## ES properties: ## ES properties:
biz.elasticsearch.address=172.16.6.60 biz.elasticsearch.address=172.16.11.201
spring.data.elasticsearch.cluster-name=elasticsearch spring.data.elasticsearch.cluster-name=elasticsearch
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300 spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200 spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
...@@ -22,7 +22,7 @@ spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200 ...@@ -22,7 +22,7 @@ spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
## emqx properties: ## emqx properties:
emqx.clean-session=true emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]} emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.3.35:2883 emqx.broker=tcp://1172.16.11.201:1883
emqx.user-name=super emqx.user-name=super
emqx.password=a123456 emqx.password=a123456
...@@ -30,10 +30,10 @@ emqx.password=a123456 ...@@ -30,10 +30,10 @@ emqx.password=a123456
rule.definition.load=false rule.definition.load=false
rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto
rule.definition.default-agency=jcs rule.definition.default-agency=jcs
rule.definition.localIp=172.16.3.35 rule.definition.localIp=172.16.11.201
## mongodb properties: ## mongodb properties:
#spring.data.mongodb.uri=mongodb://172.16.6.60:27017/command_db #spring.data.mongodb.uri=mongodb://172.16.11.201:27017/command_db
## file properties: ## file properties:
file.url=http://39.98.45.134:9000/ file.url=http://39.98.45.134:9000/
......
...@@ -34,7 +34,7 @@ spring.datasource.hikari.connection-test-query=SELECT 1 ...@@ -34,7 +34,7 @@ spring.datasource.hikari.connection-test-query=SELECT 1
##liquibase ##liquibase
spring.liquibase.change-log = classpath:/db/changelog/changelog-master.xml spring.liquibase.change-log = classpath:/db/changelog/changelog-master.xml
spring.liquibase.enabled= true spring.liquibase.enabled= false
## eureka properties: ## eureka properties:
eureka.client.registry-fetch-interval-seconds=5 eureka.client.registry-fetch-interval-seconds=5
......
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