Commit b8696252 authored by chenzhao's avatar chenzhao

修改代码

parent 54d411dc
...@@ -111,6 +111,8 @@ public class CommonPageInfoParam extends CommonPageable { ...@@ -111,6 +111,8 @@ public class CommonPageInfoParam extends CommonPageable {
private String status; private String status;
private String bizOrgCode;
private String isRemoveShield; private String isRemoveShield;
private String isFireAlarm; private String isFireAlarm;
...@@ -198,6 +200,14 @@ public class CommonPageInfoParam extends CommonPageable { ...@@ -198,6 +200,14 @@ public class CommonPageInfoParam extends CommonPageable {
public void setEquipType(String equipType) { public void setEquipType(String equipType) {
this.equipType = equipType; this.equipType = equipType;
} }
public void setBizOrgCode(String bizOrgCode) {
this.bizOrgCode = bizOrgCode;
}
public String getBizOrgCode() {
return bizOrgCode;
}
......
...@@ -63,7 +63,9 @@ public class CommonPageParamUtil { ...@@ -63,7 +63,9 @@ public class CommonPageParamUtil {
param.setIsRemoveShield(toString(queryRequests.get(i).getValue())); param.setIsRemoveShield(toString(queryRequests.get(i).getValue()));
} else if("isRemovedFire".equals(name)){ } else if("isRemovedFire".equals(name)){
param.setIsRemovedFire(toString(queryRequests.get(i).getValue())); param.setIsRemovedFire(toString(queryRequests.get(i).getValue()));
} } else if("bizOrgCode".equals(name)){
param.setBizOrgCode(toString(queryRequests.get(i).getValue()));
}
} }
if(commonPageable !=null){ if(commonPageable !=null){
param.setPageNumber(commonPageable.getPageNumber()); param.setPageNumber(commonPageable.getPageNumber());
......
...@@ -7,6 +7,7 @@ import java.util.Map; ...@@ -7,6 +7,7 @@ import java.util.Map;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
...@@ -101,6 +102,7 @@ public class EquipmentAlarmController extends AbstractBaseController { ...@@ -101,6 +102,7 @@ public class EquipmentAlarmController extends AbstractBaseController {
if (commonPageable.getPageNumber() == 0) { if (commonPageable.getPageNumber() == 0) {
commonPageable.setPageNumber(1); commonPageable.setPageNumber(1);
} }
ReginParams reginParams = getSelectedOrgInfo();
List<CommonRequest> queryRequests = new ArrayList<>(); List<CommonRequest> queryRequests = new ArrayList<>();
CommonRequest request = new CommonRequest(); CommonRequest request = new CommonRequest();
request.setName("beginDate"); request.setName("beginDate");
...@@ -154,6 +156,10 @@ public class EquipmentAlarmController extends AbstractBaseController { ...@@ -154,6 +156,10 @@ public class EquipmentAlarmController extends AbstractBaseController {
request12.setName("isRemoveShield"); request12.setName("isRemoveShield");
request12.setValue(StringUtil.isNotEmpty(isRemoveShield) ? StringUtils.trimToNull(isRemoveShield) : null); request12.setValue(StringUtil.isNotEmpty(isRemoveShield) ? StringUtils.trimToNull(isRemoveShield) : null);
queryRequests.add(request12); queryRequests.add(request12);
CommonRequest request13 = new CommonRequest();
request13.setName("bizOrgCode");
request13.setValue(StringUtil.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null );
queryRequests.add(request13);
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);
...@@ -220,6 +226,7 @@ public class EquipmentAlarmController extends AbstractBaseController { ...@@ -220,6 +226,7 @@ public class EquipmentAlarmController extends AbstractBaseController {
@RequestParam(value = "isRemovedFire", required = false) String isRemovedFire, @RequestParam(value = "isRemovedFire", required = false) String isRemovedFire,
CommonPageable commonPageable) { CommonPageable commonPageable) {
List<CommonRequest> queryRequests = new ArrayList<>(); List<CommonRequest> queryRequests = new ArrayList<>();
ReginParams reginParams = getSelectedOrgInfo();
CommonRequest request = new CommonRequest(); CommonRequest request = new CommonRequest();
request.setName("beginDate"); request.setName("beginDate");
request.setValue(StringUtil.isNotEmpty(beginDate) ? StringUtils.trimToNull(beginDate).substring(0, 10) + " 00:00:00" : null); request.setValue(StringUtil.isNotEmpty(beginDate) ? StringUtils.trimToNull(beginDate).substring(0, 10) + " 00:00:00" : null);
...@@ -269,6 +276,10 @@ public class EquipmentAlarmController extends AbstractBaseController { ...@@ -269,6 +276,10 @@ public class EquipmentAlarmController extends AbstractBaseController {
request13.setName("isRemovedFire"); request13.setName("isRemovedFire");
request13.setValue(StringUtil.isNotEmpty(isRemovedFire) ? StringUtils.trimToNull(isRemovedFire) : null); request13.setValue(StringUtil.isNotEmpty(isRemovedFire) ? StringUtils.trimToNull(isRemovedFire) : null);
queryRequests.add(request13); queryRequests.add(request13);
CommonRequest request14 = new CommonRequest();
request13.setName("bizOrgCode");
request13.setValue(StringUtil.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null );
queryRequests.add(request14);
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);
......
...@@ -250,6 +250,9 @@ ...@@ -250,6 +250,9 @@
<if test="param.isRemoveShield != null and param.isRemoveShield != ''">AND <if test="param.isRemoveShield != null and param.isRemoveShield != ''">AND
wlesal.type != 'SHIELD' wlesal.type != 'SHIELD'
</if> </if>
<if test="param.bizOrgCode != null and param.bizOrgCode != ''">AND
wles.biz_org_code like concat (#{param.bizOrgCode},'%')
</if>
</where> </where>
ORDER BY wlesal.create_date DESC ORDER BY wlesal.create_date DESC
...@@ -320,6 +323,7 @@ ...@@ -320,6 +323,7 @@
wl_equipment_specific_alarm_log wlesal wl_equipment_specific_alarm_log wlesal
LEFT JOIN wl_equipment we ON wlesal.equipment_code = we.code LEFT JOIN wl_equipment we ON wlesal.equipment_code = we.code
LEFT JOIN wl_equipment_specific_alarm wlesa ON wlesa.id = wlesal.equipment_specific_alarm_id LEFT JOIN wl_equipment_specific_alarm wlesa ON wlesa.id = wlesal.equipment_specific_alarm_id
LEFT JOIN wl_equipment_specific wls ON wls.id = wlesal.equipment_specific_id
<where> <where>
<choose> <choose>
<when test="param.confirmType != null and param.confirmType == 0"> <when test="param.confirmType != null and param.confirmType == 0">
...@@ -332,6 +336,9 @@ ...@@ -332,6 +336,9 @@
wlesal.clean_time is NULL wlesal.clean_time is NULL
</when> </when>
</choose> </choose>
<if test="param.bizOrgCode != null and param.bizOrgCode != ''">AND
wls.biz_org_code like concat (#{param.bizOrgCode},'%')
</if>
</where> </where>
) d ) d
<where> <where>
......
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