Browse Source

征拆基础数据所有接口

qianxb 1 year ago
parent
commit
39f03b991e
27 changed files with 1018 additions and 7 deletions
  1. 5 2
      blade-ops/blade-swagger/src/main/resources/application-dev.yml
  2. 12 0
      blade-service-api/blade-land-api/pom.xml
  3. 21 0
      blade-service-api/blade-land-api/src/main/java/org/springblade/land/dto/CropsInfoDTO.java
  4. 45 0
      blade-service-api/blade-land-api/src/main/java/org/springblade/land/entity/CropsInfo.java
  5. 36 0
      blade-service-api/blade-land-api/src/main/java/org/springblade/land/entity/LandRole.java
  6. 37 0
      blade-service-api/blade-land-api/src/main/java/org/springblade/land/entity/LandTypeInfo.java
  7. 25 0
      blade-service-api/blade-land-api/src/main/java/org/springblade/land/vo/CropsInfoVO.java
  8. 27 0
      blade-service-api/blade-land-api/src/main/java/org/springblade/land/vo/LandRoleVO.java
  9. 6 0
      blade-service/blade-land/pom.xml
  10. 1 1
      blade-service/blade-land/src/main/java/org/springblade/land/controller/AttachmentInfoController.java
  11. 87 0
      blade-service/blade-land/src/main/java/org/springblade/land/controller/CropsInfoController.java
  12. 99 0
      blade-service/blade-land/src/main/java/org/springblade/land/controller/LandRoleController.java
  13. 92 0
      blade-service/blade-land/src/main/java/org/springblade/land/controller/LandTypeInfoController.java
  14. 3 3
      blade-service/blade-land/src/main/java/org/springblade/land/controller/PolicyInfoController.java
  15. 43 0
      blade-service/blade-land/src/main/java/org/springblade/land/mapper/CropsInfoMapper.java
  16. 38 0
      blade-service/blade-land/src/main/java/org/springblade/land/mapper/CropsInfoMapper.xml
  17. 45 0
      blade-service/blade-land/src/main/java/org/springblade/land/mapper/LandRoleMapper.java
  18. 28 0
      blade-service/blade-land/src/main/java/org/springblade/land/mapper/LandRoleMapper.xml
  19. 37 0
      blade-service/blade-land/src/main/java/org/springblade/land/mapper/LandTypeInfoMapper.java
  20. 18 0
      blade-service/blade-land/src/main/java/org/springblade/land/mapper/LandTypeInfoMapper.xml
  21. 1 1
      blade-service/blade-land/src/main/java/org/springblade/land/mapper/PolicyInfoMapper.xml
  22. 47 0
      blade-service/blade-land/src/main/java/org/springblade/land/service/ICropsInfoService.java
  23. 44 0
      blade-service/blade-land/src/main/java/org/springblade/land/service/ILandRoleService.java
  24. 46 0
      blade-service/blade-land/src/main/java/org/springblade/land/service/ILandTypeInfoService.java
  25. 76 0
      blade-service/blade-land/src/main/java/org/springblade/land/service/impl/CropsInfoServiceImpl.java
  26. 62 0
      blade-service/blade-land/src/main/java/org/springblade/land/service/impl/LandRoleServiceImpl.java
  27. 37 0
      blade-service/blade-land/src/main/java/org/springblade/land/service/impl/LandTypeInfoServiceImpl.java

+ 5 - 2
blade-ops/blade-swagger/src/main/resources/application-dev.yml

@@ -22,6 +22,9 @@ knife4j:
       - name: 档案接口
         uri: 127.0.0.1:8090
         location: /blade-archive/v2/api-docs
-      - name: 内控系统
+#      - name: 内控系统
+#        uri: 127.0.0.1:8090
+#        location: /blade-control/v2/api-docs
+      - name: 征拆接口
         uri: 127.0.0.1:8090
-        location: /blade-control/v2/api-docs
+        location: /blade-land/v2/api-docs

+ 12 - 0
blade-service-api/blade-land-api/pom.xml

@@ -19,4 +19,16 @@
         <maven.compiler.target>8</maven.compiler.target>
     </properties>
 
+    <dependencies>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-common</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-user-api</artifactId>
+            <version>${bladex.project.version}</version>
+        </dependency>
+    </dependencies>
+
 </project>

+ 21 - 0
blade-service-api/blade-land-api/src/main/java/org/springblade/land/dto/CropsInfoDTO.java

@@ -0,0 +1,21 @@
+package org.springblade.land.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.land.entity.CropsInfo;
+
+import java.util.List;
+
+/**
+ * @Param
+ * @Author wangwl
+ * @Date 2023/9/13 11:09
+ **/
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class CropsInfoDTO extends CropsInfo {
+
+    @ApiModelProperty(value = "子集合")
+    private List<CropsInfo> childrenList;
+}

+ 45 - 0
blade-service-api/blade-land-api/src/main/java/org/springblade/land/entity/CropsInfo.java

@@ -0,0 +1,45 @@
+package org.springblade.land.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.base.BaseEntity;
+
+/**
+ * @Param
+ * @Author wangwl
+ * @Date 2023/9/13 10:57
+ **/
+@Data
+@TableName("l_crops_info")
+@EqualsAndHashCode(callSuper = true)
+public class CropsInfo extends BaseEntity {
+
+    @ApiModelProperty(value = "项目id")
+    private Long projectId;
+
+    @ApiModelProperty(value = "父id")
+    private Long parentId;
+
+    @ApiModelProperty(value = "单位名称")
+    private String unitName;
+
+    @ApiModelProperty(value = "规格名称")
+    private String specificationName;
+
+    @ApiModelProperty(value = "区域id")
+    private Long areaId;
+
+    @ApiModelProperty(value = "名称")
+    private String name;
+
+    @ApiModelProperty(value = "补偿性质")
+    private Integer compensationType;
+
+    @ApiModelProperty(value = "政府补偿标准")
+    private String governmentStand;
+
+    @ApiModelProperty(value = "协定补偿标准")
+    private String agreementStand;
+}

+ 36 - 0
blade-service-api/blade-land-api/src/main/java/org/springblade/land/entity/LandRole.java

@@ -0,0 +1,36 @@
+package org.springblade.land.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.base.BaseEntity;
+
+/**
+ * @Param
+ * @Author wangwl
+ * @Date 2023/9/13 16:58
+ **/
+@Data
+@TableName("l_land_role")
+@EqualsAndHashCode(callSuper = true)
+public class LandRole extends BaseEntity {
+
+    @ApiModelProperty(value = "项目id")
+    private Long projectId;
+
+    @ApiModelProperty(value = "编号")
+    private String number;
+
+    @ApiModelProperty(value = "名称")
+    private String name;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    @ApiModelProperty(value = "角色用户")
+    private String allUser;
+
+    @ApiModelProperty(value = "区域id")
+    private Long areaId;
+}

+ 37 - 0
blade-service-api/blade-land-api/src/main/java/org/springblade/land/entity/LandTypeInfo.java

@@ -0,0 +1,37 @@
+package org.springblade.land.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.base.BaseEntity;
+
+/**
+ * @Param
+ * @Author wangwl
+ * @Date 2023/9/13 9:27
+ **/
+@Data
+@TableName("l_land_type_info")
+@EqualsAndHashCode(callSuper = true)
+public class LandTypeInfo extends BaseEntity {
+
+    @ApiModelProperty(value = "项目id")
+    private Long projectId;
+
+    @ApiModelProperty(value = "区域id")
+    private Long areaId;
+
+    @ApiModelProperty(value = "名称")
+    private String name;
+
+    @ApiModelProperty(value = "土地性质")
+    private Integer landNature;
+
+    @ApiModelProperty(value = "政府补偿标准")
+    private String governmentStand;
+
+    @ApiModelProperty(value = "协定赔偿标准")
+    private String agreementStand;
+
+}

+ 25 - 0
blade-service-api/blade-land-api/src/main/java/org/springblade/land/vo/CropsInfoVO.java

@@ -0,0 +1,25 @@
+package org.springblade.land.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.land.entity.CropsInfo;
+
+import java.util.List;
+
+/**
+ * @Param
+ * @Author wangwl
+ * @Date 2023/9/13 11:09
+ **/
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class CropsInfoVO extends CropsInfo {
+
+    @ApiModelProperty(value = "补偿性质名称")
+    private String compensationTypeName;
+
+    @ApiModelProperty(value = "子集合")
+    private List<CropsInfo> childrenList;
+
+}

+ 27 - 0
blade-service-api/blade-land-api/src/main/java/org/springblade/land/vo/LandRoleVO.java

@@ -0,0 +1,27 @@
+package org.springblade.land.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.secure.BladeUser;
+import org.springblade.land.entity.CropsInfo;
+import org.springblade.land.entity.LandRole;
+import org.springblade.system.user.entity.User;
+import org.springframework.boot.autoconfigure.security.SecurityProperties;
+
+import java.util.List;
+
+/**
+ * @Param
+ * @Author wangwl
+ * @Date 2023/9/13 11:09
+ **/
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class LandRoleVO extends LandRole {
+
+    @ApiModelProperty(value = "用户集合")
+    private List<User> allUserList;
+
+
+}

+ 6 - 0
blade-service/blade-land/pom.xml

@@ -57,6 +57,12 @@
             <scope>compile</scope>
         </dependency>
 
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-user-api</artifactId>
+            <version>${bladex.project.version}</version>
+        </dependency>
+
     </dependencies>
 
     <properties>

+ 1 - 1
blade-service/blade-land/src/main/java/org/springblade/land/controller/AttachmentInfoController.java

@@ -31,7 +31,7 @@ import javax.validation.Valid;
 @RestController
 @AllArgsConstructor
 @RequestMapping("/attachmentInfo")
-@Api(value = "政策法规-附件", tags = "政策法规-附件")
+@Api(value = "基础数据-政策法规附件", tags = "基础数据-政策法规附件")
 public class AttachmentInfoController extends BladeController {
 
 

+ 87 - 0
blade-service/blade-land/src/main/java/org/springblade/land/controller/CropsInfoController.java

@@ -0,0 +1,87 @@
+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 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.CropsInfoDTO;
+import org.springblade.land.entity.CropsInfo;
+import org.springblade.land.entity.LandTypeInfo;
+import org.springblade.land.service.ICropsInfoService;
+import org.springblade.land.service.ILandTypeInfoService;
+import org.springblade.land.vo.CropsInfoVO;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ * @author yangyj
+ * @Date 2023/2/17 10:40
+ * @description TODO
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/cropsInfo")
+@Api(value = "基础数据-青苗名库", tags = "基础数据-青苗名库")
+public class CropsInfoController extends BladeController {
+
+    private final ICropsInfoService cropsInfoService;
+    /**
+     * 分页
+     */
+    @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 = "compensationType", value = "补偿性质", required = false)
+    })
+    public R<IPage<CropsInfoVO>> page(Query query, CropsInfo info){
+        IPage<CropsInfoVO> iPage = cropsInfoService.page(query, info);
+        return R.data(iPage);
+    }
+
+    /**
+     * 新增或修改
+     */
+    @PostMapping("/addOrUpdate")
+    @ApiOperationSupport(order = 1)
+    @ApiOperation(value = "新增或修改", notes = "传入对象")
+    public R addOrUpdate(@Valid @RequestBody CropsInfoDTO dto) {
+        cropsInfoService.addOrUpdate(dto);
+        return R.success("操作成功");
+    }
+
+    /**
+     * 查询单个详情
+     */
+    @GetMapping("detail")
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "查询单个详情", notes = "传入单个id")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "id", required = true)
+    })
+    public R<CropsInfoVO> detail(Long id){
+        return R.data(cropsInfoService.detail(id));
+    }
+
+    /**
+     * 批量删除
+     */
+    @PostMapping("/remove")
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "批量逻辑删除", notes = "传入ids")
+    public R remove(@ApiParam(value = "主键集合", required = true) @RequestBody List<Long> ids) {
+        cropsInfoService.remove(ids);
+        return R.success("删除成功");
+    }
+
+}

+ 99 - 0
blade-service/blade-land/src/main/java/org/springblade/land/controller/LandRoleController.java

@@ -0,0 +1,99 @@
+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 org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.land.entity.LandRole;
+import org.springblade.land.entity.LandTypeInfo;
+import org.springblade.land.service.ILandRoleService;
+import org.springblade.land.service.ILandTypeInfoService;
+import org.springblade.land.vo.LandRoleVO;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ * @author yangyj
+ * @Date 2023/2/17 10:40
+ * @description TODO
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/landRole")
+@Api(value = "基础数据-区域权限", tags = "基础数据-区域权限")
+public class LandRoleController extends BladeController {
+
+    private final ILandRoleService roleService;
+    /**
+     * 分页
+     */
+    @GetMapping("page")
+    @ApiOperationSupport(order = 2)
+    @ApiOperation(value = "分页", notes = "传入搜索值")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "projectId", value = "项目id", required = true),
+            @ApiImplicitParam(name = "current", value = "当前页", required = true),
+            @ApiImplicitParam(name = "size", value = "每页的数量", required = true),
+            @ApiImplicitParam(name = "name", value = "名称", required = false),
+    })
+    public R<IPage<LandRole>> page(Query query, LandRole info){
+        IPage<LandRole> iPage = roleService.page(query, info);
+        return R.data(iPage);
+    }
+
+
+
+    /**
+     * 新增或修改
+     */
+    @PostMapping("/addOrUpdate")
+    @ApiOperationSupport(order = 1)
+    @ApiOperation(value = "新增或修改", notes = "传入对象")
+    public R addOrUpdate(@Valid @RequestBody LandRole landRole) {
+        roleService.addOrUpdate(landRole);
+        return R.success("操作成功");
+    }
+
+    /**
+     * 查询单个详情
+     */
+    @GetMapping("detail")
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "查询单个详情", notes = "传入单个id")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "id", required = true)
+    })
+    public R<LandRoleVO> detail(Long id){
+        return R.data(roleService.detail(id));
+    }
+
+    /**
+     * 批量删除
+     */
+    @PostMapping("/remove")
+    @ApiOperationSupport(order = 5)
+    @ApiOperation(value = "批量逻辑删除", notes = "传入ids")
+    public R remove(@ApiParam(value = "主键集合", required = true) @RequestBody List<Long> ids) {
+        roleService.deleteLogic(ids);
+        return R.success("删除成功");
+    }
+
+    /**
+     * 查询当前项目业主方合同段
+     */
+    @GetMapping("getOwnerId")
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "查询当前项目业主方合同段id", notes = "传入项目id")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "projectId", value = "项目id", required = true)
+    })
+    public R<Long> getOwnerId(Long projectId){
+        return R.data(roleService.getOwnerId(projectId));
+    }
+
+}

+ 92 - 0
blade-service/blade-land/src/main/java/org/springblade/land/controller/LandTypeInfoController.java

@@ -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("删除成功");
+    }
+
+}

+ 3 - 3
blade-service/blade-land/src/main/java/org/springblade/land/controller/PolicyInfoController.java

@@ -27,7 +27,7 @@ import java.util.List;
 @RestController
 @AllArgsConstructor
 @RequestMapping("/policyInfo")
-@Api(value = "政策法规-双方协议", tags = "政策法规-双方协议")
+@Api(value = "基础数据-政策法规双方协议", tags = "基础数据-政策法规双方协议")
 public class PolicyInfoController extends BladeController {
 
     private final IPolicyInfoService policyInfoService;
@@ -65,11 +65,11 @@ public class PolicyInfoController extends BladeController {
     }
 
     /**
-     * 查询
+     * 查询单个详情
      */
     @GetMapping("detail")
     @ApiOperationSupport(order = 3)
-    @ApiOperation(value = "查询", notes = "传入单个id")
+    @ApiOperation(value = "查询单个详情", notes = "传入单个id")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "id", value = "id", required = true)
     })

+ 43 - 0
blade-service/blade-land/src/main/java/org/springblade/land/mapper/CropsInfoMapper.java

@@ -0,0 +1,43 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.land.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.apache.ibatis.annotations.Param;
+import org.springblade.land.entity.CropsInfo;
+import org.springblade.land.entity.LandTypeInfo;
+import org.springblade.land.vo.CropsInfoVO;
+
+import java.util.List;
+
+
+/**
+ *  Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-02-17
+ */
+public interface CropsInfoMapper extends BaseMapper<CropsInfo> {
+
+
+    CropsInfoVO detail(@Param("id") Long id);
+
+    IPage<CropsInfoVO> page(IPage<CropsInfoVO> iPage,@Param("info") CropsInfo info);
+
+    void remove(@Param("ids") List<Long> ids);
+}

+ 38 - 0
blade-service/blade-land/src/main/java/org/springblade/land/mapper/CropsInfoMapper.xml

@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.land.mapper.CropsInfoMapper">
+    <delete id="remove">
+        delete from l_crops_info
+        where id in
+        <foreach collection="ids" item="id" open="(" close=")" separator=",">
+            #{id}
+        </foreach>
+        or
+        parent_id in
+        <foreach collection="ids" item="id" open="(" close=")" separator=",">
+            #{id}
+        </foreach>
+    </delete>
+
+
+    <select id="detail" resultType="org.springblade.land.vo.CropsInfoVO">
+        select
+               lci.*,
+               (select dict_value from blade_dict where code = 'compensation_type' and dict_key = lci.compensation_type) as compensationTypeName
+        from l_crops_info lci where lci.is_deleted = 0 and lci.id = #{id}
+    </select>
+    <select id="page" resultType="org.springblade.land.vo.CropsInfoVO">
+        select
+            lci.*,
+            (select dict_value from blade_dict where code = 'compensation_type' and dict_key = lci.compensation_type) as compensationTypeName
+        from l_crops_info lci
+        where lci.is_deleted = 0 and lci.project_id = #{info.projectId} and lci.parent_id = 0
+        <if test="info.compensationType != null and info.compensationType != ''">
+            and compensation_type = #{info.compensationType}
+        </if>
+        <if test="info.name != null and info.name != ''">
+            and name like concat('%',#{info.name},'%')
+        </if>
+        and area_id in (select id from l_region_tree_info where is_deleted = 0 and (ancestors like concat('%',#{info.areaId},'%') or id = #{info.areaId}))
+    </select>
+</mapper>

+ 45 - 0
blade-service/blade-land/src/main/java/org/springblade/land/mapper/LandRoleMapper.java

@@ -0,0 +1,45 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.land.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.apache.ibatis.annotations.Param;
+import org.springblade.land.entity.LandRole;
+import org.springblade.land.entity.LandTypeInfo;
+import org.springblade.land.vo.LandRoleVO;
+import org.springblade.system.user.entity.User;
+
+import java.util.List;
+
+
+/**
+ *  Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-02-17
+ */
+public interface LandRoleMapper extends BaseMapper<LandRole> {
+
+    LandRoleVO detail(@Param("id") Long id);
+
+    List<User> getUserList(@Param("allUser") List<Long> allUser);
+
+    Long getOwnerId(@Param("projectId") Long projectId);
+
+    IPage<LandRole> page(IPage<LandRole> iPage,@Param("role") LandRole landRole);
+}

+ 28 - 0
blade-service/blade-land/src/main/java/org/springblade/land/mapper/LandRoleMapper.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.land.mapper.LandRoleMapper">
+
+
+    <select id="detail" resultType="org.springblade.land.vo.LandRoleVO">
+        select
+                llr.*
+        from l_land_role llr where llr.id = #{id}
+    </select>
+    <select id="getUserList" resultType="org.springblade.system.user.entity.User">
+        select * from blade_user where id in
+        <foreach collection="allUser" item="user" open="(" separator="," close=")">
+            #{user}
+        </foreach>
+    </select>
+    <select id="getOwnerId" resultType="java.lang.Long">
+        select id from m_contract_info
+        WHERE contract_type = 3 and is_deleted = 0 and p_id = #{projectId}
+    </select>
+    <select id="page" resultType="org.springblade.land.entity.LandRole">
+        SELECT * from l_land_role
+        WHERE project_id = #{role.projectId} and is_deleted = 0
+        <if test="role.name != null and role.name != ''">
+            and name like concat('%',#{role.name},'%')
+        </if>
+    </select>
+</mapper>

+ 37 - 0
blade-service/blade-land/src/main/java/org/springblade/land/mapper/LandTypeInfoMapper.java

@@ -0,0 +1,37 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.land.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.apache.ibatis.annotations.Param;
+import org.springblade.land.dto.PolicyInfoSearchDTO;
+import org.springblade.land.entity.LandTypeInfo;
+import org.springblade.land.entity.PolicyInfo;
+
+
+/**
+ *  Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-02-17
+ */
+public interface LandTypeInfoMapper extends BaseMapper<LandTypeInfo> {
+
+
+    IPage<LandTypeInfo> page(IPage<LandTypeInfo> iPage,@Param("info") LandTypeInfo info);
+}

+ 18 - 0
blade-service/blade-land/src/main/java/org/springblade/land/mapper/LandTypeInfoMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.land.mapper.LandTypeInfoMapper">
+
+
+    <select id="page" resultType="org.springblade.land.entity.LandTypeInfo">
+        select *
+        from l_land_type_info
+        where is_deleted = 0 and project_id = #{info.projectId}
+        <if test="info.landNature != null and info.landNature != ''">
+            and land_nature = #{info.landNature}
+        </if>
+        <if test="info.name != null and info.name != ''">
+            and name like concat('%',#{info.name},'%')
+        </if>
+            and area_id in (select id from l_region_tree_info where is_deleted = 0 and (ancestors like concat('%',#{info.areaId},'%') or id = #{info.areaId}))
+    </select>
+</mapper>

+ 1 - 1
blade-service/blade-land/src/main/java/org/springblade/land/mapper/PolicyInfoMapper.xml

@@ -5,7 +5,7 @@
 
     <select id="page" resultType="org.springblade.land.entity.PolicyInfo">
         select * from l_policy_info
-        where is_deleted = 0
+        where is_deleted = 0 and project_id = #{dto.projectId}
         <if test="dto.areaId != null and dto.areaId != ''">
             and area_id = #{dto.areaId}
         </if>

+ 47 - 0
blade-service/blade-land/src/main/java/org/springblade/land/service/ICropsInfoService.java

@@ -0,0 +1,47 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.land.service;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseService;
+import org.springblade.core.mp.support.Query;
+import org.springblade.land.dto.CropsInfoDTO;
+import org.springblade.land.entity.CropsInfo;
+import org.springblade.land.entity.LandTypeInfo;
+import org.springblade.land.vo.CropsInfoVO;
+
+import java.util.List;
+
+
+/**
+ *  服务类
+ *
+ * @author BladeX
+ * @since 2023-02-17
+ */
+public interface ICropsInfoService extends BaseService<CropsInfo> {
+
+
+    void addOrUpdate(CropsInfoDTO dto);
+
+    CropsInfoVO detail(Long id);
+
+    IPage<CropsInfoVO> page(Query query,CropsInfo info);
+
+    void remove(List<Long> ids);
+}

+ 44 - 0
blade-service/blade-land/src/main/java/org/springblade/land/service/ILandRoleService.java

@@ -0,0 +1,44 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.land.service;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseService;
+import org.springblade.core.mp.support.Query;
+import org.springblade.land.entity.LandRole;
+import org.springblade.land.entity.LandTypeInfo;
+import org.springblade.land.vo.LandRoleVO;
+
+
+/**
+ *  服务类
+ *
+ * @author BladeX
+ * @since 2023-02-17
+ */
+public interface ILandRoleService extends BaseService<LandRole> {
+
+
+    void addOrUpdate(LandRole landRole);
+
+    LandRoleVO detail(Long id);
+
+    Long getOwnerId(Long projectId);
+
+    IPage<LandRole> page(Query query,LandRole landRole);
+}

+ 46 - 0
blade-service/blade-land/src/main/java/org/springblade/land/service/ILandTypeInfoService.java

@@ -0,0 +1,46 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.land.service;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseService;
+import org.springblade.core.mp.support.Query;
+import org.springblade.land.dto.PolicyInfoDTO;
+import org.springblade.land.dto.PolicyInfoSearchDTO;
+import org.springblade.land.entity.LandTypeInfo;
+import org.springblade.land.entity.PolicyInfo;
+
+import java.io.FileNotFoundException;
+import java.util.List;
+
+
+/**
+ *  服务类
+ *
+ * @author BladeX
+ * @since 2023-02-17
+ */
+public interface ILandTypeInfoService extends BaseService<LandTypeInfo> {
+
+
+    void addOrUpdate(LandTypeInfo info);
+
+    LandTypeInfo detail(Long id);
+
+    IPage<LandTypeInfo> page (Query query,LandTypeInfo info);
+}

+ 76 - 0
blade-service/blade-land/src/main/java/org/springblade/land/service/impl/CropsInfoServiceImpl.java

@@ -0,0 +1,76 @@
+package org.springblade.land.service.impl;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.AllArgsConstructor;
+import org.springblade.common.utils.SnowFlakeUtil;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.core.mp.support.Query;
+import org.springblade.land.dto.CropsInfoDTO;
+import org.springblade.land.entity.CropsInfo;
+import org.springblade.land.entity.LandTypeInfo;
+import org.springblade.land.mapper.CropsInfoMapper;
+import org.springblade.land.service.ICropsInfoService;
+import org.springblade.land.vo.CropsInfoVO;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+@Service
+@AllArgsConstructor
+public class CropsInfoServiceImpl extends BaseServiceImpl<CropsInfoMapper, CropsInfo> implements ICropsInfoService {
+
+
+    @Override
+    @Transactional
+    public void addOrUpdate(CropsInfoDTO dto) {
+        dto.setParentId(0L);
+        Boolean isExist = true;
+        if (dto.getId() == null) {
+            isExist = false;
+            dto.setId(SnowFlakeUtil.getId());
+        }else {
+            this.remove(new LambdaQueryWrapper<CropsInfo>().eq(CropsInfo::getParentId,dto.getId()));
+        }
+        CropsInfo cropsInfo = new CropsInfo();
+        BeanUtils.copyProperties(dto,cropsInfo);
+        if (isExist){
+            this.updateById(cropsInfo);
+        }else {
+            this.save(cropsInfo);
+        }
+        List<CropsInfo> childrenList = dto.getChildrenList();
+        if (childrenList != null && childrenList.size() > 0){
+            for (CropsInfo info : childrenList) {
+                info.setParentId(dto.getId());
+                info.setProjectId(dto.getProjectId());
+            }
+            this.saveBatch(childrenList);
+        }
+    }
+
+    @Override
+    public CropsInfoVO detail(Long id) {
+        CropsInfoVO vo = baseMapper.detail(id);
+        List<CropsInfo> list = this.list(new LambdaQueryWrapper<CropsInfo>().eq(CropsInfo::getParentId, id));
+        if (list != null && list.size() > 0){
+            vo.setChildrenList(list);
+        }
+        return vo;
+    }
+
+    @Override
+    public IPage<CropsInfoVO> page(Query query, CropsInfo info) {
+        IPage<CropsInfoVO> iPage = new Page<>(query.getCurrent(),query.getSize());
+        return baseMapper.page(iPage,info);
+    }
+
+    @Override
+    public void remove(List<Long> ids) {
+        baseMapper.remove(ids);
+    }
+}

+ 62 - 0
blade-service/blade-land/src/main/java/org/springblade/land/service/impl/LandRoleServiceImpl.java

@@ -0,0 +1,62 @@
+package org.springblade.land.service.impl;
+
+
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.AllArgsConstructor;
+import org.apache.commons.lang.StringUtils;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.land.entity.LandRole;
+import org.springblade.land.entity.LandTypeInfo;
+import org.springblade.land.mapper.LandRoleMapper;
+import org.springblade.land.service.ILandRoleService;
+import org.springblade.land.vo.LandRoleVO;
+import org.springblade.system.user.entity.User;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+
+@Service
+@AllArgsConstructor
+public class LandRoleServiceImpl extends BaseServiceImpl<LandRoleMapper, LandRole> implements ILandRoleService {
+
+
+    @Override
+    public void addOrUpdate(LandRole landRole) {
+        this.saveOrUpdate(landRole);
+    }
+
+    @Override
+    public LandRoleVO detail(Long id) {
+        LandRoleVO vo = baseMapper.detail(id);
+        String allUser = vo.getAllUser();
+        if (StringUtils.isNotBlank(allUser)){
+//            String[] split = allUser.split(",");
+            List<Long> userIdList = Func.toLongList(allUser);
+            List<User> userList = baseMapper.getUserList(userIdList);
+            vo.setAllUserList(userList);
+        }
+        return vo;
+    }
+
+    /**
+     * 获取当前项目指挥部合同段id
+     * @param projectId
+     * @return
+     */
+    @Override
+    public Long getOwnerId(Long projectId) {
+        return baseMapper.getOwnerId(projectId);
+    }
+
+    @Override
+    public IPage<LandRole> page(Query query, LandRole landRole) {
+        IPage<LandRole> iPage = new Page<>(query.getCurrent(),query.getSize());
+        return baseMapper.page(iPage,landRole);
+    }
+}

+ 37 - 0
blade-service/blade-land/src/main/java/org/springblade/land/service/impl/LandTypeInfoServiceImpl.java

@@ -0,0 +1,37 @@
+package org.springblade.land.service.impl;
+
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.AllArgsConstructor;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.core.mp.support.Query;
+import org.springblade.land.entity.LandTypeInfo;
+import org.springblade.land.entity.PolicyInfo;
+import org.springblade.land.mapper.LandTypeInfoMapper;
+import org.springblade.land.service.ILandTypeInfoService;
+import org.springframework.stereotype.Service;
+
+
+@Service
+@AllArgsConstructor
+public class LandTypeInfoServiceImpl extends BaseServiceImpl<LandTypeInfoMapper, LandTypeInfo> implements ILandTypeInfoService {
+
+
+    @Override
+    public void addOrUpdate(LandTypeInfo info) {
+        this.saveOrUpdate(info);
+    }
+
+    @Override
+    public LandTypeInfo detail(Long id) {
+        return this.getById(id);
+    }
+
+    @Override
+    public IPage<LandTypeInfo> page(Query query, LandTypeInfo info) {
+        IPage<LandTypeInfo> iPage = new Page<>(query.getCurrent(),query.getSize());
+        return baseMapper.page(iPage,info);
+    }
+}