|
@@ -68,12 +68,16 @@ public class DownloadController {
|
|
|
* 客体_功能资源模板
|
|
|
*/
|
|
|
public final String APP_FUN_TEMPLATE_RLPATH = "/template/appFunTemplate.xls";
|
|
|
+ /**
|
|
|
+ * 主客体_应用资源模板
|
|
|
+ */
|
|
|
+ public final String APPLY_TEMPLATE_RLPATH = "/template/applyTemplate.xls";
|
|
|
|
|
|
private Logger logger = LoggerFactory.getLogger(DownloadController.class);
|
|
|
|
|
|
@ApiOperation(value = "获取xls附件")
|
|
|
- @ApiImplicitParam(name = "type", value = "附件类型:police 警员,auxiliaryPolice 辅警 " +
|
|
|
- "externalPersonnel 外部人员 manager 管理员 govUser 政府人员 ", required = true)
|
|
|
+ @ApiImplicitParam(name = "type", value = "附件类型:police 警员,auxiliaryPolice 辅警, " +
|
|
|
+ "externalPersonnel 外部人员, manager 管理员, govUser 政府人员, serviceResource 服务资源,appFun 功能资源, apply 应用资源,org 机构, user 人员 ", required = true)
|
|
|
@GetMapping(value = "/downTemplate")
|
|
|
public HttpServletResponse downTemplate(@RequestParam("type") String type, HttpServletResponse response) {
|
|
|
ApplicationHome home = new ApplicationHome(getClass());
|
|
@@ -97,8 +101,11 @@ public class DownloadController {
|
|
|
//授权主客体管理_服务资源模板
|
|
|
response = down(response, SERVICE_RESOURCE_TEMPLATE_RLPATH);
|
|
|
}else if (StringUtils.equals(type, "appFun")){
|
|
|
- //授权主客体管理_服务资源模板
|
|
|
+ //授权主客体管理_功能资源模板
|
|
|
response = down(response, APP_FUN_TEMPLATE_RLPATH);
|
|
|
+ }else if (StringUtils.equals(type, "apply")){
|
|
|
+ //授权主客体管理_应用资源模板
|
|
|
+ response = down(response, APPLY_TEMPLATE_RLPATH);
|
|
|
}
|
|
|
return response;
|
|
|
}
|
|
@@ -134,6 +141,8 @@ public class DownloadController {
|
|
|
fileName = "客体_服务资源导入.xls";
|
|
|
}else if ("appFunTemplate.xls".equals( resource.getFilename())) {
|
|
|
fileName = "客体_功能资源导入.xls";
|
|
|
+ }else if ("applyTemplate.xls".equals( resource.getFilename())) {
|
|
|
+ fileName = "主客体_应用资源导入.xls";
|
|
|
}
|
|
|
response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
|
|
|
response.addHeader("Content-Length", "" + resource.contentLength());
|