| | |
| | | @SysLogAnnotation(operModul = "图斑", operType = "查询", operDesc = "查询图斑的全部信息") |
| | | public ResponseResult<PaginationData<LotInfo>> page(@RequestParam Integer page, |
| | | @RequestParam(name = "page_size", defaultValue = "10") Integer pageSize, |
| | | @RequestParam String itemId) { |
| | | @RequestParam String workspaceId) { |
| | | //调用service分页查询 |
| | | PatchesParam param=PatchesParam.builder() |
| | | .page(page) |
| | | .itemId(itemId) |
| | | .workspaceId(workspaceId) |
| | | .pageSize(pageSize).build(); |
| | | PaginationData<LotInfo> data = getPatchesService.limitGet(param); |
| | | return ResponseResult.success(data); |
| | |
| | | @GetMapping("/GetPhoto") |
| | | public ResponseResult<PaginationData<MediaFileEntity>> GetPatchesPhoto(@RequestParam(name = "page", defaultValue = "1") Integer page, |
| | | @RequestParam(name = "page_size", defaultValue = "10") Integer pageSize, |
| | | @RequestParam String itemId, |
| | | @RequestParam String workspaceId, |
| | | @RequestParam String dkbh){ |
| | | PatchesParam param=PatchesParam.builder() |
| | | .page(page) |
| | | .itemId(itemId) |
| | | .workspaceId(workspaceId) |
| | | .pageSize(pageSize).build(); |
| | | getPatchesService.getPhoto(param,dkbh); |
| | | return ResponseResult.success(getPatchesService.getPhoto(param,dkbh)); |
| | |
| | | @Autowired |
| | | private ShpToDataSourceServiceImpl shpToDataSourceServiceImpl; |
| | | @PostMapping("/getGeo") |
| | | public ResponseResult<List<LotInfo>> getGeo (@RequestParam("file") MultipartFile file,@RequestParam String itemId) throws IOException { |
| | | List<LotInfo> list=shpToDataSourceServiceImpl.insertGeo(file,itemId); |
| | | public ResponseResult<List<LotInfo>> getGeo (@RequestParam("file") MultipartFile file,@RequestParam String workspaceId) throws IOException { |
| | | List<LotInfo> list=shpToDataSourceServiceImpl.insertGeo(file,workspaceId); |
| | | return ResponseResult.success(list); |
| | | } |
| | | |
| | |
| | | @Builder.Default |
| | | private int pageSize = 10; |
| | | |
| | | private String itemId; |
| | | private String workspaceId; |
| | | } |
| | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @TableField("item_id") |
| | | private String itemId; |
| | | @TableField("workspace_id") |
| | | private String workspaceId; |
| | | |
| | | @TableField("bsm") |
| | | private String bsm; |
| | |
| | | public PaginationData<LotInfo> limitGet(PatchesParam param) { |
| | | Page<LotInfo> page = mapper.selectPage(new Page<LotInfo>(param.getPage(), param.getPageSize()), |
| | | new LambdaQueryWrapper<LotInfo>() |
| | | .eq(LotInfo::getItemId,param.getItemId())); |
| | | .eq(LotInfo::getWorkspaceId,param.getWorkspaceId())); |
| | | List<LotInfo> records = page.getRecords() |
| | | .stream() |
| | | .collect(Collectors.toList()); |
| | |
| | | private ShpToDataSourceMapper mapper; |
| | | String head = POLYGON; |
| | | String json; |
| | | public List<LotInfo> insertGeo(MultipartFile file ,String itemId) throws IOException { |
| | | public List<LotInfo> insertGeo(MultipartFile file ,String workspaceId) throws IOException { |
| | | List<LotInfo> list=new ArrayList<>(); |
| | | MultipartFileTOFileUtil multipartFileTOFileUtil = new MultipartFileTOFileUtil(); |
| | | File file1 = multipartFileTOFileUtil.multipartFile2File(file); |
| | |
| | | String uuid = UUID.randomUUID().toString(); |
| | | String bsm = uuid.replaceAll("-", ""); |
| | | lotInfo.setBsm(bsm); |
| | | lotInfo.setItemId(itemId); |
| | | lotInfo.setWorkspaceId(workspaceId); |
| | | lotInfo.setDkfw(json); |
| | | lotInfo.setDkbh("dkbh"+i); |
| | | mapper.insert(lotInfo); |
| | |
| | | @Autowired |
| | | private SummarizeService summarizeService; |
| | | @GetMapping("/getSummarize") |
| | | public ResponseResult<FlyInfo> getSummarize(@RequestParam String itemId){ |
| | | FlyInfo summarize=summarizeService.findData(itemId); |
| | | public ResponseResult<FlyInfo> getSummarize(@RequestParam String workspaceId){ |
| | | FlyInfo summarize=summarizeService.findData(workspaceId); |
| | | return ResponseResult.success(summarize); |
| | | } |
| | | @PutMapping("/upSummarize") |
| | | public ResponseResult upSummarize(@RequestBody FlyInfo summarize){ |
| | | FlyInfo flyInfo= FlyInfo.builder() |
| | | .id(summarize.getId()) |
| | | .itemId(summarize.getItemId()) |
| | | .workspaceId(summarize.getWorkspaceId()) |
| | | .hour(summarize.getHour()) |
| | | .min(summarize.getMin()) |
| | | .flyCount(summarize.getFlyCount()) |
| | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @TableField("item_id") |
| | | private String itemId; |
| | | @TableField("workspace_id") |
| | | private String workspaceId; |
| | | |
| | | @TableField("hour") |
| | | private String hour; |
| | |
| | | import com.dji.sample.summarize.model.entity.FlyInfo; |
| | | |
| | | public interface SummarizeService { |
| | | FlyInfo findData(String itemId); |
| | | FlyInfo findData(String workspaceId); |
| | | void updateData( FlyInfo flyInfo); |
| | | } |
| | |
| | | private SummarizeMapper mapper; |
| | | |
| | | @Override |
| | | public FlyInfo findData(String itemId) { |
| | | return mapper.selectOne(new LambdaQueryWrapper<FlyInfo>().eq(FlyInfo::getItemId,itemId)); |
| | | public FlyInfo findData(String workspaceId) { |
| | | return mapper.selectOne(new LambdaQueryWrapper<FlyInfo>().eq(FlyInfo::getWorkspaceId,workspaceId)); |
| | | } |
| | | |
| | | @Override |
| | | public void updateData(FlyInfo flyInfo) { |
| | | mapper.update(flyInfo, new LambdaQueryWrapper<FlyInfo>() |
| | | .eq(FlyInfo::getItemId, flyInfo.getItemId())); |
| | | .eq(FlyInfo::getWorkspaceId, flyInfo.getWorkspaceId())); |
| | | } |
| | | |
| | | } |