|
|
|
@ -3,6 +3,8 @@ package com.ruoyi.portal.controller;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.IOException;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.ruoyi.portal.domain.SecureDocumentRequest;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
@ -38,7 +40,7 @@ public class HwWebDocumentController extends BaseController
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询Hw资料文件列表
|
|
|
|
* 查询Hw资料文件列表
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RequiresPermissions("com.ruoyi.portal:hwWebDocument:list")
|
|
|
|
@RequiresPermissions("portal:hwWebDocument:list")
|
|
|
|
@GetMapping("/list")
|
|
|
|
@GetMapping("/list")
|
|
|
|
public TableDataInfo list(HwWebDocument hwWebDocument)
|
|
|
|
public TableDataInfo list(HwWebDocument hwWebDocument)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -50,7 +52,7 @@ public class HwWebDocumentController extends BaseController
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 导出Hw资料文件列表
|
|
|
|
* 导出Hw资料文件列表
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RequiresPermissions("com.ruoyi.portal:hwWebDocument:export")
|
|
|
|
@RequiresPermissions("portal:hwWebDocument:export")
|
|
|
|
@Log(title = "Hw资料文件", businessType = BusinessType.EXPORT)
|
|
|
|
@Log(title = "Hw资料文件", businessType = BusinessType.EXPORT)
|
|
|
|
@PostMapping("/export")
|
|
|
|
@PostMapping("/export")
|
|
|
|
public void export(HttpServletResponse response, HwWebDocument hwWebDocument)
|
|
|
|
public void export(HttpServletResponse response, HwWebDocument hwWebDocument)
|
|
|
|
@ -63,7 +65,7 @@ public class HwWebDocumentController extends BaseController
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 获取Hw资料文件详细信息
|
|
|
|
* 获取Hw资料文件详细信息
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RequiresPermissions("com.ruoyi.portal:hwWebDocument:query")
|
|
|
|
@RequiresPermissions("portal:hwWebDocument:query")
|
|
|
|
@GetMapping(value = "/{documentId}")
|
|
|
|
@GetMapping(value = "/{documentId}")
|
|
|
|
public AjaxResult getInfo(@PathVariable("documentId") Long documentId)
|
|
|
|
public AjaxResult getInfo(@PathVariable("documentId") Long documentId)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -73,7 +75,7 @@ public class HwWebDocumentController extends BaseController
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 新增Hw资料文件
|
|
|
|
* 新增Hw资料文件
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RequiresPermissions("com.ruoyi.portal:hwWebDocument:add")
|
|
|
|
@RequiresPermissions("portal:hwWebDocument:add")
|
|
|
|
@Log(title = "Hw资料文件", businessType = BusinessType.INSERT)
|
|
|
|
@Log(title = "Hw资料文件", businessType = BusinessType.INSERT)
|
|
|
|
@PostMapping
|
|
|
|
@PostMapping
|
|
|
|
public AjaxResult add(@RequestBody HwWebDocument hwWebDocument)
|
|
|
|
public AjaxResult add(@RequestBody HwWebDocument hwWebDocument)
|
|
|
|
@ -84,7 +86,7 @@ public class HwWebDocumentController extends BaseController
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 修改Hw资料文件
|
|
|
|
* 修改Hw资料文件
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RequiresPermissions("com.ruoyi.portal:hwWebDocument:edit")
|
|
|
|
@RequiresPermissions("portal:hwWebDocument:edit")
|
|
|
|
@Log(title = "Hw资料文件", businessType = BusinessType.UPDATE)
|
|
|
|
@Log(title = "Hw资料文件", businessType = BusinessType.UPDATE)
|
|
|
|
@PutMapping
|
|
|
|
@PutMapping
|
|
|
|
public AjaxResult edit(@RequestBody HwWebDocument hwWebDocument)
|
|
|
|
public AjaxResult edit(@RequestBody HwWebDocument hwWebDocument)
|
|
|
|
@ -95,11 +97,28 @@ public class HwWebDocumentController extends BaseController
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 删除Hw资料文件
|
|
|
|
* 删除Hw资料文件
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RequiresPermissions("com.ruoyi.portal:hwWebDocument:remove")
|
|
|
|
@RequiresPermissions("portal:hwWebDocument:remove")
|
|
|
|
@Log(title = "Hw资料文件", businessType = BusinessType.DELETE)
|
|
|
|
@Log(title = "Hw资料文件", businessType = BusinessType.DELETE)
|
|
|
|
@DeleteMapping("/{documentIds}")
|
|
|
|
@DeleteMapping("/{documentIds}")
|
|
|
|
public AjaxResult remove(@PathVariable Long[] documentIds)
|
|
|
|
public AjaxResult remove(@PathVariable Long[] documentIds)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return toAjax(hwWebDocumentService.deleteHwWebDocumentByDocumentIds(documentIds));
|
|
|
|
return toAjax(hwWebDocumentService.deleteHwWebDocumentByDocumentIds(documentIds));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 获取安全文件地址
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@RequiresPermissions("portal:hwWebDocument:query")
|
|
|
|
|
|
|
|
@Log(title = "获取安全文件地址", businessType = BusinessType.OTHER)
|
|
|
|
|
|
|
|
@PostMapping("/getSecureDocumentAddress")
|
|
|
|
|
|
|
|
public AjaxResult getSecureDocumentAddress(@RequestBody SecureDocumentRequest request)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
String address = hwWebDocumentService.verifyAndGetDocumentAddress(request.getDocumentId(), request.getProvidedKey());
|
|
|
|
|
|
|
|
return success(address);
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
return error(e.getMessage());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|