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

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

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