|
|
@@ -1,5 +1,6 @@
|
|
|
package com.inspur.service.impl;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.UUID;
|
|
|
import java.util.stream.Collectors;
|
|
|
@@ -8,6 +9,7 @@ import cn.hutool.http.HttpUtil;
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.inspur.common.core.domain.AjaxResult;
|
|
|
import com.inspur.common.utils.DateUtils;
|
|
|
+import com.inspur.common.utils.StringUtils;
|
|
|
import com.inspur.domain.ElevatorInfo;
|
|
|
import com.inspur.domain.ElevatorPersonInfo;
|
|
|
import com.inspur.mapper.ElevatorInfoMapper;
|
|
|
@@ -19,6 +21,8 @@ import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
+import static com.inspur.common.utils.PageUtils.startPage;
|
|
|
+
|
|
|
/**
|
|
|
* 电梯信息Service业务层处理
|
|
|
*
|
|
|
@@ -70,7 +74,18 @@ public class ElevatorInfoServiceImpl implements IElevatorInfoService
|
|
|
@Override
|
|
|
public List<ElevatorInfo> selectElevatorInfoList(ElevatorInfo elevatorInfo)
|
|
|
{
|
|
|
- return elevatorInfoMapper.selectElevatorInfoList(elevatorInfo);
|
|
|
+ List<ElevatorInfo> elevatorInfos = new ArrayList<>();
|
|
|
+ // 根据维保人员名称 查询所有电梯ID
|
|
|
+ if (!StringUtils.isEmpty(elevatorInfo.getHandler())) {
|
|
|
+ List<String> elevatorIds = elevatorPersonInfoMapper.selectElevatorIdsByHandler(elevatorInfo.getHandler());
|
|
|
+ if (CollectionUtils.isEmpty(elevatorIds)) {
|
|
|
+ return elevatorInfos;
|
|
|
+ }
|
|
|
+ elevatorInfo.setElevatorIds(elevatorIds);
|
|
|
+ }
|
|
|
+ startPage();
|
|
|
+ elevatorInfos = elevatorInfoMapper.selectElevatorInfoList(elevatorInfo);
|
|
|
+ return elevatorInfos;
|
|
|
}
|
|
|
|
|
|
/**
|