|
@@ -0,0 +1,92 @@
|
|
|
+package org.springblade.land.controller;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
+import io.swagger.annotations.*;
|
|
|
+import lombok.AllArgsConstructor;
|
|
|
+import lombok.SneakyThrows;
|
|
|
+import org.springblade.core.boot.ctrl.BladeController;
|
|
|
+import org.springblade.core.mp.support.Query;
|
|
|
+import org.springblade.core.tool.api.R;
|
|
|
+import org.springblade.land.dto.PolicyInfoDTO;
|
|
|
+import org.springblade.land.dto.PolicyInfoSearchDTO;
|
|
|
+import org.springblade.land.entity.AttachmentInfo;
|
|
|
+import org.springblade.land.entity.LandTypeInfo;
|
|
|
+import org.springblade.land.entity.PolicyInfo;
|
|
|
+import org.springblade.land.service.IAttachmentInfoService;
|
|
|
+import org.springblade.land.service.ILandTypeInfoService;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
+
|
|
|
+import javax.validation.Valid;
|
|
|
+import java.io.FileNotFoundException;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author yangyj
|
|
|
+ * @Date 2023/2/17 10:40
|
|
|
+ * @description TODO
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@AllArgsConstructor
|
|
|
+@RequestMapping("/landTypeInfo")
|
|
|
+@Api(value = "基础数据-地类名库", tags = "基础数据-地类名库")
|
|
|
+public class LandTypeInfoController extends BladeController {
|
|
|
+
|
|
|
+ private final ILandTypeInfoService landTypeInfoService;
|
|
|
+ /**
|
|
|
+ * 分页
|
|
|
+ */
|
|
|
+ @GetMapping("page")
|
|
|
+ @ApiOperationSupport(order = 2)
|
|
|
+ @ApiOperation(value = "分页", notes = "传入搜索值")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "projectId", value = "项目id", required = true),
|
|
|
+ @ApiImplicitParam(name = "areaId", value = "区域id", required = true),
|
|
|
+ @ApiImplicitParam(name = "current", value = "当前页", required = true),
|
|
|
+ @ApiImplicitParam(name = "size", value = "每页的数量", required = true),
|
|
|
+ @ApiImplicitParam(name = "name", value = "名称", required = false),
|
|
|
+ @ApiImplicitParam(name = "landNature", value = "土地性质", required = false)
|
|
|
+ })
|
|
|
+ public R<IPage<LandTypeInfo>> page(Query query, LandTypeInfo info){
|
|
|
+ IPage<LandTypeInfo> iPage = landTypeInfoService.page(query, info);
|
|
|
+ return R.data(iPage);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增或修改
|
|
|
+ */
|
|
|
+ @PostMapping("/addOrUpdate")
|
|
|
+ @ApiOperationSupport(order = 1)
|
|
|
+ @ApiOperation(value = "新增或修改", notes = "传入对象")
|
|
|
+ public R addOrUpdate(@Valid @RequestBody LandTypeInfo info) {
|
|
|
+ landTypeInfoService.addOrUpdate(info);
|
|
|
+ return R.success("操作成功");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询单个详情
|
|
|
+ */
|
|
|
+ @GetMapping("detail")
|
|
|
+ @ApiOperationSupport(order = 3)
|
|
|
+ @ApiOperation(value = "查询单个详情", notes = "传入单个id")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "id", value = "id", required = true)
|
|
|
+ })
|
|
|
+ public R<LandTypeInfo> detail(Long id){
|
|
|
+ return R.data(landTypeInfoService.detail(id));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 批量删除
|
|
|
+ */
|
|
|
+ @PostMapping("/remove")
|
|
|
+ @ApiOperationSupport(order = 4)
|
|
|
+ @ApiOperation(value = "批量逻辑删除", notes = "传入ids")
|
|
|
+ public R remove(@ApiParam(value = "主键集合", required = true) @RequestBody List<Long> ids) {
|
|
|
+ landTypeInfoService.deleteLogic(ids);
|
|
|
+ return R.success("删除成功");
|
|
|
+ }
|
|
|
+
|
|
|
+}
|