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

Merge branch 'mazq-0312-merge' into 'develop'

Mazq 0312 merge

See merge request dcuc/auth-back!71
黄资权 4 жил өмнө
parent
commit
cd92d78ee5
22 өөрчлөгдсөн 147 нэмэгдсэн , 443 устгасан
  1. 0 77
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/appservice/v1/controller/ResourceAccpetController.java
  2. 0 118
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/appservice/v1/vo/AppInfoAcceptVo.java
  3. 0 29
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/appservice/v1/vo/AppResourceAcceptVo.java
  4. 0 52
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/appservice/v1/vo/MenuResourceAcceptVo.java
  5. 0 65
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/appservice/v1/vo/ServiceResourceAcceptVo.java
  6. 6 6
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v1/controller/AuthServiceController.java
  7. 1 1
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v1/controller/WorkFlowApiController.java
  8. 11 4
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v1/vo/ServiceAuthFlowAcceptVo.java
  9. 4 7
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v1/vo/ServiceAuthResultVo.java
  10. 1 4
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v3/controller/AuthV3ApiController.java
  11. 4 0
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/app/ResourceAuthController.java
  12. 9 2
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/app/ResourceListingController.java
  13. 5 0
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/app/vo/ListingParam.java
  14. 7 0
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/app/vo/ResourceRequestParam.java
  15. 7 0
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/app/vo/ResourceRequestResult.java
  16. 12 25
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/app/vo/ResourceVo.java
  17. 36 4
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/app/vo/ServiceAuthFlowVo.java
  18. 5 5
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/app/vo/ServiceResourceVo.java
  19. 19 20
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/auth/ServiceAuthResultController.java
  20. 13 10
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/auth/ServiceResourceController.java
  21. 4 4
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/auth/vo/ServiceAuthVo.java
  22. 3 10
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/auth/vo/ServiceResourceBackVo.java

+ 0 - 77
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/appservice/v1/controller/ResourceAccpetController.java

@@ -1,77 +0,0 @@
-package com.dragoninfo.dcuc.authweb.restcontroller.api.appservice.v1.controller;
-
-import com.dragoninfo.dcuc.app.dto.AppResourceAcceptDTO;
-import com.dragoninfo.dcuc.app.dto.ServiceResourceAcceptDTO;
-import com.dragoninfo.dcuc.app.facade.IResourceFacade;
-import com.dragoninfo.dcuc.authweb.restcontroller.api.appservice.v1.vo.AppResourceAcceptVo;
-import com.dragoninfo.dcuc.authweb.restcontroller.api.appservice.v1.vo.ServiceResourceAcceptVo;
-import com.dragoninfo.dcuc.common.entity.ApiResult;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.MediaType;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-/**
- * @author mazq
- * @Description 提供给外部推送应用、服务数据的接口
- * @create 2020-11-25 14:21
- */
-@Api(tags = {"应用服务资源推送处理接口"})
-@Controller
-@RequestMapping(value = "/api/app-service/v1/")
-public class ResourceAccpetController {
-
-    @Autowired
-    private IResourceFacade iResourceFacade;
-
-    /**
-     * 插入或更新资源同步表、应用信息表
-     *
-     * @param acceptVo
-     * @return
-     */
-    @ApiOperation(value = "推送应用资源处理")
-    @ApiImplicitParams({@ApiImplicitParam(name = "acceptVo", value = "应用资源vo")})
-    @RequestMapping(value = "apps/appresource", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
-    @ResponseBody
-    public ApiResult appAccept(@RequestBody AppResourceAcceptVo acceptVo) {
-        AppResourceAcceptDTO dto = new AppResourceAcceptDTO();
-        BeanUtils.copyProperties(acceptVo,dto);
-        boolean result = iResourceFacade.acceptAppResource(dto);
-        if(result) {
-            return ApiResult.setSuccess();
-        } else {
-            return ApiResult.setFailMessage("accept app resource fail");
-        }
-    }
-
-
-    /**
-     * 插入或更新资源同步表、服务信息表
-     *
-     * @param serviceResourceVo
-     * @return
-     */
-    @ApiOperation(value = "推送服务资源处理")
-    @ApiImplicitParams({@ApiImplicitParam(name = "serviceResourceVo", value = "服务资源vo")})
-    @RequestMapping(value = "apps/serviceresource", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
-    @ResponseBody
-    public ApiResult serviceAccept(@RequestBody ServiceResourceAcceptVo serviceResourceVo) {
-        ServiceResourceAcceptDTO acceptDTO = new ServiceResourceAcceptDTO();
-        BeanUtils.copyProperties(serviceResourceVo,acceptDTO);
-        boolean result = iResourceFacade.acceptServiceResource(acceptDTO);
-        if(result){
-           return ApiResult.setSuccess();
-        }else {
-           return ApiResult.setFailMessage("accept service failed");
-        }
-    }
-}

+ 0 - 118
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/appservice/v1/vo/AppInfoAcceptVo.java

@@ -1,118 +0,0 @@
-package com.dragoninfo.dcuc.authweb.restcontroller.api.appservice.v1.vo;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-/**
- * 推送应用Vo
- * @author mazq
- * @date 2021/2/19
- */
-@ApiModel(value = "推送应用资源vo")
-@Data
-public class AppInfoAcceptVo {
-
-    private String id;
-    /**
-     * 应用系统编号
-     */
-    @ApiModelProperty(value = "应用系统编号")
-    private String yyxtbh;
-    /**
-     *应用系统名称
-     */
-    @ApiModelProperty(value = "应用系统名称")
-    private String yyxtmc;
-    /**
-     * 应用系统说明
-     */
-    @ApiModelProperty(value = "应用系统说明")
-    private String yyxtsm;
-    /**
-     * 应用系统事权单位代码
-     */
-    @ApiModelProperty(value = "应用系统事权单位代码")
-    private String yyxtsqdwdm;
-    /**
-     * 应用系统管理单位代码
-     */
-    @ApiModelProperty(value = "应用系统管理单位代码")
-    private String yyxtgldwdm;
-    /**
-     * 应用系统承建单位名称
-     */
-    @ApiModelProperty(value = "应用系统承建单位名称")
-    private String yyxtcjdwmc;
-    /**
-     * 应用系统承建单位代码
-     */
-    @ApiModelProperty(value = "应用系统承建单位代码")
-    private String yyxtcjdwdm;
-    /**
-     * 应用系统承建单位名称
-     */
-    @ApiModelProperty(value = "应用系统承建单位名称")
-    private String yyxtywdwmc;
-    /**
-     * 上线日期
-     */
-    @ApiModelProperty(value = "上线日期")
-    private String sxrq;
-    /**
-     * 下线日期
-     */
-    @ApiModelProperty(value = "下线日期")
-    private String xxrq;
-    /**
-     * 应用系统分类代码
-     */
-    @ApiModelProperty(value = "应用系统分类代码")
-    private String yyxtfldm;
-    /**
-     * 公安警种分类代码
-     */
-    @ApiModelProperty(value = "公安警种分类代码")
-    private String gajzfldm;
-    /**
-     * 公安业务职责分类代码
-     */
-    @ApiModelProperty(value = "公安业务职责分类代码")
-    private String gazzfldm;
-    /**
-     * 系统在用标识
-     */
-    @ApiModelProperty(value = "系统在用标识")
-    private String xtzybs;
-    /**
-     * 系统注销标识
-     */
-    @ApiModelProperty(value = "系统注销标识")
-    private String xtzxbs;
-    /**
-     * 系统建设标识
-     */
-    @ApiModelProperty(value = "系统建设标识")
-    private String xtjsbs;
-    /**
-     * 系统架构类型
-     */
-    @ApiModelProperty(value = "系统架构类型")
-    private String xtjglx;
-    /**
-     * 应用系统访问地址
-     */
-    @ApiModelProperty(value = "应用系统访问地址")
-    private String yyxtfwdz;
-    /**
-     * 业务使用场景代码
-     */
-    @ApiModelProperty(value = "业务使用场景代码")
-    private String ywsycjdm;
-    /**
-     * 应用系统图标
-     */
-    @ApiModelProperty(value = "应用系统图标")
-    private String yyxttb;
-
-}

+ 0 - 29
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/appservice/v1/vo/AppResourceAcceptVo.java

@@ -1,29 +0,0 @@
-package com.dragoninfo.dcuc.authweb.restcontroller.api.appservice.v1.vo;
-
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import java.util.List;
-/**
- * 推送应用和菜单数据Vo
- * @author mazq
- * @date 2021/2/19
- */
-@ApiModel(value = "推送应用和菜单资源vo")
-@Data
-public class AppResourceAcceptVo {
-
-    /**
-     * 推送过来的应用实体类Vo
-     */
-    @ApiModelProperty(value = "推送应用资源vo")
-    private AppInfoAcceptVo tAppSystem;
-    /**
-     * 推送过来的应用对应的菜单实体类Vo
-     */
-    @ApiModelProperty(value = "推送菜单资源vo")
-    private List<MenuResourceAcceptVo> tAppFunctionList;
-
-
-}

+ 0 - 52
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/appservice/v1/vo/MenuResourceAcceptVo.java

@@ -1,52 +0,0 @@
-package com.dragoninfo.dcuc.authweb.restcontroller.api.appservice.v1.vo;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-/**
- * 推送菜单Vo
- * @author mazq
- * @date 2021/2/18
- */
-@ApiModel(value = "推送菜单资源vo")
-@Data
-public class MenuResourceAcceptVo {
-
-    private String id;
-    /**
-     * 功能编号
-     */
-    @ApiModelProperty(value = "功能编号")
-    private String gnbh;
-    /**
-     * 功能说明
-     */
-    @ApiModelProperty(value = "功能说明")
-    private String gnsm;
-    /**
-     * 上级功能编号
-     */
-    @ApiModelProperty(value = "上级功能编号")
-    private String sjgnbh;
-    /**
-     * 功能使用场景代码
-     */
-    @ApiModelProperty(value = "功能使用场景代码")
-    private String gnsycjdm;
-    /**
-     * 设计安全隐私类别
-     */
-    @ApiModelProperty(value = " 设计安全隐私类别")
-    private String sjaqyslb;
-    /**
-     * 在用状态
-     */
-    @ApiModelProperty(value = "在用状态")
-    private String zyzt;
-    /**
-     * 功能名称
-     */
-    @ApiModelProperty(value = "功能名称")
-    private String gnmc;
-}

+ 0 - 65
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/appservice/v1/vo/ServiceResourceAcceptVo.java

@@ -1,65 +0,0 @@
-package com.dragoninfo.dcuc.authweb.restcontroller.api.appservice.v1.vo;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-/**
- * 服务资源推送接收Vo
- * @author mazq
- * @date 2021/2/19
- */
-@ApiModel(value = "推送服务资源vo")
-@Data
-public class ServiceResourceAcceptVo {
-
-    private String id;
-    /**
-     * 服务资源编码
-     */
-    @ApiModelProperty(value = "服务资源编码")
-    private String FWZYBSF;
-    /**
-     * 服务资源名称
-     */
-    @ApiModelProperty(value = "服务资源名称")
-    private String FWZYMC;
-    /**
-     * 服务资源类型
-     */
-    @ApiModelProperty(value = "服务资源类型")
-    private String FWLXDM;
-    /**
-     * 事权单位编号
-     */
-    @ApiModelProperty(value = "事权单位编号")
-    private String FWZYSQDW_JGDM;
-    /**
-     * 管理单位
-     */
-    @ApiModelProperty(value = "管理单位")
-    private String FWZYGLDW_GAJGJGDM;
-    /**
-     * 应用资源标识符
-     */
-    @ApiModelProperty(value = "应用资源标识符")
-    private String TGFWZYD_YYZYBS;
-    /**
-     * 服务资源描述
-     */
-    @ApiModelProperty(value = "服务资源描述")
-    private String FWZYMS;
-    /**
-     * 服务访问地址
-     */
-    @ApiModelProperty(value = "服务访问地址")
-    private String FWFWDZ;
-    /**
-     * 服务资源状态代码 0:未激活;1:启用;2:停止;3:撤销;
-     */
-    @ApiModelProperty(value = "服务资源状态代码")
-    private String FWZYZTDM;
-
-    @ApiModelProperty(value = "信息创建单位GA机构代码")
-    private String XXCZDW_GAJGJGDM;
-}

+ 6 - 6
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v1/controller/AuthServiceController.java

@@ -64,7 +64,7 @@ public class AuthServiceController {
             return ApiResult.setFailMessage("appCode is not null");
         }
         ApplyInfo applyInfo = applyInfoFacade.getAppByCode(appCode);
-        if (applyInfo==null|| BooleanEnum.TRUE.value.equals(applyInfo.getApplyStatus())){
+        if (applyInfo == null || BooleanEnum.TRUE.value.equals(applyInfo.getApplyStatus())) {
             return ApiResult.setFailMessage("app is not enabled");
         }
         Object o = serviceAuthFacade.serviceAuthentication(appCode);
@@ -74,7 +74,7 @@ public class AuthServiceController {
 
     @ApiOperation(value = "授权服务列表")
     @PostMapping("service/search")
-    public ApiResult policeSearch(@RequestBody ApiSearchReq apiSearchReq){
+    public ApiResult policeSearch(@RequestBody ApiSearchReq apiSearchReq) {
         Map<String, SearchOperator[]> requestMap = new HashMap<>();
         requestMap.put("appCode", new SearchOperator[]{SearchOperator.eq});
         requestMap.put("serviceCode", new SearchOperator[]{SearchOperator.eq});
@@ -89,11 +89,11 @@ public class AuthServiceController {
         List<ServiceAuthResultDTO> content = serviceAuthResultDTOS.getContent();
         List<ServiceAuthResultVo> voList = new ArrayList<>(content.size());
 
-        content.forEach(item->{
-            ServiceAuthResultVo vo=new ServiceAuthResultVo();
-            BeanUtils.copyProperties(item,vo);
+        content.forEach(item -> {
+            ServiceAuthResultVo vo = new ServiceAuthResultVo();
+            BeanUtils.copyProperties(item, vo);
             voList.add(vo);
         });
-        return ApiResult.setSuccessPage(serviceAuthResultDTOS.getTotalElements(),voList);
+        return ApiResult.setSuccessPage(serviceAuthResultDTOS.getTotalElements(), voList);
     }
 }

+ 1 - 1
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v1/controller/WorkFlowApiController.java

@@ -3,11 +3,11 @@ package com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v1.controller
 import cn.hutool.core.util.StrUtil;
 import com.dragoninfo.dcuc.app.entity.ApplyInfo;
 import com.dragoninfo.dcuc.app.entity.ServiceResource;
-import com.dragoninfo.dcuc.app.enumresources.WorkFlowStatusEnum;
 import com.dragoninfo.dcuc.app.facade.IApplyInfoFacade;
 import com.dragoninfo.dcuc.app.facade.IServiceResourceFacade;
 import com.dragoninfo.dcuc.auth.auth.dto.ServiceAuthFlowDTO;
 import com.dragoninfo.dcuc.auth.auth.dto.WorkFlowResutlAcceptDTO;
+import com.dragoninfo.dcuc.auth.auth.enumresources.WorkFlowStatusEnum;
 import com.dragoninfo.dcuc.auth.auth.facade.IServiceAuthFacade;
 import com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v1.vo.ResourceAuthInfoVo;
 import com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v1.vo.ServiceAuthFlowAcceptVo;

+ 11 - 4
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v1/vo/ServiceAuthFlowAcceptVo.java

@@ -1,12 +1,15 @@
 package com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v1.vo;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import javax.validation.Valid;
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.NotNull;
+import java.util.Date;
 
 /**
  * 提交工作流工单Vo
@@ -79,11 +82,15 @@ public class ServiceAuthFlowAcceptVo {
     @NotBlank
     private String permissionValidType;
 
-    @ApiModelProperty(value = "权限有效起始时间(2020-01-01)")
-    private String startTime;
+    @ApiModelProperty(value = "权限有效起始时间(2020-01-01 00:00:00)")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date startTime;
 
-    @ApiModelProperty(value = "权限有效终止时间(2020-01-01)")
-    private String endTime;
+    @ApiModelProperty(value = "权限有效终止时间(2020-01-01 00:00:00)")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date endTime;
 
     /**
      * 访问资源信息

+ 4 - 7
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v1/vo/ServiceAuthResultVo.java

@@ -1,11 +1,8 @@
 package com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v1.vo;
 
-import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
-import java.util.Date;
-
 /**
  * @Author yica
  * @Date 2021/3/10 15:22
@@ -14,16 +11,16 @@ import java.util.Date;
 public class ServiceAuthResultVo {
 
 
-    @ApiModelProperty(value = "应用code",required = true)
+    @ApiModelProperty(value = "应用code", required = true)
     private String appCode;
 
-    @ApiModelProperty(value = "应用appName",required = true)
+    @ApiModelProperty(value = "应用appName", required = true)
     private String appName;
 
-    @ApiModelProperty(value = "服务code",required = true)
+    @ApiModelProperty(value = "服务code", required = true)
     private String serviceCode;
 
-    @ApiModelProperty(value = "服务名称",required = true)
+    @ApiModelProperty(value = "服务名称", required = true)
     private String serviceName;
 
 

+ 1 - 4
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v3/controller/AuthV3ApiController.java

@@ -5,7 +5,6 @@ import com.dragoninfo.dcuc.app.facade.IApplyInfoFacade;
 import com.dragoninfo.dcuc.auth.auth.dto.AppResourcesDto;
 import com.dragoninfo.dcuc.auth.auth.dto.RoleApiDto;
 import com.dragoninfo.dcuc.auth.auth.facade.IRoleFacade;
-import com.dragoninfo.dcuc.auth.auth.facade.IServiceAuthFacade;
 import com.dragoninfo.dcuc.auth.auth.vo.AppFunVO;
 import com.dragoninfo.dcuc.auth.power.facade.IAppFunInfoFacade;
 import com.dragoninfo.dcuc.authweb.util.VersionUtils;
@@ -26,10 +25,8 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.web.bind.annotation.*;
 
-import javax.annotation.Resource;
 import java.util.*;
 
 /**
@@ -123,7 +120,7 @@ public class AuthV3ApiController {
             return ApiResult.setFailMessage("appCode is not null");
         }
         ApplyInfo applyInfo = applyInfoFacade.getAppByCode(managerRes.getAppCode());
-        if (applyInfo==null|| BooleanEnum.TRUE.value.equals(applyInfo.getApplyStatus())){
+        if (applyInfo == null || BooleanEnum.TRUE.value.equals(applyInfo.getApplyStatus())) {
             return ApiResult.setFailMessage("app is not enabled");
         }
         if (StringUtils.isEmpty(managerRes.getIdcard())) {

+ 4 - 0
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/app/ResourceAuthController.java

@@ -7,6 +7,8 @@ import com.dragoninfo.duceap.core.response.Result;
 import com.dragonsoft.duceap.core.entity.page.PageImpl;
 import com.dragonsoft.duceap.core.entity.page.PageRequest;
 import com.dragonsoft.duceap.core.search.Searchable;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -37,6 +39,8 @@ public class ResourceAuthController {
      * 服务授权工单列表
      * @return
      */
+    @ApiOperation(value = "查询应用列表")
+    @ApiImplicitParam(name = "searchable", value = "查询条件")
     @PostMapping(value = "serviceAuthFlow/search", produces = MediaType.APPLICATION_JSON_VALUE)
     public Result<Page<ServiceAuthFlowVo>> serviceAuthFlowPage(Searchable searchable) {
         Page<ServiceAuthFlowDTO> page = iServiceAuthFacade.serviceAuthFlowPage(searchable.toSearchDTO());

+ 9 - 2
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/app/ResourceListingController.java

@@ -11,12 +11,15 @@ import com.dragoninfo.duceap.core.response.Result;
 import com.dragonsoft.duceap.core.entity.page.PageImpl;
 import com.dragonsoft.duceap.core.entity.page.PageRequest;
 import com.dragonsoft.duceap.core.search.Searchable;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Pageable;
 import org.springframework.http.MediaType;
 import org.springframework.web.bind.annotation.*;
+
 import java.util.ArrayList;
 import java.util.List;
 import java.util.stream.Collectors;
@@ -33,11 +36,12 @@ public class ResourceListingController {
     @Autowired
     private IResourceFacade iResourceFacade;
 
-
-     /**
+    /**
      * 获取应用和服务资源列表
      * 全量获取时,如果是第一页获取失败表示该资源列表都获取失败
      */
+    @ApiOperation(value = "获取应用和服务资源列表")
+    @ApiImplicitParam(name = "requestParam", value = "获取资源数据请求数据封装对象")
     @PostMapping(value = "getResourceRemote")
     public Result<List<ResourceRequestResult>> getResourceListing(@RequestBody ResourceRequestParam requestParam) {
         ResourceRequestParamDTO paramDTO = new ResourceRequestParamDTO();
@@ -55,6 +59,7 @@ public class ResourceListingController {
     /**
      * 资源同步表与应用、服务资源同步
      */
+    @ApiOperation(value = "资源同步表与应用、服务资源同步")
     @GetMapping(value = "sync")
     public Result ResourceSync() {
         iResourceFacade.resourceSync();
@@ -64,6 +69,8 @@ public class ResourceListingController {
     /**
      * 服务资源列表分页查询
      */
+    @ApiOperation(value = "查询应用列表")
+    @ApiImplicitParam(name = "searchable", value = "查询条件")
     @PostMapping(value = "serviceResource/search", produces = MediaType.APPLICATION_JSON_VALUE)
     public Result<Page<ServiceResourceVo>> serviceResourcePage(Searchable searchable) {
         Page<ServiceResourceDTO> page = iResourceFacade.serviceResourcePage(searchable.toSearchDTO());

+ 5 - 0
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/app/vo/ListingParam.java

@@ -1,5 +1,7 @@
 package com.dragoninfo.dcuc.authweb.restcontroller.app.vo;
 
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.util.List;
@@ -10,15 +12,18 @@ import java.util.List;
  * @date 2020/11/26
  */
 @Data
+@ApiModel(value = "应用服务资源获取参数封装类")
 public class ListingParam {
 
     /**
      * 资源枚举类ResourceTypeEnum 资源id 表示想要获取哪一类的资源
      */
+    @ApiModelProperty(value = "资源枚举类ResourceTypeEnum 资源id 表示想要获取哪一类的资源")
     private String resourceId;
 
     /**
      * 想要获取该类资源哪些页码的数据
      */
+    @ApiModelProperty(value = "想要获取该类资源的页码数集合")
     private List<Integer> pageNo;
 }

+ 7 - 0
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/app/vo/ResourceRequestParam.java

@@ -1,5 +1,7 @@
 package com.dragoninfo.dcuc.authweb.restcontroller.app.vo;
 
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.util.List;
@@ -10,27 +12,32 @@ import java.util.List;
  * @date 2020/11/26
  */
 @Data
+@ApiModel(value = "获取资源数据请求数据封装对象")
 public class ResourceRequestParam {
 
     /**
      * 是否获取全量应用和服务资源数据
      */
+    @ApiModelProperty(value = "是否获取全量应用和服务资源数据")
     private boolean listingAll;
 
     /**
      * 不全量获取时,获取资源数据参数封装集合
      * 当listingAll为false时有用
      */
+    @ApiModelProperty(value = "不全量获取时,获取资源数据参数封装集合,当listingAll为false时有用")
     private List<ListingParam> listingParams;
 
     /**
      * 获取每页的数量
      */
+    @ApiModelProperty(value = "获取每页的数量")
     private Integer pageSize;
 
     /**
      * 全量获取时有用
      * 从currentPageNo页开始获取
      */
+    @ApiModelProperty(value = "从currentPageNo页开始获取,当listingAll为true时有用,默认为1")
     private Integer currentPageNo;
 }

+ 7 - 0
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/app/vo/ResourceRequestResult.java

@@ -1,5 +1,7 @@
 package com.dragoninfo.dcuc.authweb.restcontroller.app.vo;
 
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.util.List;
@@ -10,26 +12,31 @@ import java.util.List;
  * @date 2020/11/26
  */
 @Data
+@ApiModel(value = "资源获取结果")
 public class ResourceRequestResult {
 
     /**
      * 资源枚举类ResourceTypeEnum 资源id
      */
+    @ApiModelProperty(value = "资源枚举类资源id")
     private String resourceId;
 
     /**
      * 当获取失败时,失败的页码集合
      */
+    @ApiModelProperty(value = "当获取失败时,失败的页码集合")
     private List<Integer> pageNos;
 
     /**
      * 总页码数量
      */
+    @ApiModelProperty(value = "总页码数量")
     private Integer totalPages;
 
     /**
      * 是否获取成功
      */
+    @ApiModelProperty(value = "是否获取成功")
     private String success;
 
     public ResourceRequestResult() {

+ 12 - 25
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/app/vo/ResourceVo.java

@@ -1,5 +1,7 @@
 package com.dragoninfo.dcuc.authweb.restcontroller.app.vo;
 
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 /**
@@ -9,70 +11,55 @@ import lombok.Data;
  * @create 2020-11-25 14:21
  */
 @Data
+@ApiModel(value = "资源展示对象父类")
 public class ResourceVo {
 
+    @ApiModelProperty(value = "id")
     private String id;
     /**
      * 资源枚举类-资源id
      */
+    @ApiModelProperty(value = "资源枚举类-资源id")
     private String resourceId;
 
     /**
      * 资源枚举类-资源类型
      */
+    @ApiModelProperty(value = "资源枚举类-资源类型")
     private String resourceType;
 
     /**
      * 资源枚举类-资源提供方
      */
+    @ApiModelProperty(value = "资源枚举类-资源提供方")
     private String resourceProvider;
     /**
      * 建设单位id(orgId)
      */
+    @ApiModelProperty(value = "建设单位id(orgId)")
     private String buildUnitId;
 
     /**
      * 建设单位编码(orgCode)
      */
+    @ApiModelProperty(value = "建设单位编码(orgCode)")
     private String buildUnitCode;
 
     /**
      * 建设单位名称
      */
+    @ApiModelProperty(value = "建设单位名称")
     private String buildUnit;
 
     /**
      * 建设单位负责人
      */
+    @ApiModelProperty(value = "建设单位负责人")
     private String buildPrincipal;
 
     /**
      * 建设单位负责人电话
      */
+    @ApiModelProperty(value = "建设单位负责人电话")
     private String buildPrincipalPhone;
-
-    /**
-     * 承建单位id(ManufacturerId)
-     */
-    private String contractUnitId;
-
-    /**
-     * 承建单位编码(ManufacturerCode)
-     */
-    private String contractUnitCode;
-
-    /**
-     * 承建单位名称
-     */
-    private String contractUnit;
-
-    /**
-     * 承建单位负责人
-     */
-    private String contractPrincipal;
-
-    /**
-     * 承建单位负责人电话
-     */
-    private String contractPrincipalPhone;
 }

+ 36 - 4
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/app/vo/ServiceAuthFlowVo.java

@@ -1,6 +1,8 @@
 package com.dragoninfo.dcuc.authweb.restcontroller.app.vo;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import org.springframework.format.annotation.DateTimeFormat;
 
@@ -14,68 +16,98 @@ import java.util.List;
  * @create 2020-11-25 14:21
  */
 @Data
+@ApiModel(value = "服务授权工单vo")
 public class ServiceAuthFlowVo {
 
+    @ApiModelProperty(value = "id")
     private String id;
     /**
      * 申请人身份证号
      */
+    @ApiModelProperty(value = "申请人身份证号")
     private String applicantIdcard;
 
     /**
      * 申请人姓名
      */
+    @ApiModelProperty(value = "申请人姓名")
     private String applicantName;
 
     /**
      * 申请机构code
      */
+    @ApiModelProperty(value = "申请机构code")
     private String applicantOrgCode;
 
     /**
      * 申请机构名称
      */
+    @ApiModelProperty(value = "申请机构名称")
     private String applicantOrgName;
     /**
      * 应用代码
      */
+    @ApiModelProperty(value = "应用代码")
     private String appCode;
 
     /**
      * 应用名称
      */
+    @ApiModelProperty(value = "应用名称")
     private String appName;
     /**
-     * 工作单类型
+     * 申请单类型
      * SERVICE_AUTH-服务授权工作单 SERVICE_CANCEL-服务权限撤销工作单
      */
+    @ApiModelProperty(value = "申请单类型,SERVICE_AUTH-服务授权工作单 SERVICE_CANCEL-服务权限撤销工作单")
     private String flowType;
 
     /**
-     * 工作状态
+     * 工作状态
      * 根据审批服务工作流状态确定
      */
+    @ApiModelProperty(value = "工作流状态")
     private String flowStatus;
 
     /**
-     * 工单号
+     * 工作流id
      */
-    private String orderNo;
+    @ApiModelProperty(value = "工作流id")
+    private String flowId;
 
     /**
      * 需要操作的服务编码集合
      */
+    @ApiModelProperty(value = "服务编码集合")
     private List<String> serviceCodes;
 
     /**
      * 服务资源名称集合
      */
+    @ApiModelProperty(value = "服务名称集合")
     private List<String> serviceNames;
 
     /**
      * 申请时间
      */
+    @ApiModelProperty(value = "id")
     @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date applyTime;
+
+    /**
+     * 申请时间
+     */
+    @ApiModelProperty(value = "id")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date startTime;
+
+    /**
+     * 申请时间
+     */
+    @ApiModelProperty(value = "id")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date endTime;
 }

+ 5 - 5
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/app/vo/ServiceResourceVo.java

@@ -1,6 +1,6 @@
 package com.dragoninfo.dcuc.authweb.restcontroller.app.vo;
 
-import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
@@ -11,22 +11,22 @@ import lombok.Data;
  * @create 2020-11-25 14:21
  */
 @Data
-@Api(value = "服务资源vo")
+@ApiModel(value = "服务资源Vo")
 public class ServiceResourceVo extends ResourceVo {
 
     /**
      * 服务在用状态
      */
-    @ApiModelProperty(value = "服务在用状态",required = true)
+    @ApiModelProperty(value = "服务在用状态")
     private String serviceStatus;
     /**
      * 服务编码
      */
-    @ApiModelProperty(value = "服务编码",required = true)
+    @ApiModelProperty(value = "服务编码")
     private String serviceCode;
     /**
      * 服务名称
      */
-    @ApiModelProperty(value = "服务名称",required = true)
+    @ApiModelProperty(value = "服务名称")
     private String serviceName;
 }

+ 19 - 20
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/auth/ServiceAuthResultController.java

@@ -28,11 +28,10 @@ import java.util.List;
  **/
 @Api(tags = {"服务授权管理接口"})
 @RestController
-@RequestMapping(value = "/authsvr/"+ VersionUtils.VERSION_UID +"/service/")
+@RequestMapping(value = "/authsvr/" + VersionUtils.VERSION_UID + "/service/")
 public class ServiceAuthResultController {
 
 
-
     @Autowired
     private IServiceAuthResultFacade serviceAuthResultFacade;
 
@@ -46,33 +45,33 @@ public class ServiceAuthResultController {
     @ApiOperation(value = "服务授权列表")
     @ApiImplicitParam(name = "searchDTO", value = "查询条件")
     @PostMapping(value = "search")
-    public Result page(SearchDTO searchDTO){
+    public Result page(SearchDTO searchDTO) {
         Page<ServiceAuthResultDTO> serviceAuthResultDTOS = serviceAuthResultFacade.serviceAuthResultPage(searchDTO);
-        List<ServiceAuthVo> list=new ArrayList<>();
-        serviceAuthResultDTOS.forEach(item->{
-            ServiceAuthVo serviceAuthVo=new ServiceAuthVo();
-            BeanUtils.copyProperties(item,serviceAuthVo);
+        List<ServiceAuthVo> list = new ArrayList<>();
+        serviceAuthResultDTOS.forEach(item -> {
+            ServiceAuthVo serviceAuthVo = new ServiceAuthVo();
+            BeanUtils.copyProperties(item, serviceAuthVo);
             list.add(serviceAuthVo);
         });
-        return Result.success(serviceAuthResultDTOS.getTotalElements(),list);
+        return Result.success(serviceAuthResultDTOS.getTotalElements(), list);
     }
 
 
     @ApiOperation(value = "服务授权修改")
     @ApiImplicitParam(name = "ServiceAuthVo", value = "服务授权vo")
     @PutMapping(value = "auth/{id}")
-    public Result updateService(@RequestBody ServiceAuthVo vo){
+    public Result updateService(@RequestBody ServiceAuthVo vo) {
         return Result.success();
     }
 
     @ApiOperation(value = "服务授权保存")
     @ApiImplicitParam(name = "ServiceAuthVo", value = "服务授权vo")
     @PostMapping(value = "auth")
-    public Result saveService(@RequestBody ServiceAuthVo vo){
-        ServiceAuthResultDTO dto=new ServiceAuthResultDTO();
-        BeanUtils.copyProperties(vo,dto);
+    public Result saveService(@RequestBody ServiceAuthVo vo) {
+        ServiceAuthResultDTO dto = new ServiceAuthResultDTO();
+        BeanUtils.copyProperties(vo, dto);
         ResponseDTO responseDTO = serviceAuthResultFacade.saveServiceAuthResult(dto);
-        if (ResponseDTO.SUCCESS_CODE.equals(responseDTO.getStatusCode())){
+        if (ResponseDTO.SUCCESS_CODE.equals(responseDTO.getStatusCode())) {
             return Result.success(responseDTO.getMessage());
         }
         return Result.fail(responseDTO.getMessage());
@@ -82,9 +81,9 @@ public class ServiceAuthResultController {
     @ApiOperation(value = "服务授权删除")
     @ApiImplicitParam(name = "searchDTO", value = "服务授权vo")
     @DeleteMapping(value = "auth/{id}")
-    public Result delService(@PathVariable("id") String id){
+    public Result delService(@PathVariable("id") String id) {
         ResponseDTO responseDTO = serviceAuthResultFacade.delServiceAuthResult(id);
-        if (ResponseDTO.SUCCESS_CODE.equals(responseDTO.getStatusCode())){
+        if (ResponseDTO.SUCCESS_CODE.equals(responseDTO.getStatusCode())) {
             return Result.success(responseDTO.getMessage());
         }
         return Result.fail(responseDTO.getMessage());
@@ -94,16 +93,16 @@ public class ServiceAuthResultController {
     @ApiOperation(value = "服务授权详情")
     @ApiImplicitParam(name = "ServiceAuthVo", value = "服务授权vo")
     @GetMapping(value = "auth/{id}")
-    public Result getService(@PathVariable("id") String id){
+    public Result getService(@PathVariable("id") String id) {
         ServiceAuthResultDTO dto = serviceAuthResultFacade.getDetail(id);
-        ServiceAuthVo vo=new ServiceAuthVo();
-        BeanUtils.copyProperties(dto,vo);
+        ServiceAuthVo vo = new ServiceAuthVo();
+        BeanUtils.copyProperties(dto, vo);
         ApplyInfo applyInfo = applyInfoFacade.applyDetail(dto.getAppId());
-        if (applyInfo!=null){
+        if (applyInfo != null) {
             vo.setAppName(applyInfo.getApplyName());
         }
         ServiceResource serviceResource = serviceResourceFacade.detailByCode(dto.getServiceCode());
-        if (serviceResource!=null) {
+        if (serviceResource != null) {
             vo.setServiceName(serviceResource.getServiceName());
         }
         return Result.success(vo);

+ 13 - 10
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/auth/ServiceResourceController.java

@@ -14,7 +14,10 @@ import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -25,7 +28,7 @@ import java.util.List;
  **/
 @Api(tags = {"服务资源管理接口"})
 @RestController
-@RequestMapping(value = "/authsvr/"+ VersionUtils.VERSION_UID +"/resource/")
+@RequestMapping(value = "/authsvr/" + VersionUtils.VERSION_UID + "/resource/")
 public class ServiceResourceController {
     @Autowired
     private IServiceResourceFacade serviceResourceFacade;
@@ -33,17 +36,17 @@ public class ServiceResourceController {
     @ApiOperation(value = "服务资源列表")
     @ApiImplicitParam(name = "serviceName", value = "查询条件")
     @PostMapping(value = "search/drop")
-    public Result droplist(@RequestBody ServiceResourceVo vo){
-        SearchDTO searchDTO=new SearchDTO();
+    public Result droplist(@RequestBody ServiceResourceVo vo) {
+        SearchDTO searchDTO = new SearchDTO();
         searchDTO.setSize("100");
         searchDTO.setPage("0");
-        Searchable searchable=Searchable.toSearchable(searchDTO);
-        searchable.addSearchFilter("serviceName", SearchOperator.like,vo.getServiceName());
+        Searchable searchable = Searchable.toSearchable(searchDTO);
+        searchable.addSearchFilter("serviceName", SearchOperator.like, vo.getServiceName());
         Page<ServiceResource> serviceResources = serviceResourceFacade.resourcePages(searchable.toSearchDTO());
-        List<ServiceResourceVo> list=new ArrayList<>();
-        serviceResources.getContent().forEach(item->{
-            ServiceResourceVo resourceVo=new ServiceResourceVo();
-            BeanUtils.copyProperties(item,resourceVo);
+        List<ServiceResourceVo> list = new ArrayList<>();
+        serviceResources.getContent().forEach(item -> {
+            ServiceResourceVo resourceVo = new ServiceResourceVo();
+            BeanUtils.copyProperties(item, resourceVo);
             list.add(resourceVo);
         });
         return Result.success(list);

+ 4 - 4
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/auth/vo/ServiceAuthVo.java

@@ -13,21 +13,21 @@ import java.util.Date;
  **/
 @Data
 @Api(value = "服务授权vo")
-public class  ServiceAuthVo {
+public class ServiceAuthVo {
     @ApiModelProperty(value = "id",required = true)
     private String id;
 
-    @ApiModelProperty(value = "应用id",required = true)
+    @ApiModelProperty(value = "应用id", required = true)
     private String appId;
 
-    @ApiModelProperty(value = "应用code",required = true)
+    @ApiModelProperty(value = "应用code", required = true)
     private String appCode;
 
     @ApiModelProperty(value = "应用名称",required = true)
     private String appName;
 
 
-    @ApiModelProperty(value = "服务id",required = true)
+    @ApiModelProperty(value = "服务id", required = true)
     private String serviceId;
 
     @ApiModelProperty(value = "服务code",required = true)

+ 3 - 10
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/auth/vo/ServiceResourceBackVo.java

@@ -1,12 +1,9 @@
 package com.dragoninfo.dcuc.authweb.restcontroller.auth.vo;
 
-import com.baomidou.mybatisplus.annotation.TableLogic;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
-import java.util.Date;
-
 /**
  * @Author yica
  * @Date 2021/3/11 13:37
@@ -15,18 +12,17 @@ import java.util.Date;
 @Api(value = "服务资源vo")
 public class ServiceResourceBackVo {
 
-    @ApiModelProperty(value = "id",required = true)
+    @ApiModelProperty(value = "id", required = true)
     private String id;
 
 
-
-    @ApiModelProperty(value = "资源枚举类-资源类型",required = true)
+    @ApiModelProperty(value = "资源枚举类-资源类型", required = true)
     private String resourceType;
 
     /**
      * 服务编码
      */
-    @ApiModelProperty(value = "服务编码",required = true)
+    @ApiModelProperty(value = "服务编码", required = true)
     private String serviceCode;
 
     /**
@@ -48,7 +44,4 @@ public class ServiceResourceBackVo {
     private String serviceUrl;
 
 
-
-
-
 }