lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java
@@ -36,7 +36,9 @@
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.system.service.ISysUserService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.springframework.beans.factory.annotation.Autowired;
@@ -124,7 +126,8 @@
    @Autowired
    private IMaintenanceStandardService maintenanceStandardService;
    @Autowired
    private ISysUserService sysUserService;
   /**
@@ -159,6 +162,10 @@
      }
      if(StringUtils.isNotBlank(equipment.getEquipmentCategoryId())){
         queryWrapper.eq("equipment_category_id",equipment.getEquipmentCategoryId());
      }
      List<String> userWorkCenterIds = getUserWorkCenterIds();
      if(CollectionUtils.isNotEmpty(userWorkCenterIds)) {
         queryWrapper.in("work_center_id",userWorkCenterIds);
      }
      if(StringUtils.isNotBlank(equipment.getWorkCenterId())){
         queryWrapper.eq("work_center_id",equipment.getWorkCenterId());
@@ -1131,4 +1138,17 @@
       return Result.OK(pageList);
    }
    private List<String> getUserWorkCenterIds(){
       LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal();
       SysUser sysUser = sysUserService.getById(user.getId());
       String areaId = sysUser.getAreaId();
       List<String>  workCenterIds = null;
       if(StringUtils.isNotBlank(areaId)){
//            strings = new ArrayList<>();
          String[] split = areaId.split(",");
          workCenterIds = Arrays.asList(split);
       }
       return workCenterIds;
    }
}