kongdeqiang
2024-04-22 7bc78d8f70a4d11e46f8bd640228804a3dd0dc68
src/main/java/com/boying/controller/StreetController.java
@@ -11,6 +11,8 @@
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;
@@ -27,6 +29,7 @@
@RestController
@RequestMapping("ffzf/street")
@RequiredArgsConstructor
@Tag(description = "ffzf/street" , name = "街道统计" )
public class StreetController {
@@ -35,6 +38,7 @@
    private final StreetLogoService streetLogoService;
    @PostMapping("/findPage")
    @Operation(summary = "分页查询" , description = "分页查询" )
    public Object findPage(Page page, Street street) {
        QueryWrapper<Street> wrapper = new QueryWrapper<>();
        wrapper.lambda()
@@ -43,6 +47,7 @@
    }
    @PostMapping("/save")
    @Operation(summary = "新增街道" , description = "新增街道" )
    public Object save(Street street) {
        QueryWrapper<Street> wrapper = new QueryWrapper<>();
        wrapper.lambda()
@@ -63,6 +68,7 @@
    }
    @PostMapping("/save2")
    @Operation(summary = "新增路" , description = "新增路" )
    public Object save2(StreetReRoad streetReRoad) {
        streetReRoadService.saveOrUpdate(streetReRoad);
        return R.ok();
@@ -70,18 +76,21 @@
    @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<>();
@@ -110,6 +119,7 @@
    }
    @GetMapping("/findList")
    @Operation(summary = "查询所有街道和路" , description = "查询所有街道和路" )
    public Object findAll() {
        Map<String,Object> map = new HashMap<>();
        QueryWrapper<Street> wrapper = new QueryWrapper<>();
@@ -125,11 +135,13 @@
    }
    @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<>();