Эх сурвалжийг харах

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	blade-service-api/blade-business-api/src/main/java/org/springblade/business/feign/ArchiveFileClient.java
#	blade-service/blade-business/src/main/java/org/springblade/business/feignClient/ArchiveFileClientImpl.java
liuyc 1 жил өмнө
parent
commit
c695ab07b8
38 өөрчлөгдсөн 1111 нэмэгдсэн , 294 устгасан
  1. 5 2
      blade-ops/blade-swagger/src/main/resources/application-dev.yml
  2. 4 6
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/feign/ArchiveFileClient.java
  3. 12 0
      blade-service-api/blade-land-api/pom.xml
  4. 21 0
      blade-service-api/blade-land-api/src/main/java/org/springblade/land/dto/CropsInfoDTO.java
  5. 45 0
      blade-service-api/blade-land-api/src/main/java/org/springblade/land/entity/CropsInfo.java
  6. 36 0
      blade-service-api/blade-land-api/src/main/java/org/springblade/land/entity/LandRole.java
  7. 37 0
      blade-service-api/blade-land-api/src/main/java/org/springblade/land/entity/LandTypeInfo.java
  8. 25 0
      blade-service-api/blade-land-api/src/main/java/org/springblade/land/vo/CropsInfoVO.java
  9. 27 0
      blade-service-api/blade-land-api/src/main/java/org/springblade/land/vo/LandRoleVO.java
  10. 27 0
      blade-service/blade-archive/src/main/java/org/springblade/archive/controller/ArchiveFileAutoController.java
  11. 2 1
      blade-service/blade-archive/src/main/java/org/springblade/archive/service/impl/ArchiveProjectConfigServiceImpl.java
  12. 9 5
      blade-service/blade-business/src/main/java/org/springblade/business/feignClient/ArchiveFileClientImpl.java
  13. 17 11
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/ArchiveFileMapper.xml
  14. 6 0
      blade-service/blade-land/pom.xml
  15. 1 1
      blade-service/blade-land/src/main/java/org/springblade/land/controller/AttachmentInfoController.java
  16. 87 0
      blade-service/blade-land/src/main/java/org/springblade/land/controller/CropsInfoController.java
  17. 99 0
      blade-service/blade-land/src/main/java/org/springblade/land/controller/LandRoleController.java
  18. 92 0
      blade-service/blade-land/src/main/java/org/springblade/land/controller/LandTypeInfoController.java
  19. 3 3
      blade-service/blade-land/src/main/java/org/springblade/land/controller/PolicyInfoController.java
  20. 43 0
      blade-service/blade-land/src/main/java/org/springblade/land/mapper/CropsInfoMapper.java
  21. 38 0
      blade-service/blade-land/src/main/java/org/springblade/land/mapper/CropsInfoMapper.xml
  22. 45 0
      blade-service/blade-land/src/main/java/org/springblade/land/mapper/LandRoleMapper.java
  23. 28 0
      blade-service/blade-land/src/main/java/org/springblade/land/mapper/LandRoleMapper.xml
  24. 37 0
      blade-service/blade-land/src/main/java/org/springblade/land/mapper/LandTypeInfoMapper.java
  25. 18 0
      blade-service/blade-land/src/main/java/org/springblade/land/mapper/LandTypeInfoMapper.xml
  26. 1 1
      blade-service/blade-land/src/main/java/org/springblade/land/mapper/PolicyInfoMapper.xml
  27. 47 0
      blade-service/blade-land/src/main/java/org/springblade/land/service/ICropsInfoService.java
  28. 44 0
      blade-service/blade-land/src/main/java/org/springblade/land/service/ILandRoleService.java
  29. 46 0
      blade-service/blade-land/src/main/java/org/springblade/land/service/ILandTypeInfoService.java
  30. 76 0
      blade-service/blade-land/src/main/java/org/springblade/land/service/impl/CropsInfoServiceImpl.java
  31. 62 0
      blade-service/blade-land/src/main/java/org/springblade/land/service/impl/LandRoleServiceImpl.java
  32. 37 0
      blade-service/blade-land/src/main/java/org/springblade/land/service/impl/LandTypeInfoServiceImpl.java
  33. 1 2
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java
  34. 1 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/formula/ITurnPointCalculator.java
  35. 0 2
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/IWbsParamService.java
  36. 2 4
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java
  37. 10 232
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/FormulaServiceImpl.java
  38. 20 23
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/WbsParamServiceImpl.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

+ 4 - 6
blade-service-api/blade-business-api/src/main/java/org/springblade/business/feign/ArchiveFileClient.java

@@ -5,19 +5,14 @@ import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.archive.dto.SendsWebSocketArchiveDTO;
-import org.springblade.business.dto.BusinessTaskDTO;
 import org.springblade.business.entity.ArchiveFile;
 import org.springblade.business.vo.ArchiveFileVO;
-import org.springblade.business.vo.BusinessTaskPageVO;
 import org.springblade.common.constant.BusinessConstant;
-import org.springblade.core.tool.api.R;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestParam;
 
-import java.io.IOException;
 import java.util.List;
 import java.util.Map;
 
@@ -122,7 +117,7 @@ public interface ArchiveFileClient {
     boolean updateArchiveFileByBoxNameOne(@RequestParam String boxName, @RequestParam Integer boxNumber);
 
     @PostMapping(API_PREFIX + "/updateRectificationById")
-    boolean updateRectificationById(@RequestParam Long id, @RequestParam Integer rectification);
+    boolean updateRectificationById(@RequestParam Long id,@RequestParam Integer rectification);
 
     //批量查询案卷下的文件
     @PostMapping(API_PREFIX + "/batchSearchArchiveFile")
@@ -140,6 +135,9 @@ public interface ArchiveFileClient {
     @PostMapping(API_PREFIX + "/getListByContractId")
     List<ArchiveFile> getListByContractId(@RequestParam Long contractId);
 
+    @PostMapping(API_PREFIX + "/updateById2")
+    void updateById2(@RequestBody ArchiveFile archiveFile);
+
     @PostMapping(API_PREFIX + "/sendWebSocketArchiveMsg")
     void sendWebSocketArchiveMsg(@RequestBody SendsWebSocketArchiveDTO webSocketArchiveDTO) throws IOException;
 

+ 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;
+
+
+}

+ 27 - 0
blade-service/blade-archive/src/main/java/org/springblade/archive/controller/ArchiveFileAutoController.java

@@ -135,7 +135,34 @@ ArchiveFileAutoController extends BladeController {
                     if (archivesAuto!= null ) {
                         archive.setAutoFileSort(archivesAuto.getAutoFileSort());
                     }
+                    //如果有替换文件,则替换
+                    List<ArchivesAutoVO.ApprovalFile> list = archive.getApprovalFileList();
+                    if (list != null && list.size() > 0) {
+                        //修改档案下的文件
+                        ArchivesAutoVO.ApprovalFile file = list.get(0);
+                        List<ArchiveFile> files = archiveFileClient.getArchiveFileByArchiveID(archive.getId());
+                        if (files != null && files.size() > 0){
+                            //档案收集的只会生成一个文件
+                            ArchiveFile archiveFile = files.get(0);
+                            archiveFile.setFileUrl(file.getFileUrl());
+                            archiveFile.setPdfFileUrl(file.getPdfFileUrl());
+                            archiveFile.setFilePage(file.getFilePage());
+                            archiveFile.setFileSize(file.getFileSize());
+                            //因为案卷提名可能修改,所以修改文件的名称
+                            archiveFile.setFileName(archive.getName());
+                            archiveFile.setDutyUser(archive.getUnit());
+                            //如果当前档案状态为待整改,则修改为已整改
+                            if (archiveFile.getRectification() != null && archiveFile.getRectification() == 1){
+                                archiveFile.setRectification(2);
+                            }
+                            //只修改档案的文件大小和页数
+                            archive.setPageN(file.getFilePage());
+                            archive.setFileSize(file.getFileSize());
+                            archiveFileClient.updateById2(archiveFile);
+                        }
+                    }
                     archivesAutoService.updateById(archive);
+
                 }
             }
         } catch (NumberFormatException e) {

+ 2 - 1
blade-service/blade-archive/src/main/java/org/springblade/archive/service/impl/ArchiveProjectConfigServiceImpl.java

@@ -6,6 +6,7 @@ import org.springblade.archive.mapper.ArchiveProjectConfigMapper;
 import org.springblade.archive.service.IArchiveProjectConfigService;
 import org.springblade.core.mp.base.BaseServiceImpl;
 import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.secure.utils.SecureUtil;
 import org.springframework.stereotype.Service;
 
 @Service
@@ -19,7 +20,7 @@ public class ArchiveProjectConfigServiceImpl extends BaseServiceImpl<ArchiveProj
      */
     @Override
     public ArchiveProjectConfig getByProjectIdOrNew(Long projectId) {
-        ArchiveProjectConfig config = baseMapper.selectOne(new LambdaQueryWrapper<ArchiveProjectConfig>().eq(ArchiveProjectConfig::getProjectId, projectId));
+        ArchiveProjectConfig config = baseMapper.selectOne(new LambdaQueryWrapper<ArchiveProjectConfig>().eq(ArchiveProjectConfig::getTenantId, SecureUtil.getTenantId()).eq(ArchiveProjectConfig::getProjectId, projectId));
         if (config == null) {
             // 创建新对象
             config = new ArchiveProjectConfig();

+ 9 - 5
blade-service/blade-business/src/main/java/org/springblade/business/feignClient/ArchiveFileClientImpl.java

@@ -1,6 +1,5 @@
 package org.springblade.business.feignClient;
 
-import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -181,7 +180,7 @@ public class ArchiveFileClientImpl implements ArchiveFileClient {
                     System.out.println(type);
                 }
             }
-        } else {
+        }else {
             List<ArchivesAutoVO> autos = fileMapper.getAllArchiveAutoByContractType(projectId);
             for (ArchivesAutoVO l : autos) {
                 String type = l.getContractType();
@@ -295,9 +294,9 @@ public class ArchiveFileClientImpl implements ArchiveFileClient {
     }
 
     @Override
-    public boolean updateRectificationById(Long id, Integer rectification) {
+    public boolean updateRectificationById(Long id,Integer rectification) {
         try {
-            fileMapper.updateRectificationById(id, rectification);
+            fileMapper.updateRectificationById(id,rectification);
         } catch (Exception e) {
             e.printStackTrace();
             return false;
@@ -313,7 +312,7 @@ public class ArchiveFileClientImpl implements ArchiveFileClient {
 
     @Override
     public void addOrUpdateArchiveFileBusinessData(Long nodeId, Long keyId, Long contractId, String formDataId) {
-        iTaskService.addOrUpdateArchiveFileBusinessData(nodeId, keyId, contractId, formDataId);
+        iTaskService.addOrUpdateArchiveFileBusinessData(nodeId,keyId,contractId,formDataId);
     }
 
     @Override
@@ -331,6 +330,11 @@ public class ArchiveFileClientImpl implements ArchiveFileClient {
         return fileMapper.getListByContractId(contractId);
     }
 
+    @Override
+    public void updateById2(ArchiveFile archiveFile) {
+        iArchiveFileService.updateById(archiveFile);
+    }
+
     @Override
     public void sendWebSocketArchiveMsg(SendsWebSocketArchiveDTO webSocketArchiveDTO) throws IOException {
         Integer pageTotal = webSocketArchiveDTO.getPageTotal();

+ 17 - 11
blade-service/blade-business/src/main/java/org/springblade/business/mapper/ArchiveFileMapper.xml

@@ -88,17 +88,20 @@
         <if test="vo.rectification != null and vo.rectification != ''">
             and u.rectification = #{vo.rectification}
         </if>
-        <choose>
-            <when test="vo.isArchive != null and vo.isArchive != ''">
-                and u.is_auto_file = #{vo.isArchive}
-            </when>
-            <when test="vo.archiveId != null and vo.archiveId != ''">
-                and 1=1
-            </when>
-            <otherwise>
-                and (u.is_auto_file is null or u.is_auto_file != 1)
-            </otherwise>
-        </choose>
+        <if test="vo.rectification == null and vo.archiveId == null">
+            and (u.is_auto_file is null or u.is_auto_file != 1)
+        </if>
+<!--        <choose>-->
+<!--            <when test="vo.isArchive != null and vo.isArchive != ''">-->
+<!--                and u.is_auto_file = #{vo.isArchive}-->
+<!--            </when>-->
+<!--            <when test="vo.archiveId != null and vo.archiveId != ''">-->
+<!--                and 1=1-->
+<!--            </when>-->
+<!--            <otherwise>-->
+<!--                and (u.is_auto_file is null or u.is_auto_file != 1)-->
+<!--            </otherwise>-->
+<!--        </choose>-->
         <if test="vo.nodeIds != null and vo.nodeIds != ''">
             and u.node_id in
             <foreach collection="vo.nodeIdArray" item="nodeId" open="(" separator="," close=")">
@@ -138,6 +141,9 @@
         <if test="vo.rectification != null and vo.rectification != ''">
             and u.rectification = #{vo.rectification}
         </if>
+        <if test="vo.rectification == null and vo.archiveId == null">
+            and (u.is_auto_file is null or u.is_auto_file != 1)
+        </if>
 <!--        <choose>-->
 <!--            <when test="vo.isArchive != null and vo.isArchive != ''">-->
 <!--                and u.is_auto_file = #{vo.isArchive}-->

+ 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);
+    }
+}

+ 1 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java

@@ -1959,8 +1959,7 @@ public class ExcelTabController extends BladeController {
         List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql);
         if (maps == null || maps.size() == 0) {
             WbsTreeContract contract = wbsTreeContractService.getOne(new LambdaQueryWrapper<WbsTreeContract>().eq(WbsTreeContract::getPKeyId,nodeId));
-            String fileName = this.wbsParamService.createFileTitle(Func.isNotEmpty(contract.getOldId()) ? Long.valueOf(contract.getOldId()) : contract.getId(), Long.parseLong(contract.getContractId()), contract);
-            fileName = StringUtils.isNotEmpty(fileName) ? fileName : "缺少文件提名配置";
+            String fileName = this.wbsParamService.createFileTitle(contract);
             InformationQuery query = new InformationQuery();
             query.setId(SnowFlakeUtil.getId());
             query.setWbsId(Long.parseLong(nodeId));

+ 1 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/formula/ITurnPointCalculator.java

@@ -17,7 +17,7 @@ import static org.springblade.manager.formula.TurnPoint.*;
  * @author yangyj
  */
 public interface ITurnPointCalculator {
-    Long VERSION=2309121330L;
+    Long VERSION=2309151430L;
      String ZD_REG="(?i)zd\\d+";
     static List<TurnPoint> create(List<Map<String, Object>> data, LinkedHashMap<String, String> configMap,LevelInfo levelInfo) {
         /*1.验证数据的合理性,如果已经合理则不需要计算

+ 0 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/service/IWbsParamService.java

@@ -21,8 +21,6 @@ public interface IWbsParamService extends BaseService<WbsParam> {
      * @Param [nodeId:当前节点id, contractId :当前合同段id]
      * @Author yangyj
      **/
-    String createFileTitle(Long nodeId, Long contractId, WbsTreeContract wbsTreeContract);
-    String createFileTitle(Long id, Long contractId);
     String createFileTitle(WbsTreeContract wbsTreeContract);
     String createFileTitle(Long pkeyId);
 

+ 2 - 4
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java

@@ -1013,8 +1013,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
 
                     if (wbsTreeContractByP != null) {
                         //处理文件提名
-                        String fileName = this.wbsParamService.createFileTitle(Func.isNotEmpty(wbsTreeContractByP.getOldId()) ? Long.valueOf(wbsTreeContractByP.getOldId()) : wbsTreeContractByP.getId(), Long.parseLong(wbsTreeContractByP.getContractId()), wbsTreeContractByP);
-                        fileName = StringUtils.isNotEmpty(fileName) ? fileName : "缺少文件提名配置";
+                        String fileName = this.wbsParamService.createFileTitle(wbsTreeContractByP);
 
                         //huangjn 保存成功后调用生成资料查询列表数据
                         this.informationQueryClient.saveOrUpdateInformationQueryData(wbsTreeContractByP.getPKeyId() + "", "首件使用字段", "业务ID(主要将来给首件使用)", fileName, Integer.parseInt(tableInfo.getClassify()), 2, "是否是首件(临时,暂时没用到)", "源文件(首件字段)", "pdf文件(首件字段)", "首件上传总结报告名称", new ArrayList<>());
@@ -1045,8 +1044,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                 WbsTreeContract wbsTreeContractByP = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>query().lambda()
                         .eq(WbsTreeContract::getId, wbsTreeContract.getParentId()).eq(WbsTreeContract::getContractId, wbsTreeContract.getContractId()));
                 //处理文件提名
-                String fileName = this.wbsParamService.createFileTitle(Func.isNotEmpty(wbsTreeContractByP.getOldId()) ? Long.valueOf(wbsTreeContractByP.getOldId()) : wbsTreeContractByP.getId(), Long.parseLong(wbsTreeContractByP.getContractId()), wbsTreeContractByP);
-                fileName = StringUtils.isNotEmpty(fileName) ? fileName : "缺少文件提名配置";
+                String fileName = this.wbsParamService.createFileTitle( wbsTreeContractByP);
 
                 //huangjn 保存成功后调用生成资料查询列表数据
                 this.informationQueryClient.saveOrUpdateInformationQueryData(wbsTreeContractByP.getPKeyId() + "", "首件使用字段", "业务ID(主要将来给首件使用)", fileName, Integer.parseInt(tableInfoList.get(0).getClassify()), 2, "false", "源文件(首件字段)", "pdf文件(首件字段)", "首件上传总结报告名称", new ArrayList<>());

+ 10 - 232
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/FormulaServiceImpl.java

@@ -46,7 +46,6 @@ import javax.validation.constraints.NotNull;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
-import java.math.BigDecimal;
 import java.util.*;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -850,11 +849,11 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
         try {
             /*检验单附表处理*/
             List<FormData> inspectionList = new ArrayList<>();
-            /*0检验表1评定表*/
+            /*1检验表5评定表*/
             this.tec.getTableAll().stream().filter(e -> e.getTableType().equals(1) ||e.getTableType().equals(5)).forEach(e -> {
-                /*获取所有挂在表里的元素映射关系*/
+                /*获取所有挂在检验单、评定表里的元素映射关系*/
                 this.tec.getKeyMappers().stream().filter(p -> p.getPkId().equals(e.getPKeyId())).forEach(k -> {
-                    /*元素长度筛选超页的元素*/
+                    /*筛选元素长度超1页的元素*/
                     List<FormData> target = tec.formDataMap.values().stream().filter(f -> f.getCode().equals(k.getCode()) && f.getAddPages() > 0).collect(Collectors.toList());
                     if (Func.isNotEmpty(target)) {
                         inspectionList.addAll(target);
@@ -874,8 +873,8 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
                         NodeTable one = this.tec.getTableAll().get(0);
                         WbsTreeContract wtc = this.wbsTreeContractService.getOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getParentId, one.getParentId()).eq(WbsTreeContract::getContractId,tec.getContractId()).eq(WbsTreeContract::getWbsId, one.getWbsId()).and(e->e.eq(WbsTreeContract::getNodeName, pd?"质量检验评定表(附表)":"质量检验表(附表)").or().eq(WbsTreeContract::getFullName, pd?"质量检验评定表(附表)":"质量检验表(附表)")));
                         if (wtc != null) {
-                            /*附表的顺序在检验单或者评定表之后*/
-                            int sort=this.tec.getTableAll().stream().filter(e ->e.getTableType().equals(1) || e.getTableType().equals(5)).map(NodeTable::getSort).max(Integer::compareTo).orElse(30);
+                            /*附表的顺序在检验单或者评定表之后,默认最后*/
+                            int sort=this.tec.getTableAll().stream().filter(e ->e.getTableType().equals(1) || e.getTableType().equals(5)).map(NodeTable::getSort).max(Integer::compareTo).orElse(1000);
                             this.wbsTreeContractService.update(Wrappers.<WbsTreeContract>lambdaUpdate()
                                     .set(WbsTreeContract::getSort,sort).set(WbsTreeContract::getContractType,-1).set(WbsTreeContract::getAncestors,one.getAncestors())
                                     .set(WbsTreeContract::getIsCopeTab,2)
@@ -893,7 +892,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
                     JSONArray dataArray = new JSONArray();
                     for (NodeTable data : subTabList) {
                         /*自动挂载附表情况下,装配TableInfo数据*/
-                        R bussDataInfo = this.getBussDataInfo(data.getPKeyId(), 1);
+                        R bussDataInfo = this.excelTabService.getBussDataInfo(data.getPKeyId(), 1);
                         @SuppressWarnings("unchecked")
                         Map<String, Object>  data1 = (Map<String, Object>) bussDataInfo.getData();
                         data1.put("pkeyId",data.getPKeyId());
@@ -911,7 +910,8 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
                     });
                     tec.getTableInfoList().addAll(subTableInfo);
                     /*获取附表元素定位集*/
-                    tec.getCoordinateMap().put(subTabList.get(0).getInitTableName(), FormulaUtils.getElementCell(first.getHtmlUrl()));
+                    /*tec.getCoordinateMap().put(subTabList.get(0).getInitTableName(), FormulaUtils.getElementCell(first.getHtmlUrl()));*/
+                    tec.getCoordinateMap().computeIfAbsent(subTabList.get(0).getInitTableName(),k->FormulaUtils.getElementCell(first.getHtmlUrl()));
                     /*附表元素关键信息*/
                     List<Map<String, Object>> elementMaps = this.jdbcTemplate.queryForList("select b.e_name ename , CONCAT(a.tab_en_name,':',b.e_key) code , b.e_key ekey ,b.id fieldId,a.tab_en_name tableName from m_table_info a join m_wbs_form_element b on a.id = b.f_id where a.tab_en_name='" + first.getInitTableName() + "' and b.is_deleted=0 ");
                     if (Func.isNotEmpty(elementMaps)) {
@@ -950,6 +950,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
                 /*根据行号排序*/
                 inspectionList.sort(Comparator.comparingInt(e->e.getCoordsList().get(0).getY()));
                 inspectionList.forEach(f -> {
+                    /*检验单、评定表不能超过一页,多余的需要删除并把检测项数据写人附表*/
                     /*检验单或者评定表存的超页数据汇总到附表对象*/
                     List<ElementData> overList = f.getValues().stream().skip(f.getCoordsList().size()).collect(Collectors.toList());
                     f.setValues(f.getValues().stream().limit(f.getCoordsList().size()).collect(Collectors.toList()));
@@ -967,6 +968,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
                     /*把附表数据刷入对应的附表元素对象*/
                     sta.flush();
                 }
+                /*把主表的表头表尾信息拷贝*/
                 String mainTableName = this.tec.getTableAll().stream().filter(e -> e.getTableType().equals(1) || e.getTableType().equals(5)).map(NodeTable::getInitTableName).findFirst().orElse("");
                 if(Func.isNotBlank(mainTableName)){
                     List<FormData> sourceFds=tec.getFormDataMap().values().stream().filter(s->!s.empty()).filter(s->StringUtils.isEquals(s.getTableName(),mainTableName)).collect(Collectors.toList());
@@ -1845,231 +1847,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
         return new HashMap<>();
     }
 
-    public R getBussDataInfo(Long pkeyId, int type) {
 
-        Map<String, Object> reData = new HashMap<>();
-
-        WbsTreeContract wbsTreeContract = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>query().lambda()
-                .eq(WbsTreeContract::getPKeyId, pkeyId));
-        if (wbsTreeContract == null) {
-            return R.data(reData);
-        }
-
-        if (wbsTreeContract.getHtmlUrl() == null) {
-            return R.data(reData);
-        }
-
-        //表单是否存储在
-        String tabName = wbsTreeContract.getInitTableName();
-        String isExitSql = " select * from information_schema.TABLES where TABLE_NAME='" + tabName + "'";
-        List<Map<String, Object>> tabList = jdbcTemplate.queryForList(isExitSql);
-        if (tabList.size() <= 0) {
-            return R.fail("无实体表对应");
-        }
-
-        String querySql = "select * from " + wbsTreeContract.getInitTableName() + " where p_key_id=" + pkeyId;
-        List<Map<String, Object>> dataIn = jdbcTemplate.queryForList(querySql);
-
-        // 匹配关联
-        try {
-            File file1 = ResourceUtil.getFile(wbsTreeContract.getHtmlUrl());
-            if (file1.exists()) {
-
-                String htmlString = IoUtil.readToString(new FileInputStream(file1));
-                Document doc = Jsoup.parse(htmlString);
-
-                // 解析
-                // 模糊匹配
-                Elements dwtitle = doc.select("el-input[placeholder~=.*承包单位]");
-                Elements sgtitle = doc.select("el-input[placeholder~=^施工单位]");
-                Elements sgtitle1 = doc.select("el-input[placeholder=安装单位]");
-                sgtitle.addAll(sgtitle1);
-
-                Elements htdtitle = doc.select("el-input[placeholder~=.*合同段.*]");
-                Elements htdtitle1 = doc.select("el-input[placeholder~=合同名称.*]");
-                htdtitle.addAll(htdtitle1);
-
-                Elements jltitle = doc.select("el-input[placeholder~=监理单位.*]");
-
-                Elements bhtitle = doc.select("el-input[placeholder~=^编号]");
-                Elements bhtitle1 = doc.select("el-input[placeholder~=合同编号.*]");
-                bhtitle.addAll(bhtitle1);
-
-
-                Elements xmtitle = doc.select("el-input[placeholder~=^项目名称]");
-
-
-                // Elements title = doc.select("el-input[placeholder~=^编号]");
-
-                /**
-                 * 承包单位 承包单位、施工单位:引用施工单位名称 ,
-                 * 监理单位:引用监理单位名称
-                 * 合同段、所属建设项目(合同段):引用合同段编号
-                 *
-                 * 施工单位:施工单位 和 安装单位
-                 *
-                 */
-                ContractInfo contractInfo = contractInfoService.getById(wbsTreeContract.getContractId());
-                // 施工单位名称
-                if (dwtitle.size() >= 1) {
-                    int y = Integer.parseInt(dwtitle.attr("trindex"));
-                    if (y <= 10) {
-                        reData.put(dwtitle.attr("keyName"), contractInfo.getConstructionUnitName());
-                    }
-
-                }
-                if (sgtitle.size() >= 1) {
-                    int y = Integer.parseInt(sgtitle.attr("trindex"));
-                    if (y <= 10) {
-                        reData.put(sgtitle.attr("keyName"), contractInfo.getConstructionUnitName());
-                    }
-                }
-
-                // 合同段名称
-                if (htdtitle.size() >= 1) {
-                    for (Element element : htdtitle) {
-                        int trindex = Integer.parseInt(element.attr("trindex"));
-                        if (trindex <= 8) {
-                            reData.put(element.attr("keyName"), contractInfo.getContractNumber());
-                        }
-                    }
-                }
-                // 监理单位名称
-                if (jltitle.size() >= 1) {
-
-                    for (Element element : jltitle) {
-                        int trindex = Integer.parseInt(element.attr("trindex"));
-                        if (trindex <= 10) {
-                            reData.put(element.attr("keyName"), contractInfo.getSupervisionUnitName());
-                        }
-                    }
-                }
-                //获取父节点划分编号
-                WbsTreeContract node = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>query().lambda()
-                        .eq(WbsTreeContract::getId, wbsTreeContract.getParentId())
-                        .eq(WbsTreeContract::getContractId, wbsTreeContract.getContractId()));
-                // 编号
-                if (bhtitle.size() >= 1 && contractInfo.getIsReferenceNumber() == 1) {
-                    for (Element element : bhtitle) {
-                        int trindex = Integer.parseInt(element.attr("trindex"));
-                        if (trindex <= 10) {
-                            reData.put(element.attr("keyName"), node.getPartitionCode() == null ? "" : node.getPartitionCode());
-                        }
-                    }
-                }
-
-                // 项目名称
-                if (xmtitle.size() >= 1) {
-                    for (Element element : xmtitle) {
-                        int trindex = Integer.parseInt(element.attr("trindex"));
-                        if (trindex <= 6) {
-                            ProjectInfo projectInfo = projectInfoService.getById(wbsTreeContract.getProjectId());
-                            reData.put(element.attr("keyName"), projectInfo.getProjectName());
-                        }
-                    }
-                }
-            }
-        } catch (FileNotFoundException e) {
-            e.printStackTrace();
-        }
-
-        if (dataIn.size() >= 1) {
-            Map<String, Object> mysqlData = dataIn.get(0);
-            for (String key : mysqlData.keySet()) {
-                String tabVal = mysqlData.get(key) + "";
-                // 时间段处理
-                if (org.apache.commons.lang.StringUtils.isNotEmpty(tabVal) && tabVal.indexOf("null") < 0) {
-                    if (tabVal.contains("T") && tabVal.contains(".000Z]")) {
-                        String[] tabData = tabVal.split("_\\^_");
-
-                        if (reData.containsKey("pickerKey")) {
-                            String pickerKey = reData.get("pickerKey") + "," + key + "__" + tabData[1];
-                            reData.put("pickerKey", pickerKey);
-                        } else {
-                            reData.put("pickerKey", key + "__" + tabData[1]);
-                        }
-
-                        String sql = tabData[0];
-                        sql = sql.replaceAll("\\[", "['");
-                        sql = sql.replaceAll("]", "']");
-                        sql = sql.replaceAll("000Z,", "000Z',");
-                        sql = sql.replaceAll(", 20", ", '20");
-                        //   sql = sql.replaceAll("'", "");
-                        if (org.apache.commons.lang.StringUtils.isNotEmpty(tabData[0])) {
-                            reData.put(key + "__" + tabData[1], sql);
-                        }
-                    } else if (tabVal.contains("T") && tabVal.contains(".000Z")) { //时间
-                        // 时间和字符串合作
-                        if (tabVal.contains("☆")) {
-                            String[] mysql = tabVal.split("☆");
-                            for (String data : mysql) {
-                                String[] tabData = data.split("_\\^_");
-                                if (org.apache.commons.lang.StringUtils.isNotEmpty(tabData[0])) {
-                                    reData.put(key + "__" + tabData[1], tabData[0]);
-                                }
-                            }
-                        } else {
-                            String[] tabData = tabVal.split("_\\^_");
-                            if (org.apache.commons.lang.StringUtils.isNotEmpty(tabData[0])) {
-                                reData.put(key + "__" + tabData[1], tabData[0]);
-                            }
-                        }
-                    } else if (tabVal.contains("☆")) {
-                        String[] mysql = tabVal.split("☆");
-                        for (String data : mysql) {
-                            String[] tabData = data.split("_\\^_");
-                            if (org.apache.commons.lang.StringUtils.isNotEmpty(tabData[0])) {
-                                reData.put(key + "__" + tabData[1], tabData[0]);
-                            }
-                        }
-                    } else if (tabVal.contains("_^_")) {
-                        String[] tabData = tabVal.split("_\\^_");
-                        if (org.apache.commons.lang.StringUtils.isNotEmpty(tabData[0])) {
-                            if (tabVal.contains("[") && tabVal.contains("年")) {
-                                String[] strings = org.apache.commons.lang.StringUtils.strip(tabData[0], "[]").split(",");
-
-                                reData.put(key + "__" + tabData[1], strings);
-                            } else {
-                                reData.put(key + "__" + tabData[1], tabData[0]);
-                            }
-                        }
-                    } else {
-                        reData.put(key, tabVal);
-                    }
-                }
-            }
-        }
-
-        // 获取默认值
-        QueryWrapper<TextdictInfo> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("type", 4);
-        queryWrapper.eq("tab_id", wbsTreeContract.getIsTypePrivatePid());
-        final List<TextdictInfo> textdictInfos = textDictInfoService.getBaseMapper().selectList(queryWrapper);
-        if (!textdictInfos.isEmpty()) {
-            for (TextdictInfo textdictInfo : textdictInfos) {
-                if (reData.containsKey(textdictInfo.getColKey())) {
-                    String keyVal = reData.get(textdictInfo.getColKey()) + "";
-                } else {
-                    reData.put(textdictInfo.getColKey() + "", textdictInfo.getSigRoleName());
-                }
-            }
-        }
-
-        // 移除Id 和 p_key_id
-        if (type == 0) {
-            reData.remove("id");
-            reData.remove("p_key_id");
-            reData.remove("classify");
-            reData.remove("contractId");
-            reData.remove("pkeyId");
-            reData.remove("projectId");
-        }
-        if (type == 1) {
-            reData.put("pkeyId", reData.get("p_key_id"));
-        }
-        reData.put("tabGroupId", wbsTreeContract.getTabGroupId());
-        return R.data(reData);
-    }
 
 }
 

+ 20 - 23
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/WbsParamServiceImpl.java

@@ -45,39 +45,36 @@ public class WbsParamServiceImpl extends BaseServiceImpl<WbsParamMapper, WbsPara
      */
     public static final String FILE_TITLE = "FILE_TITLE";
 
+
+
     @Override
-    @Cacheable(cacheNames = "file_title", key = "#wbsTreeContract.pKeyId+'@'+T(System).currentTimeMillis()/(1000*100)")
-    public String createFileTitle(Long nodeId, Long contractId, WbsTreeContract wbsTreeContract) {
-        if (BaseUtils.isNotNull(nodeId, contractId)) {
-            StaticLog.info("获取节点{}文件题名", nodeId);
-            List<WbsTreeContract> nodes = tracing(wbsTreeContract.getPKeyId());
+    @Cacheable(cacheNames = "file_title", key = "#wtc.pKeyId+'@'+T(System).currentTimeMillis()/(1000*100)")
+    public String createFileTitle(WbsTreeContract wtc) {
+        if(wtc!=null&&wtc.getPKeyId()!=null){
+            List<WbsTreeContract> nodes = tracing(wtc.getPKeyId());
             if (Func.isNotEmpty(nodes)) {
-                /*优先取私有*/
-                WbsParam wp = this.getOne(Wrappers.<WbsParam>lambdaQuery().eq(WbsParam::getNodeId, wbsTreeContract.getPKeyId()).eq(WbsParam::getK, FILE_TITLE).last(" limit 1"));
-                if (wp == null) {
-                    wp = this.getOne(Wrappers.<WbsParam>lambdaQuery().eq(WbsParam::getNodeId, nodeId).eq(WbsParam::getK, FILE_TITLE).last(" limit 1 "));
-                }
-                if (Func.isNotEmpty(wp)) {
-                    return CustomFunction.tree(nodes.stream().map(w->StringUtils.isNotEmpty(w.getFullName())?w.getFullName():w.getNodeName()).collect(Collectors.toList()), wp.getV()).toString();
+                WbsTreePrivate wtp = this.formulaService.wtpId(wtc.getPKeyId());
+                if(wtp!=null){
+                    /*优先取私有*/
+                    WbsParam wp = this.getOne(Wrappers.<WbsParam>lambdaQuery().eq(WbsParam::getNodeId, wtp.getPKeyId()).eq(WbsParam::getK, FILE_TITLE).last(" limit 1"));
+                    if (wp == null) {
+                        WbsTreePrivate publicWtp = this.formulaService.getOriginWtp(wtp.getPKeyId());
+                        wp = this.getOne(Wrappers.<WbsParam>lambdaQuery().eq(WbsParam::getNodeId, publicWtp.getId()).eq(WbsParam::getK, FILE_TITLE).last(" limit 1 "));
+                    }
+                    if (Func.isNotEmpty(wp)) {
+                        return CustomFunction.tree(nodes.stream().map(w->StringUtils.isNotEmpty(w.getFullName())?w.getFullName():w.getNodeName()).collect(Collectors.toList()), wp.getV()).toString();
+                    }
                 }
+
             }
         }
         return NOT_SET;
     }
 
-    @Override
-    public String createFileTitle(Long id, Long contractId) {
-        return NOT_SET;
-    }
-
-    @Override
-    public String createFileTitle(WbsTreeContract wbsTreeContract) {
-        return NOT_SET;
-    }
-
     @Override
     public String createFileTitle(Long pkeyId) {
-        return NOT_SET;
+        WbsTreeContract wtc =this.treeContractService.getOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getPKeyId,pkeyId));
+        return createFileTitle(wtc);
     }
 
     @Override