Commit ea000999 authored by caotao's avatar caotao

1.解决按月导出接口表头为空的问题。

2.导出的数据按照里程从高往低排序。
parent 528a8f3e
package com.yeejoin.equipmanage.controller; package com.yeejoin.equipmanage.controller;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
...@@ -73,22 +74,14 @@ public class CarController extends AbstractBaseController { ...@@ -73,22 +74,14 @@ public class CarController extends AbstractBaseController {
@Lazy @Lazy
ICarService iCarService; ICarService iCarService;
@Autowired @Autowired
private EquipmentMapper equipmentMapper;
@Autowired
ISystemDicService iSystemDicService; ISystemDicService iSystemDicService;
@Autowired @Autowired
private EquipmentCategoryMapper equipmentCategoryMapper;
@Autowired
ICarInfoService iCarInfoService; ICarInfoService iCarInfoService;
@Autowired @Autowired
ICarPropertyService iCarPropertyService; ICarPropertyService iCarPropertyService;
@Autowired @Autowired
CarInfoMapper carInfoMapper; CarInfoMapper carInfoMapper;
@Autowired @Autowired
private ManufacturerInfoMapper manufacturerInfoMapper;
@Autowired
private CarPropertyMapper carPropertyMapper;
@Autowired
IEquipmentOnCarService iEquipmentOnCarService; IEquipmentOnCarService iEquipmentOnCarService;
@Autowired @Autowired
ExtinguishantOnCarMapper extinguishantOnCarMapper; ExtinguishantOnCarMapper extinguishantOnCarMapper;
...@@ -97,35 +90,42 @@ public class CarController extends AbstractBaseController { ...@@ -97,35 +90,42 @@ public class CarController extends AbstractBaseController {
@Autowired @Autowired
CarMapper carMapper; CarMapper carMapper;
@Autowired @Autowired
private EquipmentIndexMapper equipmentIndexMapper;
@Autowired
EquipmentDetailMapper equipmentDetailMapper; EquipmentDetailMapper equipmentDetailMapper;
@Autowired @Autowired
EquipmentQrcodeMapper equipmentQrcodeMapper; EquipmentQrcodeMapper equipmentQrcodeMapper;
@Resource(name = "productionQRCodeFactoryMap")
private Map<String, ProductionQRCode> messageHandMap;
@Autowired @Autowired
ICarLonAndLatDataService iCarLonAndLatDataService; ICarLonAndLatDataService iCarLonAndLatDataService;
@Lazy @Lazy
@Autowired @Autowired
IEquipmentService iEquipmentService; IEquipmentService iEquipmentService;
@Autowired @Autowired
IEquipmentDetailService iEquipmentDetailService; IEquipmentDetailService iEquipmentDetailService;
@Autowired @Autowired
IEquipmentQrcodeService iEquipmentQrcodeService; IEquipmentQrcodeService iEquipmentQrcodeService;
@Autowired @Autowired
IEquipmentIndexService iEquipmentIndexService; IEquipmentIndexService iEquipmentIndexService;
@Autowired
ISourceStatistics iSourceStatistics;
@Autowired
JcsFeign jcsFeign;
@Autowired
FireFightingSystemServiceImpl fireFightingSystemServiceImpl;
@Autowired
private EquipmentMapper equipmentMapper;
@Autowired
private EquipmentCategoryMapper equipmentCategoryMapper;
@Autowired
private ManufacturerInfoMapper manufacturerInfoMapper;
@Autowired
private CarPropertyMapper carPropertyMapper;
@Autowired
private EquipmentIndexMapper equipmentIndexMapper;
@Resource(name = "productionQRCodeFactoryMap")
private Map<String, ProductionQRCode> messageHandMap;
@Autowired @Autowired
private ISyncDataService syncDataService; private ISyncDataService syncDataService;
@Value("${redis_equip_type_count}") @Value("${redis_equip_type_count}")
private String equipTypeAndCount; private String equipTypeAndCount;
@Value("${redis_car_type_count}") @Value("${redis_car_type_count}")
private String carTypeAndCount; private String carTypeAndCount;
@Autowired @Autowired
...@@ -136,26 +136,14 @@ public class CarController extends AbstractBaseController { ...@@ -136,26 +136,14 @@ public class CarController extends AbstractBaseController {
private String appKeyApp; private String appKeyApp;
@Value("${iot.vehicle.track}") @Value("${iot.vehicle.track}")
private String iotServerName; private String iotServerName;
@Value("${systemctl.sync.switch}") @Value("${systemctl.sync.switch}")
private Boolean syncSwitch; private Boolean syncSwitch;
@Value("${auth-key-fire-car}") @Value("${auth-key-fire-car}")
private String carAuthKey; private String carAuthKey;
@Value("${auth-key-fire-iot-equip:fire_iot-equip_info}") @Value("${auth-key-fire-iot-equip:fire_iot-equip_info}")
private String iotAuthKey; private String iotAuthKey;
@Autowired
ISourceStatistics iSourceStatistics;
@Autowired @Autowired
private RedisUtils redisUtils; private RedisUtils redisUtils;
@Autowired
JcsFeign jcsFeign;
@Autowired
FireFightingSystemServiceImpl fireFightingSystemServiceImpl;
@Value("${iot.code.prefix.have.used:20210003,20210004,20210005}") @Value("${iot.code.prefix.have.used:20210003,20210004,20210005}")
private String haveUsedIotPrefix; private String haveUsedIotPrefix;
...@@ -198,12 +186,12 @@ public class CarController extends AbstractBaseController { ...@@ -198,12 +186,12 @@ public class CarController extends AbstractBaseController {
} }
// 验证车辆code唯一性 // 验证车辆code唯一性
String iotCode = car.getIotCode(); String iotCode = car.getIotCode();
if(StringUtils.isNotEmpty(iotCode) && StringUtils.isNotEmpty(iotCode.trim())){ if (StringUtils.isNotEmpty(iotCode) && StringUtils.isNotEmpty(iotCode.trim())) {
Car ar= carMapper.getCarsByIotCode(car.getIotCode()); Car ar = carMapper.getCarsByIotCode(car.getIotCode());
if(ar!=null){ if (ar != null) {
throw new BadRequest("物联编码重复"); throw new BadRequest("物联编码重复");
} }
if(StringUtils.isNotEmpty(haveUsedIotPrefix) && Arrays.stream(haveUsedIotPrefix.split(",")).anyMatch(iotCode::startsWith)){ if (StringUtils.isNotEmpty(haveUsedIotPrefix) && Arrays.stream(haveUsedIotPrefix.split(",")).anyMatch(iotCode::startsWith)) {
throw new BadRequest("物联编码航班已占用"); throw new BadRequest("物联编码航班已占用");
} }
} }
...@@ -270,7 +258,6 @@ public class CarController extends AbstractBaseController { ...@@ -270,7 +258,6 @@ public class CarController extends AbstractBaseController {
// } // }
@Async("equipAsyncExecutor") @Async("equipAsyncExecutor")
public void refreshAllCount() { public void refreshAllCount() {
// 清空单位装备分类树缓存 // 清空单位装备分类树缓存
...@@ -349,26 +336,25 @@ public class CarController extends AbstractBaseController { ...@@ -349,26 +336,25 @@ public class CarController extends AbstractBaseController {
// saveFile(carInstance);视频图片文件后期统一处理 // saveFile(carInstance);视频图片文件后期统一处理
String iotCode = car.getIotCode(); String iotCode = car.getIotCode();
if(StringUtil.isNotEmpty(iotCode) && StringUtils.isNotEmpty(iotCode.trim())){ if (StringUtil.isNotEmpty(iotCode) && StringUtils.isNotEmpty(iotCode.trim())) {
Car ar= carMapper.getCarsByIotCodeExcludeCarId(car.getIotCode(),car.getId()); Car ar = carMapper.getCarsByIotCodeExcludeCarId(car.getIotCode(), car.getId());
if(ar != null){ if (ar != null) {
throw new BadRequest("物联编码重复"); throw new BadRequest("物联编码重复");
} }
if(StringUtils.isNotEmpty(haveUsedIotPrefix) && Arrays.stream(haveUsedIotPrefix.split(",")).anyMatch(iotCode::startsWith)){ if (StringUtils.isNotEmpty(haveUsedIotPrefix) && Arrays.stream(haveUsedIotPrefix.split(",")).anyMatch(iotCode::startsWith)) {
throw new BadRequest("物联编码航班已占用"); throw new BadRequest("物联编码航班已占用");
} }
} }
//用来解绑车辆 //用来解绑车辆
if (!ObjectUtils.isEmpty(car.getTeamId())){ if (!ObjectUtils.isEmpty(car.getTeamId())) {
jcsFeign.getUserCar(car.getId(),car.getTeamId()); jcsFeign.getUserCar(car.getId(), car.getTeamId());
} }
Equipment equipment = iEquipmentService.getById(car.getEquipmentId()); Equipment equipment = iEquipmentService.getById(car.getEquipmentId());
car.setName(equipment != null ? equipment.getName() : null); car.setName(equipment != null ? equipment.getName() : null);
if (ObjectUtils.isEmpty(car.getBizOrgName()) && !ObjectUtils.isEmpty(car.getBizOrgCode())) { if (ObjectUtils.isEmpty(car.getBizOrgName()) && !ObjectUtils.isEmpty(car.getBizOrgCode())) {
FeignClientResult<Map<String, Object>> result = Privilege.companyClient.queryByOrgcode(car.getBizOrgCode()); FeignClientResult<Map<String, Object>> result = Privilege.companyClient.queryByOrgcode(car.getBizOrgCode());
System.out.println("==============================" + JSONObject.toJSONString(result.getResult())); System.out.println("==============================" + JSONObject.toJSONString(result.getResult()));
...@@ -421,7 +407,7 @@ public class CarController extends AbstractBaseController { ...@@ -421,7 +407,7 @@ public class CarController extends AbstractBaseController {
* @return * @return
*/ */
@RequestMapping(value = "/{id}", method = RequestMethod.GET) @RequestMapping(value = "/{id}", method = RequestMethod.GET)
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询") @ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询")
public Car selectById(HttpServletRequest request, @PathVariable Long id) { public Car selectById(HttpServletRequest request, @PathVariable Long id) {
return iCarService.selectOneById(id); return iCarService.selectOneById(id);
...@@ -429,6 +415,7 @@ public class CarController extends AbstractBaseController { ...@@ -429,6 +415,7 @@ public class CarController extends AbstractBaseController {
/** /**
* 电建项目-车辆信息详情(表单组件格式导致白屏修复) * 电建项目-车辆信息详情(表单组件格式导致白屏修复)
*
* @param request * @param request
* @param id * @param id
* @return * @return
...@@ -466,7 +453,7 @@ public class CarController extends AbstractBaseController { ...@@ -466,7 +453,7 @@ public class CarController extends AbstractBaseController {
@RequestMapping(value = "/peoperty", method = RequestMethod.POST) @RequestMapping(value = "/peoperty", method = RequestMethod.POST)
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "根据id查询", notes = "根据id查询") @ApiOperation(httpMethod = "POST", value = "根据id查询", notes = "根据id查询")
public Map<String, Object> getCarPropertyByCarIds(@RequestBody List<Long> carIds) { public Map<String, Object> getCarPropertyByCarIds(@RequestBody List<Long> carIds) {
return iCarPropertyService.getCarPropertyByCarIds(carIds); return iCarPropertyService.getCarPropertyByCarIds(carIds);
} }
...@@ -1176,8 +1163,8 @@ public class CarController extends AbstractBaseController { ...@@ -1176,8 +1163,8 @@ public class CarController extends AbstractBaseController {
Map<Long, List<CarIndexVo>> map = null; Map<Long, List<CarIndexVo>> map = null;
// String orgCode = getOrgCode(); // String orgCode = getOrgCode();
ReginParams ReginParams=getSelectedOrgInfo(); ReginParams ReginParams = getSelectedOrgInfo();
String orgCode= ReginParams.getPersonIdentity().getBizOrgCode(); String orgCode = ReginParams.getPersonIdentity().getBizOrgCode();
List<CarIndexVo> carVoList = iCarService.getCarsIotInfo(orgCode); List<CarIndexVo> carVoList = iCarService.getCarsIotInfo(orgCode);
if (!carVoList.isEmpty()) { if (!carVoList.isEmpty()) {
...@@ -1331,7 +1318,7 @@ public class CarController extends AbstractBaseController { ...@@ -1331,7 +1318,7 @@ public class CarController extends AbstractBaseController {
public ResponseModel getTeamCarList(@RequestParam(required = false) Long id, public ResponseModel getTeamCarList(@RequestParam(required = false) Long id,
@RequestParam(required = false) String sequenceNbr, @RequestParam(required = false) String sequenceNbr,
@RequestParam(required = false) Double longitude, @RequestParam(required = false) Double latitude) { @RequestParam(required = false) Double longitude, @RequestParam(required = false) Double latitude) {
return CommonResponseUtil.success(iCarService.getTeamCarList(sequenceNbr,id, longitude, latitude)); return CommonResponseUtil.success(iCarService.getTeamCarList(sequenceNbr, id, longitude, latitude));
} }
/** /**
...@@ -1396,79 +1383,90 @@ public class CarController extends AbstractBaseController { ...@@ -1396,79 +1383,90 @@ public class CarController extends AbstractBaseController {
return ResponseHelper.buildResponse(iCarService.getQRCode(id)); return ResponseHelper.buildResponse(iCarService.getQRCode(id));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@RequestMapping(value = "/location", method = RequestMethod.GET) @RequestMapping(value = "/location", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取二维码图片", notes = "获取二维码图片") @ApiOperation(httpMethod = "GET", value = "获取二维码图片", notes = "获取二维码图片")
public ResponseModel<Object> location() throws Exception { public ResponseModel<Object> location() throws Exception {
return ResponseHelper.buildResponse(iCarService.location()); return ResponseHelper.buildResponse(iCarService.location());
} }
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@RequestMapping(value = "/getCountOfCar", method = RequestMethod.GET) @RequestMapping(value = "/getCountOfCar", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "车辆统计-获取车辆总数", notes = "车辆统计-获取车辆总数") @ApiOperation(httpMethod = "GET", value = "车辆统计-获取车辆总数", notes = "车辆统计-获取车辆总数")
public Map<String, Integer> getCountOfCar() { public Map<String, Integer> getCountOfCar() {
return iCarService.getCountOfCar(); return iCarService.getCountOfCar();
} }
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@RequestMapping(value = "/getCountOfCarBelongCompany", method = RequestMethod.GET) @RequestMapping(value = "/getCountOfCarBelongCompany", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "车辆统计-获取车辆归属单位总数", notes = "车辆统计-获取车辆归属单位总数") @ApiOperation(httpMethod = "GET", value = "车辆统计-获取车辆归属单位总数", notes = "车辆统计-获取车辆归属单位总数")
public ResponseModel<Integer> getCountOfCarBelongCompany() { public ResponseModel<Integer> getCountOfCarBelongCompany() {
return CommonResponseUtil.success(iCarService.getCountOfCarBelongCompany()); return CommonResponseUtil.success(iCarService.getCountOfCarBelongCompany());
} }
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@RequestMapping(value = "/getCarCategoryInfo", method = RequestMethod.GET) @RequestMapping(value = "/getCarCategoryInfo", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "车辆统计-获取车辆分类用途信息", notes = "车辆统计-获取车辆分类用途信息") @ApiOperation(httpMethod = "GET", value = "车辆统计-获取车辆分类用途信息", notes = "车辆统计-获取车辆分类用途信息")
public List<ChartIntegerDto> getCarCategoryInfo() { public List<ChartIntegerDto> getCarCategoryInfo() {
return iCarService.getCarCategoryInfo(); return iCarService.getCarCategoryInfo();
} }
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@RequestMapping(value = "/getCarEquipStateInfo", method = RequestMethod.GET) @RequestMapping(value = "/getCarEquipStateInfo", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "车辆统计-获取设备状态信息", notes = "车辆统计-获取设备状态信息") @ApiOperation(httpMethod = "GET", value = "车辆统计-获取设备状态信息", notes = "车辆统计-获取设备状态信息")
public Page<CarEquipStateInfoDto> getCarEquipStateInfo() { public Page<CarEquipStateInfoDto> getCarEquipStateInfo() {
return iCarService.getCarEquipStateInfo(); return iCarService.getCarEquipStateInfo();
} }
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@RequestMapping(value = "/getCarEquipAlarmInfoDto", method = RequestMethod.GET) @RequestMapping(value = "/getCarEquipAlarmInfoDto", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "车辆统计-获取设备告警信息", notes = "车辆统计-获取设备告警信息") @ApiOperation(httpMethod = "GET", value = "车辆统计-获取设备告警信息", notes = "车辆统计-获取设备告警信息")
public Page<CarEquipAlarmInfoDto> getCarEquipAlarmInfoDto() { public Page<CarEquipAlarmInfoDto> getCarEquipAlarmInfoDto() {
return iCarService.getCarEquipAlarmInfoDto(); return iCarService.getCarEquipAlarmInfoDto();
} }
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@RequestMapping(value = "/getCarBelongAreaInfo", method = RequestMethod.GET) @RequestMapping(value = "/getCarBelongAreaInfo", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "车辆统计-获取车辆归属信息接口", notes = "车辆统计-获取车辆归属信息接口") @ApiOperation(httpMethod = "GET", value = "车辆统计-获取车辆归属信息接口", notes = "车辆统计-获取车辆归属信息接口")
public List<ChartIntegerDto> getCarBelongAreaInfo() { public List<ChartIntegerDto> getCarBelongAreaInfo() {
return iCarService.getCarBelongAreaInfo(); return iCarService.getCarBelongAreaInfo();
} }
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@RequestMapping(value = "/getCarAreaInfo", method = RequestMethod.GET) @RequestMapping(value = "/getCarAreaInfo", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "车辆统计-获取片区车辆归属信息接口", notes = "车辆统计-获取片区车辆归属信息接口") @ApiOperation(httpMethod = "GET", value = "车辆统计-获取片区车辆归属信息接口", notes = "车辆统计-获取片区车辆归属信息接口")
public Page<CarAreaInfoDto> getCarAreaInfo(@RequestParam String areaName) { public Page<CarAreaInfoDto> getCarAreaInfo(@RequestParam String areaName) {
return iCarService.getCarAreaInfo(areaName); return iCarService.getCarAreaInfo(areaName);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@RequestMapping(value = "/getCarMileageInfoByMoth", method = RequestMethod.GET) @RequestMapping(value = "/getCarMileageInfoByMoth", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "车辆统计-按照月份统计车辆里程", notes = "车辆统计-按照月份统计车辆里程") @ApiOperation(httpMethod = "GET", value = "车辆统计-按照月份统计车辆里程", notes = "车辆统计-按照月份统计车辆里程")
public BasicTableDataDto getCarMileageInfoByMoth(@RequestParam(required = false) String date,@RequestParam Integer current,@RequestParam Integer size) { public BasicTableDataDto getCarMileageInfoByMoth(@RequestParam(required = false) String date, @RequestParam Integer current, @RequestParam Integer size) {
return iCarService.getCarMileageInfoByMoth(date,current,size); return iCarService.getCarMileageInfoByMoth(date, current, size);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@RequestMapping(value = "/exportCarMileageInfoByMoth", method = RequestMethod.GET) @RequestMapping(value = "/exportCarMileageInfoByMoth", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "车辆统计-按照月份统计导出车辆里程", notes = "车辆统计-按照月份统计导出车辆里程") @ApiOperation(httpMethod = "GET", value = "车辆统计-按照月份统计导出车辆里程", notes = "车辆统计-按照月份统计导出车辆里程")
public void exportCarMileageInfoByMoth(@RequestParam(required = false) String date, HttpServletResponse response) { public void exportCarMileageInfoByMoth(@RequestParam(required = false) String date, HttpServletResponse response) {
List<CarExportDto> list = this.iCarService.exportCarMileageInfoByMoth(date); List<CarExportDto> list = this.iCarService.exportCarMileageInfoByMoth(date);
String name = "车辆里程月度统计表-"+date; if (org.springframework.util.StringUtils.isEmpty(date)) {
FileHelper.exportExcel(list,name,name,CarExportDto.class,UUID.randomUUID().toString()+".xls",response); date = DateUtil.format(new Date(), "yyyy-MM");
}
String name = "车辆里程月度统计表-" + date;
FileHelper.exportExcel(list, name, name, CarExportDto.class, UUID.randomUUID().toString() + ".xls", response);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@RequestMapping(value = "/getCarMileageInfoByMothOFDay", method = RequestMethod.GET) @RequestMapping(value = "/getCarMileageInfoByMothOFDay", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "车辆统计-按照月份统计每天的车辆里程", notes = "车辆统计-按照月份统计每天的车辆里程") @ApiOperation(httpMethod = "GET", value = "车辆统计-按照月份统计每天的车辆里程", notes = "车辆统计-按照月份统计每天的车辆里程")
public ZZChartsDto getCarMileageInfoByMothOFDay(@RequestParam String iotCode) { public ZZChartsDto getCarMileageInfoByMothOFDay(@RequestParam String iotCode) {
return iCarService.getCarMileageInfoByMothOFDay(iotCode); return iCarService.getCarMileageInfoByMothOFDay(iotCode);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@RequestMapping(value = "/getCarExcepitonTrack", method = RequestMethod.GET) @RequestMapping(value = "/getCarExcepitonTrack", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "车辆统计-按照日期范围获取异常车辆", notes = "车辆统计-按照日期范围获取异常车辆") @ApiOperation(httpMethod = "GET", value = "车辆统计-按照日期范围获取异常车辆", notes = "车辆统计-按照日期范围获取异常车辆")
public Page<CarExceptionDto> getCarExcepitonTrack(@RequestParam Integer type) { public Page<CarExceptionDto> getCarExcepitonTrack(@RequestParam Integer type) {
......
...@@ -1941,6 +1941,7 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS ...@@ -1941,6 +1941,7 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
carExportDtos.add(carExportDto); carExportDtos.add(carExportDto);
} }
} }
Collections.sort(carExportDtos,(e1,e2)->Double.valueOf(e2.getTotalTravel()).compareTo(Double.valueOf(e1.getTotalTravel())));
return carExportDtos; return carExportDtos;
} }
......
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