Commit c5f9e3ec authored by zhangsen's avatar zhangsen

缺陷所需APIxiugai

parent 8bf45a47
......@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient;
import com.yeejoin.amos.boot.module.common.biz.service.impl.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -483,6 +484,9 @@ public class WaterResourceController extends BaseController {
@RequestParam(value = "bizOrgCode", required = false) String bizOrgCode) {
ReginParams reginParams = getSelectedOrgInfo();
if (StringUtils.isEmpty(bizOrgCode)) {
if (ObjectUtils.isEmpty(reginParams) || ObjectUtils.isEmpty(reginParams.getPersonIdentity()) || StringUtils.isEmpty(reginParams.getPersonIdentity().getBizOrgCode())) {
return ResponseHelper.buildResponse(null);
}
bizOrgCode = reginParams.getPersonIdentity().getBizOrgCode();
}
Page<WaterResourceDto> page = new Page<>();
......
package com.yeejoin.equipmanage.controller;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
......@@ -8,6 +9,8 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.dto.OrgMenuDto;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.MediaType;
......@@ -38,6 +41,7 @@ import com.yeejoin.equipmanage.service.IFormInstanceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
/**
* @author ZeHua Li
......@@ -117,6 +121,9 @@ public class BuildingController extends AbstractBaseController {
@GetMapping(value = "/treeByName")
public List<BuildingTreeVo> treeByName(@RequestParam(required = false) String name) {
ReginParams reginParams = getSelectedOrgInfo();
if (ObjectUtils.isEmpty(reginParams) || ObjectUtils.isEmpty(reginParams.getPersonIdentity()) || StringUtils.isEmpty(reginParams.getPersonIdentity().getBizOrgCode())) {
return new ArrayList<>();
}
String bizOrgCode = reginParams.getPersonIdentity().getBizOrgCode();
return buildService.treeByName(bizOrgCode, name);
}
......
......@@ -519,6 +519,9 @@ public class FireFightingSystemController extends AbstractBaseController {
) {
if (null != isDefect && 1 == isDefect) {
ReginParams reginParams = getSelectedOrgInfo();
if (org.apache.commons.lang3.ObjectUtils.isEmpty(reginParams) || org.apache.commons.lang3.ObjectUtils.isEmpty(reginParams.getPersonIdentity()) || StringUtils.isEmpty(reginParams.getPersonIdentity().getBizOrgCode())) {
return new HashMap<>();
}
if (StringUtils.isEmpty(bizOrgCode)) {
bizOrgCode = reginParams.getPersonIdentity().getBizOrgCode();
}
......
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