/* */ package com.archive.project.document.controller ; /* */ /* */ import com.archive.common.archiveUtil.TableUtil; /* */ import com.archive.framework.web.controller.BaseController; /* */ import com.archive.framework.web.domain.AjaxResult; /* */ import com.archive.framework.web.page.TableDataInfo; /* */ import com.archive.project.dasz.archivetype.domain.ArchiveType; /* */ import com.archive.project.dasz.archivetype.service.IArchiveTypeService; /* */ import com.archive.project.dasz.physicaltable.service.IPhysicalTableService; /* */ import com.archive.project.dasz.physicaltablecolumn.service.IPhysicalTableColumnService; /* */ import com.archive.project.document.domain.Document; /* */ import com.archive.project.document.service.IDocumentService; /* */ import java.util.List; /* */ import org.apache.shiro.authz.annotation.RequiresPermissions; /* */ import org.springframework.beans.factory.annotation.Autowired; /* */ import org.springframework.stereotype.Controller; /* */ import org.springframework.ui.ModelMap; /* */ import org.springframework.web.bind.annotation.GetMapping; /* */ import org.springframework.web.bind.annotation.PathVariable; /* */ import org.springframework.web.bind.annotation.PostMapping; /* */ import org.springframework.web.bind.annotation.RequestMapping; /* */ import org.springframework.web.bind.annotation.ResponseBody; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ @Controller /* */ @RequestMapping({"/document"}) /* */ public class DocumentController /* */ extends BaseController /* */ { /* 47 */ private String prefix = "document"; /* */ /* */ @Autowired /* */ private IDocumentService documentService; /* */ /* */ @Autowired /* */ private IArchiveTypeService archiveTypeService; /* */ /* */ @Autowired /* */ private IPhysicalTableColumnService physicalTableColumnService; /* */ /* */ @Autowired /* */ private IPhysicalTableService physicalTableService; /* */ /* */ /* */ @RequiresPermissions({"document"}) /* */ @GetMapping /* */ public String document() { /* 65 */ return this.prefix + "/document"; /* */ } /* */ /* */ /* */ @RequiresPermissions({"document:qwgl"}) /* */ @GetMapping({"/qwgl/{archiveId}/{type}/{id}"}) /* */ public String qwgl(@PathVariable("archiveId") long archiveId, @PathVariable("type") String type, @PathVariable("id") String id, ModelMap mmap) { /* 72 */ long tableId = TableUtil.getTableIdByArchiveTypeId(archiveId); /* 73 */ mmap.put("tableId", Long.valueOf(tableId)); /* 74 */ mmap.put("fileId", id); /* 75 */ mmap.put("archiveTypeId", Long.valueOf(archiveId)); /* 76 */ return this.prefix + "/document"; /* */ } /* */ /* */ /* */ /* */ /* */ @RequiresPermissions({"document:list"}) /* */ @PostMapping({"/list"}) /* */ @ResponseBody /* */ public TableDataInfo list(String ownerId, String tableId) { /* 86 */ startPage(); /* 87 */ Document document = new Document(); /* 88 */ document.setTableId(tableId); /* 89 */ document.setOwnerid(ownerId); /* 90 */ List list = this.documentService.selectDocumentList(document); /* 91 */ return getDataTable(list); /* */ } /* */ /* */ @PostMapping({"/delete"}) /* */ @ResponseBody /* */ public AjaxResult delete(String id, String tableId) throws Exception { /* 97 */ boolean res = this.documentService.deleteDocument(id, tableId); /* */ /* 99 */ return AjaxResult.success(!res ? "false" : "true"); /* */ } /* */ /* */ @PostMapping({"/getArchiveTypeByTableId"}) /* */ @ResponseBody /* */ public AjaxResult getArchiveTypeByTableId(String tableId) { /* 105 */ ArchiveType archiveType = this.documentService.selectArchiveTypeByTableId(tableId); /* 106 */ return AjaxResult.success(archiveType); /* */ } /* */ } /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\document\controller\DocumentController.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */