Commit e179b4bd authored by maoying's avatar maoying

修改三维接口返回

parent f29517b0
......@@ -20,6 +20,8 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.*;
......@@ -40,6 +42,7 @@ public class FireSourceController extends BaseController {
private IWaterResourceService iWaterResourceService;
@Autowired
private IEquipmentService iEquipService;
private final Logger log = LoggerFactory.getLogger(FireSourceController.class);
@Permission
@ApiOperation(httpMethod = "POST", value = "添加消防装备", notes = "添加消防装备")
......@@ -207,9 +210,15 @@ public class FireSourceController extends BaseController {
@Permission
@ApiOperation(httpMethod = "GET", value = "消防状态明细信息", notes = "消防状态明细信息")
@RequestMapping(value = "/info/detail", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryForEquipmentList(@ApiParam(value = "设备名称", required = true) @RequestParam Long id,
public CommonResponse queryForEquipmentList(@ApiParam(value = "设备名称", required = true) @RequestParam String id,
@ApiParam(value = "设备编号", required = true) @RequestParam String type) throws Exception {
return CommonResponseUtil.success(iFireEquipService.queryForDetail(type, id));
try{
return CommonResponseUtil.success(iFireEquipService.queryForDetail(type, Long.valueOf(id)));
}catch (Exception e) {
log.error(e.getMessage(),e);
return CommonResponseUtil.failure("消防装备明细查询失败" + e.getMessage());
}
}
}
......@@ -674,8 +674,8 @@ public class RiskSourceController extends BaseController {
@Permission
@ApiOperation(value = "风险预警详情", notes = "风险预警详情")
@GetMapping(value = "/warning/detail", produces = "application/json;charset=UTF-8")
public CommonResponse earlyWarning(@RequestParam Long riskSourceId) {
Map map = riskSourceService.earlyWarning(riskSourceId);
public CommonResponse earlyWarning(@RequestParam String riskSourceId) {
Map map = riskSourceService.earlyWarning(Long.valueOf(riskSourceId));
return CommonResponseUtil.success(map);
}
......
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