Quellcode durchsuchen

feature(1.数据安全级别导入 2.数据分级导入): 1.数据安全级别导入 2.数据分级导入

1.数据安全级别导入 2.数据分级导入
mazq vor 4 Jahren
Ursprung
Commit
2940a9d8bd

+ 24 - 1
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/download/DownloadController.java

@@ -59,6 +59,7 @@ public class DownloadController {
     public final String GOVERNMENTPERSON_TEMPLATE_RLPATH = "/template/governmentpersonnelTemplate.xls";
     public final String GOVERNMENTPERSON_TEMPLATE_RLPATH = "/template/governmentpersonnelTemplate.xls";
     public final String ORG_TEMPLATE_RLPATH = "/template/OrgTemplate.xls";
     public final String ORG_TEMPLATE_RLPATH = "/template/OrgTemplate.xls";
     public final String USER_TEMPLATE_RLPATH = "/template/UserTemplate.xls";
     public final String USER_TEMPLATE_RLPATH = "/template/UserTemplate.xls";
+
     /**
     /**
      * 客体_服务资源模板
      * 客体_服务资源模板
      */
      */
@@ -73,11 +74,23 @@ public class DownloadController {
      */
      */
     public final String APPLY_TEMPLATE_RLPATH = "/template/applyTemplate.xls";
     public final String APPLY_TEMPLATE_RLPATH = "/template/applyTemplate.xls";
 
 
+    /**
+     * 主客体_数据分级模板
+     */
+    public final String DATA_LEVEL_TEMPLATE_RLPATH = "/template/dataLevelTemplate.xls";
+
+    /**
+     * 主客体_数据安全级别模板
+     */
+    public final String DATA_SEC_TEMPLATE_RLPATH = "/template/dataSecTemplate.xls";
+
     private Logger logger = LoggerFactory.getLogger(DownloadController.class);
     private Logger logger = LoggerFactory.getLogger(DownloadController.class);
 
 
     @ApiOperation(value = "获取xls附件")
     @ApiOperation(value = "获取xls附件")
     @ApiImplicitParam(name = "type", value = "附件类型:police 警员,auxiliaryPolice 辅警, " +
     @ApiImplicitParam(name = "type", value = "附件类型:police 警员,auxiliaryPolice 辅警, " +
-            "externalPersonnel 外部人员, manager 管理员, govUser 政府人员, serviceResource 服务资源,appFun 功能资源, apply  应用资源,org 机构, user 人员 ", required = true)
+            "externalPersonnel 外部人员, manager 管理员, govUser 政府人员, serviceResource 服务资源,appFun 功能资源, apply  应用资源," +
+            "org 机构, user 人员 dataLevel 数据分级  dataSec 数据安全级别",
+            required = true)
     @GetMapping(value = "/downTemplate")
     @GetMapping(value = "/downTemplate")
     public HttpServletResponse downTemplate(@RequestParam("type") String type,  HttpServletResponse response) {
     public HttpServletResponse downTemplate(@RequestParam("type") String type,  HttpServletResponse response) {
         ApplicationHome home = new ApplicationHome(getClass());
         ApplicationHome home = new ApplicationHome(getClass());
@@ -106,6 +119,12 @@ public class DownloadController {
         }else if (StringUtils.equals(type, "apply")){
         }else if (StringUtils.equals(type, "apply")){
             //授权主客体管理_应用资源模板
             //授权主客体管理_应用资源模板
             response = down(response,  APPLY_TEMPLATE_RLPATH);
             response = down(response,  APPLY_TEMPLATE_RLPATH);
+        }else if (StringUtils.equals(type, "dataLevel")){
+            //授权主客体管理_应用资源模板
+            response = down(response,  DATA_LEVEL_TEMPLATE_RLPATH);
+        }else if (StringUtils.equals(type, "dataSec")){
+            //授权主客体管理_应用资源模板
+            response = down(response,  DATA_SEC_TEMPLATE_RLPATH);
         }
         }
         return response;
         return response;
     }
     }
@@ -143,6 +162,10 @@ public class DownloadController {
                 fileName = "客体_功能资源导入.xls";
                 fileName = "客体_功能资源导入.xls";
             }else if ("applyTemplate.xls".equals( resource.getFilename())) {
             }else if ("applyTemplate.xls".equals( resource.getFilename())) {
                 fileName = "主客体_应用资源导入.xls";
                 fileName = "主客体_应用资源导入.xls";
+            }else if ("dataLevelTemplate.xls".equals( resource.getFilename())) {
+                fileName = "主客体_数据分级导入.xls";
+            }else if ("dataSecTemplate.xls".equals( resource.getFilename())) {
+                fileName = "主客体_数据安全级别导入.xls";
             }
             }
             response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
             response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
             response.addHeader("Content-Length", "" + resource.contentLength());
             response.addHeader("Content-Length", "" + resource.contentLength());

+ 30 - 0
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/sub/SubImportController.java

@@ -2,6 +2,8 @@ package com.dragoninfo.dcuc.authweb.restcontroller.sub;
 
 
 import com.dragoninfo.dcuc.app.facade.IApplyInfoFacade;
 import com.dragoninfo.dcuc.app.facade.IApplyInfoFacade;
 import com.dragoninfo.dcuc.app.facade.IServiceResourceFacade;
 import com.dragoninfo.dcuc.app.facade.IServiceResourceFacade;
+import com.dragoninfo.dcuc.app.facade.sub.IDataLevelFacade;
+import com.dragoninfo.dcuc.app.facade.sub.IDataSecFacade;
 import com.dragoninfo.dcuc.auth.power.facade.IAppFunInfoFacade;
 import com.dragoninfo.dcuc.auth.power.facade.IAppFunInfoFacade;
 import com.dragoninfo.dcuc.auth.sub.facade.IAuthOrgInfoFacade;
 import com.dragoninfo.dcuc.auth.sub.facade.IAuthOrgInfoFacade;
 import com.dragoninfo.dcuc.auth.sub.facade.IAuthUserInfoFacade;
 import com.dragoninfo.dcuc.auth.sub.facade.IAuthUserInfoFacade;
@@ -43,6 +45,12 @@ public class SubImportController {
     @Autowired
     @Autowired
     private IAuthOrgInfoFacade authOrgInfoFacade;
     private IAuthOrgInfoFacade authOrgInfoFacade;
 
 
+    @Autowired
+    private IDataLevelFacade dataLevelFacade;
+
+    @Autowired
+    private IDataSecFacade dataSecFacade;
+
     @GetMapping(value = "/app/import")
     @GetMapping(value = "/app/import")
     @ApiImplicitParam(name = "fileId", value = "导入文件id")
     @ApiImplicitParam(name = "fileId", value = "导入文件id")
     @ApiOperation(value = "授权主客体管理_应用资源导入")
     @ApiOperation(value = "授权主客体管理_应用资源导入")
@@ -99,4 +107,26 @@ public class SubImportController {
         return Result.success();
         return Result.success();
     }
     }
 
 
+    @GetMapping(value = "dataLevel/import")
+    @ApiImplicitParam(name = "fileId", value = "导入文件id")
+    @ApiOperation(value = "授权主客体管理_机构信息导入")
+    public Result dataLevelImExcel(@RequestParam("fileId") String fileId) {
+        ResponseStatus responseStatus = dataLevelFacade.impExcel(fileId);
+        if (!responseStatus.getStatusCode().equals(ResponseStatus.SUCCESS_CODE)){
+            return Result.fail(responseStatus.getStatusCode(), responseStatus.getMessage());
+        }
+        return Result.success();
+    }
+
+    @GetMapping(value = "dataSec/import")
+    @ApiImplicitParam(name = "fileId", value = "导入文件id")
+    @ApiOperation(value = "授权主客体管理_机构信息导入")
+    public Result dataSecImpExcel(@RequestParam("fileId") String fileId) {
+        ResponseStatus responseStatus = dataSecFacade.impExcel(fileId);
+        if (!responseStatus.getStatusCode().equals(ResponseStatus.SUCCESS_CODE)){
+            return Result.fail(responseStatus.getStatusCode(), responseStatus.getMessage());
+        }
+        return Result.success();
+    }
+
 }
 }

BIN
src/main/resources/template/OrgTemplate.xls


BIN
src/main/resources/template/UserTemplate.xls


BIN
src/main/resources/template/dataLevelTemplate.xls


BIN
src/main/resources/template/dataSecTemplate.xls