Commit 4dd1d055 authored by 曹盼盼's avatar 曹盼盼

增加电梯类型接口

parent c51e5840
package com.yeejoin.amos.boot.module.tzs.api.mapper; package com.yeejoin.amos.boot.module.tzs.api.mapper;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorDto; import com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorWlInfoDto; import com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorWlInfoDto;
import com.yeejoin.amos.boot.module.tzs.api.entity.Elevator; import com.yeejoin.amos.boot.module.tzs.api.entity.Elevator;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
...@@ -31,4 +33,6 @@ public interface ElevatorMapper extends BaseMapper<Elevator> { ...@@ -31,4 +33,6 @@ public interface ElevatorMapper extends BaseMapper<Elevator> {
int queryElevatorListCount(); int queryElevatorListCount();
List<ElevatorDto> selectExportData(@Param("ids") List<String> ids); List<ElevatorDto> selectExportData(@Param("ids") List<String> ids);
@Select("select address from tcb_elevator where address like concat('%',#{address},'%')")
List<JSONObject> getAddressList(String address);
} }
...@@ -20,6 +20,7 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.EsElevatorDto; ...@@ -20,6 +20,7 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.EsElevatorDto;
import com.yeejoin.amos.boot.module.tzs.api.entity.Elevator; import com.yeejoin.amos.boot.module.tzs.api.entity.Elevator;
import com.yeejoin.amos.boot.module.tzs.api.entity.MaintainInfo; import com.yeejoin.amos.boot.module.tzs.api.entity.MaintainInfo;
import com.yeejoin.amos.boot.module.tzs.api.entity.TestInfo; import com.yeejoin.amos.boot.module.tzs.api.entity.TestInfo;
import com.yeejoin.amos.boot.module.tzs.api.mapper.ElevatorMapper;
import com.yeejoin.amos.boot.module.tzs.api.service.IElevatorRelationService; import com.yeejoin.amos.boot.module.tzs.api.service.IElevatorRelationService;
import com.yeejoin.amos.boot.module.tzs.api.service.IElevatorService; import com.yeejoin.amos.boot.module.tzs.api.service.IElevatorService;
import com.yeejoin.amos.boot.module.tzs.biz.service.impl.ESElevatorServiceImpl; import com.yeejoin.amos.boot.module.tzs.biz.service.impl.ESElevatorServiceImpl;
...@@ -37,12 +38,7 @@ import org.slf4j.Logger; ...@@ -37,12 +38,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.component.emq.EmqKeeper; import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.Bean; import org.typroject.tyboot.core.foundation.utils.Bean;
...@@ -99,6 +95,9 @@ public class ElevatorController extends BaseController { ...@@ -99,6 +95,9 @@ public class ElevatorController extends BaseController {
@Autowired @Autowired
private IElevatorRelationService elevatorRelationService; private IElevatorRelationService elevatorRelationService;
@Autowired
private ElevatorMapper elevatorMapper;
/** /**
* 新增电梯 * 新增电梯
* *
...@@ -545,6 +544,13 @@ public class ElevatorController extends BaseController { ...@@ -545,6 +544,13 @@ public class ElevatorController extends BaseController {
public ResponseModel<List<ElevatorListDto>> cancelFocusElevator(@PathVariable String openId){ public ResponseModel<List<ElevatorListDto>> cancelFocusElevator(@PathVariable String openId){
return ResponseHelper.buildResponse(elevatorRelationService.getMyFocusElevator(openId)); return ResponseHelper.buildResponse(elevatorRelationService.getMyFocusElevator(openId));
} }
/**获取所有电梯的安装地址*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/getAddressList",method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "获取所有电梯的安装地址", notes = "获取所有电梯的安装地址")
public ResponseModel<List<JSONObject>> getAddressList(@RequestBody ElevatorNewDto elevatorNewDto){
return ResponseHelper.buildResponse(elevatorMapper.getAddressList(elevatorNewDto.getElevatorDto().getAddress()));
}
} }
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