Commit a1970892 authored by zhangyingbin's avatar zhangyingbin

解决96333应急处置系统,接警填报时,使用单位分类字段未正常解析

parent f73fbe85
package com.yeejoin.amos.boot.module.tzs.biz.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.feign.AmosFeignService;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient;
import com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorBaseInfoDto;
......@@ -36,6 +39,7 @@ import org.apache.commons.lang3.StringUtils;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
......@@ -49,10 +53,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* 电梯Api
......@@ -98,6 +99,9 @@ public class ElevatorController extends BaseController {
@Autowired
private ElevatorMapper elevatorMapper;
@Autowired
DataDictionaryServiceImpl iDataDictionaryService;
/**
* 新增电梯
*
......@@ -241,7 +245,9 @@ public class ElevatorController extends BaseController {
List<Elevator> elevators = iElevatorService.list(elevatorQueryWrapper);
List<ElevatorDto> elevatorDtoList = new ArrayList<>();
for (Elevator ele : elevators ) {
ElevatorDto eleDto = BeanDtoVoUtils.convertElevatorToDto(ele,false);
ElevatorDto eleDto = new ElevatorDto();
BeanUtils.copyProperties(ele,eleDto);
eleDto.setUseSiteCategory(iDataDictionaryService.getOne(new LambdaQueryWrapper<DataDictionary>().eq(DataDictionary::getCode,eleDto.getUseSiteCategory())).getName());
elevatorDtoList.add(eleDto);
}
return ResponseHelper.buildResponse(elevatorDtoList);
......
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