Commit b62cfc07 authored by zhangyingbin's avatar zhangyingbin

93666修改

parent a1970892
...@@ -247,7 +247,14 @@ public class ElevatorController extends BaseController { ...@@ -247,7 +247,14 @@ public class ElevatorController extends BaseController {
for (Elevator ele : elevators ) { for (Elevator ele : elevators ) {
ElevatorDto eleDto = new ElevatorDto(); ElevatorDto eleDto = new ElevatorDto();
BeanUtils.copyProperties(ele,eleDto); BeanUtils.copyProperties(ele,eleDto);
eleDto.setUseSiteCategory(iDataDictionaryService.getOne(new LambdaQueryWrapper<DataDictionary>().eq(DataDictionary::getCode,eleDto.getUseSiteCategory())).getName()); if(!ValidationUtil.isEmpty(eleDto.getUseSiteCategory())) {
LambdaQueryWrapper<DataDictionary> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(DataDictionary::getCode, eleDto.getUseSiteCategory());
DataDictionary dataDictionary = iDataDictionaryService.getOne(wrapper);
if (!ValidationUtil.isEmpty(dataDictionary)) {
eleDto.setUseSiteCategory(dataDictionary.getName());
}
}
elevatorDtoList.add(eleDto); elevatorDtoList.add(eleDto);
} }
return ResponseHelper.buildResponse(elevatorDtoList); return ResponseHelper.buildResponse(elevatorDtoList);
...@@ -555,7 +562,18 @@ public class ElevatorController extends BaseController { ...@@ -555,7 +562,18 @@ public class ElevatorController extends BaseController {
@RequestMapping(value = "/getAddressList",method = RequestMethod.POST) @RequestMapping(value = "/getAddressList",method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "获取电梯的安装地址", notes = "获取电梯的安装地址") @ApiOperation(httpMethod = "POST", value = "获取电梯的安装地址", notes = "获取电梯的安装地址")
public ResponseModel<List<ElevatorDto>> getAddressList(@RequestBody ElevatorListDto elevatorListDto){ public ResponseModel<List<ElevatorDto>> getAddressList(@RequestBody ElevatorListDto elevatorListDto){
return ResponseHelper.buildResponse(elevatorMapper.getAddressList(elevatorListDto.getElevatorAddress())); List<ElevatorDto> elevatorList = elevatorMapper.getAddressList(elevatorListDto.getElevatorAddress());
for(ElevatorDto elevatorDto : elevatorList){
if(!ValidationUtil.isEmpty(elevatorDto.getUseSiteCategory())) {
LambdaQueryWrapper<DataDictionary> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(DataDictionary::getCode, elevatorDto.getUseSiteCategory());
DataDictionary dataDictionary = iDataDictionaryService.getOne(wrapper);
if (!ValidationUtil.isEmpty(dataDictionary)) {
elevatorDto.setUseSiteCategory(dataDictionary.getName());
}
}
}
return ResponseHelper.buildResponse(elevatorList);
} }
} }
......
...@@ -22,6 +22,8 @@ import org.springframework.web.bind.annotation.*; ...@@ -22,6 +22,8 @@ import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
...@@ -49,12 +51,12 @@ public class TzsQyLogController extends BaseController { ...@@ -49,12 +51,12 @@ public class TzsQyLogController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/save", method = RequestMethod.POST) @RequestMapping(value = "/save", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "新增96333操作记录日志表", notes = "新增96333操作记录日志表") @ApiOperation(httpMethod = "POST", value = "新增96333操作记录日志表", notes = "新增96333操作记录日志表")
public boolean saveTzsQyLog(HttpServletRequest request,@RequestBody TzsQyLog data){ public ResponseModel<Boolean> saveTzsQyLog(HttpServletRequest request, @RequestBody TzsQyLog data){
// AgencyUserModel me = Privilege.agencyUserClient.getme().getResult(); // AgencyUserModel me = Privilege.agencyUserClient.getme().getResult();
// data.setRecUserId(me.getUserId()); // data.setRecUserId(me.getUserId());
// data.setRecUserName(me.getUserName()); // data.setRecUserName(me.getUserName());
// data.setRecDate(new Date()); // data.setRecDate(new Date());
return iTzsQyLogService.save(data); return ResponseHelper.buildResponse(iTzsQyLogService.save(data));
} }
/** /**
......
...@@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils; import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
...@@ -101,6 +103,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -101,6 +103,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
@Autowired @Autowired
CtiServiceImpl ctiService; CtiServiceImpl ctiService;
@Autowired
DataDictionaryServiceImpl iDataDictionaryService;
@Value("${duty.seats.role.ids}") @Value("${duty.seats.role.ids}")
private String dutySeatsRoleIds; private String dutySeatsRoleIds;
...@@ -110,6 +115,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -110,6 +115,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
@Override @Override
public Object selectAlertCalledById(Long id) { public Object selectAlertCalledById(Long id) {
if(redisUtils.hasKey(RedisKey.TZS_ALERTCALLED_ID+id)){ if(redisUtils.hasKey(RedisKey.TZS_ALERTCALLED_ID+id)){
// if(false){
Object obj= redisUtils.get(RedisKey.TZS_ALERTCALLED_ID+id); Object obj= redisUtils.get(RedisKey.TZS_ALERTCALLED_ID+id);
return obj; return obj;
}else{ }else{
...@@ -126,7 +132,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -126,7 +132,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
formValue.add(value); formValue.add(value);
} }
} }
AlertCalledDto alertCalledDto = BeanDtoVoUtils.convert(alertCalled,AlertCalledDto.class); AlertCalledDto alertCalledDto = new AlertCalledDto();
BeanUtils.copyProperties(alertCalled,alertCalledDto);
LambdaQueryWrapper<Elevator> elevatorQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<Elevator> elevatorQueryWrapper = new LambdaQueryWrapper<>();
elevatorQueryWrapper.eq(Elevator::getRescueCode, alertCalled.getDeviceId()); elevatorQueryWrapper.eq(Elevator::getRescueCode, alertCalled.getDeviceId());
elevatorQueryWrapper.eq(Elevator::getRegisterCode, alertCalled.getRegistrationCode()); elevatorQueryWrapper.eq(Elevator::getRegisterCode, alertCalled.getRegistrationCode());
...@@ -141,6 +148,18 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -141,6 +148,18 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
alertCalledDto.setUseUnit(elevator.getUseUnit()); alertCalledDto.setUseUnit(elevator.getUseUnit());
alertCalledDto.setRegionCode(elevator.getRegionCode()); alertCalledDto.setRegionCode(elevator.getRegionCode());
} }
if(!ValidationUtil.isEmpty(alertCalledDto.getUseSiteCategory())) {
LambdaQueryWrapper<DataDictionary> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(DataDictionary::getCode, alertCalledDto.getUseSiteCategory());
DataDictionary dataDictionary = iDataDictionaryService.getOne(wrapper);
if (!ValidationUtil.isEmpty(dataDictionary)) {
alertCalledDto.setUseUnit(dataDictionary.getName());
} else {
alertCalledDto.setUseUnit("");
}
} else {
alertCalledDto.setUseUnit("");
}
String voiceRecord = ""; String voiceRecord = "";
VoiceRecordFile temp = voiceRecordFileServiceImpl.getOne(new LambdaQueryWrapper<VoiceRecordFile>().eq(VoiceRecordFile::getAlertId,id).eq(VoiceRecordFile::getAlertStageCode,"860").orderByAsc(VoiceRecordFile::getRecDate)); VoiceRecordFile temp = voiceRecordFileServiceImpl.getOne(new LambdaQueryWrapper<VoiceRecordFile>().eq(VoiceRecordFile::getAlertId,id).eq(VoiceRecordFile::getAlertStageCode,"860").orderByAsc(VoiceRecordFile::getRecDate));
if(temp != null) { if(temp != null) {
......
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