Commit 4b1d8397 authored by tangwei's avatar tangwei

修改bug

parent 9b12765c
...@@ -109,6 +109,8 @@ public class CommandController extends BaseController { ...@@ -109,6 +109,8 @@ public class CommandController extends BaseController {
@Autowired @Autowired
RemoteSecurityService remoteSecurityService; RemoteSecurityService remoteSecurityService;
@Autowired @Autowired
private IAircraftService ircraftService;
@Autowired
IAlertFormValueService alertFormValueService; IAlertFormValueService alertFormValueService;
// 文件读取参数 // 文件读取参数
@Value("${file.url}") @Value("${file.url}")
...@@ -959,8 +961,13 @@ public class CommandController extends BaseController { ...@@ -959,8 +961,13 @@ public class CommandController extends BaseController {
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getOrgUsrzhDto/{id}") @GetMapping(value = "/getOrgUsrzhDto/{id}")
@ApiOperation(httpMethod = "GET", value = "根据灾情id处置对象单位详情", notes = "根据灾情id处置对象单位详情") @ApiOperation(httpMethod = "GET", value = "根据灾情id处置对象单位详情", notes = "根据灾情id处置对象单位详情")
public ResponseModel<OrgusrDataxDto> getOrgUsrzhDto(@PathVariable Long id) { public ResponseModel<Object> getOrgUsrzhDto(@PathVariable Long id) {
AlertCalled AlertCalled = iAlertCalledService.getAlertCalledById(id); AlertCalled AlertCalled = iAlertCalledService.getAlertCalledById(id);
if("230".equals(AlertCalled.getAlertTypeCode())){
AircraftDto aircraftDto=aircraftService.queryByAircraftSeq(RequestContext.getAgencyCode(),id);
return ResponseHelper.buildResponse(aircraftDto);
}else{
String buildId = null; String buildId = null;
OrgusrDataxDto orgusrDataxDto = new OrgusrDataxDto(); OrgusrDataxDto orgusrDataxDto = new OrgusrDataxDto();
if (AlertCalled.getUnitInvolved() != null && !"".equals(AlertCalled.getUnitInvolved())) { if (AlertCalled.getUnitInvolved() != null && !"".equals(AlertCalled.getUnitInvolved())) {
...@@ -1001,6 +1008,7 @@ public class CommandController extends BaseController { ...@@ -1001,6 +1008,7 @@ public class CommandController extends BaseController {
} }
return ResponseHelper.buildResponse(orgusrDataxDto); return ResponseHelper.buildResponse(orgusrDataxDto);
} }
}
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
...@@ -1447,10 +1455,12 @@ public class CommandController extends BaseController { ...@@ -1447,10 +1455,12 @@ public class CommandController extends BaseController {
//获取正在进行的灾情null //获取正在进行的灾情null
if (userCar != null) { if (userCar != null) {
AlertCalled alertCalled = powerTransferCompanyResourcesService.getByPowerTransferCompanyResourId(userCar.getCarId()); AlertCalled alertCalled = powerTransferCompanyResourcesService.getByPowerTransferCompanyResourId(userCar.getCarId());
alertCalled.setLatitude(alertCalled.getCoordinateX()!=null?alertCalled.getCoordinateX().toString():null); if(alertCalled!=null) {
alertCalled.setLongitude(alertCalled.getCoordinateY()!=null?alertCalled.getCoordinateY().toString():null); alertCalled.setLatitude(alertCalled.getCoordinateX() != null ? alertCalled.getCoordinateX().toString() : null);
alertCalled.setLongitude(alertCalled.getCoordinateY() != null ? alertCalled.getCoordinateY().toString() : null);
return ResponseHelper.buildResponse(alertCalled); return ResponseHelper.buildResponse(alertCalled);
} }
}
return ResponseHelper.buildResponse(null); return ResponseHelper.buildResponse(null);
} }
......
...@@ -937,13 +937,13 @@ ...@@ -937,13 +937,13 @@
AND ( d.type = 'FIREALARM' OR d.type = 'BREAKDOWN' OR d.type = 'SHIELD' OR d.type = 'NOTICE' ) AND ( d.type = 'FIREALARM' OR d.type = 'BREAKDOWN' OR d.type = 'SHIELD' OR d.type = 'NOTICE' )
</otherwise> </otherwise>
</choose> </choose>
<if test='dto.fireEquipmentName != null '> <if test="dto.fireEquipmentName != null and dto.fireEquipmentName != '' ">
AND d.fireEquipmentName LIKE CONCAT('%', #{dto.fireEquipmentName}, '%' ) AND d.fireEquipmentName LIKE CONCAT('%', #{dto.fireEquipmentName}, '%' )
</if> </if>
<if test='dto.systemIds != null '> <if test='dto.systemIds != null '>
AND d.systemIds in (#{dto.systemIds}) AND d.systemIds in (#{dto.systemIds})
</if> </if>
<if test='dto.confirmUserName != null '> <if test="dto.confirmUserName != null and dto.confirmUserName != '' ">
AND d.confirmUserName LIKE CONCAT('%', #{dto.confirmUserName}, '%' ) AND d.confirmUserName LIKE CONCAT('%', #{dto.confirmUserName}, '%' )
</if> </if>
<if test="dto.code != null"> <if test="dto.code != 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