Bladeren bron

Merge branch 'release/v2.2.0-data-beta' into 'develop'

数据授权代码合并到develop

See merge request dcuc-tjdsj/auth-service!41
黄建赢 4 jaren geleden
bovenliggende
commit
b224d4327c
72 gewijzigde bestanden met toevoegingen van 3887 en 170 verwijderingen
  1. 27 4
      Jenkinsfile
  2. 1 1
      dcuc-auth-api/pom.xml
  3. 29 0
      dcuc-auth-api/src/main/java/com/dragoninfo/dcuc/auth/auth/api/IApiDataAuthFacade.java
  4. 10 0
      dcuc-auth-api/src/main/java/com/dragoninfo/dcuc/auth/auth/facade/IBimBusinessFacade.java
  5. 50 11
      dcuc-auth-api/src/main/java/com/dragoninfo/dcuc/auth/auth/facade/IDataAuthFacade.java
  6. 9 0
      dcuc-auth-api/src/main/java/com/dragoninfo/dcuc/auth/auth/facade/IServiceAuthFacade.java
  7. 11 5
      dcuc-auth-api/src/main/java/com/dragoninfo/dcuc/auth/auth/facade/IServiceAuthResultFacade.java
  8. 1 1
      dcuc-auth-model/pom.xml
  9. 58 0
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/DataItemsCheckDto.java
  10. 52 0
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/DataItemsDto.java
  11. 27 0
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/ResourceTypeQueryDTO.java
  12. 32 4
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/ServiceAuthFlowDTO.java
  13. 62 1
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/ServiceAuthResultDTO.java
  14. 0 33
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/SubDataDTO.java
  15. 16 2
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/data/DataAuthDTO.java
  16. 50 0
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/data/DataClassifyDTO.java
  17. 33 0
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/data/DataDetailConditionDTO.java
  18. 27 0
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/data/DataDetailQueryDTO.java
  19. 49 0
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/data/DataResourceDTO.java
  20. 59 0
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/data/DataResourceTreeDTO.java
  21. 9 3
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/data/SubDataAuthDTO.java
  22. 32 0
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/data/SubDataAuthQueryDTO.java
  23. 32 0
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/data/SubDataDTO.java
  24. 25 0
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/entity/AppFunInfo.java
  25. 58 2
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/entity/DataAuth.java
  26. 38 0
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/entity/ServiceAuthFlow.java
  27. 12 0
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/entity/ServiceAuthResult.java
  28. 55 0
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/enumresources/SubDataAuthTypeEnum.java
  29. 83 1
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/po/ServiceAuthResultPO.java
  30. 28 6
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/vo/AppFunVO.java
  31. 65 0
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/vo/BusDataResultVO.java
  32. 45 0
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/vo/BusResultVO.java
  33. 386 0
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/vo/ResourceCatalogItemVO.java
  34. 674 0
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/vo/ResourceCatalogVO.java
  35. 67 0
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/vo/bim/BimUserInfoItemRespVO.java
  36. 26 0
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/vo/bim/BimUserInfoReqVO.java
  37. 23 0
      dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/vo/bim/BimUserInfoRespVO.java
  38. 4 4
      dcuc-auth-service/pom.xml
  39. 1 1
      dcuc-auth-service/src/main/assembly/conf/application.yml
  40. 16 0
      dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/bpo/ServiceAuthFlowBPO.java
  41. 21 2
      dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/bpo/ServiceAuthResultBPO.java
  42. 48 0
      dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/business/IDataAuthBusiness.java
  43. 312 0
      dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/business/impl/DataAuthBusiness.java
  44. 51 4
      dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/business/impl/ServiceAuthBusinessImpl.java
  45. 6 0
      dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/facade/BimBusinessFacade.java
  46. 38 7
      dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/facade/DataAuthFacade.java
  47. 5 0
      dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/facade/ServiceAuthFacade.java
  48. 6 1
      dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/facade/ServiceAuthResultFacade.java
  49. 53 0
      dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/facade/api/ApiDataAuthFacade.java
  50. 7 0
      dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/service/IAuthFlowService.java
  51. 23 0
      dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/service/IBusService.java
  52. 18 7
      dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/service/IDataAuthService.java
  53. 7 0
      dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/service/IServiceAuthResultService.java
  54. 10 0
      dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/service/impl/AuthFlowServiceImpl.java
  55. 151 0
      dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/service/impl/BusService.java
  56. 512 57
      dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/service/impl/DataAuthServiceImpl.java
  57. 21 1
      dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/service/impl/ServiceAuthResultServiceImpl.java
  58. 10 0
      dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/business/IBimBusiness.java
  59. 38 0
      dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/business/impl/BimBusinessImpl.java
  60. 40 0
      dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/config/DcucAuthBusConfig.java
  61. 4 4
      dcuc-auth-service/src/main/resources/application-base.yml
  62. 7 0
      dcuc-auth-service/src/main/resources/application-bus.yml
  63. 1 1
      dcuc-auth-service/src/main/resources/application.yml
  64. 6 3
      dcuc-auth-service/src/main/resources/config/mysql/V4_3_0004__Create_DataAuthTable.sql
  65. 50 0
      dcuc-auth-service/src/main/resources/config/mysql/V4_3_0004__Update_Table.sql
  66. 3 0
      dcuc-auth-service/src/main/resources/config/mysql/V4_3_0005__Add_AuthFlow.sql
  67. 45 0
      dcuc-auth-service/src/main/resources/config/mysql/V4_3_0005__init_app_fun.sql
  68. 9 2
      dcuc-auth-service/src/main/resources/config/sql/V4_3_0005__Create_DataAuthTable.sql
  69. 50 0
      dcuc-auth-service/src/main/resources/config/sql/V4_3_0005__Update_Table.sql
  70. 5 0
      dcuc-auth-service/src/main/resources/config/sql/V4_3_0006__Add_AuthFlow.sql
  71. 46 0
      dcuc-auth-service/src/main/resources/config/sql/V4_3_0006__init_app_fun.sql
  72. 2 2
      pom.xml

+ 27 - 4
Jenkinsfile

@@ -3,9 +3,11 @@
 
 def build = new org.devops.build()
 def color = new org.devops.color()
+def systemtime = new org.devops.systemtime()
 
-String cpu = "${env.cpu}"
-String imagePrefix = "${env.imagePrefix}"
+def String cpu = "${env.cpu}"
+def String imagePrefix = "${env.imagePrefix}"
+def String buildImage = "${env.buildImage}"
 
 pipeline {
     agent {
@@ -20,14 +22,15 @@ pipeline {
 
     //设定2个参数,根据项目类型不同,修改对应的description name value visibleItemCount  defaultValue 即可
     parameters {
-        extendedChoice description: '请选择CPU架构.可单选/多选/全选', multiSelectDelimiter: ',', name: 'cpu',
+        choice choices: ['false', 'true'], description: '是否需要打镜像包,默认为否', name: 'buildImage'
+        extendedChoice description: '只有在需要打镜像包的情况下,才需要选择CPU架构。可单选/多选/全选', multiSelectDelimiter: ',', name: 'cpu',
                 quoteValue: true,
                 saveJSONParameterToFile: false,
                 type: 'PT_CHECKBOX',
                 value: 'x86,arm64',
                 visibleItemCount: 5
         // 需修改对应的镜像名称
-        string defaultValue: 'bus.ga/jzywb/dcuc/', description: '请填写打的镜像通用前缀名称,注意最后面要加 / ', name: 'imagePrefix', trim: false
+        string defaultValue: 'bus.ga/jzywb/dcuc/', description: '只有在需要打镜像包的情况下,才需要填写要打镜像通用前缀名称,注意最后面要加 / ', name: 'imagePrefix', trim: false
     }
     stages {
         stage('MAVEN-BUILD') {
@@ -38,8 +41,28 @@ pipeline {
                     build.Build('mvn', 'mvn clean deploy -DskipTests=true', 'master')
                 }
             }
+            post {
+                success {
+                    script {
+                        version = build.GetMvnParentVersion()
+                        systime = systemtime.GetSysTime('yyMMdd')
+                        //将打出来的tar包,按照命名规范命名。根据实际情况,修改对应的系统简称和区域标识(DCUC-AUTH-SERVICE-TJDSJ)
+                        sh """cd dcuc-auth-service/target
+                            cp dcuc-auth-service-*.tar.gz DCUC-AUTH-SERVICE-TJDSJ-${version}-${env.GIT_COMMIT.take(8)}-BETA-${systime}.tar.gz
+                        """
+                        //将复制的按照命名规范的tar包提取到Jenkins的面板,方便下载。根据实际情况,修改对应的系统简称和区域标识(DCUC-AUTH-SERVICE-TJDSJ)
+                        archiveArtifacts artifacts: 'dcuc-auth-service/target/DCUC-AUTH-SERVICE-TJDSJ-*.tar.gz'
+                    }
+                }
+            }
+
         }
         stage('DOCKER-BUILD') {
+            when {
+                expression {
+                    return (buildImage  == 'true')
+                }
+            }
             steps {
                 script {
                     //将cpu架构和模块名称传入方法打镜像包.若在上面定义的参数名称没变,可不修改

+ 1 - 1
dcuc-auth-api/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>dcuc-auth</artifactId>
         <groupId>com.dragoninfo</groupId>
-        <version>2.1.0-tjdsj-SNAPSHOT</version>
+        <version>2.2.0-tjdsj-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

+ 29 - 0
dcuc-auth-api/src/main/java/com/dragoninfo/dcuc/auth/auth/api/IApiDataAuthFacade.java

@@ -0,0 +1,29 @@
+package com.dragoninfo.dcuc.auth.auth.api;
+
+import com.dragoninfo.dcuc.auth.auth.dto.DataItemsCheckDto;
+import com.dragonsoft.duceap.base.entity.http.ResponseDTO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+/**
+ * Created by huanghy on 2018/7/9.
+ */
+@Api(description = "数据授权类")
+@FeignClient(name = "dcuc-auth")
+public interface IApiDataAuthFacade {
+
+
+    /**
+     * 查询是否拥有数据项权限接口
+     * @return
+     */
+    @ApiOperation(value = "查询是否拥有数据项权限接口", notes = "查询是否拥有数据项权限接口")
+    @RequestMapping(value = "/api/auth-service/v1/data-auth/data-items/check", method = RequestMethod.POST)
+    ResponseDTO dataItemsCheck(@RequestBody DataItemsCheckDto dataItemsCheckDto);
+
+
+}

+ 10 - 0
dcuc-auth-api/src/main/java/com/dragoninfo/dcuc/auth/auth/facade/IBimBusinessFacade.java

@@ -1,5 +1,6 @@
 package com.dragoninfo.dcuc.auth.auth.facade;
 
+import com.dragoninfo.dcuc.auth.auth.vo.bim.BimUserInfoItemRespVO;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -41,4 +42,13 @@ public interface IBimBusinessFacade {
     @PostMapping("cacheUserToken")
     void cacheUserToken(@RequestParam("idcard") String idcard, @RequestParam("userToken") String userToken, @RequestParam("expAt") Integer expAt);
 
+    /**
+     * 获取用户信息
+     *
+     * @param userToken 用户令牌
+     * @return 用户信息
+     */
+    @GetMapping("getUserInfoByUserToken")
+    BimUserInfoItemRespVO getUserInfoByUserToken(@RequestParam("userToken") String userToken);
+
 }

+ 50 - 11
dcuc-auth-api/src/main/java/com/dragoninfo/dcuc/auth/auth/facade/IDataAuthFacade.java

@@ -1,7 +1,7 @@
 package com.dragoninfo.dcuc.auth.auth.facade;
 
-import com.dragoninfo.dcuc.auth.auth.dto.DataAuthDTO;
-import com.dragoninfo.dcuc.auth.auth.dto.SubDataAuthDTO;
+import com.dragoninfo.dcuc.auth.auth.dto.data.*;
+import com.dragoninfo.dcuc.auth.auth.vo.BusResultVO;
 import com.dragonsoft.duceap.base.entity.search.SearchDTO;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -48,7 +48,7 @@ public interface IDataAuthFacade {
      * @param searchDTO
      * @return
      */
-    @PostMapping("dataAuthSearch")
+    @PostMapping(value = "dataAuthSearch")
     List<DataAuthDTO> dataAuthSearch(@RequestBody  SearchDTO searchDTO);
 
     /**
@@ -64,20 +64,59 @@ public interface IDataAuthFacade {
      * @param subDataAuthDTO
      * @return
      */
-    @PostMapping("subDataAuthAdd")
+    @PostMapping(value = "subDataAuthAdd")
     boolean subDataAuthAdd(@RequestBody SubDataAuthDTO subDataAuthDTO);
 
     /**
      * 根据主体id和type查询主体数据权限集合
-     * @param subId  主体id
-     * @param subType 主体类型 ORG:机构 USER:人员  BUSINESS:业务域
-     * @param authType 权限资源类型  权限类型 TABLE:表 COLUMN:列  ALL:公开
+     *
      * @return
      */
-    @GetMapping("getSubDataAuth")
-    SubDataAuthDTO getSubDataAuth(@RequestParam("subId") String subId,
-                                  @RequestParam("subType") String subType,
-                                  @RequestParam("authType") String authType);
+    @PostMapping(value = "getSubDataAuth")
+    List<DataClassifyDTO> getSubDataAuth(@RequestBody SubDataAuthQueryDTO queryDTO);
 
 
+    /**
+     * 人员相关所有数据权限,只限于表或列中的一种
+     * @param userId 人员id
+     * @param authType 数据属性授权类型 TABLE:表授权 COLUMN:列授权
+     * @return
+     */
+    @GetMapping(value = "userDataAuthInfoById")
+    List<DataClassifyDTO> userDataAuthInfoByUserId(@RequestParam("userId") String userId,@RequestParam(value = "authType", required = false) String authType);
+
+    /**
+     * 人员相关所有数据权限,只限于表或列中的一种
+     * @param idcard 身份证号
+     * @param authType 数据属性授权类型 TABLE:表授权 COLUMN:列授权
+     * @return
+     */
+    @GetMapping(value = "userDataAuthInfoByIdcard")
+    List<DataClassifyDTO> userDataAuthInfoByIdcard(@RequestParam("idcard") String idcard,@RequestParam(value = "authType", required = false) String authType);
+
+    /**
+     * 批量获取主体数据授权内容
+     * @param dtos
+     * @return
+     */
+    @PostMapping(value = "subDataAuthList")
+    List<DataClassifyDTO> subDataAuthList(@RequestBody List<SubDataAuthQueryDTO> dtos);
+
+
+    /**
+     * 数据清单查询接口
+     * @param searchDTO 查询条件
+     * @return
+     */
+    @PostMapping(value = "dataDetailList")
+    BusResultVO dataDetailList(@RequestBody SearchDTO searchDTO);
+
+    /**
+     * 人员视角-有权限的数据资源查询(树结构)-根据身份证号查询
+     * @param idcard 身份证
+     * @param authType 授权类型
+     * @return
+     */
+    @GetMapping(value = "userDataTreeByIdcard")
+    List<DataResourceDTO> userDataTreeByIdcard(@RequestParam("idcard") String idcard, @RequestParam(value = "authType",required = false) String authType);
 }

+ 9 - 0
dcuc-auth-api/src/main/java/com/dragoninfo/dcuc/auth/auth/facade/IServiceAuthFacade.java

@@ -59,4 +59,13 @@ public interface IServiceAuthFacade {
     @PostMapping(value = "serviceAuthentication")
     Object serviceAuthentication(@RequestParam("appCode")String appCode);
 
+
+    /**
+     * 校验申请单id
+     * @param applicantId
+     * @return
+     */
+    @PostMapping(value = "checkApplicantId")
+    boolean checkApplicantId(@RequestParam("applicantId")String applicantId);
+
 }

+ 11 - 5
dcuc-auth-api/src/main/java/com/dragoninfo/dcuc/auth/auth/facade/IServiceAuthResultFacade.java

@@ -1,15 +1,13 @@
 package com.dragoninfo.dcuc.auth.auth.facade;
 
-import com.dragoninfo.dcuc.auth.auth.dto.AppServiceCodeDto;
 import com.dragoninfo.dcuc.auth.auth.dto.ServiceAuthResultDTO;
 import com.dragonsoft.duceap.base.entity.http.ResponseDTO;
 import com.dragonsoft.duceap.base.entity.search.SearchDTO;
-import com.dragonsoft.duceap.core.search.Searchable;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.data.domain.Page;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
 
 /**
  * 服务授权结果Facade
@@ -69,4 +67,12 @@ public interface IServiceAuthResultFacade {
      */
     @PostMapping(value = "getDetailByAppAndService")
     ServiceAuthResultDTO getDetailByAppAndService(@RequestParam("appCode")String appCode,@RequestParam("serviceCode") String serviceCode);
+
+    /**
+     * 服务授权结果-分页查询
+     * @param searchDTO
+     * @return
+     */
+    @PostMapping(value = "serviceResultPageJoinFlow")
+    Page<ServiceAuthResultDTO> serviceResultPageJoinFlow(@RequestBody SearchDTO searchDTO);
 }

+ 1 - 1
dcuc-auth-model/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>dcuc-auth</artifactId>
         <groupId>com.dragoninfo</groupId>
-        <version>2.1.0-tjdsj-SNAPSHOT</version>
+        <version>2.2.0-tjdsj-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

+ 58 - 0
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/DataItemsCheckDto.java

@@ -0,0 +1,58 @@
+package com.dragoninfo.dcuc.auth.auth.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * 代码千万行,注释第一行,编码不规范,同事两行泪
+ *
+ * @author huang(jy)
+ * @version 1.0
+ * @date 2021/4/15 10:28
+ */
+@ApiModel(description = "数据项参数对象信息")
+public class DataItemsCheckDto {
+
+    @ApiModelProperty(value = "用户身份证号")
+    private String idcard;
+
+
+    @ApiModelProperty(value = "数据项信息")
+    @Valid
+    @NotNull
+    private List<DataItemsDto> dataItemsDtoList;
+
+    /**
+     * 当前登录人身份证号
+     */
+    private String currentIdcard;
+
+    public String getIdcard() {
+        return idcard;
+    }
+
+    public void setIdcard(String idcard) {
+        this.idcard = idcard;
+    }
+
+    public List<DataItemsDto> getDataItemsDtoList() {
+        return dataItemsDtoList;
+    }
+
+    public void setDataItemsDtoList(List<DataItemsDto> dataItemsDtoList) {
+        this.dataItemsDtoList = dataItemsDtoList;
+    }
+
+    public String getCurrentIdcard() {
+        return currentIdcard;
+    }
+
+    public void setCurrentIdcard(String currentIdcard) {
+        this.currentIdcard = currentIdcard;
+    }
+}

+ 52 - 0
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/DataItemsDto.java

@@ -0,0 +1,52 @@
+package com.dragoninfo.dcuc.auth.auth.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * 代码千万行,注释第一行,编码不规范,同事两行泪
+ *
+ * @author huang(jy)
+ * @version 1.0
+ * @date 2021/4/15 10:29
+ */
+@ApiModel(description = "数据项信息")
+public class DataItemsDto {
+
+    @ApiModelProperty(value = "数据资源标识符")
+    @NotBlank(message = "数据资源标识符不允许为空")
+    private String resourceCode;
+
+    @ApiModelProperty(value = "数据项标识符")
+    @NotBlank(message = "数据项标识符不允许为空")
+    private String dataItemCode;
+
+    @ApiModelProperty(value = "是否拥有权限")
+    private boolean auth;
+
+    public String getResourceCode() {
+        return resourceCode;
+    }
+
+    public void setResourceCode(String resourceCode) {
+        this.resourceCode = resourceCode;
+    }
+
+    public String getDataItemCode() {
+        return dataItemCode;
+    }
+
+    public void setDataItemCode(String dataItemCode) {
+        this.dataItemCode = dataItemCode;
+    }
+
+    public boolean isAuth() {
+        return auth;
+    }
+
+    public void setAuth(boolean auth) {
+        this.auth = auth;
+    }
+}

+ 27 - 0
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/ResourceTypeQueryDTO.java

@@ -0,0 +1,27 @@
+package com.dragoninfo.dcuc.auth.auth.dto;
+
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 数据资源清单具体查询条件
+ * @author mazq
+ * @date 2021/4/19
+ */
+@Data
+@NoArgsConstructor
+public class ResourceTypeQueryDTO {
+
+    /**
+     * 数据资源类型code值
+     */
+    private String typeCode;
+
+    /**
+     * 数据资源code值
+     */
+    private String codeValue;
+
+
+
+}

+ 32 - 4
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/ServiceAuthFlowDTO.java

@@ -15,6 +15,10 @@ import java.util.Date;
 public class ServiceAuthFlowDTO implements Serializable {
 
     private String id;
+    /**
+     * 申请单号
+     */
+    private String applicantId;
 
     /**
      * 申请人身份证号
@@ -51,6 +55,28 @@ public class ServiceAuthFlowDTO implements Serializable {
      */
     private String appName;
 
+    /**
+     * 应用管理单位名称
+     */
+    private String appManagerOrgName;
+
+
+    /**
+     * 应用管理单位code
+     */
+    private String appManagerOrgCode;
+
+    /**
+     * 应用事权单位名称
+     */
+    private String appOrgName;
+
+    /**
+     * 应用事权单位code
+     */
+    private String appOrgCode;
+
+
     /**
      * 工作单类型
      * SERVICE_AUTH-服务授权工作单 SERVICE_CANCEL-服务权限撤销工作单
@@ -122,6 +148,11 @@ public class ServiceAuthFlowDTO implements Serializable {
      */
     private String processType;
 
+    /**
+     * 流程标识码
+     */
+    private String businessCode;
+
     /**
      * 流程名称
      */
@@ -136,10 +167,7 @@ public class ServiceAuthFlowDTO implements Serializable {
      */
     private Date endTime;
 
-    /**
-     * 流程标识码
-     */
-    private String businessCode;
+
 
     /**
      * api接口调用人身份证号

+ 62 - 1
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/ServiceAuthResultDTO.java

@@ -36,6 +36,11 @@ public class ServiceAuthResultDTO implements Serializable {
      */
     private String appId;
 
+    /**
+     * 应用状态
+     */
+    private String appStatus;
+
     /**
      * 服务编码
      */
@@ -47,13 +52,40 @@ public class ServiceAuthResultDTO implements Serializable {
      */
     private String serviceName;
 
+    /**
+     * 服务事权单位
+     */
+    private String serviceOrgName;
+
+    /**
+     * 服务事权单位code
+     */
+    private String serviceOrgCode;
+
+    /**
+     * 服务管理单位
+     */
+    private String serviceManagerOrgName;
+
+    /**
+     * 服务管理单位code
+     */
+    private String serviceManagerOrgCode;
+
     /**
      * 服务id
      */
     private String serviceId;
 
     /**
-     * 状态
+     * 服务启停用
+     */
+    private String serviceStatus;
+
+    /**
+     * 授权状态-取决于应用和服务共同作用的状态
+     * 暂时不维护这个字段
+     * 不要使用
      */
     private String authStatus;
 
@@ -97,5 +129,34 @@ public class ServiceAuthResultDTO implements Serializable {
      */
     private String applicantOrgCode;
 
+    /**
+     * 应用管理单位名称
+     */
+    private String appManagerOrgName;
+
+
+    /**
+     * 应用管理单位code
+     */
+    private String appManagerOrgCode;
+
+    /**
+     * 应用事权单位名称
+     */
+    private String appOrgName;
 
+    /**
+     * 应用事权单位code
+     */
+    private String appOrgCode;
+
+    /**
+     * 授权申请时间
+     */
+    private Date applyTime;
+
+    /**
+     * 授权审批通过时间
+     */
+    private Date authTime;
 }

+ 0 - 33
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/SubDataDTO.java

@@ -1,33 +0,0 @@
-package com.dragoninfo.dcuc.auth.auth.dto;
-
-/**
- * @author mazq
- * @date 2021/4/9
- */
-
-import lombok.Data;
-
-import java.util.List;
-
-/**
- * 主体同一类别的数据资源
- */
-@Data
-public class SubDataDTO {
-
-    /**
-     * 数据类型
-     */
-    private String dataType;
-
-    /**
-     * 权限类型 TABLE:表 COLUMN:列  ALL:公开
-     */
-    private String authType;
-
-    /**
-     * 数据资源code集合
-     */
-    private List<String> dataCodes;
-
-}

+ 16 - 2
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/DataAuthDTO.java → dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/data/DataAuthDTO.java

@@ -1,4 +1,4 @@
-package com.dragoninfo.dcuc.auth.auth.dto;
+package com.dragoninfo.dcuc.auth.auth.dto.data;
 
 import lombok.Data;
 
@@ -24,6 +24,11 @@ public class DataAuthDTO {
      */
     private String subType;
 
+    /**
+     * 数据资源唯一标识
+     */
+    private String dataId;
+
     /**
      * 数据资源code
      */
@@ -31,6 +36,10 @@ public class DataAuthDTO {
 
     /**
      * 数据资源类型
+     * DATA_SECURITY_LEVEL:    数据安全级别;
+     * LEVEL_1_COLUMN_CLASSIFY:字段一级分类;
+     * LEVEL_2_COLUMN_CLASSIFY:字段二级分类;
+     * DATA_CLASSIFY:          数据分级
      */
     private String dataType;
 
@@ -60,8 +69,13 @@ public class DataAuthDTO {
     private Date deleteTime;
 
     /**
-     * 权限类型 TABLE:表 COLUMN:列  ALL:公开
+     * 数据属性授权类型 TABLE:表授权 COLUMN:列授权
      */
     private String authType;
 
+    /**
+     * 数据对应的分级分类标签code
+     */
+    private String classifyCode;
+
 }

+ 50 - 0
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/data/DataClassifyDTO.java

@@ -0,0 +1,50 @@
+package com.dragoninfo.dcuc.auth.auth.dto.data;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * 数据分级分类DTO
+ * 和DataResourceEnum对应
+ * @author mazq
+ * @date 2021/4/15
+ */
+@AllArgsConstructor
+@NoArgsConstructor
+@Data
+public class DataClassifyDTO {
+    /**
+     * id,分级分类唯一标识
+     */
+    private String id;
+
+    /**
+     * 分级分类名称
+     */
+    private String label;
+
+    /**
+     * 分级分类code值
+     */
+    private String code;
+
+    /**
+     * 数据属性类型 TABLE:表 COLUMN:列
+     */
+    private String attrType;
+
+    /**
+     * 分级分下被勾选的叶子节点id集合
+     */
+    private List<SubDataDTO> tickedDatas;
+
+    public DataClassifyDTO(String id, String code, String label, String attrType) {
+        this.id = id;
+        this.code = code;
+        this.label = label;
+        this.attrType = attrType;
+    }
+}

+ 33 - 0
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/data/DataDetailConditionDTO.java

@@ -0,0 +1,33 @@
+package com.dragoninfo.dcuc.auth.auth.dto.data;
+
+import com.dragoninfo.dcuc.auth.auth.dto.ResourceTypeQueryDTO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * 数据清单查询条件
+ * @author mazq
+ * @date 2021/4/19
+ */
+@Data
+@NoArgsConstructor
+public class DataDetailConditionDTO {
+
+    /**
+     * 目录名称,模糊查询
+     */
+    private String resourceName;
+
+    /**
+     * 规范数据项集名称和数据对象中文名称模糊查询
+     */
+    private String keyword;
+
+    /**
+     * 表级数据类别,精确查询,多个条件间关系为AND
+     */
+    private List<ResourceTypeQueryDTO> resourceTypes;
+}

+ 27 - 0
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/data/DataDetailQueryDTO.java

@@ -0,0 +1,27 @@
+package com.dragoninfo.dcuc.auth.auth.dto.data;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * @author mazq
+ * @date 2021/4/19
+ */
+@ApiModel(value = "数据清单查询Vo")
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class DataDetailQueryDTO {
+
+    @ApiModelProperty(value = "页码")
+    private Integer page;
+
+    @ApiModelProperty(value = "页面数量")
+    private Integer pageSize;
+
+    @ApiModelProperty(value = "查询条件")
+    private DataDetailConditionDTO condition;
+}

+ 49 - 0
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/data/DataResourceDTO.java

@@ -0,0 +1,49 @@
+package com.dragoninfo.dcuc.auth.auth.dto.data;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * 数据资源树DTO
+ * @author mazq
+ * @date 2021/4/20
+ */
+@AllArgsConstructor
+@NoArgsConstructor
+@Data
+public class DataResourceDTO {
+
+    /**
+     * id,分级分类唯一标识
+     */
+    private String id;
+
+    /**
+     * 分级分类名称
+     */
+    private String label;
+
+    /**
+     * 分级分类下数据资源-树结构
+     */
+    private List<DataResourceTreeDTO> nodes;
+
+    /**
+     * 数据属性类型 TABLE:表 COLUMN:列
+     */
+    private String attrType;
+
+    /**
+     * 最后一级节点总数量
+     */
+    private Integer total;
+
+    public DataResourceDTO(String id, String label, String attrType) {
+        this.id = id;
+        this.label = label;
+        this.attrType = attrType;
+    }
+}

+ 59 - 0
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/data/DataResourceTreeDTO.java

@@ -0,0 +1,59 @@
+package com.dragoninfo.dcuc.auth.auth.dto.data;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 分级分类下的数据资源DTO
+ * @author mazq
+ * @date 2021/4/13
+ */
+@Data
+public class DataResourceTreeDTO {
+
+    /**
+     * 节点id
+     */
+    private String id;
+
+    /**
+     * 数据资源code
+     */
+    private String code;
+
+    /**
+     * 节点名称
+     */
+    private String label;
+
+    /**
+     * 数据属性类型    TABLE:表 COLUMN
+     * 列数据安全级别  DATA_SECURITY_LEVEL
+     * 字段一级分类    LEVEL_1_COLUMN_CLASSIFY
+     * 字段二级分类    LEVEL_2_COLUMN_CLASSIFY
+     * 数据分级:DATA_CLASSIFY
+     */
+    private String dataType;
+
+    /**
+     * 子节点集合
+     */
+    private List<DataResourceTreeDTO> child;
+
+    /**
+     * 是否是树节点
+     */
+    private Boolean treeNode;
+
+    /**
+     * 数据资源code与dataType拼接,以|拼接
+     */
+    private String codeDataTypeStr;
+
+    /**
+     * 父节点id
+     */
+    private String pId;
+
+}

+ 9 - 3
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/SubDataAuthDTO.java → dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/data/SubDataAuthDTO.java

@@ -1,4 +1,4 @@
-package com.dragoninfo.dcuc.auth.auth.dto;
+package com.dragoninfo.dcuc.auth.auth.dto.data;
 
 import lombok.Data;
 import lombok.NoArgsConstructor;
@@ -15,7 +15,7 @@ import java.util.List;
 public class SubDataAuthDTO {
 
     /**
-     * 主体标识id/业务域code
+     * 主体标识id/业务域code/人员idcard
      */
     private String subId;
 
@@ -24,13 +24,19 @@ public class SubDataAuthDTO {
      */
     private String subType;
 
+    /**
+     * 数据属性授权类型 TABLE:表授权 COLUMN:列授权
+     */
+    private String authType;
+
     /**
      * 主体相关的数据权限集合
      */
     private List<SubDataDTO> dataAuthList;
 
-    public SubDataAuthDTO(String subId, String subType) {
+    public SubDataAuthDTO(String subId, String subType, String authType) {
         this.subId = subId;
         this.subType = subType;
+        this.authType = authType;
     }
 }

+ 32 - 0
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/data/SubDataAuthQueryDTO.java

@@ -0,0 +1,32 @@
+package com.dragoninfo.dcuc.auth.auth.dto.data;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 主体权限查询DTO
+ * @author mazq
+ * @date 2021/4/15
+ */
+@AllArgsConstructor
+@NoArgsConstructor
+@Data
+public class SubDataAuthQueryDTO {
+
+    /**
+     * 主体id
+     */
+    private String subId;
+
+    /**
+     * 主体类型
+     */
+    private String subType;
+
+    /**
+     * 权限类型
+     */
+    private String authType;
+
+}

+ 32 - 0
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/dto/data/SubDataDTO.java

@@ -0,0 +1,32 @@
+package com.dragoninfo.dcuc.auth.auth.dto.data;
+
+import lombok.Data;
+
+/**
+ * 主体授权的数据资源
+ * @author mazq
+ * @date 2021/4/9
+ */
+@Data
+public class SubDataDTO {
+
+    /**
+     * 数据资源唯一标识
+     */
+    private String dataId;
+    /**
+     * 数据类型
+     */
+    private String dataType;
+
+    /**
+     * 数据资源code集合
+     */
+    private String dataCode;
+
+    /**
+     * 数据对应的分级分类标签code
+     */
+    private String classifyCode;
+
+}

+ 25 - 0
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/entity/AppFunInfo.java

@@ -79,6 +79,17 @@ public class AppFunInfo implements IdEntity<String> {
 	@Column(name = "REMARK")
 	private String remark;
 
+	/**
+	 * 功能使用场景代码
+	 */
+	@Column(name = "FUNCTION_USAGE_SCENARIOS")
+	private String functionUsageScenarios;
+
+	/**
+	 * 设计安全隐私类别
+	 */
+	@Column(name = "DESIGN_SECURE_TYPE")
+	private String designSecureType;
 	//columns END
 
 		
@@ -210,6 +221,20 @@ public class AppFunInfo implements IdEntity<String> {
 		return this.remark;
 	}
 
+	public String getFunctionUsageScenarios() {
+		return functionUsageScenarios;
+	}
+
+	public void setFunctionUsageScenarios(String functionUsageScenarios) {
+		this.functionUsageScenarios = functionUsageScenarios;
+	}
 
+	public String getDesignSecureType() {
+		return designSecureType;
+	}
+
+	public void setDesignSecureType(String designSecureType) {
+		this.designSecureType = designSecureType;
+	}
 }
 

+ 58 - 2
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/entity/DataAuth.java

@@ -12,7 +12,7 @@ import java.util.Date;
  * @date 2021/4/9
  */
 @Entity
-@Table(name = "T_SUBJECT_DATA_AUTH")
+@Table(name = "T_SUB_DATA_AUTH")
 public class DataAuth implements IdEntity<String> {
 
     /**
@@ -36,6 +36,12 @@ public class DataAuth implements IdEntity<String> {
     @Column(name = "SUB_TYPE")
     private String subType;
 
+    /**
+     * 数据资源唯一标识
+     */
+    @Column(name = "DATA_ID")
+    private String dataId;
+
     /**
      * 数据资源code
      */
@@ -71,6 +77,18 @@ public class DataAuth implements IdEntity<String> {
     @Column(name = "CREATE_TIME")
     private Date createTime;
 
+    /**
+     * 更新人id
+     */
+    @Column(name = "UPDATE_USER")
+    private String updateUser;
+
+    /**
+     * 更新时间
+     */
+    @Column(name = "UPDATE_TIME")
+    private Date updateTime;
+
     /**
      * 删除人id
      */
@@ -84,11 +102,17 @@ public class DataAuth implements IdEntity<String> {
     private Date deleteTime;
 
     /**
-     * 权限类型 TABLE:表 COLUMN:列  ALL:公开
+     * 数据属性授权类型 TABLE:表授权 COLUMN:列授权
      */
     @Column(name = "AUTH_TYPE")
     private String authType;
 
+    /**
+     * 数据对应的分级分类标签code
+     */
+    @Column(name = "CLASSIFY_CODE")
+    private String classifyCode;
+
     @Override
     public String getId() {
         return id;
@@ -178,4 +202,36 @@ public class DataAuth implements IdEntity<String> {
     public void setAuthType(String authType) {
         this.authType = authType;
     }
+
+    public String getClassifyCode() {
+        return classifyCode;
+    }
+
+    public void setClassifyCode(String classifyCode) {
+        this.classifyCode = classifyCode;
+    }
+
+    public String getDataId() {
+        return dataId;
+    }
+
+    public void setDataId(String dataId) {
+        this.dataId = dataId;
+    }
+
+    public String getUpdateUser() {
+        return updateUser;
+    }
+
+    public void setUpdateUser(String updateUser) {
+        this.updateUser = updateUser;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
 }

+ 38 - 0
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/entity/ServiceAuthFlow.java

@@ -24,6 +24,12 @@ public class ServiceAuthFlow implements IdEntity<String> {
     @Column(name = "ID")
     private String id;
 
+    /**
+     * 申请单号
+     */
+    @Column(name = "APPLICANT_ID")
+    private String applicantId;
+
     /**
      * 申请人身份证号
      */
@@ -66,6 +72,32 @@ public class ServiceAuthFlow implements IdEntity<String> {
     @Column(name = "APP_NAME")
     private String appName;
 
+
+    /**
+     * 应用管理单位名称
+     */
+    @Column(name = "APP_MANAGER_ORG_NAME")
+    private String appManagerOrgName;
+
+
+    /**
+     * 应用管理单位code
+     */
+    @Column(name = "APP_MANAGER_ORG_CODE")
+    private String appManagerOrgCode;
+
+    /**
+     * 应用事权单位名称
+     */
+    @Column(name = "APP_ORG_NAME")
+    private String appOrgName;
+
+    /**
+     * 应用事权单位code
+     */
+    @Column(name = "APP_ORG_CODE")
+    private String appOrgCode;
+
     /**
      * 工作单类型
      * SERVICE_AUTH-服务授权工作单 SERVICE_AUTH_CANCEL-服务权限撤销工作单
@@ -98,6 +130,12 @@ public class ServiceAuthFlow implements IdEntity<String> {
     @Column(name = "APPLY_TIME")
     private Date applyTime;
 
+    /**
+     * 申请原因
+     */
+    @Column(name = "APPLY_REASON")
+    private String applyReason;
+
     /**
      * 服务资源codes (多个服务使用',' 隔开)
      */

+ 12 - 0
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/entity/ServiceAuthResult.java

@@ -29,6 +29,12 @@ public class ServiceAuthResult implements IdEntity<String> {
     @Column(name = "FLOW_ID")
     private String flowId;
 
+    /**
+     * 内部关联消息id
+     */
+    @Column(name = "MESSAGE_ID")
+    private String messageId;
+
     /**
      * 应用编码
      */
@@ -88,4 +94,10 @@ public class ServiceAuthResult implements IdEntity<String> {
      */
     @Column(name = "DELETED")
     private String deleted;
+
+    /**
+     * 是否删除
+     */
+    @Column(name = "DELETE_TIME")
+    private Date deleteTime;
 }

+ 55 - 0
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/enumresources/SubDataAuthTypeEnum.java

@@ -0,0 +1,55 @@
+package com.dragoninfo.dcuc.auth.auth.enumresources;
+
+/**
+ * 数据授权主体类型DTO
+ * @author mazq
+ * @date 2021/4/13
+ */
+public enum SubDataAuthTypeEnum {
+
+    /**
+     * 机构数据授权
+     */
+    SUB_DATA_AUTH_ORG("机构数据授权","ORG"),
+
+    /**
+     * 人员数据授权
+     */
+    SUB_DATA_AUTH_USER("人员数据授权","USER"),
+
+    /**
+     * 业务域数据授权
+     */
+    SUB_DATA_AUTH_BUSINESS("业务域数据授权","BUSINESS");
+
+    /**
+     * 主体类型名称
+     */
+    private String label;
+
+    /**
+     * 主体类型值 ORG:机构  USER:人员  BUSINESS:业务域
+     */
+    private String value;
+
+    SubDataAuthTypeEnum(String label, String value) {
+        this.label = label;
+        this.value = value;
+    }
+
+    public String getLabel() {
+        return label;
+    }
+
+    public void setLabel(String label) {
+        this.label = label;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+}

+ 83 - 1
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/po/ServiceAuthResultPO.java

@@ -36,7 +36,7 @@ public class ServiceAuthResultPO {
 
 
     /**
-     * 应用编码
+     * 服务名称
      */
     private String serviceName;
 
@@ -50,6 +50,31 @@ public class ServiceAuthResultPO {
      */
     private String serviceStatus;
 
+    /**
+     * 服务事权单位
+     */
+    private String serviceOrgName;
+
+    /**
+     * 服务事权单位code
+     */
+    private String serviceOrgCode;
+
+    /**
+     * 服务管理单位
+     */
+    private String serviceManagerOrgName;
+
+    /**
+     * 服务管理单位code
+     */
+    private String serviceManagerOrgCode;
+
+    /**
+     * 应用状态
+     */
+    private String appStatus;
+
     /**
      * 创建时间
      */
@@ -69,4 +94,61 @@ public class ServiceAuthResultPO {
      * 流程id
      */
     private String flowId;
+
+    /**
+     * 应用管理单位名称
+     */
+    private String appManagerOrgName;
+
+
+    /**
+     * 应用管理单位code
+     */
+    private String appManagerOrgCode;
+
+    /**
+     * 应用事权单位名称
+     */
+    private String appOrgName;
+
+    /**
+     * 应用事权单位code
+     */
+    private String appOrgCode;
+
+    /**
+     * 授权申请时间
+     */
+    private Date applyTime;
+
+    /**
+     * 授权审批通过时间
+     */
+    private Date authTime;
+
+    /**
+     * 申请人名字
+     */
+    private String applicantName;
+
+    /**
+     * 申请人身份证
+     */
+    private String applicantIdcard;
+
+    /**
+     * 申请人电话
+     */
+    private String applicantPhoneNo;
+
+    /**
+     * 申请人机构名称
+     */
+    private String applicantOrgName;
+
+    /**
+     * 申请人机构Code
+     */
+    private String applicantOrgCode;
+
 }

+ 28 - 6
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/vo/AppFunVO.java

@@ -1,23 +1,45 @@
 package com.dragoninfo.dcuc.auth.auth.vo;
 
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
 import java.io.Serializable;
 
 /**
  * 接口更新同步应用资源
  * 接收参数
  */
+@ApiModel(value = "应用资源")
 public class AppFunVO implements Serializable {
-    //资源名称
+    /**
+     * 资源名称
+     */
+    @ApiModelProperty(value = "资源名称")
     private String name;
-    //上下级资源关联的字段信息,已存在为更新,不存在则新增
+    /**
+     * 上下级资源关联的字段信息,已存在为更新,不存在则新增
+     */
+    @ApiModelProperty(value = "上下级资源关联的字段信息,已存在为更新,不存在则新增")
     private String code;
-    //上级资源的关联字段信息
+    /**
+     * 上级资源的关联字段信息
+     */
+    @ApiModelProperty(value = "上级资源的关联字段信息")
     private String parentCode;
-    //有效标志(删除标志) 0:无效,1:有效
+    /**
+     * 有效标志(删除标志) 0:无效,1:有效
+     */
+    @ApiModelProperty(value = "有效标志(删除标志) 0:无效,1:有效")
     private String isActive;
-    //资源url,非必填
+    /**
+     * 资源url,非必填
+     */
+    @ApiModelProperty(value = "资源url,非必填")
     private String url;
-    //资源排序号,非必填
+    /**
+     * 资源排序号,非必填
+     */
+    @ApiModelProperty(value = "资源排序号,非必填")
     private String sort;
 
     public String getName() {

+ 65 - 0
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/vo/BusDataResultVO.java

@@ -0,0 +1,65 @@
+package com.dragoninfo.dcuc.auth.auth.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.List;
+
+/**
+ * 代码千万行,注释第一行,编码不规范,同事两行泪
+ *
+ * @author huang(jy)
+ * @version 1.0
+ * @date 2021/4/15 14:50
+ */
+public class BusDataResultVO {
+    @ApiModelProperty(value = "每页条数")
+    private int pageSize;
+    @ApiModelProperty(value = "总页数")
+    private int totalPage;
+    @ApiModelProperty(value = "页数")
+    private int page;
+    @ApiModelProperty(value = "总条数")
+    private int totalCount;
+    @ApiModelProperty(value = "具体数据")
+    private List<ResourceCatalogVO> dataList;
+
+    public int getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(int pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    public int getTotalPage() {
+        return totalPage;
+    }
+
+    public void setTotalPage(int totalPage) {
+        this.totalPage = totalPage;
+    }
+
+    public int getPage() {
+        return page;
+    }
+
+    public void setPage(int page) {
+        this.page = page;
+    }
+
+    public int getTotalCount() {
+        return totalCount;
+    }
+
+    public void setTotalCount(int totalCount) {
+        this.totalCount = totalCount;
+    }
+
+    public List<ResourceCatalogVO> getDataList() {
+        return dataList;
+    }
+
+    public void setDataList(List<ResourceCatalogVO> dataList) {
+        this.dataList = dataList;
+    }
+}

+ 45 - 0
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/vo/BusResultVO.java

@@ -0,0 +1,45 @@
+package com.dragoninfo.dcuc.auth.auth.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 代码千万行,注释第一行,编码不规范,同事两行泪
+ *
+ * @author huang(jy)
+ * @version 1.0
+ * @date 2021/4/15 14:49
+ */
+public class BusResultVO {
+
+    @ApiModelProperty(value = "状态码;\"000\"代表成功")
+    private String code;
+    @ApiModelProperty(value = "信息")
+    private String message;
+
+    @ApiModelProperty(value = "结果")
+    private BusDataResultVO resultData;
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    public BusDataResultVO getResultData() {
+        return resultData;
+    }
+
+    public void setResultData(BusDataResultVO resultData) {
+        this.resultData = resultData;
+    }
+}

+ 386 - 0
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/vo/ResourceCatalogItemVO.java

@@ -0,0 +1,386 @@
+package com.dragoninfo.dcuc.auth.auth.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import org.apache.commons.lang.StringUtils;
+
+/**
+ * 代码千万行,注释第一行,编码不规范,同事两行泪
+ * 数据项信息
+ * @author huang(jy)
+ * @version 1.0
+ * @date 2021/4/15 13:39
+ */
+public class ResourceCatalogItemVO {
+
+    @ApiModelProperty(value = "数据项ID")
+    private String columnId;
+
+    @ApiModelProperty(value = "数据项编号")
+    private String dataItemNo;
+
+    @ApiModelProperty(value = "字段英文名称")
+    private String columnCode;
+
+    @ApiModelProperty(value = "字段中文名称")
+    private String columnName;
+
+    @ApiModelProperty(value = "数据项标识符")
+    private String dataItemCode;
+
+    @ApiModelProperty(value = "是否标识项")
+    private boolean idItemStatus;
+
+    @ApiModelProperty(value = "数据元内部标识符")
+    private String dataElementCode;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    @ApiModelProperty(value = "是否查询条件,true/false")
+    private boolean searchConditionStatus;
+
+    @ApiModelProperty(value = "是否订阅条件,true/false")
+    private boolean subscribeConditionStatus;
+
+    @ApiModelProperty(value = "查询/订阅匹配方式代码")
+    private String matchingModeCode;
+
+    @ApiModelProperty(value = "查询/订阅匹配方式名称")
+    private String matchingModeName;
+
+    @ApiModelProperty(value = "是否必填,true/false")
+    private boolean requiredStatus;
+
+    @ApiModelProperty(value = "字段性质分类代码")
+    private String propertyClassifyCode;
+
+    @ApiModelProperty(value = "字段性质分类名称")
+    private String propertyClassifyName;
+
+    @ApiModelProperty(value = "字段敏感分类代码")
+    private String sensitiveClassifyCode;
+
+    @ApiModelProperty(value = "字段敏感分类名称")
+    private String sensitiveClassifyName;
+
+    @ApiModelProperty(value = "注册时间,格式:yyyy-MM-dd HH:mm:ss")
+    private String registerTime;
+
+    @ApiModelProperty(value = "更新时间,格式:yyyy-MM-dd HH:mm:ss")
+    private String updateTime;
+
+    @ApiModelProperty(value = "是否失效,true/false")
+    private boolean invalidStatus;
+
+    @ApiModelProperty(value = "数据项集数据项编号")
+    private String standardDataItemNo;
+
+    @ApiModelProperty(value = "数据项集数据项中文名")
+    private String standardDataItemName;
+
+    @ApiModelProperty(value = "数据项集数据项英文名")
+    private String standardDataItemCode;
+
+    @ApiModelProperty(value = "数据项集数据项数据类型")
+    private String standardDataItemType;
+
+    @ApiModelProperty(value = "数据项集数据项数据长度")
+    private String standardDataItemLength;
+
+
+    @ApiModelProperty(value = "数据安全级别代码")
+    private String dataSecurityLevel;
+
+    @ApiModelProperty(value = "数据安全级别名称")
+    private String dataSecurityLevelName;
+
+    @ApiModelProperty(value = "字段分类代码")
+    private String columnClassify;
+
+    @ApiModelProperty(value = "字段分类名称")
+    private String columnClassifyName;
+
+    @ApiModelProperty(value = "数据项类型代码")
+    private String dataSourceItemType;
+
+    @ApiModelProperty(value = "数据项类型名称")
+    private String dataSourceItemTypeName;
+
+
+    public void setIdItemStatus(String idItemStatus) {
+
+        this.idItemStatus = 用(idItemStatus);
+    }
+
+    public void setSearchConditionStatus(String searchConditionStatus) {
+        this.searchConditionStatus = 用(searchConditionStatus);
+    }
+
+    public void setSubscribeConditionStatus(String subscribeConditionStatus) {
+        this.subscribeConditionStatus = 用(subscribeConditionStatus);
+    }
+
+    public void setRequiredStatus(String requiredStatus) {
+        this.requiredStatus = 用(requiredStatus);
+    }
+
+    public void setInvalidStatus(String invalidStatus) {
+        this.invalidStatus = 用(invalidStatus);
+    }
+
+    private Boolean 用(String status) {
+        Boolean aloolean = false;
+        if (StringUtils.isNotBlank(status)) {
+            aloolean = status.equals("0") ? false : true;
+        }
+        return aloolean;
+    }
+
+    public String getColumnId() {
+        return columnId;
+    }
+
+    public void setColumnId(String columnId) {
+        this.columnId = columnId;
+    }
+
+    public String getDataItemNo() {
+        return dataItemNo;
+    }
+
+    public void setDataItemNo(String dataItemNo) {
+        this.dataItemNo = dataItemNo;
+    }
+
+    public String getColumnCode() {
+        return columnCode;
+    }
+
+    public void setColumnCode(String columnCode) {
+        this.columnCode = columnCode;
+    }
+
+    public String getColumnName() {
+        return columnName;
+    }
+
+    public void setColumnName(String columnName) {
+        this.columnName = columnName;
+    }
+
+    public String getDataItemCode() {
+        return dataItemCode;
+    }
+
+    public void setDataItemCode(String dataItemCode) {
+        this.dataItemCode = dataItemCode;
+    }
+
+    public boolean isIdItemStatus() {
+        return idItemStatus;
+    }
+
+    public void setIdItemStatus(boolean idItemStatus) {
+        this.idItemStatus = idItemStatus;
+    }
+
+    public String getDataElementCode() {
+        return dataElementCode;
+    }
+
+    public void setDataElementCode(String dataElementCode) {
+        this.dataElementCode = dataElementCode;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public boolean isSearchConditionStatus() {
+        return searchConditionStatus;
+    }
+
+    public void setSearchConditionStatus(boolean searchConditionStatus) {
+        this.searchConditionStatus = searchConditionStatus;
+    }
+
+    public boolean isSubscribeConditionStatus() {
+        return subscribeConditionStatus;
+    }
+
+    public void setSubscribeConditionStatus(boolean subscribeConditionStatus) {
+        this.subscribeConditionStatus = subscribeConditionStatus;
+    }
+
+    public String getMatchingModeCode() {
+        return matchingModeCode;
+    }
+
+    public void setMatchingModeCode(String matchingModeCode) {
+        this.matchingModeCode = matchingModeCode;
+    }
+
+    public String getMatchingModeName() {
+        return matchingModeName;
+    }
+
+    public void setMatchingModeName(String matchingModeName) {
+        this.matchingModeName = matchingModeName;
+    }
+
+    public boolean isRequiredStatus() {
+        return requiredStatus;
+    }
+
+    public void setRequiredStatus(boolean requiredStatus) {
+        this.requiredStatus = requiredStatus;
+    }
+
+    public String getPropertyClassifyCode() {
+        return propertyClassifyCode;
+    }
+
+    public void setPropertyClassifyCode(String propertyClassifyCode) {
+        this.propertyClassifyCode = propertyClassifyCode;
+    }
+
+    public String getPropertyClassifyName() {
+        return propertyClassifyName;
+    }
+
+    public void setPropertyClassifyName(String propertyClassifyName) {
+        this.propertyClassifyName = propertyClassifyName;
+    }
+
+    public String getSensitiveClassifyCode() {
+        return sensitiveClassifyCode;
+    }
+
+    public void setSensitiveClassifyCode(String sensitiveClassifyCode) {
+        this.sensitiveClassifyCode = sensitiveClassifyCode;
+    }
+
+    public String getSensitiveClassifyName() {
+        return sensitiveClassifyName;
+    }
+
+    public void setSensitiveClassifyName(String sensitiveClassifyName) {
+        this.sensitiveClassifyName = sensitiveClassifyName;
+    }
+
+    public String getRegisterTime() {
+        return registerTime;
+    }
+
+    public void setRegisterTime(String registerTime) {
+        this.registerTime = registerTime;
+    }
+
+    public String getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(String updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public boolean isInvalidStatus() {
+        return invalidStatus;
+    }
+
+    public void setInvalidStatus(boolean invalidStatus) {
+        this.invalidStatus = invalidStatus;
+    }
+
+    public String getStandardDataItemNo() {
+        return standardDataItemNo;
+    }
+
+    public void setStandardDataItemNo(String standardDataItemNo) {
+        this.standardDataItemNo = standardDataItemNo;
+    }
+
+    public String getStandardDataItemName() {
+        return standardDataItemName;
+    }
+
+    public void setStandardDataItemName(String standardDataItemName) {
+        this.standardDataItemName = standardDataItemName;
+    }
+
+    public String getStandardDataItemCode() {
+        return standardDataItemCode;
+    }
+
+    public void setStandardDataItemCode(String standardDataItemCode) {
+        this.standardDataItemCode = standardDataItemCode;
+    }
+
+    public String getStandardDataItemType() {
+        return standardDataItemType;
+    }
+
+    public void setStandardDataItemType(String standardDataItemType) {
+        this.standardDataItemType = standardDataItemType;
+    }
+
+    public String getStandardDataItemLength() {
+        return standardDataItemLength;
+    }
+
+    public void setStandardDataItemLength(String standardDataItemLength) {
+        this.standardDataItemLength = standardDataItemLength;
+    }
+
+    public String getDataSecurityLevel() {
+        return dataSecurityLevel;
+    }
+
+    public void setDataSecurityLevel(String dataSecurityLevel) {
+        this.dataSecurityLevel = dataSecurityLevel;
+    }
+
+    public String getDataSecurityLevelName() {
+        return dataSecurityLevelName;
+    }
+
+    public void setDataSecurityLevelName(String dataSecurityLevelName) {
+        this.dataSecurityLevelName = dataSecurityLevelName;
+    }
+
+    public String getColumnClassify() {
+        return columnClassify;
+    }
+
+    public void setColumnClassify(String columnClassify) {
+        this.columnClassify = columnClassify;
+    }
+
+    public String getColumnClassifyName() {
+        return columnClassifyName;
+    }
+
+    public void setColumnClassifyName(String columnClassifyName) {
+        this.columnClassifyName = columnClassifyName;
+    }
+
+    public String getDataSourceItemType() {
+        return dataSourceItemType;
+    }
+
+    public void setDataSourceItemType(String dataSourceItemType) {
+        this.dataSourceItemType = dataSourceItemType;
+    }
+
+    public String getDataSourceItemTypeName() {
+        return dataSourceItemTypeName;
+    }
+
+    public void setDataSourceItemTypeName(String dataSourceItemTypeName) {
+        this.dataSourceItemTypeName = dataSourceItemTypeName;
+    }
+}

+ 674 - 0
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/vo/ResourceCatalogVO.java

@@ -0,0 +1,674 @@
+package com.dragoninfo.dcuc.auth.auth.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.List;
+
+/**
+ * 代码千万行,注释第一行,编码不规范,同事两行泪
+ * 数据资源信息
+ * @author huang(jy)
+ * @version 1.0
+ * @date 2021/4/15 13:40
+ */
+@ApiModel(description = "数据资源对象信息")
+public class ResourceCatalogVO {
+
+    @ApiModelProperty(value = "数据对象ID")
+    private String dataObjectId;
+
+    @ApiModelProperty(value = "数据资源名称")
+    private String resourceName;
+
+    @ApiModelProperty(value = "数据资源标识符")
+    private String resourceCode;
+
+    @ApiModelProperty(value = "数据资源目录编号")
+    private String catalogCode;
+
+    @ApiModelProperty(value = "数据资源版本号")
+    private String resourceVersion;
+
+    @ApiModelProperty(value = "数据资源描述")
+    private String resourceDescription;
+
+    @ApiModelProperty(value = "数据资源事权单位编号")
+    private String authorityDeptCode;
+
+    @ApiModelProperty(value = "数据资源事权单位名称")
+    private String authorityDeptName;
+
+    @ApiModelProperty(value = "数据资源管理单位编号")
+    private String manageDeptCode;
+
+    @ApiModelProperty(value = "数据资源管理单位名称")
+    private String manageDeptName;
+
+    @ApiModelProperty(value = "应用系统编号")
+    private String applicationCode;
+
+
+    @ApiModelProperty(value = "应用系统名称")
+    private String applicationCodeName;//应用系统名称
+
+
+    @ApiModelProperty(value = "一级数据来源编号")
+    private String dataSourceOneCode;
+
+    @ApiModelProperty(value = "一级数据来源名称")
+    private String dataSourceOneName;
+
+    @ApiModelProperty(value = "二级数据来源编号")
+    private String dataSourceTwoCode;
+
+    @ApiModelProperty(value = "二级数据来源名称")
+    private String dataSourceTwoName;
+
+    @ApiModelProperty(value = "来源系统种类编号")
+    private String sourceSystemCode;
+
+    @ApiModelProperty(value = "来源系统种类名称")
+    private String sourceSystemName;
+
+
+    @ApiModelProperty(value = "数据资源位置编号")
+    private String resourceLocationCode;
+
+    @ApiModelProperty(value = "数据资源位置名称")
+    private String resourceLocationName;
+
+    @ApiModelProperty(value = "数据资源存储位置描述编号")
+    private String storageCenterCode;
+
+    @ApiModelProperty(value = "数据资源存储位置描述名称")
+    private String storageCenterName;
+
+    @ApiModelProperty(value = "标准数据项集编码")
+    private String standardDataCode;
+
+    @ApiModelProperty(value = "标准数据项集名称")
+    private String standardDataName;
+
+    @ApiModelProperty(value = "数据组织一级分类代码")
+    private String dataClassifyOneCode;
+
+    @ApiModelProperty(value = "数据组织一级分类名称")
+    private String dataClassifyOneName;
+
+    @ApiModelProperty(value = "数据组织二级分类代码")
+    private String dataClassifyTwoCode;
+
+    @ApiModelProperty(value = "数据组织二级分类名称")
+    private String dataClassifyTwoName;
+
+
+    @ApiModelProperty(value = "数据标签1代码")
+    private String dataLabelOneCode;
+
+    @ApiModelProperty(value = "数据标签1名称")
+    private String dataLabelOneName;
+
+
+    @ApiModelProperty(value = "数据标签2代码")
+    private String dataLabelTwoCode;
+
+    @ApiModelProperty(value = "数据标签2名称")
+    private String dataLabelTwoName;
+
+
+    @ApiModelProperty(value = "数据标签3代码")
+    private String dataLabelThreeCode;
+
+    @ApiModelProperty(value = "数据标签3名称")
+    private String dataLabelThreeName;
+
+
+    @ApiModelProperty(value = "数据标签4代码")
+    private String dataLabelFourCode;
+
+    @ApiModelProperty(value = "数据标签4名称")
+    private String dataLabelFourName;
+
+
+    @ApiModelProperty(value = "数据标签5代码")
+    private String dataLabelFiveCode;
+
+    @ApiModelProperty(value = "数据标签5名称")
+    private String dataLabelFiveName;
+
+
+    @ApiModelProperty(value = "数据更新周期代码")
+    private String updateCycleCode;
+
+    @ApiModelProperty(value = "数据更新周期名称")
+    private String updateCycleName;
+
+    @ApiModelProperty(value = "存量数据记录规模")
+    private String stockRecordSize;
+
+    @ApiModelProperty(value = "存量数据存储规模")
+    private String stockStorageSize;
+
+    @ApiModelProperty(value = "增量数据记录规模")
+    private String incrementRecordSize;
+
+    @ApiModelProperty(value = "增量数据存储规模")
+    private String incrementStorageSize;
+
+    @ApiModelProperty(value = "数据存储周期")
+    private String storageCycle;
+
+    @ApiModelProperty(value = "资源状态代码")
+    private String resourceStatus;
+
+    @ApiModelProperty(value = "资源状态名称1启动0停用2注销")
+    private String resourceStatusName;
+
+
+    @ApiModelProperty(value = "注册时间,格式:yyyy-MM-dd HH:mm:ss")
+    private String registerTime;
+
+
+    @ApiModelProperty(value = "更新时间,格式:yyyy-MM-dd HH:mm:ss")
+    private String updateTime;
+
+
+    @ApiModelProperty(value = "用")
+    private String resourceId;
+
+    @ApiModelProperty(value = "数据项信息,格式JSON数组,数组内容见dataItems格式")
+    private List<ResourceCatalogItemVO> dataItems;
+
+
+    @ApiModelProperty(value = "数据接入方式编号")
+    private String dataInsertCode;
+
+    @ApiModelProperty(value = "数据接入方式名称")
+    private String dataInsertName;
+
+
+
+    @ApiModelProperty(value = "数据资源服务编号")
+    private String resourceServiceCode;
+
+
+    @ApiModelProperty(value = "数据分级代码")
+    private String dataClassification;
+
+    @ApiModelProperty(value = "数据分级名称")
+    private String dataClassificationName;
+
+
+
+    @ApiModelProperty(value = "数据对象中文名")
+    private String tableName;
+
+
+    @ApiModelProperty(value = "数据对象代码")
+    private String tableCode;
+
+    public String getDataObjectId() {
+        return dataObjectId;
+    }
+
+    public void setDataObjectId(String dataObjectId) {
+        this.dataObjectId = dataObjectId;
+    }
+
+    public String getResourceName() {
+        return resourceName;
+    }
+
+    public void setResourceName(String resourceName) {
+        this.resourceName = resourceName;
+    }
+
+    public String getResourceCode() {
+        return resourceCode;
+    }
+
+    public void setResourceCode(String resourceCode) {
+        this.resourceCode = resourceCode;
+    }
+
+    public String getCatalogCode() {
+        return catalogCode;
+    }
+
+    public void setCatalogCode(String catalogCode) {
+        this.catalogCode = catalogCode;
+    }
+
+    public String getResourceVersion() {
+        return resourceVersion;
+    }
+
+    public void setResourceVersion(String resourceVersion) {
+        this.resourceVersion = resourceVersion;
+    }
+
+    public String getResourceDescription() {
+        return resourceDescription;
+    }
+
+    public void setResourceDescription(String resourceDescription) {
+        this.resourceDescription = resourceDescription;
+    }
+
+    public String getAuthorityDeptCode() {
+        return authorityDeptCode;
+    }
+
+    public void setAuthorityDeptCode(String authorityDeptCode) {
+        this.authorityDeptCode = authorityDeptCode;
+    }
+
+    public String getAuthorityDeptName() {
+        return authorityDeptName;
+    }
+
+    public void setAuthorityDeptName(String authorityDeptName) {
+        this.authorityDeptName = authorityDeptName;
+    }
+
+    public String getManageDeptCode() {
+        return manageDeptCode;
+    }
+
+    public void setManageDeptCode(String manageDeptCode) {
+        this.manageDeptCode = manageDeptCode;
+    }
+
+    public String getManageDeptName() {
+        return manageDeptName;
+    }
+
+    public void setManageDeptName(String manageDeptName) {
+        this.manageDeptName = manageDeptName;
+    }
+
+    public String getApplicationCode() {
+        return applicationCode;
+    }
+
+    public void setApplicationCode(String applicationCode) {
+        this.applicationCode = applicationCode;
+    }
+
+    public String getApplicationCodeName() {
+        return applicationCodeName;
+    }
+
+    public void setApplicationCodeName(String applicationCodeName) {
+        this.applicationCodeName = applicationCodeName;
+    }
+
+    public String getDataSourceOneCode() {
+        return dataSourceOneCode;
+    }
+
+    public void setDataSourceOneCode(String dataSourceOneCode) {
+        this.dataSourceOneCode = dataSourceOneCode;
+    }
+
+    public String getDataSourceOneName() {
+        return dataSourceOneName;
+    }
+
+    public void setDataSourceOneName(String dataSourceOneName) {
+        this.dataSourceOneName = dataSourceOneName;
+    }
+
+    public String getDataSourceTwoCode() {
+        return dataSourceTwoCode;
+    }
+
+    public void setDataSourceTwoCode(String dataSourceTwoCode) {
+        this.dataSourceTwoCode = dataSourceTwoCode;
+    }
+
+    public String getDataSourceTwoName() {
+        return dataSourceTwoName;
+    }
+
+    public void setDataSourceTwoName(String dataSourceTwoName) {
+        this.dataSourceTwoName = dataSourceTwoName;
+    }
+
+    public String getSourceSystemCode() {
+        return sourceSystemCode;
+    }
+
+    public void setSourceSystemCode(String sourceSystemCode) {
+        this.sourceSystemCode = sourceSystemCode;
+    }
+
+    public String getSourceSystemName() {
+        return sourceSystemName;
+    }
+
+    public void setSourceSystemName(String sourceSystemName) {
+        this.sourceSystemName = sourceSystemName;
+    }
+
+    public String getResourceLocationCode() {
+        return resourceLocationCode;
+    }
+
+    public void setResourceLocationCode(String resourceLocationCode) {
+        this.resourceLocationCode = resourceLocationCode;
+    }
+
+    public String getResourceLocationName() {
+        return resourceLocationName;
+    }
+
+    public void setResourceLocationName(String resourceLocationName) {
+        this.resourceLocationName = resourceLocationName;
+    }
+
+    public String getStorageCenterCode() {
+        return storageCenterCode;
+    }
+
+    public void setStorageCenterCode(String storageCenterCode) {
+        this.storageCenterCode = storageCenterCode;
+    }
+
+    public String getStorageCenterName() {
+        return storageCenterName;
+    }
+
+    public void setStorageCenterName(String storageCenterName) {
+        this.storageCenterName = storageCenterName;
+    }
+
+    public String getStandardDataCode() {
+        return standardDataCode;
+    }
+
+    public void setStandardDataCode(String standardDataCode) {
+        this.standardDataCode = standardDataCode;
+    }
+
+    public String getStandardDataName() {
+        return standardDataName;
+    }
+
+    public void setStandardDataName(String standardDataName) {
+        this.standardDataName = standardDataName;
+    }
+
+    public String getDataClassifyOneCode() {
+        return dataClassifyOneCode;
+    }
+
+    public void setDataClassifyOneCode(String dataClassifyOneCode) {
+        this.dataClassifyOneCode = dataClassifyOneCode;
+    }
+
+    public String getDataClassifyOneName() {
+        return dataClassifyOneName;
+    }
+
+    public void setDataClassifyOneName(String dataClassifyOneName) {
+        this.dataClassifyOneName = dataClassifyOneName;
+    }
+
+    public String getDataClassifyTwoCode() {
+        return dataClassifyTwoCode;
+    }
+
+    public void setDataClassifyTwoCode(String dataClassifyTwoCode) {
+        this.dataClassifyTwoCode = dataClassifyTwoCode;
+    }
+
+    public String getDataClassifyTwoName() {
+        return dataClassifyTwoName;
+    }
+
+    public void setDataClassifyTwoName(String dataClassifyTwoName) {
+        this.dataClassifyTwoName = dataClassifyTwoName;
+    }
+
+    public String getDataLabelOneCode() {
+        return dataLabelOneCode;
+    }
+
+    public void setDataLabelOneCode(String dataLabelOneCode) {
+        this.dataLabelOneCode = dataLabelOneCode;
+    }
+
+    public String getDataLabelOneName() {
+        return dataLabelOneName;
+    }
+
+    public void setDataLabelOneName(String dataLabelOneName) {
+        this.dataLabelOneName = dataLabelOneName;
+    }
+
+    public String getDataLabelTwoCode() {
+        return dataLabelTwoCode;
+    }
+
+    public void setDataLabelTwoCode(String dataLabelTwoCode) {
+        this.dataLabelTwoCode = dataLabelTwoCode;
+    }
+
+    public String getDataLabelTwoName() {
+        return dataLabelTwoName;
+    }
+
+    public void setDataLabelTwoName(String dataLabelTwoName) {
+        this.dataLabelTwoName = dataLabelTwoName;
+    }
+
+    public String getDataLabelThreeCode() {
+        return dataLabelThreeCode;
+    }
+
+    public void setDataLabelThreeCode(String dataLabelThreeCode) {
+        this.dataLabelThreeCode = dataLabelThreeCode;
+    }
+
+    public String getDataLabelThreeName() {
+        return dataLabelThreeName;
+    }
+
+    public void setDataLabelThreeName(String dataLabelThreeName) {
+        this.dataLabelThreeName = dataLabelThreeName;
+    }
+
+    public String getDataLabelFourCode() {
+        return dataLabelFourCode;
+    }
+
+    public void setDataLabelFourCode(String dataLabelFourCode) {
+        this.dataLabelFourCode = dataLabelFourCode;
+    }
+
+    public String getDataLabelFourName() {
+        return dataLabelFourName;
+    }
+
+    public void setDataLabelFourName(String dataLabelFourName) {
+        this.dataLabelFourName = dataLabelFourName;
+    }
+
+    public String getDataLabelFiveCode() {
+        return dataLabelFiveCode;
+    }
+
+    public void setDataLabelFiveCode(String dataLabelFiveCode) {
+        this.dataLabelFiveCode = dataLabelFiveCode;
+    }
+
+    public String getDataLabelFiveName() {
+        return dataLabelFiveName;
+    }
+
+    public void setDataLabelFiveName(String dataLabelFiveName) {
+        this.dataLabelFiveName = dataLabelFiveName;
+    }
+
+    public String getUpdateCycleCode() {
+        return updateCycleCode;
+    }
+
+    public void setUpdateCycleCode(String updateCycleCode) {
+        this.updateCycleCode = updateCycleCode;
+    }
+
+    public String getUpdateCycleName() {
+        return updateCycleName;
+    }
+
+    public void setUpdateCycleName(String updateCycleName) {
+        this.updateCycleName = updateCycleName;
+    }
+
+    public String getStockRecordSize() {
+        return stockRecordSize;
+    }
+
+    public void setStockRecordSize(String stockRecordSize) {
+        this.stockRecordSize = stockRecordSize;
+    }
+
+    public String getStockStorageSize() {
+        return stockStorageSize;
+    }
+
+    public void setStockStorageSize(String stockStorageSize) {
+        this.stockStorageSize = stockStorageSize;
+    }
+
+    public String getIncrementRecordSize() {
+        return incrementRecordSize;
+    }
+
+    public void setIncrementRecordSize(String incrementRecordSize) {
+        this.incrementRecordSize = incrementRecordSize;
+    }
+
+    public String getIncrementStorageSize() {
+        return incrementStorageSize;
+    }
+
+    public void setIncrementStorageSize(String incrementStorageSize) {
+        this.incrementStorageSize = incrementStorageSize;
+    }
+
+    public String getStorageCycle() {
+        return storageCycle;
+    }
+
+    public void setStorageCycle(String storageCycle) {
+        this.storageCycle = storageCycle;
+    }
+
+    public String getResourceStatus() {
+        return resourceStatus;
+    }
+
+    public void setResourceStatus(String resourceStatus) {
+        this.resourceStatus = resourceStatus;
+    }
+
+    public String getResourceStatusName() {
+        return resourceStatusName;
+    }
+
+    public void setResourceStatusName(String resourceStatusName) {
+        this.resourceStatusName = resourceStatusName;
+    }
+
+    public String getRegisterTime() {
+        return registerTime;
+    }
+
+    public void setRegisterTime(String registerTime) {
+        this.registerTime = registerTime;
+    }
+
+    public String getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(String updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getResourceId() {
+        return resourceId;
+    }
+
+    public void setResourceId(String resourceId) {
+        this.resourceId = resourceId;
+    }
+
+    public List<ResourceCatalogItemVO> getDataItems() {
+        return dataItems;
+    }
+
+    public void setDataItems(List<ResourceCatalogItemVO> dataItems) {
+        this.dataItems = dataItems;
+    }
+
+    public String getDataInsertCode() {
+        return dataInsertCode;
+    }
+
+    public void setDataInsertCode(String dataInsertCode) {
+        this.dataInsertCode = dataInsertCode;
+    }
+
+    public String getDataInsertName() {
+        return dataInsertName;
+    }
+
+    public void setDataInsertName(String dataInsertName) {
+        this.dataInsertName = dataInsertName;
+    }
+
+    public String getResourceServiceCode() {
+        return resourceServiceCode;
+    }
+
+    public void setResourceServiceCode(String resourceServiceCode) {
+        this.resourceServiceCode = resourceServiceCode;
+    }
+
+    public String getDataClassification() {
+        return dataClassification;
+    }
+
+    public void setDataClassification(String dataClassification) {
+        this.dataClassification = dataClassification;
+    }
+
+    public String getDataClassificationName() {
+        return dataClassificationName;
+    }
+
+    public void setDataClassificationName(String dataClassificationName) {
+        this.dataClassificationName = dataClassificationName;
+    }
+
+    public String getTableName() {
+        return tableName;
+    }
+
+    public void setTableName(String tableName) {
+        this.tableName = tableName;
+    }
+
+    public String getTableCode() {
+        return tableCode;
+    }
+
+    public void setTableCode(String tableCode) {
+        this.tableCode = tableCode;
+    }
+}

+ 67 - 0
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/vo/bim/BimUserInfoItemRespVO.java

@@ -0,0 +1,67 @@
+package com.dragoninfo.dcuc.auth.auth.vo.bim;
+
+import lombok.Data;
+
+/**
+ * @author huangzqa
+ * @date 2021/4/9
+ **/
+@Data
+public class BimUserInfoItemRespVO {
+
+    /**
+     * 消息id
+     */
+    private String messageId;
+
+    /**
+     * true表示查询成功
+     */
+    private String result;
+
+    /**
+     * 结果描述
+     */
+    private String resultDescription;
+
+    /**
+     * 用户id
+     */
+    private String yhId;
+
+    /**
+     * 姓名
+     */
+    private String xm;
+
+    /**
+     * 警号
+     */
+    private String jh;
+
+    /***
+     * 身份证号
+     */
+    private String sfzh;
+
+    /**
+     * 单位代码
+     */
+    private String dwdm;
+
+    /**
+     * 单位名称
+     */
+    private String dwmc;
+
+    /**
+     * 职位
+     */
+    private String zw;
+
+    /**
+     * 用户名
+     */
+    private String yhm;
+
+}

+ 26 - 0
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/vo/bim/BimUserInfoReqVO.java

@@ -0,0 +1,26 @@
+package com.dragoninfo.dcuc.auth.auth.vo.bim;
+
+import lombok.Data;
+
+/**
+ * @author huangzqa
+ * @date 2021/4/9
+ **/
+@Data
+public class BimUserInfoReqVO {
+
+    /**
+     * token
+     */
+    private String token;
+
+    /**
+     * 消息ID
+     */
+    private String messageId;
+
+    /**
+     * 用户令牌
+     */
+    private String userToken;
+}

+ 23 - 0
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/vo/bim/BimUserInfoRespVO.java

@@ -0,0 +1,23 @@
+package com.dragoninfo.dcuc.auth.auth.vo.bim;
+
+import lombok.Data;
+
+/**
+ * @author huangzqa
+ * @date 2021/4/9
+ **/
+@Data
+public class BimUserInfoRespVO {
+
+    private Boolean success;
+
+    private BimUserInfoItemRespVO data;
+
+    private String errorCode;
+
+    private String errorMessage;
+
+    private BimRespException errorException;
+
+
+}

+ 4 - 4
dcuc-auth-service/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>dcuc-auth</artifactId>
         <groupId>com.dragoninfo</groupId>
-        <version>2.1.0-tjdsj-SNAPSHOT</version>
+        <version>2.2.0-tjdsj-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <artifactId>dcuc-auth-service</artifactId>
@@ -207,9 +207,9 @@
                                     <goal>copy-dependencies</goal>
                                 </goals>
                                 <configuration>
-                                    <!--   &lt;!&ndash;排除licenseignore包,用来禁用许可开关,防止生产环境通过关闭开关,绕过许可&ndash;&gt;
-                                       <excludeArtifactIds>duceap-support-licenseignore</excludeArtifactIds>-->
-                                    <!--<excludeScope>provided</excludeScope>-->
+                                    <!--排除licenseignore包,用来禁用许可开关,防止生产环境通过关闭开关,绕过许可-->
+                                    <excludeArtifactIds>duceap-support-licenseignore</excludeArtifactIds>
+                                    <excludeScope>provided</excludeScope>
                                     <outputDirectory>${project.build.directory}/lib</outputDirectory>
                                     <!--取消依赖包的时间戳-->
                                     <useBaseVersion>true</useBaseVersion>

+ 1 - 1
dcuc-auth-service/src/main/assembly/conf/application.yml

@@ -1,6 +1,6 @@
 spring:
   profiles:
-    include: base,auth
+    include: base,auth,bus
 #apollo配置
 apollo:
   autoUpdateInjectedSpringProperties: false

+ 16 - 0
dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/bpo/ServiceAuthFlowBPO.java

@@ -3,6 +3,8 @@ package com.dragoninfo.dcuc.auth.auth.bpo;
 
 import com.dragoninfo.dcuc.auth.auth.entity.ServiceAuthFlow;
 import com.dragoninfo.duceap.core.persistent.BaseBPO;
+import com.dragonsoft.duceap.base.enums.BooleanEnum;
+import com.dragonsoft.duceap.core.persistent.factory.PersistentFactory;
 import org.springframework.stereotype.Repository;
 
 /**
@@ -12,4 +14,18 @@ import org.springframework.stereotype.Repository;
  */
 @Repository
 public class ServiceAuthFlowBPO extends BaseBPO<ServiceAuthFlow,String> {
+
+    /**
+     * 校验申请单id
+     * @param applicantId
+     * @return
+     */
+    public boolean checkApplicantId(String applicantId){
+        String sql="select  count(*) from  t_service_auth_flow where applicant_id = ? and deleted= ?";
+        int i = PersistentFactory.getJdbcDao().queryForInt(sql, new Object[]{applicantId, BooleanEnum.FALSE.value});
+        if (i==0){
+            return false;
+        }
+        return true;
+    }
 }

+ 21 - 2
dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/bpo/ServiceAuthResultBPO.java

@@ -1,7 +1,6 @@
 package com.dragoninfo.dcuc.auth.auth.bpo;
 
 
-import com.dragoninfo.dcuc.auth.auth.dto.ServiceAuthResultDTO;
 import com.dragoninfo.dcuc.auth.auth.entity.ServiceAuthResult;
 import com.dragoninfo.dcuc.auth.auth.po.ServiceAuthResultPO;
 import com.dragoninfo.duceap.core.persistent.BaseBPO;
@@ -32,7 +31,8 @@ public class ServiceAuthResultBPO extends BaseBPO<ServiceAuthResult,String> {
                 "  y.apply_name as appName,\n" +
                 "  y.apply_name as app_name,\n" +
                 "  t.app_code as appCode, \n" +
-                "  r.service_status  \n" +
+                "  r.service_status,  \n" +
+                "  r.service_status as serviceStatus \n" +
                 "FROM \n" +
                 "\tT_SERVICE_AUTH_RESULT t \n" +
                 "LEFT JOIN T_SERVICE_RESOURCE r ON r.id = t.service_id\n" +
@@ -65,4 +65,23 @@ public class ServiceAuthResultBPO extends BaseBPO<ServiceAuthResult,String> {
         String sql = "SELECT * from T_SERVICE_AUTH_RESULT where deleted = '0' and app_code = ? and service_code = ?";
         return PersistentFactory.getJdbcDao().queryUniqueResult(sql,ServiceAuthResult.class,new Object[]{appCode,serviceCode});
     }
+
+    public Page<ServiceAuthResultPO> serviceResultPageJoinFlow(Searchable searchable) {
+        String sql = "SELECT t.app_code, t.service_code, t.create_time as auth_time,t.deleted as deleted," +
+                     "a.apply_name as app_name, a.apply_status as app_status, a.org_name as app_org_name, a.manager_org_name as app_manager_org_name," +
+                     "f.applicant_name, f.applicant_org_code, f.create_time as apply_time, f.applicant_org_name, f.applicant_idcard, f.applicant_phone_no," +
+                     "f.app_org_code as app_org_code, f.app_manager_org_code as app_manager_org_code," +
+                     "s.service_name, s.service_status, s.build_unit as service_org_name, s.manager_unit as service_manager_org_name, " +
+                     "s.manager_unit_code as service_manager_org_code, s.build_unit_code as service_org_code," +
+                     "t.app_code as appCode, t.service_code as serviceCode, a.apply_name as appName," +
+                     "a.org_name as appOrgName, f.applicant_name as applicantName, s.service_name as serviceName, s.manager_unit as serviceManagerOrgName," +
+                     "f.app_org_code as appOrgCode, a.apply_status as appStatus, a.manager_org_name as appManagerOrgName, s.service_status as serviceStatus, a.deleted as app_deleted, " +
+                     "s.manager_unit_code as serviceManagerOrgCode, s.deleted as service_deleted" +
+                     " FROM T_SERVICE_AUTH_RESULT t" +
+                     " INNER JOIN T_SERVICE_RESOURCE s ON t.service_id = s.id" +
+                     " INNER JOIN T_APPLY_INFO a ON t.app_id = a.id" +
+                     " LEFT JOIN T_SERVICE_AUTH_FLOW f ON f.message_id = t.message_id";
+        Page<ServiceAuthResultPO> paging = PersistentFactory.getJdbcDao().paging(sql, searchable,ServiceAuthResultPO.class);
+        return paging;
+    }
 }

+ 48 - 0
dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/business/IDataAuthBusiness.java

@@ -1,8 +1,56 @@
 package com.dragoninfo.dcuc.auth.auth.business;
 
+import com.dragoninfo.dcuc.auth.auth.dto.data.DataClassifyDTO;
+import com.dragoninfo.dcuc.auth.auth.dto.data.DataResourceDTO;
+import com.dragoninfo.dcuc.auth.auth.dto.data.SubDataAuthQueryDTO;
+import com.dragoninfo.dcuc.user.user.entity.UserInfo;
+
+import java.util.List;
+
 /**
+ * 数据授权业务组合类
  * @author mazq
  * @date 2021/4/9
  */
 public interface IDataAuthBusiness {
+
+    /**
+     * 人员相关所有数据权限,只限于表或列中的一种
+     * @param userId    人员id
+     * @param authType  数据属性授权类型 TABLE:表授权 COLUMN:列授权
+     * @return
+     */
+    List<DataClassifyDTO> userDataAuthInfoByUserId(String userId, String authType);
+
+    /**
+     * 人员相关所有数据权限,只限于表或列中的一种
+     * @param idcard    身份证号
+     * @param authType  数据属性授权类型 TABLE:表授权 COLUMN:列授权
+     * @return
+     */
+    List<DataClassifyDTO> userDataAuthInfoByIdcard(String idcard, String authType);
+
+    /**
+     * 获取主体所有数据权限
+     * @param  queryDTO 主体权限查询对象
+     * @return
+     */
+    List<DataClassifyDTO> getSubDataAuth(SubDataAuthQueryDTO queryDTO);
+
+    /**
+     * 批量获取主体所有数据权限
+     * @param list 主体权限查询对象集合
+     * @return
+     */
+    List<DataClassifyDTO> getSubDataAuthList(List<SubDataAuthQueryDTO> list);
+
+    /**
+     * 人员视角-有权限的数据资源查询(树结构)-根据身份证号查询
+     * @param idcard 身份证
+     * @param authType 授权类型
+     * @return
+     */
+    List<DataResourceDTO> userDataTreeByIdcard(String idcard, String authType);
+
+    List<DataClassifyDTO> userDataAuthInfoByUser(UserInfo userInfo);
 }

+ 312 - 0
dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/business/impl/DataAuthBusiness.java

@@ -0,0 +1,312 @@
+package com.dragoninfo.dcuc.auth.auth.business.impl;
+
+import com.dragoninfo.dcuc.app.enumresources.DataResourceEnum;
+import com.dragoninfo.dcuc.app.facade.IDataResourceFacade;
+import com.dragoninfo.dcuc.app.vo.DataResourceClassifyVo;
+import com.dragoninfo.dcuc.app.vo.DataResourceTreeVo;
+import com.dragoninfo.dcuc.auth.auth.business.IDataAuthBusiness;
+import com.dragoninfo.dcuc.auth.auth.dto.data.*;
+import com.dragoninfo.dcuc.auth.auth.enumresources.SubDataAuthTypeEnum;
+import com.dragoninfo.dcuc.auth.auth.service.IBusService;
+import com.dragoninfo.dcuc.auth.auth.service.IDataAuthService;
+import com.dragoninfo.dcuc.user.user.entity.UserInfo;
+import com.dragoninfo.dcuc.user.user.facade.IUserFacade;
+import com.dragonsoft.duceap.base.enums.BooleanEnum;
+import com.dragonsoft.duceap.commons.util.MapUtils;
+import com.dragonsoft.duceap.commons.util.collections.CollectionUtils;
+import com.dragonsoft.duceap.commons.util.string.StringUtils;
+import com.dragonsoft.duceap.core.search.Searchable;
+import com.dragonsoft.duceap.core.search.enums.SearchOperator;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.util.StopWatch;
+
+import java.util.*;
+import java.util.concurrent.CompletableFuture;
+import java.util.stream.Collectors;
+
+/**
+ * @author mazq
+ * @date 2021/4/13
+ */
+@Slf4j
+@Component
+public class DataAuthBusiness implements IDataAuthBusiness {
+
+    public static String idJoin = "|";
+
+    @Autowired
+    private IUserFacade userFacade;
+
+    @Autowired
+    private IDataAuthService dataAuthService;
+
+    @Autowired
+    private IDataResourceFacade dataResourceFacade;
+
+    @Autowired
+    private IBusService busService;
+
+
+
+    @Override
+    public List<DataClassifyDTO> userDataAuthInfoByUserId(String userId, String authType) {
+        UserInfo userInfo = userFacade.detailById(userId);
+        return getUserDataAuth(authType, userInfo);
+    }
+
+    @Override
+    public List<DataClassifyDTO> userDataAuthInfoByIdcard(String idcard, String authType) {
+        UserInfo userInfo = userFacade.detailBySfzh(idcard);
+        return getUserDataAuth(authType, userInfo);
+    }
+
+    private List<DataClassifyDTO> getUserDataAuth(String authType, UserInfo userInfo) {
+        //数据授权主体 ORG && USER && BUSINESS
+        List<SubDataAuthQueryDTO> list = new ArrayList<>();
+        if (userInfo == null){
+            return new ArrayList<>();
+        }
+        String orgCode = userInfo.getOrgCode();
+        if(StringUtils.isNotBlank(orgCode)){
+            list.add(new SubDataAuthQueryDTO(orgCode, SubDataAuthTypeEnum.SUB_DATA_AUTH_ORG.getValue(),authType));
+        }
+        String idcard = userInfo.getIdcard();
+        if(StringUtils.isNotBlank(idcard)){
+            list.add(new SubDataAuthQueryDTO(idcard, SubDataAuthTypeEnum.SUB_DATA_AUTH_USER.getValue(),authType));
+        }
+        String policeBusinessStr = userInfo.getPoliceBusiness();
+        if(StringUtils.isNotBlank(policeBusinessStr)){
+            String[] businessArr = policeBusinessStr.split(",");
+            for (String business : businessArr) {
+                list.add(new SubDataAuthQueryDTO(business, SubDataAuthTypeEnum.SUB_DATA_AUTH_BUSINESS.getValue(),authType));
+            }
+        }
+        return getSubDataAuthList(list);
+    }
+
+    @Override
+    public List<DataClassifyDTO> getSubDataAuth(SubDataAuthQueryDTO queryDTO) {
+        Searchable searchable = Searchable.newSearchable();
+        searchable.addSearchFilter("subId", SearchOperator.eq,queryDTO.getSubId());
+        searchable.addSearchFilter("subType", SearchOperator.eq,queryDTO.getSubType());
+        searchable.addSearchFilter("deleted",SearchOperator.eq, BooleanEnum.FALSE.getValue());
+        String authType = queryDTO.getAuthType();
+        if(StringUtils.isNotBlank(authType)){
+            searchable.addSearchFilter("authType",SearchOperator.eq, authType);
+        }
+        List<DataAuthDTO> authDTOS = dataAuthService.search(searchable.toSearchDTO());
+        //组装权限数据成前端需要的DataClassifyDTO
+        List<DataClassifyDTO> classifyDTOS = getDataClassifyDTOS(authDTOS);
+        return classifyDTOS;
+    }
+
+    @Override
+    public List<DataClassifyDTO> getSubDataAuthList(List<SubDataAuthQueryDTO> list) {
+        if(CollectionUtils.isEmpty(list)){
+            return new ArrayList<>();
+        }
+        List<DataAuthDTO> authDTOS = dataAuthService.getSubDataAuthList(list);
+        //分成表和列组装成DataClassifyDTO
+        List<DataClassifyDTO> classifyDTOS = getDataClassifyDTOS(authDTOS);
+        return classifyDTOS;
+    }
+
+    @Override
+    public List<DataResourceDTO> userDataTreeByIdcard(String idcard, String authType) {
+        List<DataResourceDTO> resourceDTOS = new ArrayList<>();
+        //获取有权限的数据
+        List<DataClassifyDTO> dataClassifyDTOS = userDataAuthInfoByIdcard(idcard, authType);
+        if(CollectionUtils.isEmpty(dataClassifyDTOS)) {
+            return resourceDTOS;
+        }
+        //获取数据资源树
+        Map<String, DataResourceTreeVo> allTreeVosMap = getDataResourceTree(dataClassifyDTOS);
+
+        if(MapUtils.isEmpty(allTreeVosMap)){
+            return resourceDTOS;
+        }
+        //筛选有权限的树节点
+        List<DataResourceTreeVo> authTreeVoList = filterAuthTreeNode(dataClassifyDTOS, allTreeVosMap);
+
+        if(CollectionUtils.isEmpty(authTreeVoList)){
+            return resourceDTOS;
+        }
+
+        //将有权限的节点组装成树结构
+        List<DataResourceTreeVo> topTreeNodes = authTreeVoList.stream().filter(item -> item.getPId() == null).collect(Collectors.toList());
+        List<DataResourceTreeVo> childTreeNodes = authTreeVoList.stream().filter(item -> item.getPId() != null).collect(Collectors.toList());
+        for (DataResourceTreeVo topTreeNode : topTreeNodes) {
+            DataResourceTreeDTO topTreeDTO = convertToTreeDTO(topTreeNode, childTreeNodes);
+            final List<DataResourceTreeDTO> child = topTreeDTO.getChild();
+            if(CollectionUtils.isEmpty(child)){
+                continue;
+            }
+            //构建分级分类DTO
+            String id = topTreeDTO.getId();
+            DataResourceEnum dataEnum = DataResourceEnum.getByCode(id);
+            DataResourceDTO dataResourceDTO = new DataResourceDTO(dataEnum.getCode(),dataEnum.getLabel(),dataEnum.getAttrType().getValue());
+            dataResourceDTO.setNodes(new ArrayList<DataResourceTreeDTO>(){{addAll(child);}});
+            resourceDTOS.add(dataResourceDTO);
+        }
+        return resourceDTOS;
+    }
+
+    @Override
+    public List<DataClassifyDTO> userDataAuthInfoByUser(UserInfo userInfo) {
+        return getUserDataAuth(null, userInfo);
+    }
+
+
+    private List<DataClassifyDTO> getDataClassifyDTOS(List<DataAuthDTO> authDTOS) {
+        List<DataClassifyDTO> classifyDTOS = new ArrayList<>();
+        if(CollectionUtils.isEmpty(authDTOS)){
+            return classifyDTOS;
+        }
+        //根据授权类型分组
+        Map<String, List<DataAuthDTO>> map = authDTOS.stream().collect(Collectors.groupingBy(DataAuthDTO::getAuthType));
+        for (Map.Entry<String, List<DataAuthDTO>> entry : map.entrySet()) {
+            List<DataAuthDTO> oneAuthTypeDTOS = entry.getValue();
+            String authType = entry.getKey();
+            //根据分级分类分组
+            Map<String, List<DataAuthDTO>> classifyMap = oneAuthTypeDTOS.stream().collect(Collectors.groupingBy(DataAuthDTO::getClassifyCode));
+            for (Map.Entry<String, List<DataAuthDTO>> classify : classifyMap.entrySet()) {
+                DataResourceEnum resourceEnum = DataResourceEnum.getByCode(classify.getKey());
+                if (null == resourceEnum) {
+                    continue;
+                }
+                DataClassifyDTO dto = new DataClassifyDTO(resourceEnum.getCode(), resourceEnum.getCode(), resourceEnum.getLabel(), authType);
+                List<DataAuthDTO> value = classify.getValue();
+                List<SubDataDTO> tickedDataList = value.stream().map(item -> {
+                    SubDataDTO subDataDTO = new SubDataDTO();
+                    subDataDTO.setDataId(item.getDataId());
+                    subDataDTO.setDataType(item.getDataType());
+                    subDataDTO.setDataCode(item.getDataCode());
+                    subDataDTO.setClassifyCode(item.getClassifyCode());
+                    return subDataDTO;
+                }).collect(Collectors.toList());
+                dto.setTickedDatas(tickedDataList);
+                classifyDTOS.add(dto);
+            }
+        }
+        return classifyDTOS;
+    }
+
+
+    /**
+     * 将TreeVo转为DTO
+     * @param topTreeNode 顶级节点
+     * @param childTreeNodes 有权限的子节点
+     * @return
+     */
+    private DataResourceTreeDTO convertToTreeDTO(DataResourceTreeVo topTreeNode, List<DataResourceTreeVo> childTreeNodes) {
+        DataResourceTreeDTO dto = new DataResourceTreeDTO();
+        BeanUtils.copyProperties(topTreeNode,dto,"child");
+        String id = topTreeNode.getId();
+        List<DataResourceTreeVo> childList = childTreeNodes.stream().filter(item -> item.getPId().equals(id)).collect(Collectors.toList());
+        if(CollectionUtils.isEmpty(childList)){
+            dto.setChild(null);
+            dto.setTreeNode(false);
+        }else {
+            List<DataResourceTreeDTO> list = new ArrayList<>();
+            for (DataResourceTreeVo child : childList) {
+                DataResourceTreeDTO childDTO = convertToTreeDTO(child,childTreeNodes);
+                list.add(childDTO);
+            }
+            dto.setChild(list);
+            dto.setTreeNode(true);
+        }
+        return dto;
+    }
+
+    /**
+     * 过滤有权限的树节点
+     * @param dataClassifyDTOS 有权限的分级分类数据
+     * @param allTreeVosMap 平铺的树节点
+     * @return
+     */
+    private List<DataResourceTreeVo> filterAuthTreeNode(List<DataClassifyDTO> dataClassifyDTOS, Map<String, DataResourceTreeVo> allTreeVosMap) {
+        List<SubDataDTO> authDatas = dataClassifyDTOS.stream()
+                .map(item -> item.getTickedDatas())
+                .flatMap(List::stream)
+                .collect(Collectors.toList());
+        Set<String> dataIds = authDatas.stream()
+                .map(item -> item.getClassifyCode() + idJoin + item.getDataId())
+                .collect(Collectors.toSet());
+        Set<String> authDataIds = new HashSet<>();
+        dataIds.stream().forEach(id->{
+            authDataIds.add(id);
+            String dataId = id;
+            int index;
+            while ((index = dataId.lastIndexOf(idJoin)) != -1){
+                authDataIds.add(dataId = dataId.substring(0, index));
+            }
+        });
+        //过滤有权限的树节点
+        return allTreeVosMap.entrySet().stream()
+                .filter(item -> authDataIds.contains(item.getKey()))
+                .collect(Collectors.mapping(Map.Entry::getValue, Collectors.toList()));
+    }
+
+    /**
+     * 获取所有数据资源树
+     * @param dataClassifyDTOS 有权限的分级分类数据
+     * @return 平铺的树节点
+     */
+    private Map<String, DataResourceTreeVo> getDataResourceTree(List<DataClassifyDTO> dataClassifyDTOS) {
+        Set<String> attrTypeSet = dataClassifyDTOS
+                .stream()
+                .map(dataClassifyDTO -> dataClassifyDTO.getAttrType())
+                .collect(Collectors.toSet());
+        StopWatch stopWatch  = new StopWatch();
+        stopWatch.start("get data resource tree");
+        //所有数据资源Map
+        Map<String, DataResourceTreeVo> allTreeVosMap = new HashMap<>();
+        List<CompletableFuture<List<DataResourceTreeVo>>> futureList = new ArrayList<>();
+
+        for (String attrType : attrTypeSet) {
+            //future多线程任务
+            //将树结构平铺成Map
+            //id唯一
+            CompletableFuture<List<DataResourceTreeVo>> cf = CompletableFuture.supplyAsync(()->{
+                List<DataResourceClassifyVo> dataResource = dataResourceFacade.getAllDataResourceTree(attrType);
+                List<DataResourceTreeVo> topTreeVos = dataResource.stream()
+                        .map(item -> item.getNodes())
+                        .flatMap(List::stream).collect(Collectors.toList());
+                return topTreeVos;
+            });
+            futureList.add(cf);
+        }
+        List<DataResourceTreeVo> result = CompletableFuture
+                .allOf(futureList.toArray(new CompletableFuture[futureList.size()]))
+                .thenApply(e -> futureList.stream().map(CompletableFuture::join).flatMap(List::stream).collect(Collectors.toList()))
+                .join();
+        convertTreeToMap(result,allTreeVosMap);
+        stopWatch.stop();
+        log.info("get data resource tree cost time:{}",stopWatch.getTotalTimeMillis());
+        return allTreeVosMap;
+    }
+
+    /**
+     * 将树结构平铺成Map
+     * id唯一 key
+     * @param topTreeVos 顶级树节点
+     * @param allTreeVosMap
+     * @return
+     */
+    private void convertTreeToMap(List<DataResourceTreeVo> topTreeVos, Map<String, DataResourceTreeVo> allTreeVosMap) {
+        for (DataResourceTreeVo topTreeVo : topTreeVos) {
+            String id = topTreeVo.getId();
+            allTreeVosMap.put(id, topTreeVo);
+            List<DataResourceTreeVo> child = topTreeVo.getChild();
+            if(CollectionUtils.isNotEmpty(child)){
+                convertTreeToMap(child, allTreeVosMap);
+                //将子级设置为null
+                topTreeVo.setChild(null);
+            }
+        }
+    }
+
+}

+ 51 - 4
dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/business/impl/ServiceAuthBusinessImpl.java

@@ -1,6 +1,11 @@
 package com.dragoninfo.dcuc.auth.auth.business.impl;
 
+import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSON;
+import com.dragoninfo.dcuc.app.entity.ApplyInfo;
+import com.dragoninfo.dcuc.app.entity.ServiceResource;
+import com.dragoninfo.dcuc.app.facade.IApplyInfoFacade;
+import com.dragoninfo.dcuc.app.facade.IServiceResourceFacade;
 import com.dragoninfo.dcuc.auth.auth.business.IServiceAuthBusiness;
 import com.dragoninfo.dcuc.auth.auth.dto.ResourceInfoDTO;
 import com.dragoninfo.dcuc.auth.auth.dto.ServiceAuthFlowDTO;
@@ -13,7 +18,10 @@ import com.dragoninfo.dcuc.auth.auth.service.IAuthFlowService;
 import com.dragoninfo.dcuc.auth.auth.service.IServiceAuthResultService;
 import com.dragoninfo.dcuc.auth.auth.service.impl.AuthFlowServiceImpl;
 import com.dragoninfo.dcuc.auth.config.DcucServiceAuthConfig;
+import com.dragoninfo.dcuc.common.entity.ApiResult;
 import com.dragoninfo.dcuc.common.http.HttpUtil;
+import com.dragoninfo.dcuc.org.entity.OrgInfo;
+import com.dragoninfo.dcuc.org.facade.IOrgInfoFacade;
 import com.dragonsoft.duceap.base.entity.http.ResponseDTO;
 import com.dragonsoft.duceap.base.entity.http.ResponseStatus;
 import com.dragonsoft.duceap.commons.util.UUIDUtils;
@@ -27,9 +35,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * @author mazq
@@ -49,6 +56,14 @@ public class ServiceAuthBusinessImpl implements IServiceAuthBusiness {
     @Autowired
     private DcucServiceAuthConfig serviceAuthConfig;
 
+    @Autowired
+    private IApplyInfoFacade applyInfoFacade;
+
+    @Autowired
+    private IServiceResourceFacade serviceResourceFacade;
+
+    @Autowired
+    private IOrgInfoFacade orgInfoFacade;
 
     @Override
     public boolean dealAuthFlowResult(WorkFlowResutlAcceptDTO dto) {
@@ -79,17 +94,49 @@ public class ServiceAuthBusinessImpl implements IServiceAuthBusiness {
      */
     @Override
     public ResponseDTO serviceAuthFlowSave(ServiceAuthFlowDTO dto) {
+        //校验应用和服务是否存在
+        ApplyInfo applyInfo = applyInfoFacade.getAppByCode(dto.getAppCode());
+        if (applyInfo == null) {
+            return ResponseDTO.fail(
+                    ResponseStatus.FAIL_CODE,String.format("应用代码 %s 不存在", dto.getAppCode()),null);
+        }
+        String serviceCodes = dto.getServiceCodes();
+        String[] serviceCodArray = serviceCodes.split(StrUtil.COMMA);
+        for (String serviceCode : serviceCodArray) {
+            ServiceResource serviceResource = serviceResourceFacade.detailByCode(serviceCode);
+            if (serviceResource == null) {
+                return ResponseDTO.fail(ResponseStatus.FAIL_CODE ,String.format("服务代码 %s 不存在", serviceCode),null);
+            }
+        }
         String flowStatus = WorkFlowStatusEnum.APPLYING.getValue();
         //生成消息id
         dto.setMessageId(UUIDUtils.getUUID());
         //先保存工作单
         dto.setFlowStatus(flowStatus);
+        //设置应用的管理单位和事权单位信息
+        String orgId = applyInfo.getOrgId();
+        String managerOrgId = applyInfo.getManagerOrgId();
+        List<OrgInfo> orgsByIds = orgInfoFacade.getOrgsByIds(String.join(StrUtil.COMMA, orgId, managerOrgId));
+        Map<String, OrgInfo> orgInfoMap = orgsByIds
+                .stream()
+                .collect(Collectors.toMap(OrgInfo::getId, item -> item, (old, laset) -> laset));
+        OrgInfo orgInfo = orgInfoMap.get(orgId);
+        OrgInfo managerOrgInfo = orgInfoMap.get(managerOrgId);
+        if(null != orgInfo){
+            dto.setAppOrgName(orgInfo.getFullName());
+            dto.setAppOrgCode(orgInfo.getCode());
+        }
+        if(null != managerOrgInfo){
+            dto.setAppManagerOrgName(managerOrgInfo.getFullName());
+            dto.setAppManagerOrgCode(managerOrgInfo.getCode());
+        }
+        //保存
         authFlowService.serviceAuthFlowSave(dto);
 
         //将工作单推送给审批服务
         ResponseDTO responseDTO = null;
         try {
-            logger.info("-------pushWorkFlowToServer STATR---------------");
+            logger.info("-------pushWorkFlowToServer START---------------");
             responseDTO = pushWorkFlowToServer(dto);
             logger.info("-------pushWorkFlowToServer END---------------");
             if(!ResponseStatus.SUCCESS_CODE.equals(responseDTO.getStatusCode())){

+ 6 - 0
dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/facade/BimBusinessFacade.java

@@ -1,5 +1,6 @@
 package com.dragoninfo.dcuc.auth.auth.facade;
 
+import com.dragoninfo.dcuc.auth.auth.vo.bim.BimUserInfoItemRespVO;
 import com.dragoninfo.dcuc.auth.business.IBimBusiness;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -30,4 +31,9 @@ public class BimBusinessFacade implements IBimBusinessFacade {
     public void cacheUserToken(String idcard, String userToken, Integer expAt) {
         bimBusiness.cacheUserToken(idcard, userToken, expAt);
     }
+
+    @Override
+    public BimUserInfoItemRespVO getUserInfoByUserToken(String userToken) {
+        return bimBusiness.getUserInfoByUserToken(userToken);
+    }
 }

+ 38 - 7
dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/facade/DataAuthFacade.java

@@ -1,10 +1,12 @@
 package com.dragoninfo.dcuc.auth.auth.facade;
 
 import com.dragoninfo.dcuc.auth.auth.business.IDataAuthBusiness;
-import com.dragoninfo.dcuc.auth.auth.dto.DataAuthDTO;
-import com.dragoninfo.dcuc.auth.auth.dto.SubDataAuthDTO;
+import com.dragoninfo.dcuc.auth.auth.dto.data.*;
 import com.dragoninfo.dcuc.auth.auth.service.IDataAuthService;
+import com.dragoninfo.dcuc.auth.auth.service.impl.DataAuthServiceImpl;
+import com.dragoninfo.dcuc.auth.auth.vo.BusResultVO;
 import com.dragonsoft.duceap.base.entity.search.SearchDTO;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
@@ -15,15 +17,18 @@ import java.util.List;
  * @author mazq
  * @date 2021/4/9
  */
+@Slf4j
 @RestController
 @RequestMapping(value = "/dcuc/auth/dataAuthFacade")
-public class DataAuthFacade implements IDataAuthFacade{
+public class DataAuthFacade implements IDataAuthFacade {
 
     @Autowired
     private IDataAuthService dataAuthService;
 
-//    @Autowired
-//    private IDataAuthBusiness dataAuthBusiness;
+    @Autowired
+    private IDataAuthBusiness dataAuthBusiness;
+
+    private static final String[] dataResourceClassifyLable = new String[]{DataAuthServiceImpl.dataLabelOneCodeStr,DataAuthServiceImpl.dataLabelTwoCodeStr,DataAuthServiceImpl.dataLabelThreeCodeStr,DataAuthServiceImpl.dataLabelFourCodeStr,DataAuthServiceImpl.dataLabelFiveCodeStr};
 
     @Override
     public DataAuthDTO dataAuthAdd(DataAuthDTO dataAuthDTO) {
@@ -56,8 +61,34 @@ public class DataAuthFacade implements IDataAuthFacade{
     }
 
     @Override
-    public SubDataAuthDTO getSubDataAuth(String subId, String subType, String authType) {
-        return dataAuthService.getSubDataAuth(subId,subType,authType);
+    public List<DataClassifyDTO> getSubDataAuth(SubDataAuthQueryDTO queryDTO) {
+        return dataAuthBusiness.getSubDataAuth(queryDTO);
+    }
+
+    @Override
+    public List<DataClassifyDTO> userDataAuthInfoByUserId(String userId, String authType) {
+        return dataAuthBusiness.userDataAuthInfoByUserId(userId, authType);
+    }
+
+    @Override
+    public List<DataClassifyDTO> userDataAuthInfoByIdcard(String idcard, String authType) {
+        return dataAuthBusiness.userDataAuthInfoByIdcard(idcard, authType);
+    }
+
+    @Override
+    public List<DataClassifyDTO> subDataAuthList(List<SubDataAuthQueryDTO> dtos) {
+        return dataAuthBusiness.getSubDataAuthList(dtos);
+    }
+
+    @Override
+    public BusResultVO dataDetailList(SearchDTO searchDTO) {
+        return dataAuthService.dataDetailList(searchDTO);
     }
 
+    @Override
+    public List<DataResourceDTO> userDataTreeByIdcard(String idcard, String authType) {
+        return dataAuthBusiness.userDataTreeByIdcard(idcard, authType);
+    }
+
+
 }

+ 5 - 0
dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/facade/ServiceAuthFacade.java

@@ -97,4 +97,9 @@ public class ServiceAuthFacade implements IServiceAuthFacade {
     public Object serviceAuthentication(String appCode){
         return authResultService.serviceAuthentication(appCode);
     }
+
+    @Override
+    public boolean checkApplicantId(String applicantId) {
+        return authFlowService.checkApplicantId(applicantId);
+    }
 }

+ 6 - 1
dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/facade/ServiceAuthResultFacade.java

@@ -20,7 +20,7 @@ import java.util.List;
  **/
 @RestController
 @RequestMapping(value = "/dcuc/auth/serviceAuthResultFacade")
-public class ServiceAuthResultFacade implements IServiceAuthResultFacade{
+public class ServiceAuthResultFacade implements IServiceAuthResultFacade {
 
     @Autowired
     private IServiceAuthResultService serviceAuthResultService;
@@ -90,4 +90,9 @@ public class ServiceAuthResultFacade implements IServiceAuthResultFacade{
     public ServiceAuthResultDTO getDetailByAppAndService(String appCode, String serviceCode) {
         return serviceAuthResultService.getDetailByAppAndService( appCode, serviceCode);
     }
+
+    @Override
+    public Page<ServiceAuthResultDTO> serviceResultPageJoinFlow(SearchDTO searchDTO) {
+        return serviceAuthResultService.serviceResultPageJoinFlow(Searchable.toSearchable(searchDTO));
+    }
 }

+ 53 - 0
dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/facade/api/ApiDataAuthFacade.java

@@ -0,0 +1,53 @@
+package com.dragoninfo.dcuc.auth.auth.facade.api;
+
+import com.dragoninfo.dcuc.auth.auth.api.IApiDataAuthFacade;
+import com.dragoninfo.dcuc.auth.auth.dto.DataItemsCheckDto;
+import com.dragoninfo.dcuc.auth.auth.dto.DataItemsDto;
+import com.dragoninfo.dcuc.auth.auth.service.IDataAuthService;
+import com.dragonsoft.duceap.base.entity.http.ResponseDTO;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 代码千万行,注释第一行,编码不规范,同事两行泪
+ *
+ * @author huang(jy)
+ * @version 1.0
+ * @date 2021/4/15 10:28
+ */
+@RestController
+public class ApiDataAuthFacade implements IApiDataAuthFacade {
+
+
+    @Autowired
+    private IDataAuthService dataAuthService;
+
+    /**
+     * 查询是否拥有数据项权限接口
+     * @return
+     */
+    @Override
+    public ResponseDTO dataItemsCheck(DataItemsCheckDto dataItemsCheckDto) {
+        String msg = checkParam(dataItemsCheckDto);
+        if (StringUtils.isNotBlank(msg)){
+            return  ResponseDTO.fail(msg, (Object) null);
+        }
+        return dataAuthService.dataItemsCheck(dataItemsCheckDto);
+    }
+
+    private String checkParam(DataItemsCheckDto dataItemsCheckDto) {
+        String msg = "";
+        if (StringUtils.isBlank(dataItemsCheckDto.getIdcard())){
+            return "身份证号码不能为空";
+        }
+        for (int i = 0; i < dataItemsCheckDto.getDataItemsDtoList().size(); i++) {
+            DataItemsDto dataItemsDto = dataItemsCheckDto.getDataItemsDtoList().get(i);
+            if (StringUtils.isBlank(dataItemsDto.getDataItemCode()) || StringUtils.isBlank(dataItemsDto.getResourceCode())){
+                msg += "第" + (i + 1) + "项的数据资源标识符或数据项标识符不允许为空!";
+                break;
+            }
+        }
+        return msg;
+    }
+}

+ 7 - 0
dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/service/IAuthFlowService.java

@@ -57,4 +57,11 @@ public interface IAuthFlowService {
      * @return
      */
     List<ServiceAuthFlow> getByFlowIds(List<String> flowIds);
+
+    /**
+     * 校验申请单id
+     * @param applicantId
+     * @return
+     */
+    boolean checkApplicantId(String applicantId);
 }

+ 23 - 0
dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/service/IBusService.java

@@ -0,0 +1,23 @@
+package com.dragoninfo.dcuc.auth.auth.service;
+
+import com.dragoninfo.dcuc.auth.auth.vo.BusResultVO;
+
+import java.util.Map;
+
+/**
+ * 代码千万行,注释第一行,编码不规范,同事两行泪
+ *
+ * @author huang(jy)
+ * @version 1.0
+ * @date 2021/4/15 18:51
+ */
+public interface IBusService {
+    /**
+     * 数据资源目录列表查询接口
+     * @param param
+     * @param currentIdcard
+     * @return
+     */
+    BusResultVO resourceDataItemsQuery(Map<String, Object> param, String currentIdcard);
+
+}

+ 18 - 7
dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/service/IDataAuthService.java

@@ -1,7 +1,12 @@
 package com.dragoninfo.dcuc.auth.auth.service;
 
-import com.dragoninfo.dcuc.auth.auth.dto.DataAuthDTO;
-import com.dragoninfo.dcuc.auth.auth.dto.SubDataAuthDTO;
+import com.dragoninfo.dcuc.auth.auth.dto.data.DataAuthDTO;
+import com.dragoninfo.dcuc.auth.auth.dto.DataItemsCheckDto;
+import com.dragoninfo.dcuc.auth.auth.dto.data.SubDataAuthDTO;
+import com.dragoninfo.dcuc.auth.auth.vo.BusResultVO;
+import com.dragonsoft.duceap.base.entity.http.ResponseDTO;
+import com.dragonsoft.duceap.base.entity.http.ResponseStatus;
+import com.dragoninfo.dcuc.auth.auth.dto.data.SubDataAuthQueryDTO;
 import com.dragonsoft.duceap.base.entity.search.SearchDTO;
 
 import java.util.List;
@@ -56,11 +61,17 @@ public interface IDataAuthService {
     boolean subDataAuthAdd(SubDataAuthDTO subDataAuthDTO);
 
     /**
-     * 获取主体所有数据权限
-     * @param subId  主体id
-     * @param subType 主体类型 ORG:机构 USER:人员  BUSINESS:业务域
-     * @param auhType 权限资源类型  权限类型 TABLE:表 COLUMN:列  ALL:公开
+     * 批量获取主体数据权限
+     * @param list
      * @return
      */
-    SubDataAuthDTO getSubDataAuth(String subId, String subType, String auhType);
+    List<DataAuthDTO> getSubDataAuthList(List<SubDataAuthQueryDTO> list);
+
+    /**
+     * 查询是否拥有数据项权限接口
+     * @return
+     */
+    ResponseDTO dataItemsCheck(DataItemsCheckDto dataItemsCheckDto);
+
+    BusResultVO dataDetailList(SearchDTO searchDTO);
 }

+ 7 - 0
dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/service/IServiceAuthResultService.java

@@ -119,4 +119,11 @@ public interface IServiceAuthResultService {
     void setAuthtionResultToRedis(String appCode, List<ServiceAuthenticationResVO> serviceCodes);
 
     ServiceAuthResultDTO getDetailByAppAndService(String appCode, String serviceCode);
+
+    /**
+     * 服务授权结果-分页查询
+     * @param toSearchable
+     * @return
+     */
+    Page<ServiceAuthResultDTO> serviceResultPageJoinFlow(Searchable toSearchable);
 }

+ 10 - 0
dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/service/impl/AuthFlowServiceImpl.java

@@ -109,4 +109,14 @@ public class AuthFlowServiceImpl implements IAuthFlowService {
         return serviceAuthFlowBPO.find(ServiceAuthFlow.class, searchable);
     }
 
+    /**
+     * 校验申请单id
+     * @param applicantId
+     * @return
+     */
+    @Override
+    public boolean checkApplicantId(String applicantId){
+        return serviceAuthFlowBPO.checkApplicantId(applicantId);
+    }
+
 }

+ 151 - 0
dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/service/impl/BusService.java

@@ -0,0 +1,151 @@
+package com.dragoninfo.dcuc.auth.auth.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.dragoninfo.dcuc.auth.auth.service.IBusService;
+import com.dragoninfo.dcuc.auth.auth.vo.BusResultVO;
+import com.dragoninfo.dcuc.auth.auth.vo.ResourceCatalogItemVO;
+import com.dragoninfo.dcuc.auth.auth.vo.ResourceCatalogVO;
+import com.dragoninfo.dcuc.auth.config.DcucAuthBusConfig;
+import com.dragoninfo.dcuc.common.http.HttpUtil;
+import com.dragonsoft.duceap.base.exception.ApplicationException;
+import com.dragonsoft.duceap.commons.util.string.StringUtils;
+import com.dragonsoft.duceap.core.context.ContextUtils;
+import net.sf.json.JSONObject;
+import org.apache.http.Header;
+import org.apache.http.message.BasicHeader;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 代码千万行,注释第一行,编码不规范,同事两行泪
+ * 总线调用service
+ *
+ * @author huang(jy)
+ * @version 1.0
+ * @date 2021/4/15 11:23
+ */
+@Service
+public class BusService implements IBusService {
+
+    Logger logger = LoggerFactory.getLogger(BusService.class);
+
+    @Autowired
+    DcucAuthBusConfig dcucAuthBusConfig;
+
+    /**
+     * 用户令牌headerKey
+     */
+    public static final String headerUserTokenStr = "userToken";
+    /**
+     * 应用令牌headerKey
+     */
+    public static final String headerAppTokenStr = "appToken";
+
+    /**
+     * 数据资源目录列表查询接口
+     * @param param
+     * @param currentIdcard
+     * @return
+     */
+    @Override
+    public BusResultVO resourceDataItemsQuery(Map<String, Object> param, String currentIdcard) {
+        String result = baseQuery(dcucAuthBusConfig.getResourceUrl(), param, dcucAuthBusConfig.getBusServiceFunc(), currentIdcard);
+        //指定对象。否则在JSONObject转换时会报错
+        Map<String,Class<?>> classMap = new HashMap<String,Class<?>>();
+        classMap.put("dataList", ResourceCatalogVO.class);
+        classMap.put("dataItems", ResourceCatalogItemVO.class);
+        JSONObject jsonObject = JSONObject.fromObject(result);
+        BusResultVO busResultVO = (BusResultVO)JSONObject.toBean(jsonObject, BusResultVO.class, classMap);
+        return busResultVO;
+    }
+
+    /**
+     * 基础查询
+     * @param url
+     * @param param
+     * @return
+     */
+    public String baseQuery(String url, Map<String, Object> param, String busServiceFunc, String currentIdcard) {
+        String response = "";
+        logger.info("baseQuery >> 当前登录人身份证号currentIdcard:{}, ContextUtils.getUserInfo():{}", currentIdcard, JSON.toJSONString(ContextUtils.getUserInfo()));
+        //获取当前登录人身份证号
+        String busSreIdcard = StringUtils.isNotBlank(currentIdcard) ? currentIdcard : ContextUtils.getUserInfo().getId();
+        // 构建header
+        String busSraId = dcucAuthBusConfig.getBusSraId();
+        String busServiceId = dcucAuthBusConfig.getBusServiceId();
+        try{
+            List<Header> heards = getHeaders(busSraId, busSreIdcard, busServiceId, busServiceFunc);
+            logger.info("baseQuery >> url:{}, busSraId:{}, busServiceId:{}, busServiceFunc:{}, busSreIdcard:{}",
+                    url, busSraId, busServiceId, busServiceFunc, busSreIdcard);
+            long startTime = System.currentTimeMillis();
+            logger.info("开始======请求总线接口:【{}】", startTime);
+            response = HttpUtil.postJSON(url, JSON.toJSONString(param), heards, null);
+            logger.info("结束======请求总线接口耗时:【{}】", (System.currentTimeMillis() -startTime));
+        }catch (Exception e){
+            logger.info("调用总线接口异常:busSraId:【{}】,busSreIdcard:【{}】,busServiceId:【{}】,busServiceFunc:【{}】,url:【{}】", busSraId, busSreIdcard, busServiceId, busServiceFunc, url);
+            throw new ApplicationException("调用总线接口异常:" + e.getMessage());
+        }
+        if (StringUtils.isBlank(response)){
+            logger.info("调用总线接口失败:返回结果:【{}】", response);
+            throw new ApplicationException("调用总线接口失败,返回结果为空");
+        }
+        JSONObject jsonObject = JSONObject.fromObject(response);
+        if (!"000".equals(jsonObject.get("code"))){
+            logger.info("调用总线接口失败:返回结果:【{}】", response);
+            throw new ApplicationException("调用总线接口失败:" + jsonObject.get("message"));
+        }
+        return  response;
+
+    }
+
+
+    /**
+     * 构建请求头
+     *
+     * @param busSraId
+     * @param busSreIdcard
+     * @param busServiceId
+     * @param busServiceFunc
+     * @return
+     */
+    private List<Header> getHeaders(String busSraId, String busSreIdcard, String busServiceId, String busServiceFunc) {
+        logger.info("getHeaders >>> busSraId:{},busSreIdcard:{},busServiceId:{},busServiceFunc:{}",
+                busSraId, busSreIdcard, busServiceId, busServiceFunc);
+        List<Header> heardList = new ArrayList<>();
+        Header busSraIdHeader = new BasicHeader("bus_sra_id", busSraId);
+        Header busSreIdHeader = new BasicHeader("bus_sre_idcard", busSreIdcard);
+        Header serviceIdHeader = new BasicHeader("bus_service_id", busServiceId);
+        Header busServiceFuncHeader = new BasicHeader("bus_service_func", busServiceFunc);
+        Header userTokenHeader = new BasicHeader("bus_sre_token", getHeaderParam(headerUserTokenStr));
+        Header appTokenHeader = new BasicHeader("bus_sra_token", getHeaderParam(headerAppTokenStr));
+        heardList.add(busSraIdHeader);
+        heardList.add(busSreIdHeader);
+        heardList.add(serviceIdHeader);
+        heardList.add(busServiceFuncHeader);
+        heardList.add(userTokenHeader);
+        heardList.add(appTokenHeader);
+        return heardList;
+    }
+
+    /**
+     * 从请求头或者参数中获取信息
+     * @param headerKey
+     * @return
+     */
+    public String getHeaderParam(String headerKey){
+        HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest();
+        String headerValue = request.getHeader(headerKey);
+        return headerValue;
+    }
+
+}

+ 512 - 57
dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/service/impl/DataAuthServiceImpl.java

@@ -1,35 +1,135 @@
 package com.dragoninfo.dcuc.auth.auth.service.impl;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.TypeReference;
 import com.dragoninfo.dcuc.auth.auth.bpo.DataAuthBPO;
-import com.dragoninfo.dcuc.auth.auth.dto.DataAuthDTO;
-import com.dragoninfo.dcuc.auth.auth.dto.SubDataAuthDTO;
-import com.dragoninfo.dcuc.auth.auth.dto.SubDataDTO;
+import com.dragoninfo.dcuc.auth.auth.business.IDataAuthBusiness;
+import com.dragoninfo.dcuc.auth.auth.dto.*;
+import com.dragoninfo.dcuc.auth.auth.dto.data.*;
 import com.dragoninfo.dcuc.auth.auth.entity.DataAuth;
+import com.dragoninfo.dcuc.auth.auth.enumresources.YesNotEnum;
+import com.dragoninfo.dcuc.auth.auth.service.IBusService;
 import com.dragoninfo.dcuc.auth.auth.service.IDataAuthService;
+import com.dragoninfo.dcuc.auth.auth.vo.BusResultVO;
+import com.dragoninfo.dcuc.auth.auth.vo.ResourceCatalogItemVO;
+import com.dragoninfo.dcuc.auth.auth.vo.ResourceCatalogVO;
+import com.dragoninfo.dcuc.user.user.entity.UserInfo;
+import com.dragoninfo.dcuc.user.user.facade.IUserFacade;
+import com.dragonsoft.duceap.base.entity.http.ResponseDTO;
 import com.dragonsoft.duceap.base.entity.search.SearchDTO;
+import com.dragonsoft.duceap.base.entity.security.BaseSecurityUser;
 import com.dragonsoft.duceap.base.enums.BooleanEnum;
 import com.dragonsoft.duceap.base.utils.UserContextUtils;
+import com.dragonsoft.duceap.commons.util.MapUtils;
+import com.dragonsoft.duceap.commons.util.collections.CollectionUtils;
+import com.dragonsoft.duceap.core.context.ContextUtils;
 import com.dragonsoft.duceap.core.search.Searchable;
 import com.dragonsoft.duceap.core.search.enums.SearchOperator;
+import com.dragonsoft.duceap.core.search.filter.Condition;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.StopWatch;
 
+import java.lang.reflect.Method;
 import java.util.*;
 import java.util.stream.Collectors;
 
 /**
  * 数据权限serviceImpl
+ *
  * @author mazq
  * @date 2021/4/9
  */
+@Slf4j
 @Service
 public class DataAuthServiceImpl implements IDataAuthService {
 
+
+
     @Autowired
     private DataAuthBPO dataAuthBPO;
 
+    @Autowired
+    private IBusService busService;
+    @Autowired
+    private IDataAuthBusiness dataAuthBusiness;
+    @Autowired
+    private IUserFacade userFacade;
+
+
+    /**
+     * 字段分类字符串
+     */
+    public static final String columnClassifyStr = "columnClassify";
+    /**
+     * 安全等级字符串
+     */
+    public static final String dataSecurityLevelStr = "dataSecurityLevel";
+    /**
+     * 数据组织一级分类代码
+     */
+    public static final String dataClassifyOneCodeStr = "RESOURCE_SJZZYJFL";
+    /**
+     * 数据组织二级分类代码
+     */
+    public static final String dataClassifyTwoCodeStr = "RESOURCE_SJZZEJFL";
+    /**
+     * 数据标签1代码
+     */
+    public static final String dataLabelOneCodeStr = "RESOURCE_SJZYBQ1";
+    /**
+     * 数据标签2代码
+     */
+    public static final String dataLabelTwoCodeStr = "RESOURCE_SJZYBQ2";
+    /**
+     * 数据标签3代码
+     */
+    public static final String dataLabelThreeCodeStr = "RESOURCE_SJZYBQ3";
+    /**
+     * 数据标签4代码
+     */
+    public static final String dataLabelFourCodeStr = "RESOURCE_SJZYBQ4";
+    /**
+     * 数据标签5代码
+     */
+    public static final String dataLabelFiveCodeStr = "RESOURCE_SJZYBQ5";
+    /**
+     * 数据组织类型数组(按顺序。数据标签1-5为同级)
+     */
+    public static final String[] dataStrArr = new String[]{dataClassifyOneCodeStr, dataClassifyTwoCodeStr, dataLabelOneCodeStr, dataLabelTwoCodeStr, dataLabelThreeCodeStr, dataLabelFourCodeStr, dataLabelFiveCodeStr};
+    /**
+     * 数据分级
+     */
+    public static final String dataLevelStr = "DATA_LEVEL";
+    /**
+     * 数组资源分类对应实体属性key数组
+     */
+    private volatile LinkedHashMap<String, String> dataMap = new LinkedHashMap<>();
+
+    /**
+     * 字段一级分类
+     */
+    public static final String columnOneClassifyStr = "LEVEL_1_COLUMN_CLASSIFY";
+    /**
+     * 字段二级分类
+     */
+    public static final String columnTwoClassifyStr = "LEVEL_2_COLUMN_CLASSIFY";
+    /**
+     * 数据安全级别
+     */
+    public static final String dataSecurityLevelTypeStr = "DATA_SECURITY_LEVEL";
+
+    /**
+     * codeDataTypeStr分隔符
+     */
+    public static final String CODE_DATA_TYPE_SEPARATOR = "\\|";
+
+    private static final String[] dataResourceClassifyLable = new String[]{dataLabelOneCodeStr,dataLabelTwoCodeStr,dataLabelThreeCodeStr,dataLabelFourCodeStr,dataLabelFiveCodeStr};
+
     @Override
     public DataAuthDTO add(DataAuthDTO dataAuthDTO) {
         String userId = UserContextUtils.getCurrentUser().getId();
@@ -37,7 +137,7 @@ public class DataAuthServiceImpl implements IDataAuthService {
         Date date = new Date();
         dataAuthDTO.setCreateUser(userId);
         dataAuthDTO.setCreateTime(date);
-        BeanUtils.copyProperties(dataAuthDTO,dataAuth);
+        BeanUtils.copyProperties(dataAuthDTO, dataAuth);
         dataAuthBPO.save(dataAuth);
         dataAuthDTO.setId(dataAuth.getId());
         return dataAuthDTO;
@@ -51,7 +151,7 @@ public class DataAuthServiceImpl implements IDataAuthService {
         dataAuth.setDeleteTime(new Date());
         dataAuth.setDeleteUser(userId);
         DataAuthDTO dto = new DataAuthDTO();
-        BeanUtils.copyProperties(dataAuth,dto);
+        BeanUtils.copyProperties(dataAuth, dto);
         return dto;
     }
 
@@ -59,14 +159,14 @@ public class DataAuthServiceImpl implements IDataAuthService {
     public DataAuthDTO get(String id) {
         DataAuthDTO dataAuthDTO = new DataAuthDTO();
         DataAuth dataAuth = dataAuthBPO.get(id);
-        BeanUtils.copyProperties(dataAuth,dataAuthDTO);
+        BeanUtils.copyProperties(dataAuth, dataAuthDTO);
         return dataAuthDTO;
     }
 
     @Override
     public boolean update(DataAuthDTO dataAuthDTO) {
         DataAuth dataAuth = new DataAuth();
-        BeanUtils.copyProperties(dataAuthDTO,dataAuth);
+        BeanUtils.copyProperties(dataAuthDTO, dataAuth);
         dataAuthBPO.update(dataAuth);
         return true;
     }
@@ -74,7 +174,6 @@ public class DataAuthServiceImpl implements IDataAuthService {
     @Override
     public List<DataAuthDTO> search(SearchDTO searchDTO) {
         Searchable searchable = Searchable.toSearchable(searchDTO);
-        searchable.addSearchFilter("deleted",SearchOperator.eq,BooleanEnum.FALSE.getValue());
         List<DataAuth> dataAuths = dataAuthBPO.find(DataAuth.class, searchable);
         List<DataAuthDTO> dtos = convertToDTOS(dataAuths);
         return dtos;
@@ -82,88 +181,444 @@ public class DataAuthServiceImpl implements IDataAuthService {
 
     private List<DataAuthDTO> convertToDTOS(List<DataAuth> dataAuths) {
         return dataAuths.stream().map(item -> {
-                DataAuthDTO dto = new DataAuthDTO();
-                BeanUtils.copyProperties(item, dto);
-                return dto;
-            }).collect(Collectors.toList());
+            DataAuthDTO dto = new DataAuthDTO();
+            BeanUtils.copyProperties(item, dto);
+            return dto;
+        }).collect(Collectors.toList());
     }
 
+    @Transactional(rollbackFor = RuntimeException.class)
     @Override
     public boolean subDataAuthAdd(SubDataAuthDTO subDataAuthDTO) {
-        String userId = UserContextUtils.getCurrentUser().getId();
+        List<SubDataDTO> subDataList = subDataAuthDTO.getDataAuthList();
+        //过滤哪些权限需要删除,哪些权限需要新增
         Date date = new Date();
         String subId = subDataAuthDTO.getSubId();
         String subType = subDataAuthDTO.getSubType();
-        List<SubDataDTO> dataAuthList = subDataAuthDTO.getDataAuthList();
-        //过滤哪些权限需要删除,哪些权限需要新增
-        List<DataAuth> existDataAuths = getDataAuthsBySub(subId, subType, null);
+        String authType = subDataAuthDTO.getAuthType();
+        String userId = null;
+        BaseSecurityUser currentUser = UserContextUtils.getCurrentUser();
+        if (null != currentUser) {
+            userId = currentUser.getId();
+        }
+        //传入权限为空时
+        //删除该主体下所有的权限
+        List<DataAuth> existDataAuths = getDataAuthsBySub(subId, subType, authType);
+        if (CollectionUtils.isEmpty(subDataList)) {
+            delDataAuthList(date, userId, existDataAuths);
+            return true;
+        }
         Set<String> existSet = existDataAuths.stream()
-                .map(item -> item.getDataCode() +";"+ item.getDataType() + ";" + item.getAuthType())
+                .map(item -> item.getDataId() + ";" + item.getDataType())
+                .collect(Collectors.toSet());
+        Set<String> lastSet = subDataList.stream()
+                .map(item -> item.getDataId() + ";" + item.getDataType())
                 .collect(Collectors.toSet());
-        Set<String> lastSet = dataAuthList.stream()
-                .map(item -> {
-                    String dataType = item.getDataType();
-                    List<String> dataCodes = item.getDataCodes();
-                    String authType = item.getAuthType();
-                    dataCodes.forEach(code -> code =code+ ";" + dataType + ";" + authType);
-                    return dataCodes;
-        }).flatMap(List::stream).collect(Collectors.toSet());
         Set<String> addCollect = lastSet.stream().filter(s -> !existSet.contains(s)).collect(Collectors.toSet());
         Set<String> delCollect = existSet.stream().filter(s -> !lastSet.contains(s)).collect(Collectors.toSet());
         //新增
-        for (String codeType : addCollect) {
-            String[] arr = codeType.split(";");
+        List<SubDataDTO> addList = subDataList.stream()
+                .filter(item -> addCollect.contains(item.getDataId() + ";" + item.getDataType()))
+                .collect(Collectors.toList());
+        addDataAuthList(date, subId, subType, authType, userId, addList);
+        //删除
+        List<DataAuth> delList = existDataAuths.stream()
+                .filter(item -> delCollect.contains(item.getDataId() + ";" + item.getDataType()))
+                .collect(Collectors.toList());
+        delDataAuthList(date, userId, delList);
+        return true;
+    }
+
+    private void addDataAuthList(Date date, String subId, String subType, String authType, String userId, List<SubDataDTO> addList) {
+        for (SubDataDTO dto : addList) {
             DataAuth dataAuth = new DataAuth();
-            dataAuth.setDataCode(arr[0]);
-            dataAuth.setDataType(arr[1]);
+            dataAuth.setDataCode(dto.getDataCode());
+            dataAuth.setDataType(dto.getDataType());
+            dataAuth.setClassifyCode(dto.getClassifyCode());
+            dataAuth.setDataId(dto.getDataId());
             dataAuth.setCreateUser(userId);
             dataAuth.setCreateTime(date);
             dataAuth.setSubId(subId);
             dataAuth.setSubType(subType);
-            dataAuth.setAuthType(arr[2]);
+            dataAuth.setAuthType(authType);
+            dataAuth.setDeleted(YesNotEnum.NO.getValue());
             dataAuthBPO.save(dataAuth);
         }
-        //删除
-        List<DataAuth> delList = existDataAuths.stream()
-                .filter(item -> delCollect.contains(item.getDataCode() + ";" + item.getDataType()))
-                .collect(Collectors.toList());
+    }
+
+    private void delDataAuthList(Date date, String userId, List<DataAuth> delList) {
         for (DataAuth dataAuth : delList) {
             dataAuth.setDeleteUser(userId);
             dataAuth.setDeleteTime(date);
             dataAuth.setDeleted(BooleanEnum.TRUE.getValue());
             dataAuthBPO.update(dataAuth);
         }
-        return true;
     }
 
-    public List<DataAuth> getDataAuthsBySub(String subId, String subType,String authType) {
+    @Override
+    public List<DataAuthDTO> getSubDataAuthList(List<SubDataAuthQueryDTO> list) {
+        //批量主体查询
+        List<DataAuth> result = new ArrayList<>();
+        //多次查询和concat(subId,subType)查询选用
+        //如果查询太慢应该拼接subId_subType作为冗余字段建立索引
+        StopWatch stopWatch = new StopWatch();
+        stopWatch.start("getSubDataAuthList");
+        for (SubDataAuthQueryDTO dto : list) {
+            List<DataAuth> dataAuths = getDataAuthsBySub(dto.getSubId(), dto.getSubType(), dto.getAuthType());
+            result.addAll(dataAuths);
+        }
+        stopWatch.stop();
+        log.info("getSubDataAuthList cost time:{}",stopWatch.getTotalTimeMillis());
+        //去除重复的数据全资源
+        result = result.stream()
+                .collect(
+                        Collectors.collectingAndThen(
+                                Collectors.toCollection(
+                                        () -> new TreeSet<>(
+                                                Comparator.comparing(da -> da.getDataId() + ";" + da.getDataType())
+                                        )
+                                )
+                                , ArrayList::new)
+                );
+        return convertToDTOS(result);
+    }
+
+    private List<DataAuth> getDataAuthsBySub(String subId, String subType, String authType) {
         Searchable searchable = Searchable.newSearchable();
-        searchable.addSearchFilter("subId", SearchOperator.eq,subId);
-        searchable.addSearchFilter("subType", SearchOperator.eq,subType);
-        searchable.addSearchFilter("deleted",SearchOperator.eq, BooleanEnum.FALSE.getValue());
-        if(StringUtils.isNotBlank(authType)){
-            searchable.addSearchFilter("authType",SearchOperator.eq,authType);
+        searchable.addSearchFilter("subId", SearchOperator.eq, subId);
+        searchable.addSearchFilter("subType", SearchOperator.eq, subType);
+        searchable.addSearchFilter("deleted", SearchOperator.eq, BooleanEnum.FALSE.getValue());
+        if (StringUtils.isNotBlank(authType)) {
+            searchable.addSearchFilter("authType", SearchOperator.eq, authType);
         }
         return dataAuthBPO.find(DataAuth.class, searchable);
     }
 
+
+    /**
+     * 查询是否拥有数据项权限接口
+     *
+     * @return
+     */
+    @Override
+    public ResponseDTO dataItemsCheck(DataItemsCheckDto dataItemsCheckDto) {
+        initDataMap();
+        UserInfo userInfo = userFacade.detailBySfzh(dataItemsCheckDto.getIdcard());
+        if (userInfo == null){
+            return  ResponseDTO.fail("用户不存在", (Object) null);
+        }
+        //获取用户所有的数据分级分类
+        List<DataClassifyDTO> dataClassifyDTOList = dataAuthBusiness.userDataAuthInfoByUser(userInfo);
+        if (CollectionUtils.isNotEmpty(dataClassifyDTOList)){
+            Map<String, List<String>> listMap = new HashMap<>();
+            LinkedHashMap<String, List<String>> dataListMap = new LinkedHashMap<>();
+            List<String> dataStrList = Arrays.asList(dataStrArr);
+
+            for (DataClassifyDTO dataClassifyDTO : dataClassifyDTOList) {
+                for (SubDataDTO subDataDTO : dataClassifyDTO.getTickedDatas()) {
+                    //获取每个类型对应的code数组
+                    listMap = buildDataCodeMap(subDataDTO, listMap);
+                    //数据资源分类需要构建父级的code数组
+                    if (dataStrList.contains(subDataDTO.getDataType())) {
+                        dataListMap = buildDataParentCodeMap(subDataDTO, dataListMap);
+
+                    }
+                }
+            }
+            //先获取每个数据标识符下的数据项
+            for (DataItemsDto dataItemsDto : dataItemsCheckDto.getDataItemsDtoList()) {
+                try {
+                    //数据项的分类代码、安全等级
+                    getDataItemClassify(dataItemsDto, listMap, dataListMap, dataItemsCheckDto.getCurrentIdcard());
+                } catch (Exception e) {
+                    return  ResponseDTO.fail(e.getMessage(), (Object) null);
+                }
+            }
+        }
+        return ResponseDTO.newInstance(dataItemsCheckDto.getDataItemsDtoList());
+    }
+
+
+
     @Override
-    public SubDataAuthDTO getSubDataAuth(String subId, String subType,String authType) {
-        List<DataAuth> dataAuths = getDataAuthsBySub(subId, subType,authType);
-        List<SubDataDTO> subDataList = new ArrayList<>();
-        SubDataAuthDTO subDataAuthDTO = new SubDataAuthDTO(subId,subType);
-        Map<String, List<DataAuth>> map = dataAuths.stream().collect(Collectors.groupingBy(DataAuth::getDataType));
-        for (Map.Entry<String, List<DataAuth>> entry : map.entrySet()) {
-            String dataType = entry.getKey();
-            List<DataAuth> dataAuthList = entry.getValue();
-            List<String> codes = dataAuthList.stream().map(item -> item.getDataCode()).collect(Collectors.toList());
-            SubDataDTO subDataDTO = new SubDataDTO();
-            subDataDTO.setDataType(dataType);
-            subDataDTO.setDataCodes(codes);
-            subDataList.add(subDataDTO);
-        }
-        subDataAuthDTO.setDataAuthList(subDataList);
-        return subDataAuthDTO;
+    public BusResultVO dataDetailList(SearchDTO searchDTO) {
+        DataDetailQueryDTO queryDTO = new DataDetailQueryDTO();
+        queryDTO.setPage(Integer.valueOf(searchDTO.getPage()) + 1);
+        queryDTO.setPageSize(Integer.valueOf(searchDTO.getSize()));
+        DataDetailConditionDTO condition = new DataDetailConditionDTO();
+        Searchable searchable = Searchable.toSearchable(searchDTO);
+        Condition resourceNameCondition = searchable.getSearchFilter("resourceName", SearchOperator.like);
+        if (resourceNameCondition != null && resourceNameCondition.getValue() != null){
+            condition.setResourceName(String.valueOf(resourceNameCondition.getValue()));
+        }
+        Condition codeDataTypeStrCondition = searchable.getSearchFilter("codeDataTypeStr", SearchOperator.eq);
+        if (codeDataTypeStrCondition != null && codeDataTypeStrCondition.getValue() != null){
+            String resourceTypes = String.valueOf(codeDataTypeStrCondition.getValue());
+            String[] resourceTypesArr = resourceTypes.split(CODE_DATA_TYPE_SEPARATOR);
+            List<ResourceTypeQueryDTO> resourceTypesList = new ArrayList<>();
+            ResourceTypeQueryDTO resourceTypeQueryDTO = new ResourceTypeQueryDTO();
+            resourceTypeQueryDTO.setCodeValue(resourceTypesArr[1]);
+            List<String> list = Arrays.asList(dataResourceClassifyLable);
+            if (resourceTypesArr.length >= 3 && !list.contains(resourceTypesArr[2])){
+                resourceTypeQueryDTO.setTypeCode(resourceTypesArr[2]);
+            }
+            resourceTypesList.add(resourceTypeQueryDTO);
+            condition.setResourceTypes(resourceTypesList);
+
+        }
+        if(resourceNameCondition != null || codeDataTypeStrCondition != null){
+            queryDTO.setCondition(condition);
+        }
+        String query = JSON.toJSONString(queryDTO);
+        log.info("dataDetailList >> query:{}", query);
+        BusResultVO resultVO = busService.resourceDataItemsQuery(JSON.parseObject(query, new TypeReference<Map<String,Object>>(){{}}), "");
+
+        String idcard = ContextUtils.getUserInfo() == null ? "" : ContextUtils.getUserInfo().getIdcard();
+
+
+        Condition idcardCondition = searchable.getSearchFilter("idcard", SearchOperator.eq);
+        if (idcardCondition != null && idcardCondition.getValue() != null){
+            idcard = String.valueOf(idcardCondition.getValue());
+        }
+        List<DataClassifyDTO> dataClassifyDTOList = dataAuthBusiness.userDataAuthInfoByIdcard(idcard, null);
+            Map<String, List<String>> listMap = new HashMap<>();
+
+            for (DataClassifyDTO dataClassifyDTO : dataClassifyDTOList) {
+                for (SubDataDTO subDataDTO : dataClassifyDTO.getTickedDatas()) {
+                    //获取每个类型对应的code数组
+                    listMap = buildDataCodeMap(subDataDTO, listMap);
+                }
+            }
+            for (ResourceCatalogVO resourceCatalogVO:resultVO.getResultData().getDataList()){
+                List<ResourceCatalogItemVO> list = new ArrayList<>();
+                for (ResourceCatalogItemVO resourceCatalogItemVO: resourceCatalogVO.getDataItems()){
+                    ResourceCatalogVO catalogItemVO = new ResourceCatalogVO();
+                    BeanUtils.copyProperties(resourceCatalogVO, catalogItemVO);
+                    DataItemsDto dataItemsDto = new DataItemsDto();
+                    dataItemsDto.setDataItemCode(resourceCatalogItemVO.getDataItemCode());
+                    dataItemsDto.setResourceCode(resourceCatalogVO.getResourceCode());
+                    Boolean isAuth = buildColumnAuth(catalogItemVO, dataItemsDto, listMap);
+                    if (isAuth){
+                        list.add(resourceCatalogItemVO);
+                    }
+                }
+                resourceCatalogVO.setDataItems(list);
+            }
+        return resultVO;
+    }
+
+    /**
+     * 数据资源分类需要构建父级的code数组
+     * @param subDataDTO
+     * @return
+     */
+    private LinkedHashMap<String, List<String>> buildDataParentCodeMap(SubDataDTO subDataDTO, LinkedHashMap<String, List<String>> dataListMap) {
+
+        //dataId为父级和子级code通过|拼接,所以转换成数组
+        String[] dataArr = subDataDTO.getDataId().split(CODE_DATA_TYPE_SEPARATOR);
+        for (int i = 0; i < dataArr.length; i++) {
+            //数据授权时,构建的dataId为(01|01|RESOURCE_SJZYBQ1|1),第3个一定是标签类型。不是具体code值。所以跳过不处理
+            if (dataArr.length > 3 && i == 2){
+                continue;
+            }
+            //数组的前两个顺序和dataStrArr前两个一致,代表数据组织一级和二级,
+            String value = dataArr[i];
+            String key = dataStrArr[i];
+            //当数组最后一个值时。key应该为当前codeType。因为标签级是同级的。不重新赋值都永远是标签1的类型
+            if (i == (dataArr.length-1)){
+                key = subDataDTO.getDataType();
+            }
+            if (CollectionUtils.isEmpty(dataListMap.get(key))) {
+                dataListMap.put(key, new ArrayList<String>() {{
+                    add(value);
+                }});
+            } else {
+                List<String> list = dataListMap.get(key);
+                //去重
+                if (!list.contains(value)){
+                    list.add(value);
+                }
+                dataListMap.put(key, list);
+            }
+        }
+        return dataListMap;
+    }
+
+    /**
+     * 获取类型下的code数组
+     * @param subDataDTO
+     * @return
+     */
+    private Map<String, List<String>> buildDataCodeMap(SubDataDTO subDataDTO, Map<String, List<String>> map) {
+        if (CollectionUtils.isEmpty(map.get(subDataDTO.getDataType()))) {
+            map.put(subDataDTO.getDataType(), new ArrayList<String>() {{
+                add(subDataDTO.getDataCode());
+            }});
+        } else {
+            List<String> mapList = map.get(subDataDTO.getDataType());
+            mapList.add(subDataDTO.getDataCode());
+            map.put(subDataDTO.getDataType(), mapList);
+        }
+        return  map;
+    }
+
+    /**
+     * 获取数据项的分类代码、安全等级
+     *
+     * @param dataItemsDto
+     * @param currentIdcard
+     * @return
+     */
+    private void getDataItemClassify(DataItemsDto dataItemsDto, Map<String, List<String>> listMap, LinkedHashMap<String, List<String>> dataListMap, String currentIdcard) {
+
+        //构建参数
+        Map<String, Object> paramMap = buildSearcher(dataItemsDto.getResourceCode());
+        BusResultVO busResultVO = busService.resourceDataItemsQuery(paramMap, currentIdcard);
+        List<ResourceCatalogVO> resourceCatalogVOList = busResultVO.getResultData().getDataList();
+        if (CollectionUtils.isNotEmpty(resourceCatalogVOList)){
+            //数据资源标识符只可能对应一条数据
+            ResourceCatalogVO resourceCatalogVO = resourceCatalogVOList.get(0);
+
+            Boolean isAuth;
+            if (StringUtils.isNotBlank(dataItemsDto.getDataItemCode())) {
+                isAuth = buildColumnAuth(resourceCatalogVO, dataItemsDto, listMap);
+            } else {
+                isAuth = buildTableAuth(resourceCatalogVOList, dataItemsDto, dataListMap, listMap);
+            }
+            dataItemsDto.setAuth(isAuth);
+        }
+    }
+
+    /**
+     * 判断表级权限
+     * @param resourceCatalogVOList
+     * @param dataItemsDto
+     * @param dataListMap
+     * @param listMap
+     * @return
+     */
+    private Boolean buildTableAuth(List<ResourceCatalogVO> resourceCatalogVOList, DataItemsDto dataItemsDto, LinkedHashMap<String, List<String>> dataListMap, Map<String, List<String>> listMap) {
+        boolean isAuth = true;
+        //数据资源标识符只可能对应一条数据
+        ResourceCatalogVO resourceCatalogVO = resourceCatalogVOList.get(0);
+        //循环数组,获取对应的类型和对象属性key的关系
+        for (Map.Entry<String, String> map : dataMap.entrySet()) {
+            //获取属性值
+            String value = getFieldValueByName(map.getValue(), resourceCatalogVO);
+            //类型key
+            String key = map.getKey();
+            if (StringUtils.isNotBlank(value)) {
+                if (CollectionUtils.isNotEmpty(dataListMap.get(key))) {
+                    //用户拥有的权限是否包含数据资源返回的值
+                    if (!dataListMap.get(key).contains(value)) {
+                        isAuth = false;
+                    }
+                } else {
+                    isAuth = false;
+                }
+            }
+        }
+
+        if (isAuth && StringUtils.isNotBlank(resourceCatalogVO.getDataClassification()) && !listMap.get(dataLevelStr).contains(resourceCatalogVO.getDataClassification())) {
+            isAuth = false;
+        }
+        return isAuth;
+    }
+
+    /**
+     * 判断列级权限
+     * @param resourceCatalogVO
+     * @param dataItemsDto
+     * @param listMap
+     * @return
+     */
+    private boolean buildColumnAuth(ResourceCatalogVO resourceCatalogVO, DataItemsDto dataItemsDto, Map<String, List<String>> listMap) {
+        boolean isAuth = true;
+        Map<String, String> columnResultMap = new HashMap<>();
+        //具体数据项值不为空,则循环获取全部数据项进行判断处理
+        if (resourceCatalogVO != null ) {
+            //数据项数组
+            List<ResourceCatalogItemVO> resourceCatalogItemVOList = resourceCatalogVO.getDataItems();
+            for (ResourceCatalogItemVO resourceCatalogItemVO : resourceCatalogItemVOList) {
+                if (resourceCatalogItemVO.getDataItemCode().equals(dataItemsDto.getDataItemCode())) {
+                    columnResultMap.put(columnClassifyStr, resourceCatalogItemVO.getColumnClassify());
+                    columnResultMap.put(dataSecurityLevelStr, resourceCatalogItemVO.getDataSecurityLevel());
+                    break;
+                }
+            }
+        }
+
+        //将数据项的分类代码、安全等级与用户所有的数据分级分类比对,有则说明有权限。无则说明无权限
+        if (StringUtils.isNotBlank(columnResultMap.get(columnClassifyStr))) {
+            List<String> stringList = new ArrayList<String>() {{add(columnOneClassifyStr);}{add(columnTwoClassifyStr);}};
+            for (String key : stringList) {
+                isAuth = true;
+                if (CollectionUtils.isNotEmpty(listMap.get(key))) {
+                    if (!listMap.get(key).contains(columnResultMap.get(columnClassifyStr))) {
+                        isAuth = false;
+                    }
+                } else {
+                    isAuth = false;
+                }
+            }
+        }
+        if (isAuth && StringUtils.isNotBlank(columnResultMap.get(dataSecurityLevelStr)) && !listMap.get(dataSecurityLevelTypeStr).contains(columnResultMap.get(dataSecurityLevelStr))) {
+            isAuth = false;
+        }
+        return isAuth;
+    }
+
+    /**
+     * 获取对象属性值
+     * @param fieldName
+     * @param o
+     * @return
+     */
+    private static String getFieldValueByName(String fieldName, Object o) {
+        try {
+            String firstLetter = fieldName.substring(0, 1).toUpperCase();
+            String getter = "get" + firstLetter + fieldName.substring(1);
+            Method method = o.getClass().getMethod(getter, new Class[]{});
+            Object value = method.invoke(o, new Object[]{});
+            if (value != null) {
+                return String.valueOf(value);
+            }
+            return "";
+        } catch (Exception e) {
+
+            return null;
+        }
+    }
+
+    /**
+     * 构建请求参数
+     *
+     * @param resourceCode
+     */
+    private Map<String, Object> buildSearcher(String resourceCode) {
+        Map<String, Object> param = new HashMap<>();
+        Map<String, Object> conditionParam = new HashMap<>();
+        conditionParam.put("resourceCode", resourceCode);
+        param.put("condition", conditionParam);
+        param.put("page", 1);
+        param.put("pageSize", 1);
+        return param;
+    }
+
+
+    /**
+     * 数组资源分类对应实体属性key数组
+     */
+    private void initDataMap() {
+        if (MapUtils.isEmpty(dataMap)) {
+            dataMap.put(dataClassifyOneCodeStr, "dataClassifyOneCode");
+            dataMap.put(dataClassifyTwoCodeStr, "dataClassifyTwoCode");
+            dataMap.put(dataLabelOneCodeStr, "dataLabelOneCode");
+            dataMap.put(dataLabelTwoCodeStr, "dataLabelTwoCode");
+            dataMap.put(dataLabelThreeCodeStr, "dataLabelThreeCode");
+            dataMap.put(dataLabelFourCodeStr, "dataLabelFourCode");
+            dataMap.put(dataLabelFiveCodeStr, "dataLabelFiveCode");
+        }
     }
 
 

+ 21 - 1
dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/auth/service/impl/ServiceAuthResultServiceImpl.java

@@ -184,6 +184,7 @@ public class ServiceAuthResultServiceImpl implements IServiceAuthResultService {
                     serviceAuthResult.setAuthStatus(authStatus);
                     serviceAuthResult.setUpdateTime(date);
                     serviceAuthResult.setFlowId(serviceAuthFlow.getFlowId());
+                    serviceAuthResult.setMessageId(serviceAuthFlow.getMessageId());
                     serviceAuthResultBPO.update(serviceAuthResult);
                 } else {
                     //不存在的新增
@@ -200,6 +201,7 @@ public class ServiceAuthResultServiceImpl implements IServiceAuthResultService {
                     serviceAuthResult.setServiceId(serviceResource.getId());
                     serviceAuthResult.setAppId(appId);
                     serviceAuthResult.setFlowId(serviceAuthFlow.getFlowId());
+                    serviceAuthResult.setMessageId(serviceAuthFlow.getMessageId());
                     saveAuthResult(serviceAuthResult);
                 }
             }
@@ -211,7 +213,7 @@ public class ServiceAuthResultServiceImpl implements IServiceAuthResultService {
                     .collect(Collectors.toList());
             for (ServiceAuthResult serviceAuthResult : result) {
                 serviceAuthResult.setDeleted(BooleanEnum.TRUE.getValue());
-                serviceAuthResult.setUpdateTime(date);
+                serviceAuthResult.setDeleteTime(date);
                 serviceAuthFlow.setFlowId(serviceAuthFlow.getFlowId());
                 serviceAuthResultBPO.update(serviceAuthResult);
             }
@@ -488,4 +490,22 @@ public class ServiceAuthResultServiceImpl implements IServiceAuthResultService {
         return dto;
     }
 
+    @Override
+    public Page<ServiceAuthResultDTO> serviceResultPageJoinFlow(Searchable searchable) {
+        searchable.addSearchFilter("deleted", SearchOperator.eq, BooleanEnum.FALSE.getValue());
+        searchable.addSearchFilter("service_deleted", SearchOperator.eq, BooleanEnum.FALSE.getValue());
+        searchable.addSearchFilter("app_deleted", SearchOperator.eq, BooleanEnum.FALSE.getValue());
+        Page<ServiceAuthResultPO> paging = serviceAuthResultBPO.serviceResultPageJoinFlow(searchable);
+        List<ServiceAuthResultDTO> dtos=new ArrayList<>();
+        paging.forEach(item->{
+            ServiceAuthResultDTO dto=new ServiceAuthResultDTO();
+            BeanUtils.copyProperties(item,dto);
+            dto.setAuthStatus(item.getServiceStatus());
+            dtos.add(dto);
+        });
+        Pageable newPageable = new PageRequest(paging.getNumber(), paging.getSize());
+        PageImpl<ServiceAuthResultDTO> pageResult = new PageImpl<>(dtos, newPageable, paging.getTotalElements());
+        return pageResult;
+    }
+
 }

+ 10 - 0
dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/business/IBimBusiness.java

@@ -1,5 +1,7 @@
 package com.dragoninfo.dcuc.auth.business;
 
+import com.dragoninfo.dcuc.auth.auth.vo.bim.BimUserInfoItemRespVO;
+
 /**
  * @author huangzqa
  * @date 2021/4/9
@@ -49,4 +51,12 @@ public interface IBimBusiness {
      * @param expAt     失效时间(秒)
      */
     void cacheUserToken(String idcard, String userToken, Integer expAt);
+
+    /**
+     * 获取用户信息
+     *
+     * @param userToken 用户令牌
+     * @return 用户信息
+     */
+    BimUserInfoItemRespVO getUserInfoByUserToken(String userToken);
 }

+ 38 - 0
dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/business/impl/BimBusinessImpl.java

@@ -234,4 +234,42 @@ public class BimBusinessImpl implements IBimBusiness {
     public void cacheUserToken(String idcard, String userToken, Integer expAt) {
         redisTemplate.opsForValue().set(AuthRedisConstant.REDIS_USER_TOKEN_NAMESPACE + idcard, userToken, expAt, TimeUnit.SECONDS);
     }
+
+    @Override
+    public BimUserInfoItemRespVO getUserInfoByUserToken(String userToken) {
+
+        if (StrUtil.isBlank(userToken)) {
+            throw new IllegalArgumentException("UserToken is blank.");
+        }
+
+        String messageId = UUIDUtils.getUUID();
+
+        String token = getToken();
+
+        BimUserInfoReqVO bimUserInfoReqVO = new BimUserInfoReqVO();
+        bimUserInfoReqVO.setToken(token);
+        bimUserInfoReqVO.setMessageId(messageId);
+        bimUserInfoReqVO.setUserToken(userToken);
+
+        String reqJson = JsonUtils.toJSONString(bimUserInfoReqVO);
+
+        log.info("UserInfo req :{}", reqJson);
+
+        String url = dcucAuthConfig.getBimUrl() + "/api/rest/customization/ExpApiCustomDragonitService/getUserInfoByUserToken";
+
+        log.info("UserInfo req url:{}", reqJson);
+        String postResp = HttpRequest.post(url)
+                .body(reqJson)
+                .execute()
+                .body();
+        log.info("UserInfo resp :{}", postResp);
+
+        BimUserInfoRespVO bimRespVo = JsonUtils.parseObject(postResp, BimUserInfoRespVO.class);
+
+        if (!bimRespVo.getSuccess()) {
+            log.error("UserInfo error:{}", postResp);
+        }
+
+        return bimRespVo.getData();
+    }
 }

+ 40 - 0
dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/config/DcucAuthBusConfig.java

@@ -0,0 +1,40 @@
+package com.dragoninfo.dcuc.auth.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+/**
+ * 代码千万行,注释第一行,编码不规范,同事两行泪
+ *
+ * @author huang(jy)
+ * @version 1.0
+ * @date 2021/4/15 11:23
+ */
+@ConfigurationProperties(prefix = "dcuc.auth.bus-index")
+@Data
+@Component
+public class DcucAuthBusConfig {
+
+    /**
+     * 总线请求头参数
+     */
+    private String busSraId;
+
+    /**
+     * 总线请求头参数
+     */
+    private String busServiceId;
+
+
+    /**
+     * 总线请求头参数(方法标识)
+     */
+    private String busServiceFunc;
+    /**
+     * 总线请求头参数(接口地址)
+     */
+    private String resourceUrl;
+
+
+}

+ 4 - 4
dcuc-auth-service/src/main/resources/application-base.yml

@@ -1,9 +1,9 @@
 spring:
   datasource:
-    username: jzpt_bu
-    password: dragon
+    username: dcuc
+    password: 123
     driver-class-name: com.mysql.jdbc.Driver
-    url: jdbc:mysql://192.168.120.142:3306/dcuc_2.0?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
+    url: jdbc:mysql://10.254.10.31:3306/dcuc_tjdsj_2.0?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
     druid:
       filters: sqlaudit
   application:
@@ -82,7 +82,7 @@ duceap:
       strategy: database
   flyway:
     # 是否执行flyway
-    enabled: false
+    enabled: true
     # 执行flyway路径
     locations: classpath:/config/mysql
   auditlog:

+ 7 - 0
dcuc-auth-service/src/main/resources/application-bus.yml

@@ -0,0 +1,7 @@
+dcuc:
+  auth:
+    bus-index:
+      resource-url: http://10.201.7.31:8585/bus/send
+      bus-sra-id: Y-120000000000-0037
+      bus-service-id: S-120000000000-0100-00028
+      bus-service-func: searchCataLogList

+ 1 - 1
dcuc-auth-service/src/main/resources/application.yml

@@ -1,6 +1,6 @@
 spring:
   profiles:
-    include: base,auth
+    include: base,auth,bus
 #apollo配置
 apollo:
   autoUpdateInjectedSpringProperties: false

+ 6 - 3
dcuc-auth-service/src/main/resources/config/mysql/V4_3_0004__Create_DataAuthTable.sql

@@ -1,16 +1,19 @@
--- 数据授权表添加
 CREATE TABLE `t_sub_data_auth` (
   `id` varchar(255) NOT NULL COMMENT '主键id',
   `sub_id` varchar(255) NOT NULL COMMENT '主体id',
   `sub_type` varchar(50) DEFAULT NULL COMMENT '主体类型',
+  `data_id` varchar(200) DEFAULT NULL COMMENT '数据资源唯一标识',
   `data_code` varchar(100) NOT NULL COMMENT '数据资源code',
   `data_type` varchar(50) DEFAULT NULL COMMENT '数据资源类型',
   `create_user` varchar(255) DEFAULT NULL COMMENT '创建人',
   `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+  `update_user` varchar(255) DEFAULT NULL,
+  `update_time` datetime DEFAULT NULL,
   `delete_user` varchar(255) DEFAULT NULL COMMENT '删除人',
   `delete_time` datetime DEFAULT NULL COMMENT '删除时间',
   `deleted` varchar(6) DEFAULT NULL COMMENT '是否删除',
-  `auth_type` varchar(10) DEFAULT NULL COMMENT '权限类型 TABLE:表 COLUMN:列  ALL:公开',
+  `auth_type` varchar(10) DEFAULT NULL COMMENT '数据属性授权类型 TABLE:表授权 COLUMN:列授权',
+  `classify_code` varchar(50) DEFAULT NULL COMMENT '数据对应的分级分类标签code',
   PRIMARY KEY (`id`),
   KEY `INX_SUB` (`sub_id`,`sub_type`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='主体数据授权表';

+ 50 - 0
dcuc-auth-service/src/main/resources/config/mysql/V4_3_0004__Update_Table.sql

@@ -0,0 +1,50 @@
+-- 授权申请单新增应用事权单位和管理单位
+ALTER TABLE `t_service_auth_flow` ADD `app_manager_org_name` varchar(255) DEFAULT NULL;
+ALTER TABLE `t_service_auth_flow` ADD `app_manager_org_code` varchar(100) DEFAULT NULL;
+ALTER TABLE `t_service_auth_flow` ADD `app_org_name` varchar(255) DEFAULT NULL;
+ALTER TABLE `t_service_auth_flow` ADD `app_org_code` varchar(100) DEFAULT NULL;
+
+-- 授权结果表新增删除时间
+ALTER TABLE `t_service_auth_result` ADD `delete_time` datetime DEFAULT NULL;
+
+-- 授权结果表新增message_id
+ALTER TABLE `t_service_auth_result` ADD `message_id` VARCHAR(255) DEFAULT NULL;
+
+-- 新增索引
+ALTER TABLE `t_service_auth_flow` ADD index `message_id_inx`(`message_id`);
+ALTER TABLE `t_service_auth_result` ADD index `message_id_inx`(`message_id`);
+
+-- 修改字段长度
+ALTER TABLE `t_service_auth_flow` MODIFY `service_names` VARCHAR(800);
+
+-- 历史数据处理
+UPDATE `t_service_auth_result` r JOIN `t_service_auth_flow` f ON r.flow_id = f.flow_id SET r.message_id = f.message_id;
+
+-- 应用数据同步结束后手动执行
+-- UPDATE `t_service_auth_flow` f
+-- JOIN (
+-- 	SELECT
+-- 		a1.`apply_code` as `apply_code`,
+-- 		o.`CODE` AS org_code,
+-- 		o.FULL_NAME AS `org_name`
+-- 	FROM
+-- 		`t_apply_info` a1
+-- 	INNER JOIN `t_org_info` o
+-- 	ON a1.org_id = o.id
+-- ) a ON f.app_code = a.apply_code
+-- SET f.app_org_code = a.org_code, f.app_org_name = a.org_name;
+--
+--
+--
+-- UPDATE `t_service_auth_flow` f
+-- JOIN (
+-- 	SELECT
+-- 		a1.`apply_code` as `apply_code`,
+-- 		o.`CODE` AS org_code,
+-- 		o.FULL_NAME AS `org_name`
+-- 	FROM
+-- 		`t_apply_info` a1
+-- 	INNER JOIN `t_org_info` o
+-- 	ON a1.manager_org_id = o.id
+-- ) a ON f.app_code = a.apply_code
+-- SET f.app_manager_org_code = a.org_code, f.app_manager_org_name = a.org_name;

+ 3 - 0
dcuc-auth-service/src/main/resources/config/mysql/V4_3_0005__Add_AuthFlow.sql

@@ -0,0 +1,3 @@
+ALTER TABLE `T_SERVICE_AUTH_FLOW` ADD `applicant_id` varchar(32) DEFAULT NULL COMMENT '申请单号';
+ALTER TABLE `T_SERVICE_AUTH_FLOW` ADD `apply_reason` varchar(500) DEFAULT NULL COMMENT '申请原因';
+

+ 45 - 0
dcuc-auth-service/src/main/resources/config/mysql/V4_3_0005__init_app_fun.sql

@@ -0,0 +1,45 @@
+INSERT INTO `t_app_fun_info` (`id`, `name`, `code`, `app_id`, `PARENT_ID`, `url`, `show_mode`, `param_name`, `param_value`, `is_active`, `SEQ`, `create_time`, `creator`, `modified_time`, `modifier`, `remark`) VALUES ('8a7e8b4b78f83c220178fc6615180015', '业务域标签管理', 'YHZX_YWYBQGL', '2c90e9446710758d016710d090f10000', '', '', NULL, NULL, NULL, '1', NULL, NULL, NULL, '2021-04-23 09:56:35', NULL, NULL);
+INSERT INTO `t_app_fun_info` (`id`, `name`, `code`, `app_id`, `PARENT_ID`, `url`, `show_mode`, `param_name`, `param_value`, `is_active`, `SEQ`, `create_time`, `creator`, `modified_time`, `modifier`, `remark`) VALUES ('8a7e8b4b78f83c220178fc57063d0013', '数据分级分类表码', 'QXGL_SQKTGL_SJFJFLBM', '40288a82727cdf1601727eb5cd07000b', 'QXGL_SQKTGL', '', NULL, NULL, NULL, '1', NULL, NULL, NULL, '2021-04-23 09:40:08', NULL, '');
+INSERT INTO `t_app_fun_info` (`id`, `name`, `code`, `app_id`, `PARENT_ID`, `url`, `show_mode`, `param_name`, `param_value`, `is_active`, `SEQ`, `create_time`, `creator`, `modified_time`, `modifier`, `remark`) VALUES ('8a7e8b4b78f83c220178fc5684040012', '授权客体管理', 'QXGL_SQKTGL', '40288a82727cdf1601727eb5cd07000b', '', '', NULL, NULL, NULL, '1', NULL, NULL, NULL, '2021-04-23 09:39:35', NULL, NULL);
+INSERT INTO `t_app_fun_info` (`id`, `name`, `code`, `app_id`, `PARENT_ID`, `url`, `show_mode`, `param_name`, `param_value`, `is_active`, `SEQ`, `create_time`, `creator`, `modified_time`, `modifier`, `remark`) VALUES ('8a7e8b4b78f83c220178fc53590f0011', '人员视角', 'QXGL_SQCX_SJSQCX_RYSJ', '40288a82727cdf1601727eb5cd07000b', 'QXGL_SQCX_SJSQCX', '', NULL, NULL, NULL, '1', NULL, NULL, NULL, '2021-04-23 09:36:07', NULL, '');
+INSERT INTO `t_app_fun_info` (`id`, `name`, `code`, `app_id`, `PARENT_ID`, `url`, `show_mode`, `param_name`, `param_value`, `is_active`, `SEQ`, `create_time`, `creator`, `modified_time`, `modifier`, `remark`) VALUES ('8a7e8b4b78f83c220178fc5301010010', '数据授权查询', 'QXGL_SQCX_SJSQCX', '40288a82727cdf1601727eb5cd07000b', 'QXGL_SQCX', '', NULL, NULL, NULL, '1', NULL, NULL, NULL, '2021-04-23 09:35:45', NULL, '');
+INSERT INTO `t_app_fun_info` (`id`, `name`, `code`, `app_id`, `PARENT_ID`, `url`, `show_mode`, `param_name`, `param_value`, `is_active`, `SEQ`, `create_time`, `creator`, `modified_time`, `modifier`, `remark`) VALUES ('8a7e8b4b78f83c220178fc525cf6000f', '授权查询', 'QXGL_SQCX', '40288a82727cdf1601727eb5cd07000b', '', '', NULL, NULL, NULL, '1', NULL, NULL, NULL, '2021-04-23 09:35:03', NULL, NULL);
+INSERT INTO `t_app_fun_info` (`id`, `name`, `code`, `app_id`, `PARENT_ID`, `url`, `show_mode`, `param_name`, `param_value`, `is_active`, `SEQ`, `create_time`, `creator`, `modified_time`, `modifier`, `remark`) VALUES ('8a7e8b4b78f83c220178fc50c2ba000e', '机构授权', 'QXGL_SQGL_SJSQGL_JGSQ', '40288a82727cdf1601727eb5cd07000b', 'QXGL_SQGL_SJSQGL', '', NULL, NULL, NULL, '1', NULL, NULL, NULL, '2021-04-23 09:33:18', NULL, '');
+INSERT INTO `t_app_fun_info` (`id`, `name`, `code`, `app_id`, `PARENT_ID`, `url`, `show_mode`, `param_name`, `param_value`, `is_active`, `SEQ`, `create_time`, `creator`, `modified_time`, `modifier`, `remark`) VALUES ('8a7e8b4b78f83c220178fc5062ef000d', '标签授权', 'QXGL_SQGL_SJSQGL_BQSQ', '40288a82727cdf1601727eb5cd07000b', 'QXGL_SQGL_SJSQGL', '', NULL, NULL, NULL, '1', NULL, NULL, NULL, '2021-04-23 09:32:53', NULL, '');
+INSERT INTO `t_app_fun_info` (`id`, `name`, `code`, `app_id`, `PARENT_ID`, `url`, `show_mode`, `param_name`, `param_value`, `is_active`, `SEQ`, `create_time`, `creator`, `modified_time`, `modifier`, `remark`) VALUES ('8a7e8b4b78f83c220178fc4fc817000c', '人员授权', 'QXGL_SQGL_SJSQGL_RYSQ', '40288a82727cdf1601727eb5cd07000b', 'QXGL_SQGL_SJSQGL', '', NULL, NULL, NULL, '1', NULL, NULL, NULL, '2021-04-23 09:32:13', NULL, '');
+INSERT INTO `t_app_fun_info` (`id`, `name`, `code`, `app_id`, `PARENT_ID`, `url`, `show_mode`, `param_name`, `param_value`, `is_active`, `SEQ`, `create_time`, `creator`, `modified_time`, `modifier`, `remark`) VALUES ('8a7e8b4b78f83c220178fc4f35e7000b', '数据授权管理', 'QXGL_SQGL_SJSQGL', '40288a82727cdf1601727eb5cd07000b', '2c90e96664252f05016425363b3f0002', '', NULL, NULL, NULL, '1', NULL, NULL, NULL, '2021-04-23 09:31:36', NULL, '');
+UPDATE `t_app_fun_info` SET `id`='8a8b810e781b11e601781b507a080000', `name`='服务授权管理', `code`='svc_auth_management', `app_id`='40288a82727cdf1601727eb5cd07000b', `PARENT_ID`='2c90e96664252f05016425363b3f0002', `url`='', `show_mode`=NULL, `param_name`=NULL, `param_value`=NULL, `is_active`='1', `SEQ`=NULL, `create_time`=NULL, `creator`=NULL, `modified_time`='2021-04-23 09:37:42', `modifier`=NULL, `remark`=NULL WHERE (`id`='8a8b810e781b11e601781b507a080000');
+
+
+
+INSERT INTO `t_menu_info` (`id`, `name`, `code`, `app_id`, `parent_id`, `url`, `show_mode`, `param_name`, `param_value`, `is_active`, `seq`, `create_time`, `creator`, `modified_time`, `modifier`, `remark`, `is_system`, `is_hide`)
+ VALUES ('6510a37b1df04y199db6041bb97hasdk', '业务域标签管理', 'YHZX_YWYBQGL', '00000000000000000000000000000000', NULL, NULL, '1', NULL, NULL, '1', '4', '2020-12-04 16:53:04', NULL, '2020-12-04 16:53:04', NULL, NULL, '0', '0');
+
+
+ INSERT INTO `t_menu_info` (`id`, `name`, `code`, `app_id`, `parent_id`, `url`, `show_mode`, `param_name`, `param_value`, `is_active`, `seq`, `create_time`, `creator`, `modified_time`, `modifier`, `remark`, `is_system`, `is_hide`)
+ VALUES ('6510a37b1df04y199db6123bb97hasdk', '授权客体管理', 'QXGL_SQKTGL', '00000000000000000000000000000000', NULL, NULL, '1', NULL, NULL, '1', '4', '2020-12-04 16:53:04', NULL, '2020-12-04 16:53:04', NULL, NULL, '0', '0');
+ INSERT INTO `t_menu_info` (`id`, `name`, `code`, `app_id`, `parent_id`, `url`, `show_mode`, `param_name`, `param_value`, `is_active`, `seq`, `create_time`, `creator`, `modified_time`, `modifier`, `remark`, `is_system`, `is_hide`)
+ VALUES ('6510a37b1df04y199db6123bb3edasdk', '数据分级分类表码', 'QXGL_SQKTGL_SJFJFLBM', '00000000000000000000000000000000', '6510a37b1df04y199db6123bb97hasdk', NULL, '1', NULL, NULL, '1', '4', '2020-12-04 16:53:04', NULL, '2020-12-04 16:53:04', NULL, NULL, '0', '0');
+
+
+ INSERT INTO `t_menu_info` (`id`, `name`, `code`, `app_id`, `parent_id`, `url`, `show_mode`, `param_name`, `param_value`, `is_active`, `seq`, `create_time`, `creator`, `modified_time`, `modifier`, `remark`, `is_system`, `is_hide`)
+ VALUES ('6510a37b1df852399db6123bb97hasdk', '数据授权管理', 'QXGL_SQGL_SJSQGL', '00000000000000000000000000000000', '2c90e96664252f05016425363b3f0002', NULL, '1', NULL, NULL, '1', '4', '2020-12-04 16:53:04', NULL, '2020-12-04 16:53:04', NULL, NULL, '0', '0');
+INSERT INTO `t_menu_info` (`id`, `name`, `code`, `app_id`, `parent_id`, `url`, `show_mode`, `param_name`, `param_value`, `is_active`, `seq`, `create_time`, `creator`, `modified_time`, `modifier`, `remark`, `is_system`, `is_hide`)
+ VALUES ('6510a37b1dFGRy199db6123bb3edasdk', '标签授权', 'QXGL_SQGL_SJSQGL_BQSQ', '00000000000000000000000000000000', '6510a37b1df852399db6123bb97hasdk', NULL, '1', NULL, NULL, '1', '4', '2020-12-04 16:53:04', NULL, '2020-12-04 16:53:04', NULL, NULL, '0', '0');
+INSERT INTO `t_menu_info` (`id`, `name`, `code`, `app_id`, `parent_id`, `url`, `show_mode`, `param_name`, `param_value`, `is_active`, `seq`, `create_time`, `creator`, `modified_time`, `modifier`, `remark`, `is_system`, `is_hide`)
+ VALUES ('6510a37b1df04y199d2WS23bb3edasdk', '机构授权', 'QXGL_SQGL_SJSQGL_JGSQ', '00000000000000000000000000000000', '6510a37b1df852399db6123bb97hasdk', NULL, '1', NULL, NULL, '1', '4', '2020-12-04 16:53:04', NULL, '2020-12-04 16:53:04', NULL, NULL, '0', '0');
+INSERT INTO `t_menu_info` (`id`, `name`, `code`, `app_id`, `parent_id`, `url`, `show_mode`, `param_name`, `param_value`, `is_active`, `seq`, `create_time`, `creator`, `modified_time`, `modifier`, `remark`, `is_system`, `is_hide`)
+ VALUES ('6510a37b1df04y199dbHGB3bb3edasdk', '人员授权', 'QXGL_SQGL_SJSQGL_RYSQ', '00000000000000000000000000000000', '6510a37b1df852399db6123bb97hasdk', NULL, '1', NULL, NULL, '1', '4', '2020-12-04 16:53:04', NULL, '2020-12-04 16:53:04', NULL, NULL, '0', '0');
+
+ INSERT INTO `t_menu_info` (`id`, `name`, `code`, `app_id`, `parent_id`, `url`, `show_mode`, `param_name`, `param_value`, `is_active`, `seq`, `create_time`, `creator`, `modified_time`, `modifier`, `remark`, `is_system`, `is_hide`)
+ VALUES ('6510a37b1df04yokijb6123bb97hasdk', '授权查询', 'QXGL_SQCX', '00000000000000000000000000000000', NULL, NULL, '1', NULL, NULL, '1', '4', '2020-12-04 16:53:04', NULL, '2020-12-04 16:53:04', NULL, NULL, '0', '0');
+ INSERT INTO `t_menu_info` (`id`, `name`, `code`, `app_id`, `parent_id`, `url`, `show_mode`, `param_name`, `param_value`, `is_active`, `seq`, `create_time`, `creator`, `modified_time`, `modifier`, `remark`, `is_system`, `is_hide`)
+ VALUES ('6510a33dsdf04y199db6123bb3edasdk', '数据授权查询', 'QXGL_SQCX_SJSQCX', '00000000000000000000000000000000', '6510a37b1df04yokijb6123bb97hasdk', NULL, '1', NULL, NULL, '1', '4', '2020-12-04 16:53:04', NULL, '2020-12-04 16:53:04', NULL, NULL, '0', '0');
+ INSERT INTO `t_menu_info` (`id`, `name`, `code`, `app_id`, `parent_id`, `url`, `show_mode`, `param_name`, `param_value`, `is_active`, `seq`, `create_time`, `creator`, `modified_time`, `modifier`, `remark`, `is_system`, `is_hide`)
+ VALUES ('6510a33dsdf04y1992sa123bb3edasdk', '人员视角', 'QXGL_SQCX_SJSQCX_RYSJ', '00000000000000000000000000000000', '6510a33dsdf04y199db6123bb3edasdk', NULL, '1', NULL, NULL, '1', '4', '2020-12-04 16:53:04', NULL, '2020-12-04 16:53:04', NULL, NULL, '0', '0');
+
+INSERT INTO `t_menu_info` (`id`,`name`,`code`,`app_id`,`parent_id`,`url`,`show_mode`,`param_name`,`param_value`,`is_active`,`seq`,`create_time`,`creator`,`modified_time`,`modifier`,`remark`,`is_system`,`is_hide`)
+VALUES('156aeb2baf5611ebb10c005056bd2a78','服务授权管理','QXGL_SQGL_FWSQGL','00000000000000000000000000000000',NULL,NULL,'1',NULL,NULL,'1','4','2021-05-07 00:00:00',NULL,'2021-05-07 00:00:00',NULL,NULL,'0','0');
+
+INSERT INTO `t_menu_info` (`id`,`name`,`code`,`app_id`,`parent_id`,`url`,`show_mode`,`param_name`,`param_value`,`is_active`,`seq`,`create_time`,`creator`,`modified_time`,`modifier`,`remark`,`is_system`,`is_hide`)
+VALUES('221cad41af5611ebb10c005056bd2a78','服务授权','QXGL_SQGL_FWSQGL_FWSQ','00000000000000000000000000000000','156aeb2baf5611ebb10c005056bd2a78',NULL,'1',NULL,NULL,'1','4','2021-05-07 00:00:00',NULL,'2021-05-07 00:00:00',NULL,NULL,'0','0');

+ 9 - 2
dcuc-auth-service/src/main/resources/config/sql/V4_3_0005__Create_DataAuthTable.sql

@@ -6,14 +6,18 @@ CREATE TABLE "T_SUB_DATA_AUTH" (
 "ID" VARCHAR2(255 BYTE) NOT NULL ,
 "SUB_ID" VARCHAR2(255 BYTE) NOT NULL ,
 "SUB_TYPE" VARCHAR2(50 BYTE) NULL ,
+"DATA_ID" VARCHAR2(500 BYTE) NULL ,
 "DATA_CODE" VARCHAR2(100 BYTE) NOT NULL ,
 "DATA_TYPE" VARCHAR2(50 BYTE) NULL ,
 "CREATE_USER" VARCHAR2(255 BYTE) NULL ,
 "CREATE_TIME" TIMESTAMP(0)  NULL ,
+"UPDATE_USER" VARCHAR2(255 BYTE) NULL ,
+"UPDATE_TIME" TIMESTAMP(0)  NULL ,
 "DELETE_USER" VARCHAR2(255 BYTE) NULL ,
 "DELETE_TIME" TIMESTAMP(0)  NULL ,
 "DELETED" VARCHAR2(6 BYTE) NULL ,
-"AUTH_TYPE" VARCHAR2(30 BYTE) NULL
+"AUTH_TYPE" VARCHAR2(30 BYTE) NULL,
+"CLASSIFY_CODE" VARCHAR2(150 BYTE) NULL
 )
 LOGGING
 NOCOMPRESS
@@ -23,6 +27,7 @@ NOCACHE
 COMMENT ON COLUMN "ID" IS '主键id';
 COMMENT ON COLUMN "SUB_ID" IS '主体id';
 COMMENT ON COLUMN "SUB_TYPE" IS '主体类型';
+COMMENT ON COLUMN "DATA_ID" IS '数据资源唯一标识';
 COMMENT ON COLUMN "DATA_CODE" IS '数据资源code';
 COMMENT ON COLUMN "DATA_TYPE" IS '数据资源类型';
 COMMENT ON COLUMN "CREATE_USER" IS '创建人';
@@ -30,7 +35,9 @@ COMMENT ON COLUMN "CREATE_TIME" IS '创建时间';
 COMMENT ON COLUMN "DELETE_USER" IS '删除人';
 COMMENT ON COLUMN "DELETE_TIME" IS '删除时间';
 COMMENT ON COLUMN "DELETED" IS '是否删除';
-COMMENT ON COLUMN "AUTH_TYPE" IS '权限类型 TABLE:表 COLUMN:列  ALL:公开';
+COMMENT ON COLUMN "AUTH_TYPE" IS '数据属性授权类型 TABLE:表授权 COLUMN:列授权';
+COMMENT ON COLUMN "CLASSIFY_CODE" IS '数据对应的分级分类标签code';
+COMMENT ON TABLE "T_SUB_DATA_AUTH" IS '主体数据授权表';
 
 -- ----------------------------
 -- Indexes structure for table T_SUB_DATA_AUTH

+ 50 - 0
dcuc-auth-service/src/main/resources/config/sql/V4_3_0005__Update_Table.sql

@@ -0,0 +1,50 @@
+-- 授权申请单新增应用事权单位和管理单位
+ALTER TABLE "T_SERVICE_AUTH_FLOW" ADD "APP_MANAGER_ORG_NAME" VARCHAR2(255 BYTE) DEFAULT NULL;
+ALTER TABLE "T_SERVICE_AUTH_FLOW" ADD "APP_MANAGER_ORG_CODE" VARCHAR2(100 BYTE) DEFAULT NULL;
+ALTER TABLE "T_SERVICE_AUTH_FLOW" ADD "APP_ORG_NAME" VARCHAR2(255 BYTE) DEFAULT NULL;
+ALTER TABLE "T_SERVICE_AUTH_FLOW" ADD "APP_ORG_CODE" VARCHAR2(100 BYTE) DEFAULT NULL;
+
+-- 授权结果表新增删除时间
+ALTER TABLE "T_SERVICE_AUTH_RESULT" ADD "DELETE_TIME" TIMESTAMP(0) DEFAULT NULL;
+
+-- 授权结果表新增message_id
+ALTER TABLE "T_SERVICE_AUTH_RESULT" ADD "MESSAGE_ID" VARCHAR2(255 BYTE) DEFAULT NULL;
+
+-- 新增索引
+ALTER TABLE "T_SERVICE_AUTH_FLOW" ADD index "message_id_inx"("message_id");
+ALTER TABLE "T_SERVICE_AUTH_RESULT" ADD index "message_id_inx"("message_id");
+
+-- 修改字段长度
+ALTER TABLE "T_SERVICE_AUTH_FLOW" MODIFY "SERVICE_NAMES" VARCHAR2(1600);
+
+-- 历史数据处理
+UPDATE "T_SERVICE_AUTH_RESULT" r JOIN "T_SERVICE_AUTH_FLOW" f ON r."FLOW_ID" = f."FLOW_ID" SET r."MESSAGE_ID" = f."MESSAGE_ID";
+
+-- 应用数据同步结束后手动执行
+-- UPDATE "T_SERVICE_AUTH_FLOW" f
+-- JOIN (
+-- 	SELECT
+-- 		a1."APPLY_CODE" as "APPLY_CODE",
+-- 		o."CODE" as "ORG_CODE",
+-- 		o."FULL_NAME" as "ORG_NAME"
+-- 	FROM
+-- 		"T_APPLY_INFO" a1
+-- 	INNER JOIN "T_ORG_INFO" o
+-- 	ON a1."ORG_ID" = o."ID"
+-- ) a ON f."APP_CODE" = a."APPLY_CODE"
+-- SET f."APP_ORG_CODE" = a."ORG_CODE", f."APP_ORG_NAME" = a."ORG_NAME";
+--
+--
+--
+-- UPDATE "T_SERVICE_AUTH_FLOW" f
+-- JOIN (
+-- 	SELECT
+-- 		a1."APPLY_CODE" as "APPLY_CODE",
+-- 		o."CODE" as "ORG_CODE",
+-- 		o."FULL_NAME" as "ORG_NAME"
+-- 	FROM
+-- 		"T_APPLY_INFO" a1
+-- 	INNER JOIN "T_ORG_INFO" o
+-- 	ON a1."MANAGER_ORG_ID" = o."ID"
+-- ) a ON f."APP_CODE" = a."APPLY_CODE"
+-- SET f."APP_ORG_CODE" = a."ORG_CODE", f."APP_ORG_NAME" = a."ORG_NAME";

+ 5 - 0
dcuc-auth-service/src/main/resources/config/sql/V4_3_0006__Add_AuthFlow.sql

@@ -0,0 +1,5 @@
+alter table T_SERVICE_AUTH_FLOW add applicant_id varchar2(32);
+comment on column T_SERVICE_AUTH_FLOW.applicant_id is '申请单号id';
+
+alter table "T_SERVICE_AUTH_FLOW" add "APPLY_REASON" varchar2(500);
+comment on column T_SERVICE_AUTH_FLOW.applicant_id is '申请原因';

+ 46 - 0
dcuc-auth-service/src/main/resources/config/sql/V4_3_0006__init_app_fun.sql

@@ -0,0 +1,46 @@
+INSERT INTO "T_APP_FUN_INFO" ("ID", "NAME", "CODE", "APP_ID", "PARENT_ID", "URL", "SHOW_MODE", "PARAM_NAME", "PARAM_VALUE", "IS_ACTIVE", "SEQ", "CREATE_TIME", "CREATOR", "MODIFIED_TIME", "MODIFIER", "REMARK") VALUES ('8a7e8b4b78f83c220178fc6615180015', '业务域标签管理', 'YHZX_YWYBQGL', '2c90e9446710758d016710d090f10000', '', '', NULL, NULL, NULL, '1', NULL, NULL, NULL, TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL);
+INSERT INTO "T_APP_FUN_INFO" ("ID", "NAME", "CODE", "APP_ID", "PARENT_ID", "URL", "SHOW_MODE", "PARAM_NAME", "PARAM_VALUE", "IS_ACTIVE", "SEQ", "CREATE_TIME", "CREATOR", "MODIFIED_TIME", "MODIFIER", "REMARK") VALUES ('8a7e8b4b78f83c220178fc57063d0013', '数据分级分类表码', 'QXGL_SQKTGL_SJFJFLBM', '40288a82727cdf1601727eb5cd07000b', 'QXGL_SQKTGL', '', NULL, NULL, NULL, '1', NULL, NULL, NULL, TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, '');
+INSERT INTO "T_APP_FUN_INFO" ("ID", "NAME", "CODE", "APP_ID", "PARENT_ID", "URL", "SHOW_MODE", "PARAM_NAME", "PARAM_VALUE", "IS_ACTIVE", "SEQ", "CREATE_TIME", "CREATOR", "MODIFIED_TIME", "MODIFIER", "REMARK") VALUES ('8a7e8b4b78f83c220178fc5684040012', '授权客体管理', 'QXGL_SQKTGL', '40288a82727cdf1601727eb5cd07000b', '', '', NULL, NULL, NULL, '1', NULL, NULL, NULL, TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL);
+INSERT INTO "T_APP_FUN_INFO" ("ID", "NAME", "CODE", "APP_ID", "PARENT_ID", "URL", "SHOW_MODE", "PARAM_NAME", "PARAM_VALUE", "IS_ACTIVE", "SEQ", "CREATE_TIME", "CREATOR", "MODIFIED_TIME", "MODIFIER", "REMARK") VALUES ('8a7e8b4b78f83c220178fc53590f0011', '人员视角', 'QXGL_SQCX_SJSQCX_RYSJ', '40288a82727cdf1601727eb5cd07000b', 'QXGL_SQCX_SJSQCX', '', NULL, NULL, NULL, '1', NULL, NULL, NULL, TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, '');
+INSERT INTO "T_APP_FUN_INFO" ("ID", "NAME", "CODE", "APP_ID", "PARENT_ID", "URL", "SHOW_MODE", "PARAM_NAME", "PARAM_VALUE", "IS_ACTIVE", "SEQ", "CREATE_TIME", "CREATOR", "MODIFIED_TIME", "MODIFIER", "REMARK") VALUES ('8a7e8b4b78f83c220178fc5301010010', '数据授权查询', 'QXGL_SQCX_SJSQCX', '40288a82727cdf1601727eb5cd07000b', 'QXGL_SQCX', '', NULL, NULL, NULL, '1', NULL, NULL, NULL, TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, '');
+INSERT INTO "T_APP_FUN_INFO" ("ID", "NAME", "CODE", "APP_ID", "PARENT_ID", "URL", "SHOW_MODE", "PARAM_NAME", "PARAM_VALUE", "IS_ACTIVE", "SEQ", "CREATE_TIME", "CREATOR", "MODIFIED_TIME", "MODIFIER", "REMARK") VALUES ('8a7e8b4b78f83c220178fc525cf6000f', '授权查询', 'QXGL_SQCX', '40288a82727cdf1601727eb5cd07000b', '', '', NULL, NULL, NULL, '1', NULL, NULL, NULL, TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL);
+INSERT INTO "T_APP_FUN_INFO" ("ID", "NAME", "CODE", "APP_ID", "PARENT_ID", "URL", "SHOW_MODE", "PARAM_NAME", "PARAM_VALUE", "IS_ACTIVE", "SEQ", "CREATE_TIME", "CREATOR", "MODIFIED_TIME", "MODIFIER", "REMARK") VALUES ('8a7e8b4b78f83c220178fc50c2ba000e', '机构授权', 'QXGL_SQGL_SJSQGL_JGSQ', '40288a82727cdf1601727eb5cd07000b', 'QXGL_SQGL_SJSQGL', '', NULL, NULL, NULL, '1', NULL, NULL, NULL, TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, '');
+INSERT INTO "T_APP_FUN_INFO" ("ID", "NAME", "CODE", "APP_ID", "PARENT_ID", "URL", "SHOW_MODE", "PARAM_NAME", "PARAM_VALUE", "IS_ACTIVE", "SEQ", "CREATE_TIME", "CREATOR", "MODIFIED_TIME", "MODIFIER", "REMARK") VALUES ('8a7e8b4b78f83c220178fc5062ef000d', '标签授权', 'QXGL_SQGL_SJSQGL_BQSQ', '40288a82727cdf1601727eb5cd07000b', 'QXGL_SQGL_SJSQGL', '', NULL, NULL, NULL, '1', NULL, NULL, NULL, TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, '');
+INSERT INTO "T_APP_FUN_INFO" ("ID", "NAME", "CODE", "APP_ID", "PARENT_ID", "URL", "SHOW_MODE", "PARAM_NAME", "PARAM_VALUE", "IS_ACTIVE", "SEQ", "CREATE_TIME", "CREATOR", "MODIFIED_TIME", "MODIFIER", "REMARK") VALUES ('8a7e8b4b78f83c220178fc4fc817000c', '人员授权', 'QXGL_SQGL_SJSQGL_RYSQ', '40288a82727cdf1601727eb5cd07000b', 'QXGL_SQGL_SJSQGL', '', NULL, NULL, NULL, '1', NULL, NULL, NULL, TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, '');
+INSERT INTO "T_APP_FUN_INFO" ("ID", "NAME", "CODE", "APP_ID", "PARENT_ID", "URL", "SHOW_MODE", "PARAM_NAME", "PARAM_VALUE", "IS_ACTIVE", "SEQ", "CREATE_TIME", "CREATOR", "MODIFIED_TIME", "MODIFIER", "REMARK") VALUES ('8a7e8b4b78f83c220178fc4f35e7000b', '数据授权管理', 'QXGL_SQGL_SJSQGL', '40288a82727cdf1601727eb5cd07000b', '2c90e96664252f05016425363b3f0002', '', NULL, NULL, NULL, '1', NULL, NULL, NULL, TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, '');
+UPDATE "T_APP_FUN_INFO" SET "ID"='8a8b810e781b11e601781b507a080000', "NAME"='服务授权管理', "CODE"='svc_auth_management', "APP_ID"='40288a82727cdf1601727eb5cd07000b', "PARENT_ID"='2c90e96664252f05016425363b3f0002', "URL"='', "SHOW_MODE"=NULL, "PARAM_NAME"=NULL, "PARAM_VALUE"=NULL, "IS_ACTIVE"='1', "SEQ"=NULL, "CREATE_TIME"=NULL, "CREATOR"=NULL, "MODIFIER"=NULL, "REMARK"=NULL WHERE ("id"='8a8b810e781b11e601781b507a080000');
+
+
+
+
+INSERT INTO "T_MENU_INFO" ("ID", "NAME", "CODE", "APP_ID", "PARENT_ID", "URL", "SHOW_MODE", "PARAM_NAME", "PARAM_VALUE", "IS_ACTIVE", "SEQ", "CREATE_TIME", "CREATOR", "MODIFIED_TIME", "MODIFIER", "REMARK", "IS_SYSTEM", "IS_HIDE")
+ VALUES ('6510a37b1df04y199db6041bb97hasdk', '业务域标签管理', 'YHZX_YWYBQGL', '00000000000000000000000000000000', NULL, NULL, '1', NULL, NULL, '1', '4', TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '0', '0');
+
+
+ INSERT INTO "T_MENU_INFO" ("ID", "NAME", "CODE", "APP_ID", "PARENT_ID", "URL", "SHOW_MODE", "PARAM_NAME", "PARAM_VALUE", "IS_ACTIVE", "SEQ", "CREATE_TIME", "CREATOR", "MODIFIED_TIME", "MODIFIER", "REMARK", "IS_SYSTEM", "IS_HIDE")
+ VALUES ('6510a37b1df04y199db6123bb97hasdk', '授权客体管理', 'QXGL_SQKTGL', '00000000000000000000000000000000', NULL, NULL, '1', NULL, NULL, '1', '4', TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '0', '0');
+ INSERT INTO "T_MENU_INFO" ("ID", "NAME", "CODE", "APP_ID", "PARENT_ID", "URL", "SHOW_MODE", "PARAM_NAME", "PARAM_VALUE", "IS_ACTIVE", "SEQ", "CREATE_TIME", "CREATOR", "MODIFIED_TIME", "MODIFIER", "REMARK", "IS_SYSTEM", "IS_HIDE")
+ VALUES ('6510a37b1df04y199db6123bb3edasdk', '数据分级分类表码', 'QXGL_SQKTGL_SJFJFLBM', '00000000000000000000000000000000', '6510a37b1df04y199db6123bb97hasdk', NULL, '1', NULL, NULL, '1', '4', TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '0', '0');
+
+
+ INSERT INTO "T_MENU_INFO" ("ID", "NAME", "CODE", "APP_ID", "PARENT_ID", "URL", "SHOW_MODE", "PARAM_NAME", "PARAM_VALUE", "IS_ACTIVE", "SEQ", "CREATE_TIME", "CREATOR", "MODIFIED_TIME", "MODIFIER", "REMARK", "IS_SYSTEM", "IS_HIDE")
+ VALUES ('6510a37b1df852399db6123bb97hasdk', '数据授权管理', 'QXGL_SQGL_SJSQGL', '00000000000000000000000000000000', '2c90e96664252f05016425363b3f0002', NULL, '1', NULL, NULL, '1', '4', TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '0', '0');
+INSERT INTO "T_MENU_INFO" ("ID", "NAME", "CODE", "APP_ID", "PARENT_ID", "URL", "SHOW_MODE", "PARAM_NAME", "PARAM_VALUE", "IS_ACTIVE", "SEQ", "CREATE_TIME", "CREATOR", "MODIFIED_TIME", "MODIFIER", "REMARK", "IS_SYSTEM", "IS_HIDE")
+ VALUES ('6510a37b1dFGRy199db6123bb3edasdk', '标签授权', 'QXGL_SQGL_SJSQGL_BQSQ', '00000000000000000000000000000000', '6510a37b1df852399db6123bb97hasdk', NULL, '1', NULL, NULL, '1', '4', TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '0', '0');
+INSERT INTO "T_MENU_INFO" ("ID", "NAME", "CODE", "APP_ID", "PARENT_ID", "URL", "SHOW_MODE", "PARAM_NAME", "PARAM_VALUE", "IS_ACTIVE", "SEQ", "CREATE_TIME", "CREATOR", "MODIFIED_TIME", "MODIFIER", "REMARK", "IS_SYSTEM", "IS_HIDE")
+ VALUES ('6510a37b1df04y199d2WS23bb3edasdk', '机构授权', 'QXGL_SQGL_SJSQGL_JGSQ', '00000000000000000000000000000000', '6510a37b1df852399db6123bb97hasdk', NULL, '1', NULL, NULL, '1', '4', TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '0', '0');
+INSERT INTO "T_MENU_INFO" ("ID", "NAME", "CODE", "APP_ID", "PARENT_ID", "URL", "SHOW_MODE", "PARAM_NAME", "PARAM_VALUE", "IS_ACTIVE", "SEQ", "CREATE_TIME", "CREATOR", "MODIFIED_TIME", "MODIFIER", "REMARK", "IS_SYSTEM", "IS_HIDE")
+ VALUES ('6510a37b1df04y199dbHGB3bb3edasdk', '人员授权', 'QXGL_SQGL_SJSQGL_RYSQ', '00000000000000000000000000000000', '6510a37b1df852399db6123bb97hasdk', NULL, '1', NULL, NULL, '1', '4', TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '0', '0');
+
+ INSERT INTO "T_MENU_INFO" ("ID", "NAME", "CODE", "APP_ID", "PARENT_ID", "URL", "SHOW_MODE", "PARAM_NAME", "PARAM_VALUE", "IS_ACTIVE", "SEQ", "CREATE_TIME", "CREATOR", "MODIFIED_TIME", "MODIFIER", "REMARK", "IS_SYSTEM", "IS_HIDE")
+ VALUES ('6510a37b1df04yokijb6123bb97hasdk', '授权查询', 'QXGL_SQCX', '00000000000000000000000000000000', NULL, NULL, '1', NULL, NULL, '1', '4', TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '0', '0');
+ INSERT INTO "T_MENU_INFO" ("ID", "NAME", "CODE", "APP_ID", "PARENT_ID", "URL", "SHOW_MODE", "PARAM_NAME", "PARAM_VALUE", "IS_ACTIVE", "SEQ", "CREATE_TIME", "CREATOR", "MODIFIED_TIME", "MODIFIER", "REMARK", "IS_SYSTEM", "IS_HIDE")
+ VALUES ('6510a33dsdf04y199db6123bb3edasdk', '数据授权查询', 'QXGL_SQCX_SJSQCX', '00000000000000000000000000000000', '6510a37b1df04yokijb6123bb97hasdk', NULL, '1', NULL, NULL, '1', '4', TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '0', '0');
+INSERT INTO "T_MENU_INFO" ("ID", "NAME", "CODE", "APP_ID", "PARENT_ID", "URL", "SHOW_MODE", "PARAM_NAME", "PARAM_VALUE", "IS_ACTIVE", "SEQ", "CREATE_TIME", "CREATOR", "MODIFIED_TIME", "MODIFIER", "REMARK", "IS_SYSTEM", "IS_HIDE")
+ VALUES ('6510a33dsdf04y1992sa123bb3edasdk', '人员视角', 'QXGL_SQCX_SJSQCX_RYSJ', '00000000000000000000000000000000', '6510a33dsdf04y199db6123bb3edasdk', NULL, '1', NULL, NULL, '1', '4', TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2021-04-23 09:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '0', '0');
+
+INSERT INTO "T_MENU_INFO" ("ID", "NAME", "CODE", "APP_ID", "PARENT_ID", "URL", "SHOW_MODE", "PARAM_NAME", "PARAM_VALUE", "IS_ACTIVE", "SEQ", "CREATE_TIME", "CREATOR", "MODIFIED_TIME", "MODIFIER", "REMARK", "IS_SYSTEM", "IS_HIDE")
+VALUES('156aeb2baf5611ebb10c005056bd2a78','服务授权管理','QXGL_SQGL_FWSQGL','00000000000000000000000000000000',NULL,NULL,'1',NULL,NULL,'1','4','2021-05-07 00:00:00',NULL,'2021-05-07 00:00:00',NULL,NULL,'0','0');
+
+INSERT INTO "T_MENU_INFO" ("ID", "NAME", "CODE", "APP_ID", "PARENT_ID", "URL", "SHOW_MODE", "PARAM_NAME", "PARAM_VALUE", "IS_ACTIVE", "SEQ", "CREATE_TIME", "CREATOR", "MODIFIED_TIME", "MODIFIER", "REMARK", "IS_SYSTEM", "IS_HIDE")
+VALUES('221cad41af5611ebb10c005056bd2a78','服务授权','QXGL_SQGL_FWSQGL_FWSQ','00000000000000000000000000000000','156aeb2baf5611ebb10c005056bd2a78',NULL,'1',NULL,NULL,'1','4','2021-05-07 00:00:00',NULL,'2021-05-07 00:00:00',NULL,NULL,'0','0');

+ 2 - 2
pom.xml

@@ -4,7 +4,7 @@
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.dragoninfo</groupId>
-    <version>2.1.0-tjdsj-SNAPSHOT</version>
+    <version>2.2.0-tjdsj-SNAPSHOT</version>
     <artifactId>dcuc-auth</artifactId>
     <packaging>pom</packaging>
     <modules>
@@ -153,4 +153,4 @@
             <uniqueVersion>false</uniqueVersion>
         </snapshotRepository>
     </distributionManagement>
-</project>
+</project>