Commit 33f34ed1 authored by 曹盼盼's avatar 曹盼盼

修改

parent ed5d37b6
......@@ -162,5 +162,5 @@ public class AlertCalledDto extends BaseDto {
@ApiModelProperty(value = "现场照片")
private List<AttachmentDto> images;
private String equipment;
}
package com.yeejoin.amos.boot.module.tzs.api.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.HashMap;
import java.util.Map;
@AllArgsConstructor
@Getter
public enum EquipmentClassifityEnum {
/**
**设备分类
*/
锅炉("锅炉","1000"),
压力容器("压力容器","2000"),
电梯("电梯","3000"),
起重机械("起重机械","4000"),
厂内专用机动车辆("场(厂)内专用机动车辆","5000"),
大型游乐设施("大型游乐设施","6000"),
压力管道元件("压力管道元件","7000"),
压力管道("压力管道","8000");
private String name;
private String code;
public static Map<String,String> getName=new HashMap<>();
public static Map<String,String> getCode=new HashMap<>();
static {
for (EquipmentClassifityEnum e : EquipmentClassifityEnum.values()){
getName.put(e.code, e.name);
getCode.put(e.name, e.code);
}
}
}
......@@ -33,6 +33,6 @@ public interface ElevatorMapper extends BaseMapper<Elevator> {
int queryElevatorListCount();
List<ElevatorDto> selectExportData(@Param("ids") List<String> ids);
@Select("select address from tcb_elevator where address like concat('%',#{address},'%')")
List<JSONObject> getAddressList(String address);
@Select("select * from tcb_elevator where address like concat('%',#{address},'%')")
List<ElevatorDto> getAddressList(String address);
}
......@@ -544,12 +544,12 @@ public class ElevatorController extends BaseController {
public ResponseModel<List<ElevatorListDto>> cancelFocusElevator(@PathVariable String 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()));
@ApiOperation(httpMethod = "POST", value = "获取电梯的安装地址", notes = "获取电梯的安装地址")
public ResponseModel<List<ElevatorDto>> getAddressList(@RequestBody ElevatorListDto elevatorListDto){
return ResponseHelper.buildResponse(elevatorMapper.getAddressList(elevatorListDto.getElevatorAddress()));
}
}
......
package com.yeejoin.amos.boot.module.tzs.biz.controller;
import com.alibaba.fastjson.JSONArray;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
......@@ -142,8 +143,14 @@ public class EquipmentCategoryController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "设备分类八大类", notes = "设备分类八大类")
@GetMapping(value = "/selectClassify")
public ResponseModel<List<EquipmentCategoryDto>> selectClassify() {
return ResponseHelper.buildResponse(equipmentCategoryServiceImpl.selectClassify());
public ResponseModel<JSONArray> selectClassify() {
List<EquipmentCategoryDto> equipmentCategoryDtos = equipmentCategoryServiceImpl.selectClassify();
JSONArray jsonArray = new JSONArray();
equipmentCategoryDtos.forEach(e->{
jsonArray.add(e.getName());
}
);
return ResponseHelper.buildResponse(jsonArray);
}
}
......@@ -17,6 +17,7 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.*;
import com.yeejoin.amos.boot.module.tzs.api.entity.*;
import com.yeejoin.amos.boot.module.tzs.api.enums.AlertStageEnums;
import com.yeejoin.amos.boot.module.tzs.api.enums.DispatchPaperEnums;
import com.yeejoin.amos.boot.module.tzs.api.enums.EquipmentClassifityEnum;
import com.yeejoin.amos.boot.module.tzs.api.enums.TzsCommonParam;
import com.yeejoin.amos.boot.module.tzs.api.mapper.AlertCalledMapper;
import com.yeejoin.amos.boot.module.tzs.api.service.IAlertCalledService;
......@@ -462,10 +463,11 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
public AlertCalledObjsDto createAlertCalled(AlertCalledObjsDto alertCalledObjsDto, AgencyUserModel user) {
try {
// 警情基本信息
AlertCalled alertCalled = BeanDtoVoUtils.convert(alertCalledObjsDto.getAlertCalledDto(),AlertCalled.class);
alertCalled.setEquipmentClassification("电梯");
alertCalled.setEquipmentClassificationCode("3000");
alertCalled.setEquipmentClassification(alertCalledObjsDto.getAlertCalledDto().getEquipment());
Map<String, String> getCode = EquipmentClassifityEnum.getCode;
String code= getCode.get(alertCalledObjsDto.getAlertCalledDto().getEquipment().toString());
alertCalled.setEquipmentClassificationCode(code);
alertCalled.setCallTime(DateUtils.longStr2Date(alertCalled.getCallTimeStr()));
// 判断是否归并警情
......
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