Commit 08d32ce5 authored by kongfm's avatar kongfm

警情表添加设备id字段

parent 7001fde2
......@@ -150,4 +150,7 @@ public class AlertCalledDto extends BaseDto {
@ApiModelProperty(value = "图片")
private List<String> images;
@ApiModelProperty(value = "设备id")
private Long equipmentId;
}
......@@ -221,4 +221,8 @@ public class AlertCalled extends BaseEntity {
@ApiModelProperty(value = "是否辅屏查询")
private String isAuxiliaryScreen;
@TableField("equipment_id")
@ApiModelProperty(value = "设备id")
private Long equipmentId;
}
......@@ -100,10 +100,10 @@ public class ElevatorServiceImpl extends BaseService<ElevatorDto, Elevator, Elev
throw new BadRequest("警情不存在或者设备编码不存在");
// 设备类型 和 编码 确定设备的使用单位或者维保单位
String equipmentClassificationCode = alertCalledDto.getEquipmentClassificationCode();
String deviceId = alertCalledDto.getDeviceId();
Long deviceId = alertCalledDto.getEquipmentId();
// 目前只有电梯类型
LambdaQueryWrapper<Elevator> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(Elevator::getRescueCode, deviceId);
queryWrapper.eq(Elevator::getSequenceNbr, deviceId);
Elevator elevator = this.getOne(queryWrapper);
if (ValidationUtil.isEmpty(elevator))
throw new BadRequest("设备未找到");
......
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