import org.springframework.web.bind.annotation.RequestMapping; | import org.springframework.web.bind.annotation.RequestMapping; | ||||
import org.springframework.web.bind.annotation.RestController; | import org.springframework.web.bind.annotation.RestController; | ||||
import java.math.BigInteger; | |||||
/** | /** | ||||
* <p>地图统计数据</p> | * <p>地图统计数据</p> | ||||
* | * | ||||
*/ | */ | ||||
@GetMapping("driverArea") | @GetMapping("driverArea") | ||||
@RequiresPermissions("statisticsMap:driverArea") | @RequiresPermissions("statisticsMap:driverArea") | ||||
public Response area(Integer driverArea,Integer type) { | |||||
public Response area(BigInteger driverArea, Integer type) { | |||||
return iStatisticsMapService.getDriversByDriverArea(driverArea, type); | return iStatisticsMapService.getDriversByDriverArea(driverArea, type); | ||||
} | } | ||||
import com.taauav.common.bean.Response; | import com.taauav.common.bean.Response; | ||||
import java.math.BigInteger; | |||||
/** | /** | ||||
* 地图统计接口 | * 地图统计接口 | ||||
* | |||||
* @author dyg | * @author dyg | ||||
* @date 2019.12.07 | * @date 2019.12.07 | ||||
*/ | */ | ||||
public interface IStatisticsMapService { | public interface IStatisticsMapService { | ||||
/** | /** | ||||
* 获取所有区域数据 | * 获取所有区域数据 | ||||
* | |||||
* @return | * @return | ||||
*/ | */ | ||||
Response getIndexData(); | Response getIndexData(); | ||||
/** | /** | ||||
* 根据区域编号获取河道数据 | * 根据区域编号获取河道数据 | ||||
* | |||||
* @param driverArea | * @param driverArea | ||||
* @param type 1百度 2高德 | |||||
* @param type 1百度 2高德 | |||||
* @return | * @return | ||||
*/ | */ | ||||
Response getDriversByDriverArea(Integer driverArea, Integer type); | |||||
Response getDriversByDriverArea(BigInteger driverArea, Integer type); | |||||
/** | /** | ||||
* 根据河道任务编号获取图片数据 | * 根据河道任务编号获取图片数据 | ||||
* | |||||
* @param inspectDriverId | * @param inspectDriverId | ||||
* @param type 1百度 2高德 | |||||
* @param type 1百度 2高德 | |||||
* @return | * @return | ||||
*/ | */ | ||||
Response getFileListByInspectDriverId(Integer inspectDriverId, Integer type); | Response getFileListByInspectDriverId(Integer inspectDriverId, Integer type); |
import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
import org.springframework.util.StringUtils; | import org.springframework.util.StringUtils; | ||||
import java.math.BigInteger; | |||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
import java.util.HashMap; | import java.util.HashMap; | ||||
import java.util.List; | import java.util.List; | ||||
* @return | * @return | ||||
*/ | */ | ||||
@Override | @Override | ||||
public Response getDriversByDriverArea(Integer driverArea,Integer type) { | |||||
public Response getDriversByDriverArea(BigInteger driverArea, Integer type) { | |||||
if (StringUtils.isEmpty(driverArea)) { | if (StringUtils.isEmpty(driverArea)) { | ||||
return response.failure("区域编号不存在"); | return response.failure("区域编号不存在"); | ||||
} | } |
import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
import org.springframework.util.StringUtils; | import org.springframework.util.StringUtils; | ||||
import java.math.BigInteger; | |||||
import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||
import java.util.*; | import java.util.*; | ||||
map.put("status", status); | map.put("status", status); | ||||
} | } | ||||
if (map.containsKey("driverArea") && !"".equals(map.get("driverArea"))) { | if (map.containsKey("driverArea") && !"".equals(map.get("driverArea"))) { | ||||
map.put("driverArea", Integer.valueOf(map.get("driverArea").toString())); | |||||
map.put("driverArea", BigInteger.valueOf(Long.valueOf(map.get("driverArea").toString()))); | |||||
} else { | } else { | ||||
map.remove("driverArea"); | map.remove("driverArea"); | ||||
} | } |