Commit 5a30f316 authored by kongfm's avatar kongfm

告知书BUG 3582修复

parent 5bf11b28
......@@ -135,6 +135,10 @@ public class AlertCalledController extends BaseController {
@Autowired
TzsAuthService tzsAuthService;
@Autowired
private ElevatorServiceImpl iElevatorService;
/**
* 新增警情接警填报记录
*
......@@ -144,10 +148,17 @@ public class AlertCalledController extends BaseController {
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增警情接警填报记录", notes = "新增警情接警填报记录")
public ResponseModel<AlertCalledDto> save(@RequestBody AlertCalledObjsDto alertCalledObjsDto) {
if (ValidationUtil.isEmpty(alertCalledObjsDto)
|| ValidationUtil.isEmpty(alertCalledObjsDto.getAlertCalledDto())) {
if (ValidationUtil.isEmpty(alertCalledObjsDto)) {
throw new BadRequest("参数校验失败.");
}
LambdaQueryWrapper<Elevator> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(Elevator::getRescueCode,alertCalledObjsDto.getAlertCalledDto().getDeviceId());
Elevator elevator = iElevatorService.getOne(queryWrapper);
if(elevator == null) {
throw new BadRequest("未找到相关电梯.");
}
ReginParams reginParams = getSelectedOrgInfo();
alertCalledObjsDto = iAlertCalledService.createAlertCalled(alertCalledObjsDto, reginParams.getUserModel());
......
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