Commit c2d9a165 authored by 李秀明's avatar 李秀明

feat(设备告警): 接口参数修改

parent d20ca3f4
...@@ -3,7 +3,7 @@ package com.yeejoin.equipmanage.common.utils; ...@@ -3,7 +3,7 @@ package com.yeejoin.equipmanage.common.utils;
import java.util.List; import java.util.List;
public class CommonPageInfoParam extends CommonPageable { public class CommonPageInfoParam extends CommonPageable {
/** /**
* id * id
*/ */
...@@ -12,27 +12,27 @@ public class CommonPageInfoParam extends CommonPageable { ...@@ -12,27 +12,27 @@ public class CommonPageInfoParam extends CommonPageable {
* 名称 * 名称
*/ */
private String name; private String name;
/** /**
* 装备类型 * 装备类型
*/ */
private String equipType; private String equipType;
/** /**
* 编号 * 编号
*/ */
private String code; private String code;
/** /**
* 生产区域 * 生产区域
*/ */
private String productArea; private String productArea;
/** /**
* 保护对象 * 保护对象
*/ */
private String protectObj; private String protectObj;
/** /**
* 装备分类 * 装备分类
*/ */
...@@ -41,17 +41,17 @@ public class CommonPageInfoParam extends CommonPageable { ...@@ -41,17 +41,17 @@ public class CommonPageInfoParam extends CommonPageable {
* 开始时间 * 开始时间
*/ */
private String beginDate; private String beginDate;
/** /**
* 结束时间 * 结束时间
*/ */
private String endDate; private String endDate;
/** /**
* 评价模型id * 评价模型id
*/ */
private Long evalModelId; private Long evalModelId;
/** /**
* 风险点ID * 风险点ID
*/ */
...@@ -123,6 +123,10 @@ public class CommonPageInfoParam extends CommonPageable { ...@@ -123,6 +123,10 @@ public class CommonPageInfoParam extends CommonPageable {
* 所属建筑ids * 所属建筑ids
*/ */
private List<String> buildIds; private List<String> buildIds;
/**
* 所属建筑名称
*/
private String buildingName;
private String status; private String status;
...@@ -261,8 +265,8 @@ public class CommonPageInfoParam extends CommonPageable { ...@@ -261,8 +265,8 @@ public class CommonPageInfoParam extends CommonPageable {
public String getBizOrgCode() { public String getBizOrgCode() {
return bizOrgCode; return bizOrgCode;
} }
public String getProductArea() { public String getProductArea() {
return productArea; return productArea;
...@@ -405,4 +409,12 @@ public class CommonPageInfoParam extends CommonPageable { ...@@ -405,4 +409,12 @@ public class CommonPageInfoParam extends CommonPageable {
public void setBuildIds(List<String> buildIds) { public void setBuildIds(List<String> buildIds) {
this.buildIds = buildIds; this.buildIds = buildIds;
} }
public String getBuildingName() {
return buildingName;
}
public void setBuildingName(String buildingName) {
this.buildingName = buildingName;
}
} }
...@@ -76,29 +76,31 @@ public class CommonPageParamUtil { ...@@ -76,29 +76,31 @@ public class CommonPageParamUtil {
param.setIndexTypeCode(toString(queryRequests.get(i).getValue())); param.setIndexTypeCode(toString(queryRequests.get(i).getValue()));
} else if ("alarmLogId".equals(name)) { } else if ("alarmLogId".equals(name)) {
param.setAlarmLogId(toLong(queryRequests.get(i).getValue())); param.setAlarmLogId(toLong(queryRequests.get(i).getValue()));
} else if ("buildingName".equals(name)) {
param.setBuildingName(toString(queryRequests.get(i).getValue()));
} }
} }
if(commonPageable !=null){ if(commonPageable !=null){
param.setPageNumber(commonPageable.getPageNumber()); param.setPageNumber(commonPageable.getPageNumber());
param.setPageSize(commonPageable.getPageSize()); param.setPageSize(commonPageable.getPageSize());
} }
return param; return param;
} }
private static String toString(Object value) { private static String toString(Object value) {
if(null ==value || value =="" || "null".equals(value.toString()) || "''".equals(value.toString())){ if(null ==value || value =="" || "null".equals(value.toString()) || "''".equals(value.toString())){
return null; return null;
}else{ }else{
return value.toString(); return value.toString();
} }
} }
private static Long toLong(Object value) { private static Long toLong(Object value) {
if(null ==value || value ==""){ if(null ==value || value ==""){
return null; return null;
}else{ }else{
return Long.parseLong(value.toString()); return Long.parseLong(value.toString());
} }
} }
......
...@@ -96,6 +96,7 @@ public class EquipmentAlarmController extends AbstractBaseController { ...@@ -96,6 +96,7 @@ public class EquipmentAlarmController extends AbstractBaseController {
@RequestParam(value = "id", required = false) String id, @RequestParam(value = "id", required = false) String id,
@RequestParam(value = "cleanStatus", required = false) String cleanStatus, @RequestParam(value = "cleanStatus", required = false) String cleanStatus,
@RequestParam(value = "isRemoveShield", required = false) String isRemoveShield, @RequestParam(value = "isRemoveShield", required = false) String isRemoveShield,
@RequestParam(value = "buildingName", required = false) String buildingName,
CommonPageable commonPageable) { CommonPageable commonPageable) {
if (commonPageable.getPageNumber() == 0) { if (commonPageable.getPageNumber() == 0) {
commonPageable.setPageNumber(1); commonPageable.setPageNumber(1);
...@@ -168,6 +169,10 @@ public class EquipmentAlarmController extends AbstractBaseController { ...@@ -168,6 +169,10 @@ public class EquipmentAlarmController extends AbstractBaseController {
request14.setName("systemCode"); request14.setName("systemCode");
request14.setValue(StringUtil.isNotEmpty(systemCode) ? StringUtils.trimToNull(systemCode) : null); request14.setValue(StringUtil.isNotEmpty(systemCode) ? StringUtils.trimToNull(systemCode) : null);
queryRequests.add(request14); queryRequests.add(request14);
CommonRequest request15 = new CommonRequest();
request15.setName("buildingName");
request15.setValue(StringUtil.isNotEmpty(buildingName) ? StringUtils.trimToNull(buildingName) : null);
queryRequests.add(request15);
if (equioEnabled) { if (equioEnabled) {
if (!ValidationUtil.isEmpty(reginParams.getPersonIdentity())) { if (!ValidationUtil.isEmpty(reginParams.getPersonIdentity())) {
CommonRequest request13 = new CommonRequest(); CommonRequest request13 = new CommonRequest();
......
...@@ -214,6 +214,7 @@ ...@@ -214,6 +214,7 @@
wles.position wles.position
FROM wl_equipment_specific_alarm_log wlesal FROM wl_equipment_specific_alarm_log wlesal
LEFT JOIN wl_equipment_specific wles ON wlesal.equipment_specific_id = wles.id LEFT JOIN wl_equipment_specific wles ON wlesal.equipment_specific_id = wles.id
LEFT JOIN wl_warehouse_structure wws ON wles.warehouse_structure_id = wws.id
LEFT JOIN wl_equipment_detail wled ON wles.equipment_detail_id = wled.id LEFT JOIN wl_equipment_detail wled ON wles.equipment_detail_id = wled.id
LEFT JOIN wl_equipment we ON wled.equipment_id = we.id LEFT JOIN wl_equipment we ON wled.equipment_id = we.id
<where> <where>
...@@ -243,6 +244,9 @@ ...@@ -243,6 +244,9 @@
<if test="param.buildIds!=null and param.buildIds.size() > 0"> <if test="param.buildIds!=null and param.buildIds.size() > 0">
AND find_in_set(#{param.buildIds}, wles.warehouse_structure_id) AND find_in_set(#{param.buildIds}, wles.warehouse_structure_id)
</if> </if>
<if test="param.buildingName != null and param.buildingName != ''">
AND wws.full_name LIKE CONCAT('%', #{param.buildingName}, '%')
</if>
<if test="param.id!=null and param.id!=''">AND wlesal.equipment_specific_id = #{param.id}</if> <if test="param.id!=null and param.id!=''">AND wlesal.equipment_specific_id = #{param.id}</if>
<if test="param.cleanStatus != null and param.cleanStatus != '' and param.cleanStatus == 1">AND <if test="param.cleanStatus != null and param.cleanStatus != '' and param.cleanStatus == 1">AND
wlesal.clean_time IS NOT NULL wlesal.clean_time IS NOT NULL
......
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