kongdeqiang
2024-09-26 da9a4f7ad988c452f3a356989eaf7a6c06ae5032
src/main/java/com/boying/controller/StreetController.java
@@ -11,8 +11,6 @@
import com.boying.service.StreetReRoadService;
import com.boying.service.StreetService;
import com.boying.util.LngLatUtil;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -29,7 +27,6 @@
@RestController
@RequestMapping("ffzf/street")
@RequiredArgsConstructor
@Tag(description = "ffzf/street" , name = "街道统计" )
public class StreetController {
@@ -38,7 +35,6 @@
    private final StreetLogoService streetLogoService;
    @PostMapping("/findPage")
    @Operation(summary = "分页查询" , description = "分页查询" )
    public Object findPage(Page page, Street street) {
        QueryWrapper<Street> wrapper = new QueryWrapper<>();
        wrapper.lambda()
@@ -47,7 +43,6 @@
    }
    @PostMapping("/save")
    @Operation(summary = "新增街道" , description = "新增街道" )
    public Object save(Street street) {
        QueryWrapper<Street> wrapper = new QueryWrapper<>();
        wrapper.lambda()
@@ -68,7 +63,6 @@
    }
    @PostMapping("/save2")
    @Operation(summary = "新增路" , description = "新增路" )
    public Object save2(StreetReRoad streetReRoad) {
        streetReRoadService.saveOrUpdate(streetReRoad);
        return R.ok();
@@ -76,21 +70,18 @@
    @PostMapping("/delete")
    @Operation(summary = "删除街" , description = "删除街" )
    public Object delete(Long id) {
        streetService.removeById(id);
        return R.ok();
    }
    @PostMapping("/delete2")
    @Operation(summary = "删除路" , description = "删除路" )
    public Object delete2(Long id) {
        streetReRoadService.removeById(id);
        return R.ok();
    }
    @GetMapping("/findById")
    @Operation(summary = "根据id查询(APP)" , description = "根据id查询(APP)" )
    public Object findById(Long id,int type) {
        if(type==0){
            QueryWrapper<StreetReRoad> roadQueryWrapper = new QueryWrapper<>();
@@ -119,7 +110,6 @@
    }
    @GetMapping("/findList")
    @Operation(summary = "查询所有街道和路" , description = "查询所有街道和路" )
    public Object findAll() {
        Map<String,Object> map = new HashMap<>();
        QueryWrapper<Street> wrapper = new QueryWrapper<>();
@@ -135,13 +125,11 @@
    }
    @GetMapping("/findList2")
    @Operation(summary = "查询所有街道" , description = "查询所有街道" )
    public Object findAll2() {
        return R.ok(streetService.list());
    }
    @PostMapping("findLogo")
    @Operation(summary = "查询所有街道违章" , description = "查询所有街道违章" )
    public Object findLogo(String lng ,String lat) {
        List<StreetLogo> all = streetLogoService.list();
        List<StreetLogo> all2 = new ArrayList<>();