|
@@ -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());
|