Commit 3530008e authored by 李松's avatar 李松

修改bug

parent e415011c
...@@ -846,8 +846,8 @@ public class AlertCalledController extends BaseController { ...@@ -846,8 +846,8 @@ public class AlertCalledController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/callRecords/{id}") @GetMapping(value = "/callRecords/{id}")
@ApiOperation(httpMethod = "GET", value = "根据id获取通话记录信息", notes = "根据id获取通话记录信息") @ApiOperation(httpMethod = "GET", value = "根据id获取通话记录信息", notes = "根据id获取通话记录信息")
public ResponseModel<Object> getCallRecords(@PathVariable Long id) { public ResponseModel<Object> getCallRecords(@PathVariable Long id, @RequestParam int number, @RequestParam int size) {
return ResponseHelper.buildResponse(iAlertCalledService.getCallRecords(id)); return ResponseHelper.buildResponse(iAlertCalledService.getCallRecords(id, number, size));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
......
...@@ -981,7 +981,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -981,7 +981,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
return alertCalledMapper.getCountNum(userName, startTime, endTime, groupCode); return alertCalledMapper.getCountNum(userName, startTime, endTime, groupCode);
} }
public Object getCallRecords(Long id) { public Object getCallRecords(Long id, int number, int size) {
Page<VoiceRecordFileDto> voiceRecordFileDtoPage = new Page<>();
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
LambdaQueryWrapper<VoiceRecordFile> queryWrapper = new LambdaQueryWrapper<VoiceRecordFile>(); LambdaQueryWrapper<VoiceRecordFile> queryWrapper = new LambdaQueryWrapper<VoiceRecordFile>();
queryWrapper.eq(VoiceRecordFile::getAlertId, id).orderByDesc(VoiceRecordFile::getRecDate); queryWrapper.eq(VoiceRecordFile::getAlertId, id).orderByDesc(VoiceRecordFile::getRecDate);
...@@ -994,8 +995,15 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -994,8 +995,15 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
BeanUtils.copyProperties(voiceRecord, target); BeanUtils.copyProperties(voiceRecord, target);
dtoList.add(target); dtoList.add(target);
}); });
map.put("dataList", dtoList); // map.put("dataList", dtoList);
return map; List<VoiceRecordFileDto> collect = dtoList.stream()
.skip((long) (number - 1) * size)
.limit(size)
.collect(Collectors.toList());
voiceRecordFileDtoPage.setRecords(collect);
voiceRecordFileDtoPage.setCurrent(number);
voiceRecordFileDtoPage.setSize(size);
return voiceRecordFileDtoPage;
} }
private static Map<String, String> regionCodeOrgCodeMap = new ConcurrentHashMap<>(); private static Map<String, String> regionCodeOrgCodeMap = new ConcurrentHashMap<>();
...@@ -1026,15 +1034,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -1026,15 +1034,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
first.put("columns", columns); first.put("columns", columns);
first.put("displayName", "一级调派"); first.put("displayName", "一级调派");
List<Map<String, Object>> list = elevatorServiceImpl.selectMtByAlertId(String.valueOf(map.get("sequenceNbr"))); List<Map<String, Object>> list = elevatorServiceImpl.selectMtByAlertId(String.valueOf(map.get("sequenceNbr")));
// if (!ObjectUtils.isEmpty(list)) {
// firstData.put("companyName", ObjectUtils.isEmpty(list.get(0).get("unitName")) ? null : String.valueOf(list.get(0).get("unitName")));
// firstData.put("companyCode", ObjectUtils.isEmpty(list.get(0).get("useCode")) ? null : String.valueOf(list.get(0).get("useCode")));
// firstData.put("companyType", "维保单位");
// firstData.put("responseStatus", "已派遣");
// }
firstDatas.add(firstData); firstDatas.add(firstData);
first.put("datas", list); first.put("dataList", list);
first.put("rowKey", "sequenceNbr");
// 二级调派 // 二级调派
String secondJson; String secondJson;
try { try {
...@@ -1049,14 +1051,13 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -1049,14 +1051,13 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
String latitude = String.valueOf(map2.get("latitude")); String latitude = String.valueOf(map2.get("latitude"));
// 根据经纬度和距离返回救援机构信息 // 根据经纬度和距离返回救援机构信息
HashMap<String, Object> second = new HashMap<>(); HashMap<String, Object> second = new HashMap<>();
ArrayList<Map> secondDatas = new ArrayList<>();
second.put("key", "secondLevelDispatch"); second.put("key", "secondLevelDispatch");
second.put("renderType", "table"); second.put("renderType", "table");
second.put("columns", secondColumns); second.put("columns", secondColumns);
second.put("displayName", "二级调派"); second.put("displayName", "二级调派");
List<RescueStationDto> listByLatLonDistance = iRescueStationService.getListByLatLonDistance(latitude, longitude, 1000); List<RescueStationDto> listByLatLonDistance = iRescueStationService.getListByLatLonDistance(latitude, longitude, 1000);
second.put("datas", listByLatLonDistance); second.put("dataList", listByLatLonDistance);
second.put("rowKey", "sequenceNbr");
// 力量调派 // 力量调派
String powerJson; String powerJson;
try { try {
...@@ -1069,7 +1070,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -1069,7 +1070,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
queryWrapper.eq(DispatchTask::getAlertId, id); queryWrapper.eq(DispatchTask::getAlertId, id);
HashMap<String, Object> power = new HashMap<>(); HashMap<String, Object> power = new HashMap<>();
ArrayList<Map> powerDatas = new ArrayList<>(); ArrayList<Map> powerDatas = new ArrayList<>();
power.put("key", "firstLevelDispatch"); power.put("key", "powerLevelDispatch");
power.put("renderType", "table"); power.put("renderType", "table");
power.put("columns", powerColumns); power.put("columns", powerColumns);
power.put("displayName", "使用单位"); power.put("displayName", "使用单位");
...@@ -1086,7 +1087,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -1086,7 +1087,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
powerDatas.add(objectMap); powerDatas.add(objectMap);
}); });
} }
power.put("datas", powerDatas); power.put("dataList", powerDatas);
power.put("rowKey", "sequenceNbr");
group.add(power); group.add(power);
group.add(first); group.add(first);
group.add(second); group.add(second);
......
[ [
{ {
"dataIndex": "unitName", "dataIndex": "unitName",
"width": 150, "width": "33%",
"align": "left", "align": "left",
"title": "维保单位", "title": "维保单位",
"key": "AA6DE857-C788-494F-8F16-2ECFC7E34528" "key": "AA6DE857-C788-494F-8F16-2ECFC7E34528"
}, },
{ {
"dataIndex": "address", "dataIndex": "address",
"width": 160, "width": "33%",
"align": "left", "align": "left",
"title": "地址", "title": "地址",
"key": "611DAF3D-5B79-466C-BEF2-CC91580091FA" "key": "611DAF3D-5B79-466C-BEF2-CC91580091FA"
}, },
{ {
"dataIndex": "userName1", "dataIndex": "userName1",
"width": 160, "width": "15%",
"align": "left", "align": "left",
"title": "主要负责人", "title": "主要负责人",
"key": "611DAF3D-5B79-466C-BEF2-CC91580091FA2" "key": "611DAF3D-5B79-466C-BEF2-CC91580091FA2"
}, },
{ {
"dataIndex": "phone1", "dataIndex": "phone1",
"width": 160, "width": "15%",
"align": "left", "align": "left",
"title": "主要负责人电话", "title": "主要负责人电话",
"key": "611DAF3D-5B79-466C-BEF2-CC91580091FA3" "key": "611DAF3D-5B79-466C-BEF2-CC91580091FA3"
......
[ [
{ {
"dataIndex": "orgType", "dataIndex": "orgType",
"width": 150, "width": "15%",
"align": "left", "align": "left",
"title": "响应级别", "title": "响应级别",
"key": "AA6DE857-C788-494F-8F16-2ECFC7E34528" "key": "AA6DE857-C788-494F-8F16-2ECFC7E34528"
}, },
{ {
"dataIndex": "responseOrgName", "dataIndex": "responseOrgName",
"width": 150, "width": "26%",
"align": "left", "align": "left",
"title": "单位名称", "title": "单位名称",
"key": "D1CB84A4-E037-446A-9469-65B76E381585" "key": "D1CB84A4-E037-446A-9469-65B76E381585"
}, },
{ {
"dataIndex": "responseUserName", "dataIndex": "responseUserName",
"width": 160, "width": "10%",
"align": "left", "align": "left",
"title": "联系人", "title": "联系人",
"key": "611DAF3D-5B79-466C-BEF2-CC91580091FA" "key": "611DAF3D-5B79-466C-BEF2-CC91580091FA"
}, },
{ {
"dataIndex": "responseUserTel", "dataIndex": "responseUserTel",
"width": 160, "width": "15%",
"align": "left", "align": "left",
"title": "联系电话", "title": "联系电话",
"key": "611DAF3D-5B79-466C-BEF2-CC91580091FA1" "key": "611DAF3D-5B79-466C-BEF2-CC91580091FA1"
}, },
{ {
"dataIndex": "dispatchTime", "dataIndex": "dispatchTime",
"width": 160, "width": "15%",
"align": "left", "align": "left",
"title": "派遣时间", "title": "派遣时间",
"key": "611DAF3D-5B79-466C-BEF2-CC91580091FA2" "key": "611DAF3D-5B79-466C-BEF2-CC91580091FA2"
}, },
{ {
"dataIndex": "arriveTime", "dataIndex": "arriveTime",
"width": 160, "width": "15%",
"align": "left", "align": "left",
"title": "到达时间", "title": "到达时间",
"key": "611DAF3D-5B79-466C-BEF2-CC91580091FA3" "key": "611DAF3D-5B79-466C-BEF2-CC91580091FA3"
......
[ [
{ {
"dataIndex": "name", "dataIndex": "name",
"width": 150, "width": "23%",
"align": "left", "align": "left",
"title": "名称", "title": "名称",
"key": "AA6DE857-C788-494F-8F16-2ECFC7E34528" "key": "AA6DE857-C788-494F-8F16-2ECFC7E34528"
}, },
{ {
"dataIndex": "address", "dataIndex": "address",
"width": 150, "width": "33%",
"align": "left", "align": "left",
"title": "地址", "title": "地址",
"key": "D1CB84A4-E037-446A-9469-65B76E381585" "key": "D1CB84A4-E037-446A-9469-65B76E381585"
}, },
{ {
"dataIndex": "distance", "dataIndex": "distance",
"width": 160, "width": "20%",
"align": "left", "align": "left",
"title": "距离", "title": "距离",
"key": "611DAF3D-5B79-466C-BEF2-CC91580091FA" "key": "611DAF3D-5B79-466C-BEF2-CC91580091FA"
}, },
{ {
"dataIndex": "rescueLeader", "dataIndex": "rescueLeader",
"width": 160, "width": "10%",
"align": "left", "align": "left",
"title": "救援负责人", "title": "救援负责人",
"key": "611DAF3D-5B79-466C-BEF2-CC91580091FA1" "key": "611DAF3D-5B79-466C-BEF2-CC91580091FA1"
}, },
{ {
"dataIndex": "rescueLeaderPhone", "dataIndex": "rescueLeaderPhone",
"width": 160, "width": "10%",
"align": "left", "align": "left",
"title": "电话", "title": "电话",
"key": "611DAF3D-5B79-466C-BEF2-CC91580091FA2" "key": "611DAF3D-5B79-466C-BEF2-CC91580091FA2"
......
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