Commit 028cb122 authored by litengwei's avatar litengwei

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

parents 6ca072b0 b0fd24df
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;
}
}
......@@ -111,4 +111,6 @@ public interface EquipmentSpecificIndexMapper extends BaseMapper<EquipmentSpecif
List<EquipmentSpecificIndex> getEquipmentSpeIndexByIotCodeTrend(String iotCode, Integer isTrend, String fieldKey);
List<Map<String, Object>> getEquipSpecificScrap();
List<EquipmentSpecificIndex> getEquipIndexInIndex(@Param("list") List<String> listIndex);
}
......@@ -27,4 +27,11 @@ public interface IEquipmentSpecificIndexService extends IService<EquipmentSpecif
* @Date 2020/11/3 17:58
*/
List<EquipmentSpecificIndex> getEquipmentSpeIndexBySpeIotCode(String iotCode);
/**
* 根据指标key查询列表
* @param listIndex keys
* @return 列表
*/
List<EquipmentSpecificIndex> getEquipmentSpeIndexByIndex(List<String> listIndex);
}
package com.yeejoin.equipmanage.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yeejoin.equipmanage.common.entity.EquipmentSpecificIndex;
import com.yeejoin.equipmanage.mapper.EquipmentSpecificIndexMapper;
......@@ -23,4 +24,9 @@ public class EquipmentSpecificIndexServiceImpl extends ServiceImpl<EquipmentSpec
public List<EquipmentSpecificIndex> getEquipmentSpeIndexBySpeIotCode(String iotCode) {
return this.baseMapper.getEquipmentSpeIndexBySpeIotCode(iotCode);
}
@Override
public List<EquipmentSpecificIndex> getEquipmentSpeIndexByIndex(List<String> listIndex) {
return this.baseMapper.getEquipIndexInIndex(listIndex);
}
}
......@@ -482,4 +482,27 @@
where wed.production_date is not null
and wlsd.status != 7
</select>
<select id="getEquipIndexInIndex" resultType="com.yeejoin.equipmanage.common.entity.EquipmentSpecificIndex">
SELECT
si.equipment_specific_id AS equipmentId,
si.id,
si.`value`,
si.create_date,
si.update_date,
si.equipment_index_key,
si.equipment_specific_name,
es.position location,
es.`iot_code` AS iotCode
FROM
wl_equipment_specific_index si
LEFT JOIN wl_equipment_specific es ON si.equipment_specific_id = es.id
<where>
<if test="list != null and list.size > 0 and type = 'id'">
si.equipment_index_key IN
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
</where>
</select>
</mapper>
\ No newline at end of file
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