Compare commits
5 Commits
v1.0_lukg
...
9331b57b58
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9331b57b58 | ||
|
|
d732771032 | ||
|
|
f0a14bcd3c | ||
|
|
f1b84cb823 | ||
|
|
a272e06018 |
@@ -1,18 +1,5 @@
|
||||
package com.rzdata.web.controller.common;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import com.rzdata.common.config.JaConfig;
|
||||
import com.rzdata.common.constant.Constants;
|
||||
import com.rzdata.common.core.domain.AjaxResult;
|
||||
@@ -20,6 +7,22 @@ import com.rzdata.common.utils.StringUtils;
|
||||
import com.rzdata.common.utils.file.FileUploadUtils;
|
||||
import com.rzdata.common.utils.file.FileUtils;
|
||||
import com.rzdata.framework.config.ServerConfig;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 通用请求处理
|
||||
@@ -84,7 +87,8 @@ public class CommonController
|
||||
String url = serverConfig.getUrl() + fileName;
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ajax.put("url", url);
|
||||
ajax.put("fileName", fileName);
|
||||
ajax.put("filePath", fileName);
|
||||
ajax.put("suffixType", FileUploadUtils.extractSuffix(fileName));
|
||||
ajax.put("newFileName", FileUtils.getName(fileName));
|
||||
ajax.put("originalFilename", file.getOriginalFilename());
|
||||
return ajax;
|
||||
@@ -160,4 +164,70 @@ public class CommonController
|
||||
log.error("下载文件失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/initUpload")
|
||||
public ResponseEntity<Map<String, String>> initUpload(@RequestParam("fileName") String fileName) {
|
||||
// 上传文件路径
|
||||
String filePath = JaConfig.getUploadPath();
|
||||
String uploadId = UUID.randomUUID().toString();
|
||||
// 创建临时目录用于存放分片文件
|
||||
new File(filePath + "/" + uploadId).mkdirs();
|
||||
Map<String, String> response = new HashMap<>();
|
||||
response.put("uploadId", uploadId);
|
||||
return ResponseEntity.ok(response);
|
||||
}
|
||||
|
||||
@PostMapping("/uploadChunk")
|
||||
public ResponseEntity<Map<String, String>> uploadChunk(
|
||||
@RequestParam("chunkFile") MultipartFile chunkFile,
|
||||
@RequestParam("uploadId") String uploadId,
|
||||
@RequestParam("chunkId") int chunkId) {
|
||||
String filePath = JaConfig.getUploadPath();
|
||||
String chunkFilePath = filePath + "/" + uploadId + "/" + chunkId;
|
||||
try {
|
||||
chunkFile.transferTo(new File(chunkFilePath));
|
||||
Map<String, String> response = new HashMap<>();
|
||||
response.put("status", "200");
|
||||
return ResponseEntity.ok(response);
|
||||
} catch (IOException e) {
|
||||
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("/mergeFile")
|
||||
public ResponseEntity<Map<String, String>> mergeFile(@RequestParam("uploadId") String uploadId,
|
||||
@RequestParam("fileName") String fileName) {
|
||||
String filePath = JaConfig.getUploadPath();
|
||||
//String finalFilePath = FileUploadUtils.generateMergedFilePath(filePath, fileName);
|
||||
String fileNamePath = FileUploadUtils.getFilePath(filePath, fileName);
|
||||
String finalFilePath = filePath + fileNamePath.replace("profile/upload/", "") ;
|
||||
File dir = new File(filePath + "/" + uploadId);
|
||||
File[] chunkFiles = dir.listFiles();
|
||||
|
||||
// 按文件名(即chunkId)排序
|
||||
Arrays.sort(chunkFiles, Comparator.comparingInt(f -> Integer.parseInt(f.getName())));
|
||||
|
||||
try (FileOutputStream fos = new FileOutputStream(finalFilePath)) {
|
||||
for (File chunk : chunkFiles) {
|
||||
Files.copy(chunk.toPath(), fos);
|
||||
}
|
||||
|
||||
Map<String, String> response = new HashMap<>();
|
||||
String url = serverConfig.getUrl() + fileNamePath;
|
||||
response.put("url", url);
|
||||
response.put("filePath", fileNamePath);
|
||||
response.put("suffixType", FileUploadUtils.extractSuffix(fileNamePath));
|
||||
response.put("newFileName", FileUtils.getName(fileNamePath));
|
||||
response.put("originalFilename", fileName);
|
||||
return ResponseEntity.ok(response);
|
||||
} catch (IOException e) {
|
||||
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
|
||||
} finally {
|
||||
// 清理临时文件
|
||||
Arrays.stream(chunkFiles).forEach(File::delete);
|
||||
dir.delete();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
package com.rzdata.web.controller.document;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.rzdata.common.core.domain.DocumentCategory;
|
||||
import com.rzdata.web.service.IDocumentCategoryService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.rzdata.common.annotation.Log;
|
||||
import com.rzdata.common.core.controller.BaseController;
|
||||
import com.rzdata.common.core.domain.AjaxResult;
|
||||
import com.rzdata.common.enums.BusinessType;
|
||||
import com.rzdata.common.utils.poi.ExcelUtil;
|
||||
import com.rzdata.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 文档资源分类管理Controller
|
||||
*
|
||||
* @author spongepan
|
||||
* @date 2024-08-27
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/category")
|
||||
public class DocumentCategoryController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDocumentCategoryService documentCategoryService;
|
||||
|
||||
/**
|
||||
* 查询文档资源分类管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:category:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DocumentCategory documentCategory)
|
||||
{
|
||||
startPage();
|
||||
List<DocumentCategory> list = documentCategoryService.selectDocumentCategoryList(documentCategory);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出文档资源分类管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:category:export')")
|
||||
@Log(title = "文档资源分类管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DocumentCategory documentCategory)
|
||||
{
|
||||
List<DocumentCategory> list = documentCategoryService.selectDocumentCategoryList(documentCategory);
|
||||
ExcelUtil<DocumentCategory> util = new ExcelUtil<DocumentCategory>(DocumentCategory.class);
|
||||
util.exportExcel(response, list, "文档资源分类管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文档资源分类管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:category:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(documentCategoryService.selectDocumentCategoryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增文档资源分类管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:category:add')")
|
||||
@Log(title = "文档资源分类管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DocumentCategory documentCategory)
|
||||
{
|
||||
return toAjax(documentCategoryService.insertDocumentCategory(documentCategory));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改文档资源分类管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:category:edit')")
|
||||
@Log(title = "文档资源分类管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DocumentCategory documentCategory)
|
||||
{
|
||||
return toAjax(documentCategoryService.updateDocumentCategory(documentCategory));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除文档资源分类管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:category:remove')")
|
||||
@Log(title = "文档资源分类管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(documentCategoryService.deleteDocumentCategoryByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取文档分类树列表
|
||||
*/
|
||||
@GetMapping("/documentTree")
|
||||
public AjaxResult deptTree(DocumentCategory documentCategory)
|
||||
{
|
||||
return success(documentCategoryService.selectDocumentTreeList(documentCategory));
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,7 @@ public class DocumentController extends BaseController
|
||||
/**
|
||||
* 查询【文档资源信息】列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('document:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Document Document)
|
||||
{
|
||||
@@ -44,12 +45,13 @@ public class DocumentController extends BaseController
|
||||
* 导出【文档资源信息】列表
|
||||
*/
|
||||
@Log(title = "【文档资源信息】", businessType = BusinessType.EXPORT)
|
||||
@PreAuthorize("@ss.hasPermi('document:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Document Document)
|
||||
public void export(HttpServletResponse response, Document document)
|
||||
{
|
||||
List<Document> list = documentService.selectDocumentList(Document);
|
||||
List<Document> list = documentService.selectDocumentList(document);
|
||||
ExcelUtil<Document> util = new ExcelUtil<Document>(Document.class);
|
||||
util.exportExcel(response, list, "【文档资源信息】数据");
|
||||
util.exportExcel(response, list, "【文档资源信息】数据", document.getExcludeFields());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -65,6 +67,7 @@ public class DocumentController extends BaseController
|
||||
* 新增【文档资源信息】
|
||||
*/
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||
@PreAuthorize("@ss.hasPermi('document:add')")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Document Document)
|
||||
{
|
||||
@@ -79,6 +82,7 @@ public class DocumentController extends BaseController
|
||||
* 修改【文档资源信息】
|
||||
*/
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||
@PreAuthorize("@ss.hasPermi('document:edit')")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Document Document)
|
||||
{
|
||||
@@ -88,10 +92,22 @@ public class DocumentController extends BaseController
|
||||
/**
|
||||
* 删除【文档资源信息】
|
||||
*/
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
||||
@Log(title = "【逻辑删除-文档资源信息】", businessType = BusinessType.DELETE)
|
||||
@PreAuthorize("@ss.hasPermi('document:remove')")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(documentService.deleteDocumentByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 发布文档
|
||||
*/
|
||||
@Log(title = "【发布逻辑】", businessType = BusinessType.UPDATE)
|
||||
@PreAuthorize("@ss.hasPermi('document:push')")
|
||||
@PutMapping("/pushDoc/{ids}")
|
||||
public AjaxResult pushDoc(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(documentService.pushDoc(ids));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,6 +43,16 @@ public class SysDictTypeController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:bizlist:list')")
|
||||
@GetMapping("/bizlist")
|
||||
public TableDataInfo bizlist(SysDictType dictType)
|
||||
{
|
||||
startPage();
|
||||
List<SysDictType> list = dictTypeService.selectBizDictTypeList(dictType);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "字典类型", businessType = BusinessType.EXPORT)
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:export')")
|
||||
@PostMapping("/export")
|
||||
|
||||
@@ -55,7 +55,6 @@ public class SysUserController extends BaseController
|
||||
/**
|
||||
* 获取用户列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysUser user)
|
||||
{
|
||||
@@ -246,7 +245,7 @@ public class SysUserController extends BaseController
|
||||
/**
|
||||
* 获取部门树列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:user:list')")
|
||||
@GetMapping("/deptTree")
|
||||
public AjaxResult deptTree(SysDept dept)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.rzdata.web.controller.tool;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.rzdata.web.domain.Attachment;
|
||||
import com.rzdata.web.service.IAttachmentService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.rzdata.common.annotation.Log;
|
||||
import com.rzdata.common.core.controller.BaseController;
|
||||
import com.rzdata.common.core.domain.AjaxResult;
|
||||
import com.rzdata.common.enums.BusinessType;
|
||||
import com.rzdata.common.utils.poi.ExcelUtil;
|
||||
import com.rzdata.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 附件Controller
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/attachment")
|
||||
public class AttachmentController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAttachmentService attachmentService;
|
||||
|
||||
/**
|
||||
* 查询附件列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:attachment:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Attachment attachment)
|
||||
{
|
||||
startPage();
|
||||
List<Attachment> list = attachmentService.selectAttachmentList(attachment);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出附件列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:attachment:export')")
|
||||
@Log(title = "附件", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Attachment attachment)
|
||||
{
|
||||
List<Attachment> list = attachmentService.selectAttachmentList(attachment);
|
||||
ExcelUtil<Attachment> util = new ExcelUtil<Attachment>(Attachment.class);
|
||||
util.exportExcel(response, list, "附件数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取附件详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:attachment:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(attachmentService.selectAttachmentById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增附件
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:attachment:add')")
|
||||
@Log(title = "附件", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Attachment attachment)
|
||||
{
|
||||
return toAjax(attachmentService.insertAttachment(attachment));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改附件
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:attachment:edit')")
|
||||
@Log(title = "附件", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Attachment attachment)
|
||||
{
|
||||
return toAjax(attachmentService.updateAttachment(attachment));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除附件
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:attachment:remove')")
|
||||
@Log(title = "附件", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(attachmentService.deleteAttachmentByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.rzdata.web.controller.tool;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.rzdata.web.domain.Discussions;
|
||||
import com.rzdata.web.service.IDiscussionsService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.rzdata.common.annotation.Log;
|
||||
import com.rzdata.common.core.controller.BaseController;
|
||||
import com.rzdata.common.core.domain.AjaxResult;
|
||||
import com.rzdata.common.enums.BusinessType;
|
||||
import com.rzdata.common.utils.poi.ExcelUtil;
|
||||
import com.rzdata.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 讨论Controller
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/discussions")
|
||||
public class DiscussionsController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDiscussionsService discussionsService;
|
||||
|
||||
/**
|
||||
* 查询讨论列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Discussions discussions)
|
||||
{
|
||||
List<Discussions> list = discussionsService.selectDiscussionsList(discussions);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出讨论列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:discussions:export')")
|
||||
@Log(title = "讨论", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Discussions discussions)
|
||||
{
|
||||
List<Discussions> list = discussionsService.selectDiscussionsList(discussions);
|
||||
ExcelUtil<Discussions> util = new ExcelUtil<Discussions>(Discussions.class);
|
||||
util.exportExcel(response, list, "讨论数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取讨论详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:discussions:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(discussionsService.selectDiscussionsById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增讨论
|
||||
*/
|
||||
@Log(title = "讨论", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Discussions discussions)
|
||||
{
|
||||
return toAjax(discussionsService.insertDiscussions(discussions));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改讨论
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:discussions:edit')")
|
||||
@Log(title = "讨论", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Discussions discussions)
|
||||
{
|
||||
return toAjax(discussionsService.updateDiscussions(discussions));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除讨论
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:discussions:remove')")
|
||||
@Log(title = "讨论", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(discussionsService.deleteDiscussionsByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.rzdata.web.controller.tool;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.rzdata.web.domain.Replies;
|
||||
import com.rzdata.web.service.IRepliesService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.rzdata.common.annotation.Log;
|
||||
import com.rzdata.common.core.controller.BaseController;
|
||||
import com.rzdata.common.core.domain.AjaxResult;
|
||||
import com.rzdata.common.enums.BusinessType;
|
||||
import com.rzdata.common.utils.poi.ExcelUtil;
|
||||
import com.rzdata.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 回复Controller
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/replies")
|
||||
public class RepliesController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRepliesService repliesService;
|
||||
|
||||
/**
|
||||
* 查询回复列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:replies:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Replies replies)
|
||||
{
|
||||
startPage();
|
||||
List<Replies> list = repliesService.selectRepliesList(replies);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出回复列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:replies:export')")
|
||||
@Log(title = "回复", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Replies replies)
|
||||
{
|
||||
List<Replies> list = repliesService.selectRepliesList(replies);
|
||||
ExcelUtil<Replies> util = new ExcelUtil<Replies>(Replies.class);
|
||||
util.exportExcel(response, list, "回复数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取回复详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:replies:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(repliesService.selectRepliesById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增回复
|
||||
*/
|
||||
@Log(title = "回复", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Replies replies)
|
||||
{
|
||||
return toAjax(repliesService.insertReplies(replies));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改回复
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:replies:edit')")
|
||||
@Log(title = "回复", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Replies replies)
|
||||
{
|
||||
return toAjax(repliesService.updateReplies(replies));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除回复
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:replies:remove')")
|
||||
@Log(title = "回复", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(repliesService.deleteRepliesByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.rzdata.web.controller.tool;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.BooleanUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.blueland.bpmclient.model.ProcessInstanceModel;
|
||||
@@ -14,17 +15,21 @@ import com.rzdata.common.utils.SecurityUtils;
|
||||
import com.rzdata.common.utils.StringUtils;
|
||||
import com.rzdata.common.utils.poi.ExcelUtil;
|
||||
import com.rzdata.system.service.ISysDeptService;
|
||||
import com.rzdata.web.domain.Document;
|
||||
import com.rzdata.web.domain.Tool;
|
||||
import com.rzdata.web.service.IDocumentService;
|
||||
import com.rzdata.web.service.IToolService;
|
||||
import com.rzdata.web.service.IUseApplyService;
|
||||
import com.rzdata.web.service.WorkflowService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 工具信息Controller
|
||||
@@ -48,9 +53,14 @@ public class ToolController extends BaseController
|
||||
@Autowired
|
||||
private ISysDeptService iSysDeptService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private IDocumentService iDocumentService;
|
||||
|
||||
/**
|
||||
* 查询工具信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('tool:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Tool tool)
|
||||
{
|
||||
@@ -136,14 +146,26 @@ public class ToolController extends BaseController
|
||||
if (add) {
|
||||
tTool.setProcInstId(processInstanceModel.getProcInstId());
|
||||
toolService.insertTool(tTool);
|
||||
//保存文档和附件
|
||||
toolService.addDocAndAtt(tTool);
|
||||
}else if (BooleanUtil.isTrue(tTool.getEditStatus())){
|
||||
toolService.updateTool(tTool);
|
||||
//删除文档和附件
|
||||
toolService.deleteDocAndAtt(tTool);
|
||||
//保存文档和附件
|
||||
toolService.addDocAndAtt(tTool);
|
||||
}else {
|
||||
Tool tool = new Tool();
|
||||
tool.setToolId(tTool.getToolId());
|
||||
tool.setRecordStatus(tTool.getRecordStatus());
|
||||
toolService.updateTool(tool);
|
||||
}
|
||||
|
||||
//办结
|
||||
if(RecordStatusEnum.DONE.getCode().equals(tTool.getRecordStatus())){
|
||||
//更新文档状态
|
||||
toolService.updateDocPushStatus(tTool);
|
||||
}
|
||||
return AjaxResult.success("操作成功",processInstanceModel);
|
||||
}else {
|
||||
return AjaxResult.error();
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.rzdata.web.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.rzdata.common.annotation.Excel;
|
||||
import com.rzdata.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 附件对象 t_attachment
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-28
|
||||
*/
|
||||
@Data
|
||||
public class Attachment extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private String id;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String fileType;
|
||||
|
||||
/** 业务类型 */
|
||||
@Excel(name = "业务类型")
|
||||
private String bizType;
|
||||
|
||||
/** 文件URL */
|
||||
@Excel(name = "文件URL")
|
||||
private String fileUrl;
|
||||
|
||||
/** 文件源名称 */
|
||||
@Excel(name = "文件源名称")
|
||||
private String fileOldName;
|
||||
|
||||
/** 文件新名称 */
|
||||
@Excel(name = "文件新名称")
|
||||
private String fileNewName;
|
||||
|
||||
/** 文件后缀 */
|
||||
@Excel(name = "文件后缀")
|
||||
private String suffixType;
|
||||
|
||||
/** 文件大小 */
|
||||
@Excel(name = "文件大小")
|
||||
private Long fileSize;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String businessId;
|
||||
|
||||
/** 序号 */
|
||||
@Excel(name = "序号")
|
||||
private Long sorts;
|
||||
|
||||
/** 删除;1是, 0:否 */
|
||||
@Excel(name = "删除;1是, 0:否")
|
||||
private String del;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createDate;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updateDate;
|
||||
|
||||
/** 失效时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "失效时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date failureTime;
|
||||
|
||||
private List<String> businessIds;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.rzdata.web.domain;
|
||||
|
||||
import com.rzdata.common.annotation.Excel;
|
||||
import com.rzdata.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 讨论对象 t_discussions
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-30
|
||||
*/
|
||||
@Data
|
||||
public class Discussions extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private String id;
|
||||
|
||||
/** 业务id */
|
||||
@Excel(name = "业务id")
|
||||
private String businessId;
|
||||
|
||||
/** 业务类型;(doc:文档,tool:工具) */
|
||||
@Excel(name = "业务类型;", readConverterExp = "d=oc:文档,tool:工具")
|
||||
private String type;
|
||||
|
||||
/** 内容 */
|
||||
@Excel(name = "内容")
|
||||
private String content;
|
||||
|
||||
/** 逻辑删除;(1:删除,0:未删除) */
|
||||
@Excel(name = "逻辑删除;", readConverterExp = "1=:删除,0:未删除")
|
||||
private String isDelete;
|
||||
|
||||
/** 创建人id */
|
||||
@Excel(name = "创建人id")
|
||||
private String createById;
|
||||
|
||||
/** 更新人id */
|
||||
@Excel(name = "更新人id")
|
||||
private String updateById;
|
||||
|
||||
private String nickName;
|
||||
|
||||
|
||||
private List<Replies> repliesList;
|
||||
}
|
||||
@@ -1,17 +1,24 @@
|
||||
package com.rzdata.web.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.rzdata.common.annotation.Excel;
|
||||
import com.rzdata.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】对象 t_document
|
||||
*
|
||||
* @author ja
|
||||
* @date 2024-07-08
|
||||
*/
|
||||
@Data
|
||||
public class Document extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@@ -26,129 +33,67 @@ public class Document extends BaseEntity {
|
||||
private String docName;
|
||||
|
||||
/** 文档类别 */
|
||||
@Excel(name = "文档类别")
|
||||
@Excel(name = "类别", dictType="doc_class")
|
||||
private String docType;
|
||||
|
||||
/** 文档负责人 */
|
||||
@Excel(name = "文档负责人")
|
||||
@Excel(name = "负责人")
|
||||
private String docPrincipals;
|
||||
|
||||
/** 归属单位 **/
|
||||
@Excel(name = "归属单位")
|
||||
private String docRespDeptName;
|
||||
|
||||
/** 文档归属部门 */
|
||||
@Excel(name = "文档归属部门")
|
||||
private String docRespDept;
|
||||
|
||||
/** 文档来源 */
|
||||
@Excel(name = "文档来源")
|
||||
@Excel(name = "来源", dictType="doc_source")
|
||||
private String docSource;
|
||||
|
||||
/**
|
||||
* 工具名称
|
||||
*/
|
||||
@Excel(name = "工具名称")
|
||||
private String toolName;
|
||||
|
||||
/** 文档状态 */
|
||||
@Excel(name = "文档状态")
|
||||
@Excel(name = "上传状态", dictType="doc_upload_status")
|
||||
private String docStatus;
|
||||
|
||||
/** 文档地址 */
|
||||
@Excel(name = "文档地址")
|
||||
private String docUrl;
|
||||
|
||||
public void setDocId(String docId)
|
||||
{
|
||||
this.docId = docId;
|
||||
}
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
public String getDocId()
|
||||
{
|
||||
return docId;
|
||||
}
|
||||
public void setDocCode(String docCode)
|
||||
{
|
||||
this.docCode = docCode;
|
||||
}
|
||||
/** 文档分类id */
|
||||
private String docCategoryId;
|
||||
|
||||
public String getDocCode()
|
||||
{
|
||||
return docCode;
|
||||
}
|
||||
public void setDocName(String docName)
|
||||
{
|
||||
this.docName = docName;
|
||||
}
|
||||
/** 创建人id */
|
||||
private String createById;
|
||||
/** 更新人id */
|
||||
private String updateById;
|
||||
/** 逻辑删除(1:删除,0:未删除) */
|
||||
private String isDeleted;
|
||||
|
||||
public String getDocName()
|
||||
{
|
||||
return docName;
|
||||
}
|
||||
public void setDocType(String docType)
|
||||
{
|
||||
this.docType = docType;
|
||||
}
|
||||
/** 主键 **/
|
||||
private List<String> ids;
|
||||
|
||||
public String getDocType()
|
||||
{
|
||||
return docType;
|
||||
}
|
||||
public void setDocPrincipals(String docPrincipals)
|
||||
{
|
||||
this.docPrincipals = docPrincipals;
|
||||
}
|
||||
/** 附件名称 **/
|
||||
private Attachment attachment;
|
||||
|
||||
public String getDocPrincipals()
|
||||
{
|
||||
return docPrincipals;
|
||||
}
|
||||
public void setDocRespDept(String docRespDept)
|
||||
{
|
||||
this.docRespDept = docRespDept;
|
||||
}
|
||||
/** 关联工具id对象 */
|
||||
private String toolId;
|
||||
|
||||
public String getDocRespDept()
|
||||
{
|
||||
return docRespDept;
|
||||
}
|
||||
public void setDocSource(String docSource)
|
||||
{
|
||||
this.docSource = docSource;
|
||||
}
|
||||
/** 工具信息 **/
|
||||
private Tool tool;
|
||||
|
||||
public String getDocSource()
|
||||
{
|
||||
return docSource;
|
||||
}
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "创建时间", dateFormat="yyyy-MM-dd")
|
||||
private Date createTime;
|
||||
|
||||
public void setDocStatus(String docStatus)
|
||||
{
|
||||
this.docStatus = docStatus;
|
||||
}
|
||||
|
||||
public String getDocStatus()
|
||||
{
|
||||
return docStatus;
|
||||
}
|
||||
|
||||
public void setDocUrl(String docUrl)
|
||||
{
|
||||
this.docUrl = docUrl;
|
||||
}
|
||||
|
||||
public String getDocUrl()
|
||||
{
|
||||
return docUrl;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("docId", getDocId())
|
||||
.append("docCode", getDocCode())
|
||||
.append("docName", getDocName())
|
||||
.append("docType", getDocType())
|
||||
.append("docPrincipals", getDocPrincipals())
|
||||
.append("docRespDept", getDocRespDept())
|
||||
.append("docSource", getDocSource())
|
||||
.append("docStatus", getDocStatus())
|
||||
.append("docUrl", getDocUrl())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
private List<String> excludeFields;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.rzdata.web.domain;
|
||||
|
||||
import com.rzdata.common.annotation.Excel;
|
||||
import com.rzdata.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 回复对象 t_replies
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-30
|
||||
*/
|
||||
@Data
|
||||
public class Replies extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private String id;
|
||||
|
||||
/** 讨论表id */
|
||||
@Excel(name = "讨论表id")
|
||||
private String discussionId;
|
||||
|
||||
/** 内容 */
|
||||
@Excel(name = "内容")
|
||||
private String content;
|
||||
|
||||
/** 逻辑删除;(1:删除,0:未删除) */
|
||||
@Excel(name = "逻辑删除;", readConverterExp = "1=:删除,0:未删除")
|
||||
private String isDelete;
|
||||
|
||||
/** 创建人id */
|
||||
@Excel(name = "创建人id")
|
||||
private String createById;
|
||||
|
||||
/** 更新人id */
|
||||
@Excel(name = "更新人id")
|
||||
private String updateById;
|
||||
|
||||
private String nickName;
|
||||
|
||||
private List<String> discussionIdList;
|
||||
}
|
||||
@@ -1,13 +1,9 @@
|
||||
package com.rzdata.web.domain;
|
||||
|
||||
import com.rzdata.common.annotation.Excel;
|
||||
import com.rzdata.common.annotation.Excels;
|
||||
import com.rzdata.common.core.domain.BaseEntity;
|
||||
import com.rzdata.common.core.domain.entity.SysDept;
|
||||
import com.rzdata.web.domain.bo.BpmClientInputModelBo;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -86,6 +82,7 @@ public class Tool extends BaseEntity
|
||||
|
||||
private BpmClientInputModelBo bpmClientInputModel;
|
||||
|
||||
/** done:办结,doing:进行中**/
|
||||
private String recordStatus;
|
||||
|
||||
private Boolean editStatus;
|
||||
@@ -101,4 +98,6 @@ public class Tool extends BaseEntity
|
||||
private Boolean downloadStatus;
|
||||
|
||||
private List<String> excludeFields;
|
||||
|
||||
private List<Document> documentList;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.rzdata.web.mapper;
|
||||
|
||||
import com.rzdata.web.domain.Attachment;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 附件Mapper接口
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-28
|
||||
*/
|
||||
public interface AttachmentMapper
|
||||
{
|
||||
/**
|
||||
* 查询附件
|
||||
*
|
||||
* @param id 附件主键
|
||||
* @return 附件
|
||||
*/
|
||||
public Attachment selectAttachmentById(String id);
|
||||
|
||||
/**
|
||||
* 查询附件列表
|
||||
*
|
||||
* @param attachment 附件
|
||||
* @return 附件集合
|
||||
*/
|
||||
public List<Attachment> selectAttachmentList(Attachment attachment);
|
||||
|
||||
/**
|
||||
* 新增附件
|
||||
*
|
||||
* @param attachment 附件
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAttachment(Attachment attachment);
|
||||
|
||||
/**
|
||||
* 修改附件
|
||||
*
|
||||
* @param attachment 附件
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAttachment(Attachment attachment);
|
||||
|
||||
/**
|
||||
* 根据业务id更新附件
|
||||
* @param attachment
|
||||
* @return
|
||||
*/
|
||||
public int updateAttachmentByBusinessId(Attachment attachment);
|
||||
|
||||
/**
|
||||
* 删除附件
|
||||
*
|
||||
* @param id 附件主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAttachmentById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除附件
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAttachmentByIds(String[] ids);
|
||||
|
||||
public int deleteAttachmentByBusinessId(List<String> list);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.rzdata.web.mapper;
|
||||
|
||||
import com.rzdata.web.domain.Discussions;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 讨论Mapper接口
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-30
|
||||
*/
|
||||
public interface DiscussionsMapper
|
||||
{
|
||||
/**
|
||||
* 查询讨论
|
||||
*
|
||||
* @param id 讨论主键
|
||||
* @return 讨论
|
||||
*/
|
||||
public Discussions selectDiscussionsById(String id);
|
||||
|
||||
/**
|
||||
* 查询讨论列表
|
||||
*
|
||||
* @param discussions 讨论
|
||||
* @return 讨论集合
|
||||
*/
|
||||
public List<Discussions> selectDiscussionsList(Discussions discussions);
|
||||
|
||||
/**
|
||||
* 新增讨论
|
||||
*
|
||||
* @param discussions 讨论
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDiscussions(Discussions discussions);
|
||||
|
||||
/**
|
||||
* 修改讨论
|
||||
*
|
||||
* @param discussions 讨论
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDiscussions(Discussions discussions);
|
||||
|
||||
/**
|
||||
* 删除讨论
|
||||
*
|
||||
* @param id 讨论主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDiscussionsById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除讨论
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDiscussionsByIds(String[] ids);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.rzdata.web.mapper;
|
||||
|
||||
import com.rzdata.common.core.domain.DocumentCategory;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文档资源分类管理Mapper接口
|
||||
*
|
||||
* @author spongepan
|
||||
* @date 2024-08-27
|
||||
*/
|
||||
public interface DocumentCategoryMapper
|
||||
{
|
||||
/**
|
||||
* 查询文档资源分类管理
|
||||
*
|
||||
* @param id 文档资源分类管理主键
|
||||
* @return 文档资源分类管理
|
||||
*/
|
||||
public DocumentCategory selectDocumentCategoryById(String id);
|
||||
|
||||
/**
|
||||
* 查询文档资源分类管理列表
|
||||
*
|
||||
* @param documentCategory 文档资源分类管理
|
||||
* @return 文档资源分类管理集合
|
||||
*/
|
||||
public List<DocumentCategory> selectDocumentCategoryList(DocumentCategory documentCategory);
|
||||
|
||||
/**
|
||||
* 新增文档资源分类管理
|
||||
*
|
||||
* @param documentCategory 文档资源分类管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDocumentCategory(DocumentCategory documentCategory);
|
||||
|
||||
/**
|
||||
* 修改文档资源分类管理
|
||||
*
|
||||
* @param documentCategory 文档资源分类管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDocumentCategory(DocumentCategory documentCategory);
|
||||
|
||||
/**
|
||||
* 删除文档资源分类管理
|
||||
*
|
||||
* @param id 文档资源分类管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDocumentCategoryById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除文档资源分类管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDocumentCategoryByIds(String[] ids);
|
||||
}
|
||||
@@ -53,10 +53,14 @@ public interface DocumentMapper
|
||||
public int deleteDocumentById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
* 逻辑删除
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @param Document 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDocumentByIds(String[] ids);
|
||||
public int isDeleteDocumentByIds(Document Document);
|
||||
|
||||
public int updatePushDoc(Document doc);
|
||||
|
||||
public int batchDeleteById(List<String> list);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.rzdata.web.mapper;
|
||||
|
||||
import com.rzdata.web.domain.Replies;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 回复Mapper接口
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-30
|
||||
*/
|
||||
public interface RepliesMapper
|
||||
{
|
||||
/**
|
||||
* 查询回复
|
||||
*
|
||||
* @param id 回复主键
|
||||
* @return 回复
|
||||
*/
|
||||
public Replies selectRepliesById(String id);
|
||||
|
||||
/**
|
||||
* 查询回复列表
|
||||
*
|
||||
* @param replies 回复
|
||||
* @return 回复集合
|
||||
*/
|
||||
public List<Replies> selectRepliesList(Replies replies);
|
||||
|
||||
/**
|
||||
* 新增回复
|
||||
*
|
||||
* @param replies 回复
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertReplies(Replies replies);
|
||||
|
||||
/**
|
||||
* 修改回复
|
||||
*
|
||||
* @param replies 回复
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateReplies(Replies replies);
|
||||
|
||||
/**
|
||||
* 删除回复
|
||||
*
|
||||
* @param id 回复主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRepliesById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除回复
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRepliesByIds(String[] ids);
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.rzdata.web.service;
|
||||
|
||||
import com.rzdata.web.domain.Attachment;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 附件Service接口
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-28
|
||||
*/
|
||||
public interface IAttachmentService
|
||||
{
|
||||
/**
|
||||
* 查询附件
|
||||
*
|
||||
* @param id 附件主键
|
||||
* @return 附件
|
||||
*/
|
||||
public Attachment selectAttachmentById(String id);
|
||||
|
||||
/**
|
||||
* 查询附件列表
|
||||
*
|
||||
* @param attachment 附件
|
||||
* @return 附件集合
|
||||
*/
|
||||
public List<Attachment> selectAttachmentList(Attachment attachment);
|
||||
|
||||
/**
|
||||
* 新增附件
|
||||
*
|
||||
* @param attachment 附件
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAttachment(Attachment attachment);
|
||||
|
||||
/**
|
||||
* 修改附件
|
||||
*
|
||||
* @param attachment 附件
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAttachment(Attachment attachment);
|
||||
public int updateAttachmentByBusinessId(Attachment attachment);
|
||||
|
||||
/**
|
||||
* 批量删除附件
|
||||
*
|
||||
* @param ids 需要删除的附件主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAttachmentByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 根据业务id批量删除
|
||||
* @param businessIds
|
||||
* @return
|
||||
*/
|
||||
public int deleteAttachmentByBusinessId(List<String> businessIds);
|
||||
|
||||
/**
|
||||
* 删除附件信息
|
||||
*
|
||||
* @param id 附件主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAttachmentById(String id);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.rzdata.web.service;
|
||||
|
||||
import com.rzdata.web.domain.Discussions;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 讨论Service接口
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-30
|
||||
*/
|
||||
public interface IDiscussionsService
|
||||
{
|
||||
/**
|
||||
* 查询讨论
|
||||
*
|
||||
* @param id 讨论主键
|
||||
* @return 讨论
|
||||
*/
|
||||
public Discussions selectDiscussionsById(String id);
|
||||
|
||||
/**
|
||||
* 查询讨论列表
|
||||
*
|
||||
* @param discussions 讨论
|
||||
* @return 讨论集合
|
||||
*/
|
||||
public List<Discussions> selectDiscussionsList(Discussions discussions);
|
||||
|
||||
/**
|
||||
* 新增讨论
|
||||
*
|
||||
* @param discussions 讨论
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDiscussions(Discussions discussions);
|
||||
|
||||
/**
|
||||
* 修改讨论
|
||||
*
|
||||
* @param discussions 讨论
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDiscussions(Discussions discussions);
|
||||
|
||||
/**
|
||||
* 批量删除讨论
|
||||
*
|
||||
* @param ids 需要删除的讨论主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDiscussionsByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除讨论信息
|
||||
*
|
||||
* @param id 讨论主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDiscussionsById(String id);
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.rzdata.web.service;
|
||||
|
||||
import com.rzdata.common.core.domain.TreeSelect;
|
||||
import com.rzdata.common.core.domain.DocumentCategory;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文档资源分类管理Service接口
|
||||
*
|
||||
* @author spongepan
|
||||
* @date 2024-08-27
|
||||
*/
|
||||
public interface IDocumentCategoryService
|
||||
{
|
||||
/**
|
||||
* 查询文档资源分类管理
|
||||
*
|
||||
* @param id 文档资源分类管理主键
|
||||
* @return 文档资源分类管理
|
||||
*/
|
||||
public DocumentCategory selectDocumentCategoryById(String id);
|
||||
|
||||
/**
|
||||
* 查询文档资源分类管理列表
|
||||
*
|
||||
* @param documentCategory 文档资源分类管理
|
||||
* @return 文档资源分类管理集合
|
||||
*/
|
||||
public List<DocumentCategory> selectDocumentCategoryList(DocumentCategory documentCategory);
|
||||
|
||||
/**
|
||||
* 新增文档资源分类管理
|
||||
*
|
||||
* @param documentCategory 文档资源分类管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDocumentCategory(DocumentCategory documentCategory);
|
||||
|
||||
/**
|
||||
* 修改文档资源分类管理
|
||||
*
|
||||
* @param documentCategory 文档资源分类管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDocumentCategory(DocumentCategory documentCategory);
|
||||
|
||||
/**
|
||||
* 批量删除文档资源分类管理
|
||||
*
|
||||
* @param ids 需要删除的文档资源分类管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDocumentCategoryByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除文档资源分类管理信息
|
||||
*
|
||||
* @param id 文档资源分类管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDocumentCategoryById(String id);
|
||||
|
||||
|
||||
/**
|
||||
* 获取文档资源树
|
||||
* @param documentCategory
|
||||
* @return
|
||||
*/
|
||||
List<TreeSelect> selectDocumentTreeList(DocumentCategory documentCategory);
|
||||
}
|
||||
@@ -28,6 +28,9 @@ public interface IDocumentService
|
||||
*/
|
||||
public List<Document> selectDocumentList(Document document);
|
||||
|
||||
|
||||
public List<Document> selectDocumentListAll(Document document);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
@@ -62,4 +65,13 @@ public interface IDocumentService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDocumentById(String id);
|
||||
|
||||
/**
|
||||
* 发布文档
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int pushDoc(String[] ids);
|
||||
|
||||
public int batchDeleteById(List<String> docIds);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.rzdata.web.service;
|
||||
|
||||
import com.rzdata.web.domain.Replies;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 回复Service接口
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-30
|
||||
*/
|
||||
public interface IRepliesService
|
||||
{
|
||||
/**
|
||||
* 查询回复
|
||||
*
|
||||
* @param id 回复主键
|
||||
* @return 回复
|
||||
*/
|
||||
public Replies selectRepliesById(String id);
|
||||
|
||||
/**
|
||||
* 查询回复列表
|
||||
*
|
||||
* @param replies 回复
|
||||
* @return 回复集合
|
||||
*/
|
||||
public List<Replies> selectRepliesList(Replies replies);
|
||||
|
||||
/**
|
||||
* 新增回复
|
||||
*
|
||||
* @param replies 回复
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertReplies(Replies replies);
|
||||
|
||||
/**
|
||||
* 修改回复
|
||||
*
|
||||
* @param replies 回复
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateReplies(Replies replies);
|
||||
|
||||
/**
|
||||
* 批量删除回复
|
||||
*
|
||||
* @param ids 需要删除的回复主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRepliesByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除回复信息
|
||||
*
|
||||
* @param id 回复主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRepliesById(String id);
|
||||
}
|
||||
@@ -63,4 +63,18 @@ public interface IToolService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteToolByToolId(String toolId);
|
||||
|
||||
/**
|
||||
* 删除文档和附件
|
||||
* @param tool
|
||||
*/
|
||||
public void deleteDocAndAtt(Tool tool);
|
||||
|
||||
/**
|
||||
* 新增文档和附件
|
||||
* @param tool
|
||||
*/
|
||||
public void addDocAndAtt(Tool tool);
|
||||
|
||||
void updateDocPushStatus(Tool tTool);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.rzdata.web.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rzdata.web.domain.Attachment;
|
||||
import com.rzdata.web.mapper.AttachmentMapper;
|
||||
import com.rzdata.web.service.IAttachmentService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 附件Service业务层处理
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-28
|
||||
*/
|
||||
@Service
|
||||
public class AttachmentServiceImpl implements IAttachmentService
|
||||
{
|
||||
@Autowired
|
||||
private AttachmentMapper attachmentMapper;
|
||||
|
||||
/**
|
||||
* 查询附件
|
||||
*
|
||||
* @param id 附件主键
|
||||
* @return 附件
|
||||
*/
|
||||
@Override
|
||||
public Attachment selectAttachmentById(String id)
|
||||
{
|
||||
return attachmentMapper.selectAttachmentById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询附件列表
|
||||
*
|
||||
* @param attachment 附件
|
||||
* @return 附件
|
||||
*/
|
||||
@Override
|
||||
public List<Attachment> selectAttachmentList(Attachment attachment)
|
||||
{
|
||||
return attachmentMapper.selectAttachmentList(attachment);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增附件
|
||||
*
|
||||
* @param attachment 附件
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAttachment(Attachment attachment)
|
||||
{
|
||||
return attachmentMapper.insertAttachment(attachment);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改附件
|
||||
*
|
||||
* @param attachment 附件
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAttachment(Attachment attachment)
|
||||
{
|
||||
return attachmentMapper.updateAttachment(attachment);
|
||||
}
|
||||
/**
|
||||
* 修改附件
|
||||
*
|
||||
* @param attachment 附件
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAttachmentByBusinessId(Attachment attachment)
|
||||
{
|
||||
return attachmentMapper.updateAttachmentByBusinessId(attachment);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除附件
|
||||
*
|
||||
* @param ids 需要删除的附件主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAttachmentByIds(String[] ids)
|
||||
{
|
||||
return attachmentMapper.deleteAttachmentByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除附件
|
||||
*
|
||||
* @param ids 需要删除的附件主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAttachmentByBusinessId(List<String> businessIds)
|
||||
{
|
||||
return attachmentMapper.deleteAttachmentByBusinessId(businessIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除附件信息
|
||||
*
|
||||
* @param id 附件主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAttachmentById(String id)
|
||||
{
|
||||
return attachmentMapper.deleteAttachmentById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
package com.rzdata.web.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.lang.Snowflake;
|
||||
import com.rzdata.common.constant.Constants;
|
||||
import com.rzdata.common.utils.DateUtils;
|
||||
import com.rzdata.common.utils.SecurityUtils;
|
||||
import com.rzdata.web.domain.Discussions;
|
||||
import com.rzdata.web.domain.Replies;
|
||||
import com.rzdata.web.mapper.DiscussionsMapper;
|
||||
import com.rzdata.web.service.IDiscussionsService;
|
||||
import com.rzdata.web.service.IRepliesService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 讨论Service业务层处理
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-30
|
||||
*/
|
||||
@Service
|
||||
public class DiscussionsServiceImpl implements IDiscussionsService
|
||||
{
|
||||
@Autowired
|
||||
private DiscussionsMapper discussionsMapper;
|
||||
|
||||
@Autowired
|
||||
private Snowflake snowflake;
|
||||
|
||||
@Autowired
|
||||
private IRepliesService iRepliesService;
|
||||
|
||||
/**
|
||||
* 查询讨论
|
||||
*
|
||||
* @param id 讨论主键
|
||||
* @return 讨论
|
||||
*/
|
||||
@Override
|
||||
public Discussions selectDiscussionsById(String id)
|
||||
{
|
||||
return discussionsMapper.selectDiscussionsById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询讨论列表
|
||||
*
|
||||
* @param discussions 讨论
|
||||
* @return 讨论
|
||||
*/
|
||||
@Override
|
||||
public List<Discussions> selectDiscussionsList(Discussions discussions)
|
||||
{
|
||||
List<Discussions> discussionsList = discussionsMapper.selectDiscussionsList(discussions);
|
||||
//组装回复对象数据
|
||||
assembleReplies(discussionsList);
|
||||
return discussionsList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 组装回复对象数据
|
||||
* @param discussionsList
|
||||
*/
|
||||
private void assembleReplies(List<Discussions> discussionsList) {
|
||||
List<String> idList = discussionsList.stream().map(Discussions::getId).collect(Collectors.toList());
|
||||
Replies replies = new Replies();
|
||||
replies.setDiscussionIdList(idList);
|
||||
List<Replies> repliesList = iRepliesService.selectRepliesList(replies);
|
||||
if(CollUtil.isNotEmpty(repliesList)){
|
||||
for (Discussions disItem : discussionsList) {
|
||||
List<Replies> addList = new ArrayList<>();
|
||||
for (Replies repItem : repliesList) {
|
||||
if(repItem.getDiscussionId().equals(disItem.getId())){
|
||||
addList.add(repItem);
|
||||
}
|
||||
}
|
||||
if(CollUtil.isNotEmpty(addList)){
|
||||
disItem.setRepliesList(addList);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增讨论
|
||||
*
|
||||
* @param discussions 讨论
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDiscussions(Discussions discussions)
|
||||
{
|
||||
discussions.setId(String.valueOf(snowflake.nextId()));
|
||||
discussions.setCreateTime(DateUtils.getNowDate());
|
||||
discussions.setCreateBy(SecurityUtils.getLoginUser().getUsername());
|
||||
discussions.setCreateById(String.valueOf(SecurityUtils.getLoginUser().getUserId()));
|
||||
discussions.setIsDelete(Constants.STR_ZERO);
|
||||
return discussionsMapper.insertDiscussions(discussions);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改讨论
|
||||
*
|
||||
* @param discussions 讨论
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDiscussions(Discussions discussions)
|
||||
{
|
||||
discussions.setUpdateTime(DateUtils.getNowDate());
|
||||
return discussionsMapper.updateDiscussions(discussions);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除讨论
|
||||
*
|
||||
* @param ids 需要删除的讨论主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDiscussionsByIds(String[] ids)
|
||||
{
|
||||
return discussionsMapper.deleteDiscussionsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除讨论信息
|
||||
*
|
||||
* @param id 讨论主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDiscussionsById(String id)
|
||||
{
|
||||
return discussionsMapper.deleteDiscussionsById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,183 @@
|
||||
package com.rzdata.web.service.impl;
|
||||
|
||||
import cn.hutool.core.lang.Snowflake;
|
||||
import com.rzdata.common.core.domain.TreeSelect;
|
||||
import com.rzdata.common.utils.DateUtils;
|
||||
import com.rzdata.common.utils.SecurityUtils;
|
||||
import com.rzdata.common.utils.StringUtils;
|
||||
import com.rzdata.common.core.domain.DocumentCategory;
|
||||
import com.rzdata.web.mapper.DocumentCategoryMapper;
|
||||
import com.rzdata.web.service.IDocumentCategoryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 文档资源分类管理Service业务层处理
|
||||
*
|
||||
* @author spongepan
|
||||
* @date 2024-08-27
|
||||
*/
|
||||
@Service
|
||||
public class DocumentCategoryServiceImpl implements IDocumentCategoryService
|
||||
{
|
||||
@Autowired
|
||||
private DocumentCategoryMapper documentCategoryMapper;
|
||||
|
||||
@Autowired
|
||||
private Snowflake snowflake;
|
||||
|
||||
/**
|
||||
* 查询文档资源分类管理
|
||||
*
|
||||
* @param id 文档资源分类管理主键
|
||||
* @return 文档资源分类管理
|
||||
*/
|
||||
@Override
|
||||
public DocumentCategory selectDocumentCategoryById(String id)
|
||||
{
|
||||
return documentCategoryMapper.selectDocumentCategoryById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询文档资源分类管理列表
|
||||
*
|
||||
* @param documentCategory 文档资源分类管理
|
||||
* @return 文档资源分类管理
|
||||
*/
|
||||
@Override
|
||||
public List<DocumentCategory> selectDocumentCategoryList(DocumentCategory documentCategory)
|
||||
{
|
||||
return documentCategoryMapper.selectDocumentCategoryList(documentCategory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增文档资源分类管理
|
||||
*
|
||||
* @param documentCategory 文档资源分类管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDocumentCategory(DocumentCategory documentCategory)
|
||||
{
|
||||
documentCategory.setId(String.valueOf(snowflake.nextId()));
|
||||
documentCategory.setCreateTime(DateUtils.getNowDate());
|
||||
documentCategory.setCreateBy(SecurityUtils.getLoginUser().getUsername());
|
||||
documentCategory.setCreateById(String.valueOf(SecurityUtils.getLoginUser().getUserId()));
|
||||
return documentCategoryMapper.insertDocumentCategory(documentCategory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改文档资源分类管理
|
||||
*
|
||||
* @param documentCategory 文档资源分类管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDocumentCategory(DocumentCategory documentCategory)
|
||||
{
|
||||
documentCategory.setUpdateTime(DateUtils.getNowDate());
|
||||
return documentCategoryMapper.updateDocumentCategory(documentCategory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除文档资源分类管理
|
||||
*
|
||||
* @param ids 需要删除的文档资源分类管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDocumentCategoryByIds(String[] ids)
|
||||
{
|
||||
return documentCategoryMapper.deleteDocumentCategoryByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除文档资源分类管理信息
|
||||
*
|
||||
* @param id 文档资源分类管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDocumentCategoryById(String id)
|
||||
{
|
||||
return documentCategoryMapper.deleteDocumentCategoryById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TreeSelect> selectDocumentTreeList(DocumentCategory documentCategory) {
|
||||
List<DocumentCategory> documentCategoryList = documentCategoryMapper.selectDocumentCategoryList(documentCategory);
|
||||
return buildDeptTreeSelect(documentCategoryList);
|
||||
}
|
||||
|
||||
public List<TreeSelect> buildDeptTreeSelect(List<DocumentCategory> documentCategory)
|
||||
{
|
||||
List<DocumentCategory> docCategoryTree = buildDeptTree(documentCategory);
|
||||
return docCategoryTree.stream().map(TreeSelect::new).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public List<DocumentCategory> buildDeptTree(List<DocumentCategory> documentCategoryList)
|
||||
{
|
||||
List<DocumentCategory> returnList = new ArrayList<DocumentCategory>();
|
||||
List<String> tempList = documentCategoryList.stream().map(DocumentCategory::getId).collect(Collectors.toList());
|
||||
for (DocumentCategory documentCategory : documentCategoryList)
|
||||
{
|
||||
// 如果是顶级节点, 遍历该父节点的所有子节点
|
||||
if (!tempList.contains(documentCategory.getParentId()))
|
||||
{
|
||||
recursionFn(documentCategoryList, documentCategory);
|
||||
returnList.add(documentCategory);
|
||||
}
|
||||
}
|
||||
if (returnList.isEmpty())
|
||||
{
|
||||
returnList = documentCategoryList;
|
||||
}
|
||||
return returnList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归列表
|
||||
*/
|
||||
private void recursionFn(List<DocumentCategory> list, DocumentCategory t)
|
||||
{
|
||||
// 得到子节点列表
|
||||
List<DocumentCategory> childList = getChildList(list, t);
|
||||
t.setChildren(childList);
|
||||
for (DocumentCategory tChild : childList)
|
||||
{
|
||||
if (hasChild(list, tChild))
|
||||
{
|
||||
recursionFn(list, tChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private List<DocumentCategory> getChildList(List<DocumentCategory> list, DocumentCategory t)
|
||||
{
|
||||
List<DocumentCategory> tlist = new ArrayList<DocumentCategory>();
|
||||
Iterator<DocumentCategory> it = list.iterator();
|
||||
while (it.hasNext())
|
||||
{
|
||||
DocumentCategory n = (DocumentCategory) it.next();
|
||||
if (StringUtils.isNotNull(n.getParentId()) && n.getParentId().equals(t.getId()))
|
||||
{
|
||||
tlist.add(n);
|
||||
}
|
||||
}
|
||||
return tlist;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 判断是否有子节点
|
||||
*/
|
||||
private boolean hasChild(List<DocumentCategory> list, DocumentCategory t)
|
||||
{
|
||||
return getChildList(list, t).size() > 0;
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,25 @@
|
||||
package com.rzdata.web.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.rzdata.common.constant.Constants;
|
||||
import com.rzdata.common.utils.DateUtils;
|
||||
import com.rzdata.common.utils.SecurityUtils;
|
||||
import com.rzdata.web.domain.Attachment;
|
||||
import com.rzdata.web.domain.Document;
|
||||
import com.rzdata.web.domain.Tool;
|
||||
import com.rzdata.web.mapper.DocumentMapper;
|
||||
import com.rzdata.web.service.IDocumentService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service业务层处理
|
||||
@@ -21,6 +32,10 @@ public class DocumentServiceImpl implements IDocumentService
|
||||
{
|
||||
@Autowired
|
||||
private DocumentMapper documentMapper;
|
||||
@Autowired
|
||||
private AttachmentServiceImpl attachmentService;
|
||||
@Autowired
|
||||
private ToolServiceImpl toolService;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
@@ -31,19 +46,65 @@ public class DocumentServiceImpl implements IDocumentService
|
||||
@Override
|
||||
public Document selectDocumentById(String docId)
|
||||
{
|
||||
return documentMapper.selectDocumentById(docId);
|
||||
Document document = documentMapper.selectDocumentById(docId);
|
||||
if(StrUtil.isNotBlank(document.getToolId())){
|
||||
Tool tool = toolService.selectToolByToolId(document.getToolId());
|
||||
document.setToolName(tool.getToolName());
|
||||
}
|
||||
Attachment attachment = new Attachment();
|
||||
attachment.setBusinessId(document.getDocId());
|
||||
attachment.setDel(Constants.STR_ZERO);
|
||||
List<Attachment> attachments = attachmentService.selectAttachmentList(attachment);
|
||||
if(CollUtil.isNotEmpty(attachments)){
|
||||
document.setAttachment(attachments.get(0));
|
||||
}
|
||||
return document;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param Document 【请填写功能名称】
|
||||
* @param document 【请填写功能名称】
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public List<Document> selectDocumentList(Document Document)
|
||||
public List<Document> selectDocumentList(Document document)
|
||||
{
|
||||
return documentMapper.selectDocumentList(Document);
|
||||
List<Document> documents = documentMapper.selectDocumentList(document);
|
||||
if(CollUtil.isEmpty(documents)){
|
||||
return documents;
|
||||
}
|
||||
List<String> docIds = documents.stream().map(Document::getDocId).collect(Collectors.toList());
|
||||
Attachment attachment = new Attachment();
|
||||
attachment.setBusinessIds(docIds);
|
||||
attachment.setDel(Constants.STR_ZERO);
|
||||
List<Attachment> attachments = attachmentService.selectAttachmentList(attachment);
|
||||
if(CollUtil.isEmpty(attachments)){
|
||||
return documents;
|
||||
}
|
||||
for (Document doc : documents) {
|
||||
for (Attachment att : attachments) {
|
||||
if(doc.getDocId().equals(att.getBusinessId())){
|
||||
doc.setAttachment(att);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return documents;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param document 【请填写功能名称】
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public List<Document> selectDocumentListAll(Document document)
|
||||
{
|
||||
List<Document> documents = documentMapper.selectDocumentList(document);
|
||||
return documents;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -60,11 +121,26 @@ public class DocumentServiceImpl implements IDocumentService
|
||||
return documentMapper.insertDocument(document);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String saveDocument(Document document){
|
||||
document.setCreateTime(DateUtils.getNowDate());
|
||||
String docId = IdUtil.simpleUUID();
|
||||
document.setDocId(docId);
|
||||
document.setCreateBy(SecurityUtils.getLoginUser().getUsername());
|
||||
document.setCreateById(String.valueOf(SecurityUtils.getLoginUser().getUserId()));
|
||||
document.setIsDeleted(Constants.STR_ZERO);
|
||||
document.setCreateTime(new Date());
|
||||
int result = documentMapper.insertDocument(document);
|
||||
if(ObjectUtil.isNotEmpty(document.getAttachment())){
|
||||
Attachment attachment = document.getAttachment();
|
||||
attachment.setId(IdUtil.simpleUUID());
|
||||
attachment.setCreateBy(SecurityUtils.getLoginUser().getUsername());
|
||||
attachment.setBusinessId(docId);
|
||||
attachment.setBizType(Constants.DOC_TYPE_DOC);
|
||||
attachment.setDel(Constants.STR_ZERO);
|
||||
attachment.setCreateDate(new Date());
|
||||
attachmentService.insertAttachment(attachment);
|
||||
}
|
||||
if(result > 0){
|
||||
return docId;
|
||||
}
|
||||
@@ -74,14 +150,36 @@ public class DocumentServiceImpl implements IDocumentService
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param Document 【请填写功能名称】
|
||||
* @param document 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDocument(Document Document)
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int updateDocument(Document document)
|
||||
{
|
||||
Document.setUpdateTime(DateUtils.getNowDate());
|
||||
return documentMapper.updateDocument(Document);
|
||||
document.setUpdateBy(SecurityUtils.getLoginUser().getUsername());
|
||||
document.setUpdateById(String.valueOf(SecurityUtils.getLoginUser().getUserId()));
|
||||
document.setUpdateTime(new Date());
|
||||
int result = documentMapper.updateDocument(document);
|
||||
|
||||
Attachment attParam = document.getAttachment();
|
||||
if(ObjectUtil.isNotEmpty(attParam) && StrUtil.isBlank(attParam.getId())){
|
||||
Attachment att = new Attachment();
|
||||
att.setBusinessId(document.getDocId());
|
||||
att.setDel(Constants.STR_ONE);
|
||||
attachmentService.updateAttachmentByBusinessId(att);
|
||||
|
||||
Attachment attachment = document.getAttachment();
|
||||
attachment.setId(IdUtil.simpleUUID());
|
||||
attachment.setCreateBy(SecurityUtils.getLoginUser().getUsername());
|
||||
attachment.setBusinessId(document.getDocId());
|
||||
attachment.setBizType(Constants.DOC_TYPE_DOC);
|
||||
attachment.setDel(Constants.STR_ZERO);
|
||||
attachment.setCreateDate(new Date());
|
||||
attachmentService.insertAttachment(attachment);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -93,7 +191,12 @@ public class DocumentServiceImpl implements IDocumentService
|
||||
@Override
|
||||
public int deleteDocumentByIds(String[] ids)
|
||||
{
|
||||
return documentMapper.deleteDocumentByIds(ids);
|
||||
Document doc = new Document();
|
||||
doc.setIds(Arrays.asList(ids));
|
||||
doc.setUpdateBy(SecurityUtils.getLoginUser().getUsername());
|
||||
doc.setUpdateById(String.valueOf(SecurityUtils.getLoginUser().getUserId()));
|
||||
doc.setUpdateTime(new Date());
|
||||
return documentMapper.isDeleteDocumentByIds(doc);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -107,5 +210,31 @@ public class DocumentServiceImpl implements IDocumentService
|
||||
{
|
||||
return documentMapper.deleteDocumentById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发布文档
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int pushDoc(String[] ids) {
|
||||
Document doc = new Document();
|
||||
doc.setIds(Arrays.asList(ids));
|
||||
doc.setUpdateBy(SecurityUtils.getLoginUser().getUsername());
|
||||
doc.setUpdateById(String.valueOf(SecurityUtils.getLoginUser().getUserId()));
|
||||
doc.setDocStatus(Constants.DOC_STATUS_YFB);
|
||||
doc.setUpdateTime(new Date());
|
||||
return documentMapper.updatePushDoc(doc);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除附件
|
||||
* @param docIds
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int batchDeleteById(List<String> docIds){
|
||||
return documentMapper.batchDeleteById(docIds);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.rzdata.web.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.lang.Snowflake;
|
||||
import com.rzdata.common.constant.Constants;
|
||||
import com.rzdata.common.utils.DateUtils;
|
||||
import com.rzdata.common.utils.SecurityUtils;
|
||||
import com.rzdata.web.domain.Replies;
|
||||
import com.rzdata.web.mapper.RepliesMapper;
|
||||
import com.rzdata.web.service.IRepliesService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 回复Service业务层处理
|
||||
*
|
||||
* @author panchichun
|
||||
* @date 2024-08-30
|
||||
*/
|
||||
@Service
|
||||
public class RepliesServiceImpl implements IRepliesService
|
||||
{
|
||||
@Autowired
|
||||
private RepliesMapper repliesMapper;
|
||||
|
||||
@Autowired
|
||||
private Snowflake snowflake;
|
||||
|
||||
/**
|
||||
* 查询回复
|
||||
*
|
||||
* @param id 回复主键
|
||||
* @return 回复
|
||||
*/
|
||||
@Override
|
||||
public Replies selectRepliesById(String id)
|
||||
{
|
||||
return repliesMapper.selectRepliesById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询回复列表
|
||||
*
|
||||
* @param replies 回复
|
||||
* @return 回复
|
||||
*/
|
||||
@Override
|
||||
public List<Replies> selectRepliesList(Replies replies)
|
||||
{
|
||||
return repliesMapper.selectRepliesList(replies);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增回复
|
||||
*
|
||||
* @param replies 回复
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertReplies(Replies replies)
|
||||
{
|
||||
replies.setId(String.valueOf(snowflake.nextId()));
|
||||
replies.setCreateBy(SecurityUtils.getLoginUser().getUsername());
|
||||
replies.setCreateById(String.valueOf(SecurityUtils.getLoginUser().getUserId()));
|
||||
replies.setCreateTime(new Date());
|
||||
replies.setIsDelete(Constants.STR_ZERO);
|
||||
return repliesMapper.insertReplies(replies);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改回复
|
||||
*
|
||||
* @param replies 回复
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateReplies(Replies replies)
|
||||
{
|
||||
replies.setUpdateTime(DateUtils.getNowDate());
|
||||
return repliesMapper.updateReplies(replies);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除回复
|
||||
*
|
||||
* @param ids 需要删除的回复主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRepliesByIds(String[] ids)
|
||||
{
|
||||
return repliesMapper.deleteRepliesByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除回复信息
|
||||
*
|
||||
* @param id 回复主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRepliesById(String id)
|
||||
{
|
||||
return repliesMapper.deleteRepliesById(id);
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,24 @@
|
||||
package com.rzdata.web.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.BooleanUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.rzdata.common.annotation.DataScope;
|
||||
import com.rzdata.common.constant.Constants;
|
||||
import com.rzdata.common.utils.DateUtils;
|
||||
import com.rzdata.common.utils.SecurityUtils;
|
||||
import com.rzdata.web.domain.Document;
|
||||
import com.rzdata.web.domain.Tool;
|
||||
import com.rzdata.web.mapper.ToolMapper;
|
||||
import com.rzdata.web.service.IAttachmentService;
|
||||
import com.rzdata.web.service.IDocumentService;
|
||||
import com.rzdata.web.service.IToolService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 工具信息Service业务层处理
|
||||
@@ -25,6 +32,12 @@ public class ToolServiceImpl implements IToolService
|
||||
@Autowired
|
||||
private ToolMapper toolMapper;
|
||||
|
||||
@Autowired
|
||||
private IAttachmentService iAttachmentService;
|
||||
|
||||
@Autowired
|
||||
private IDocumentService documentService;
|
||||
|
||||
/**
|
||||
* 查询工具信息
|
||||
*
|
||||
@@ -49,6 +62,7 @@ public class ToolServiceImpl implements IToolService
|
||||
* @return 工具信息
|
||||
*/
|
||||
@Override
|
||||
@DataScope(deptAlias = "d")
|
||||
public List<Tool> selectToolList(Tool tool)
|
||||
{
|
||||
if (BooleanUtil.isTrue(tool.getPermissionCheck())) {
|
||||
@@ -84,11 +98,43 @@ public class ToolServiceImpl implements IToolService
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int updateTool(Tool tool)
|
||||
{
|
||||
tool.setUpdateBy(SecurityUtils.getUserId().toString());
|
||||
tool.setUpdateTime(DateUtils.getNowDate());
|
||||
return toolMapper.updateTool(tool);
|
||||
int result = toolMapper.updateTool(tool);
|
||||
deleteDocAndAtt(tool);
|
||||
addDocAndAtt(tool);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteDocAndAtt(Tool tool) {
|
||||
List<Document> documentList = tool.getDocumentList();
|
||||
if(CollUtil.isEmpty(documentList)){
|
||||
return;
|
||||
}
|
||||
//先删除,后新增
|
||||
List<String> docIds = documentList.stream().map(Document::getDocId).collect(Collectors.toList());
|
||||
iAttachmentService.deleteAttachmentByBusinessId(docIds);
|
||||
documentService.batchDeleteById(docIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void addDocAndAtt(Tool tool) {
|
||||
List<Document> documentList = tool.getDocumentList();
|
||||
if(CollUtil.isEmpty(documentList)){
|
||||
return;
|
||||
}
|
||||
//新增
|
||||
for (Document document : documentList) {
|
||||
document.setToolId(tool.getToolId());
|
||||
document.setDocStatus(Constants.DOC_STATUS_SHZ);
|
||||
documentService.saveDocument(document);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -114,4 +160,17 @@ public class ToolServiceImpl implements IToolService
|
||||
{
|
||||
return toolMapper.deleteToolByToolId(toolId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDocPushStatus(Tool tTool) {
|
||||
Document document = new Document();
|
||||
document.setToolId(tTool.getToolId());
|
||||
List<Document> documents = documentService.selectDocumentListAll(document);
|
||||
if(CollUtil.isEmpty(documents)){
|
||||
return;
|
||||
}
|
||||
List<String> ids = documents.stream().map(Document::getDocId).collect(Collectors.toList());
|
||||
String[] idsArray = ids.stream().toArray(String[]::new);
|
||||
documentService.pushDoc(idsArray);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ ja:
|
||||
|
||||
# 开发环境配置
|
||||
server:
|
||||
address: 0.0.0.0
|
||||
# 服务器的HTTP端口,默认为8080
|
||||
port: 8080
|
||||
servlet:
|
||||
@@ -128,7 +129,12 @@ xss:
|
||||
# 匹配链接
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||
|
||||
# 用于雪花算法生成id
|
||||
application:
|
||||
datacenterId: 2
|
||||
workerId: 1
|
||||
|
||||
bpmc:
|
||||
tenantId: TLTC_SYS
|
||||
serviceUrl: http://192.168.2.18:8081/ebpm-process-rest/
|
||||
serviceUrl: http://192.168.2.6:8081/ebpm-process-rest/
|
||||
uniteWorkUrl: http://localhost/tool-tech/workflowRouter
|
||||
|
||||
161
tool-tech-admin/src/main/resources/mapper/AttachmentMapper.xml
Normal file
161
tool-tech-admin/src/main/resources/mapper/AttachmentMapper.xml
Normal file
@@ -0,0 +1,161 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.rzdata.web.mapper.AttachmentMapper">
|
||||
|
||||
<resultMap type="Attachment" id="AttachmentResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="bizType" column="biz_type" />
|
||||
<result property="fileUrl" column="file_url" />
|
||||
<result property="fileOldName" column="file_old_name" />
|
||||
<result property="fileNewName" column="file_new_name" />
|
||||
<result property="suffixType" column="suffix_type" />
|
||||
<result property="fileSize" column="file_size" />
|
||||
<result property="businessId" column="business_id" />
|
||||
<result property="sorts" column="sorts" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="del" column="del" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createDate" column="create_date" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateDate" column="update_date" />
|
||||
<result property="failureTime" column="failure_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAttachmentVo">
|
||||
select id, biz_type, file_url, file_old_name, file_new_name, suffix_type, file_size, business_id, sorts, remark, del, create_by, create_date, update_by, update_date, failure_time from t_attachment
|
||||
</sql>
|
||||
|
||||
<select id="selectAttachmentList" parameterType="Attachment" resultMap="AttachmentResult">
|
||||
<include refid="selectAttachmentVo"/>
|
||||
<where>
|
||||
<if test="bizType != null and bizType != ''"> and biz_type = #{bizType}</if>
|
||||
<if test="fileUrl != null and fileUrl != ''"> and file_url = #{fileUrl}</if>
|
||||
<if test="fileOldName != null and fileOldName != ''"> and file_old_name like concat('%', #{fileOldName}, '%')</if>
|
||||
<if test="fileNewName != null and fileNewName != ''"> and file_new_name like concat('%', #{fileNewName}, '%')</if>
|
||||
<if test="suffixType != null and suffixType != ''"> and suffix_type = #{suffixType}</if>
|
||||
<if test="fileSize != null "> and file_size = #{fileSize}</if>
|
||||
<if test="businessId != null and businessId != ''"> and business_id = #{businessId}</if>
|
||||
<if test="sorts != null "> and sorts = #{sorts}</if>
|
||||
<if test="del != null "> and del = #{del}</if>
|
||||
<if test="createDate != null "> and create_date = #{createDate}</if>
|
||||
<if test="updateDate != null "> and update_date = #{updateDate}</if>
|
||||
<if test="failureTime != null "> and failure_time = #{failureTime}</if>
|
||||
<if test="businessIds != null and businessIds.size() > 0">
|
||||
and business_id in
|
||||
<foreach item="id" index="index" collection="businessIds" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAttachmentById" parameterType="String" resultMap="AttachmentResult">
|
||||
<include refid="selectAttachmentVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertAttachment" parameterType="Attachment">
|
||||
insert into t_attachment
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="bizType != null">biz_type,</if>
|
||||
<if test="fileUrl != null">file_url,</if>
|
||||
<if test="fileOldName != null">file_old_name,</if>
|
||||
<if test="fileNewName != null">file_new_name,</if>
|
||||
<if test="suffixType != null">suffix_type,</if>
|
||||
<if test="fileSize != null">file_size,</if>
|
||||
<if test="businessId != null">business_id,</if>
|
||||
<if test="sorts != null">sorts,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="del != null">del,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createDate != null">create_date,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateDate != null">update_date,</if>
|
||||
<if test="failureTime != null">failure_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="bizType != null">#{bizType},</if>
|
||||
<if test="fileUrl != null">#{fileUrl},</if>
|
||||
<if test="fileOldName != null">#{fileOldName},</if>
|
||||
<if test="fileNewName != null">#{fileNewName},</if>
|
||||
<if test="suffixType != null">#{suffixType},</if>
|
||||
<if test="fileSize != null">#{fileSize},</if>
|
||||
<if test="businessId != null">#{businessId},</if>
|
||||
<if test="sorts != null">#{sorts},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="del != null">#{del},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createDate != null">#{createDate},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateDate != null">#{updateDate},</if>
|
||||
<if test="failureTime != null">#{failureTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAttachment" parameterType="Attachment">
|
||||
update t_attachment
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="bizType != null">biz_type = #{bizType},</if>
|
||||
<if test="fileUrl != null">file_url = #{fileUrl},</if>
|
||||
<if test="fileOldName != null">file_old_name = #{fileOldName},</if>
|
||||
<if test="fileNewName != null">file_new_name = #{fileNewName},</if>
|
||||
<if test="suffixType != null">suffix_type = #{suffixType},</if>
|
||||
<if test="fileSize != null">file_size = #{fileSize},</if>
|
||||
<if test="businessId != null">business_id = #{businessId},</if>
|
||||
<if test="sorts != null">sorts = #{sorts},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="del != null">del = #{del},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createDate != null">create_date = #{createDate},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateDate != null">update_date = #{updateDate},</if>
|
||||
<if test="failureTime != null">failure_time = #{failureTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<update id="updateAttachmentByBusinessId" parameterType="Attachment">
|
||||
update t_attachment
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="bizType != null">biz_type = #{bizType},</if>
|
||||
<if test="fileUrl != null">file_url = #{fileUrl},</if>
|
||||
<if test="fileOldName != null">file_old_name = #{fileOldName},</if>
|
||||
<if test="fileNewName != null">file_new_name = #{fileNewName},</if>
|
||||
<if test="suffixType != null">suffix_type = #{suffixType},</if>
|
||||
<if test="fileSize != null">file_size = #{fileSize},</if>
|
||||
<if test="sorts != null">sorts = #{sorts},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="del != null">del = #{del},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createDate != null">create_date = #{createDate},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateDate != null">update_date = #{updateDate},</if>
|
||||
<if test="failureTime != null">failure_time = #{failureTime},</if>
|
||||
</trim>
|
||||
where business_id = #{businessId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAttachmentById" parameterType="String">
|
||||
delete from t_attachment where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAttachmentByIds" parameterType="String">
|
||||
delete from t_attachment where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAttachmentByBusinessId" parameterType="java.util.List">
|
||||
delete from t_attachment where business_id in
|
||||
<foreach item="id" collection="list" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
103
tool-tech-admin/src/main/resources/mapper/DiscussionsMapper.xml
Normal file
103
tool-tech-admin/src/main/resources/mapper/DiscussionsMapper.xml
Normal file
@@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.rzdata.web.mapper.DiscussionsMapper">
|
||||
|
||||
<resultMap type="Discussions" id="DiscussionsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="businessId" column="business_id" />
|
||||
<result property="type" column="type" />
|
||||
<result property="content" column="content" />
|
||||
<result property="isDelete" column="is_delete" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createById" column="create_by_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateById" column="update_by_id" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDiscussionsVo">
|
||||
select id, business_id, type, content, is_delete, create_by, create_by_id, create_time, update_by, update_by_id, update_time from t_discussions
|
||||
</sql>
|
||||
|
||||
<select id="selectDiscussionsList" parameterType="Discussions" resultMap="DiscussionsResult">
|
||||
select td.*,su.nick_name
|
||||
from t_discussions td
|
||||
left join sys_user su on su.user_id = td.create_by_id
|
||||
<where>
|
||||
<if test="businessId != null and businessId != ''"> and td.business_id = #{businessId}</if>
|
||||
<if test="type != null and type != ''"> and td.type = #{type}</if>
|
||||
<if test="content != null and content != ''"> and td.content = #{content}</if>
|
||||
<if test="isDelete != null and isDelete != ''"> and td.is_delete = #{isDelete}</if>
|
||||
<if test="createById != null and createById != ''"> and td.create_by_id = #{createById}</if>
|
||||
<if test="updateById != null and updateById != ''"> and td.update_by_id = #{updateById}</if>
|
||||
and td.is_delete = '0'
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDiscussionsById" parameterType="String" resultMap="DiscussionsResult">
|
||||
<include refid="selectDiscussionsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDiscussions" parameterType="Discussions">
|
||||
insert into t_discussions
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="businessId != null">business_id,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="content != null">content,</if>
|
||||
<if test="isDelete != null">is_delete,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createById != null">create_by_id,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateById != null">update_by_id,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="businessId != null">#{businessId},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="content != null">#{content},</if>
|
||||
<if test="isDelete != null">#{isDelete},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createById != null">#{createById},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateById != null">#{updateById},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDiscussions" parameterType="Discussions">
|
||||
update t_discussions
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="businessId != null">business_id = #{businessId},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="content != null">content = #{content},</if>
|
||||
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createById != null">create_by_id = #{createById},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateById != null">update_by_id = #{updateById},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDiscussionsById" parameterType="String">
|
||||
delete from t_discussions where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDiscussionsByIds" parameterType="String">
|
||||
delete from t_discussions where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.rzdata.web.mapper.DocumentCategoryMapper">
|
||||
|
||||
<resultMap type="DocumentCategory" id="DocumentCategoryResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="categoryName" column="category_name" />
|
||||
<result property="categoryDescription" column="category_description" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createById" column="create_by_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateById" column="update_by_id" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="types" column="types" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDocumentCategoryVo">
|
||||
select id, category_name, category_description, parent_id, create_by, create_by_id, create_time,
|
||||
update_by, update_by_id, update_time, types from t_document_category
|
||||
</sql>
|
||||
|
||||
<select id="selectDocumentCategoryList" parameterType="DocumentCategory" resultMap="DocumentCategoryResult">
|
||||
<include refid="selectDocumentCategoryVo"/>
|
||||
<where>
|
||||
<if test="categoryName != null and categoryName != ''"> and category_name like concat('%', #{categoryName}, '%')</if>
|
||||
<if test="categoryDescription != null and categoryDescription != ''"> and category_description = #{categoryDescription}</if>
|
||||
<if test="parentId != null and parentId != ''"> and parent_id = #{parentId}</if>
|
||||
<if test="createById != null and createById != ''"> and create_by_id = #{createById}</if>
|
||||
<if test="updateById != null and updateById != ''"> and update_by_id = #{updateById}</if>
|
||||
<if test="types != null and types != ''"> and types = #{types}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDocumentCategoryById" parameterType="String" resultMap="DocumentCategoryResult">
|
||||
<include refid="selectDocumentCategoryVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDocumentCategory" parameterType="DocumentCategory">
|
||||
insert into t_document_category
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="categoryName != null and categoryName != ''">category_name,</if>
|
||||
<if test="categoryDescription != null">category_description,</if>
|
||||
<if test="parentId != null">parent_id,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createById != null and createById != ''">create_by_id,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateById != null">update_by_id,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="types != null">types,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="categoryName != null and categoryName != ''">#{categoryName},</if>
|
||||
<if test="categoryDescription != null">#{categoryDescription},</if>
|
||||
<if test="parentId != null">#{parentId},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createById != null and createById != ''">#{createById},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateById != null">#{updateById},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="types != null">#{types},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDocumentCategory" parameterType="DocumentCategory">
|
||||
update t_document_category
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="categoryName != null and categoryName != ''">category_name = #{categoryName},</if>
|
||||
<if test="categoryDescription != null">category_description = #{categoryDescription},</if>
|
||||
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createById != null and createById != ''">create_by_id = #{createById},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateById != null">update_by_id = #{updateById},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="types != null">types = #{types},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDocumentCategoryById" parameterType="String">
|
||||
delete from t_document_category where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDocumentCategoryByIds" parameterType="String">
|
||||
delete from t_document_category where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -18,23 +18,44 @@
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="docCategoryId" column="doc_category_id" />
|
||||
<result property="isDeleted" column="is_deleted" />
|
||||
<result property="toolId" column="tool_id" />
|
||||
<result property="toolName" column="tool_name" />
|
||||
<result property="docRespDeptName" column="doc_resp_dept_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDocumentVo">
|
||||
select doc_id, doc_code, doc_name, doc_type, doc_principals, doc_resp_dept, doc_source, doc_status, doc_url, create_by, create_time, update_by, update_time from t_document
|
||||
select doc_id, doc_code, doc_name, doc_type, doc_principals, doc_resp_dept,
|
||||
doc_source, doc_status, doc_url, create_by, create_time,
|
||||
update_by, update_time, remark, doc_category_id,is_deleted,tool_id from t_document
|
||||
</sql>
|
||||
|
||||
<select id="selectDocumentList" parameterType="Document" resultMap="DocumentResult">
|
||||
<include refid="selectDocumentVo"/>
|
||||
select td.*, t_tool.tool_name as tool_name,sys_dept.dept_name as doc_resp_dept_name
|
||||
from t_document td
|
||||
left join t_tool on t_tool.tool_id = td.tool_id
|
||||
left join sys_dept on sys_dept.dept_id = td.doc_resp_dept
|
||||
<where>
|
||||
<if test="docCode != null and docCode != ''"> and doc_code = #{docCode}</if>
|
||||
<if test="docName != null and docName != ''"> and doc_name like concat('%', #{docName}, '%')</if>
|
||||
<if test="docType != null and docType != ''"> and doc_type = #{docType}</if>
|
||||
<if test="docPrincipals != null and docPrincipals != ''"> and doc_principals = #{docPrincipals}</if>
|
||||
<if test="docRespDept != null and docRespDept != ''"> and doc_resp_dept = #{docRespDept}</if>
|
||||
<if test="docSource != null and docSource != ''"> and doc_source = #{docSource}</if>
|
||||
<if test="docStatus != null and docStatus != ''"> and doc_status = #{docStatus}</if>
|
||||
<if test="docCode != null and docCode != ''"> and td.doc_code like concat('%', #{docCode}, '%')</if>
|
||||
<if test="docName != null and docName != ''"> and td.doc_name like concat('%', #{docName}, '%')</if>
|
||||
<if test="docType != null and docType != ''"> and td.doc_type = #{docType}</if>
|
||||
<if test="docPrincipals != null and docPrincipals != ''"> and td.doc_principals like concat('%', #{docPrincipals}, '%')</if>
|
||||
<if test="docRespDept != null and docRespDept != ''"> and td.doc_resp_dept = #{docRespDept}</if>
|
||||
<if test="docSource != null and docSource != ''"> and td.doc_source = #{docSource}</if>
|
||||
<if test="docStatus != null and docStatus != ''"> and td.doc_status = #{docStatus}</if>
|
||||
<if test="toolId != null and toolId != ''"> and td.tool_id = #{toolId}</if>
|
||||
<if test="docCategoryId != null and docCategoryId != ''"> and td.doc_category_id = #{docCategoryId}</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
AND date_format(td.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
AND date_format(td.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
and td.is_deleted = '0'
|
||||
</where>
|
||||
order by td.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectDocumentById" parameterType="String" resultMap="DocumentResult">
|
||||
@@ -58,6 +79,12 @@
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="docCategoryId != null">doc_category_id,</if>
|
||||
<if test="createById != null and createById != ''">create_by_id,</if>
|
||||
<if test="updateById != null">update_by_id,</if>
|
||||
<if test="isDeleted != null">is_deleted,</if>
|
||||
<if test="toolId != null">tool_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="docId != null">#{docId},</if>
|
||||
@@ -73,6 +100,12 @@
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="docCategoryId != null">#{docCategoryId},</if>
|
||||
<if test="createById != null and createById != ''">#{createById},</if>
|
||||
<if test="updateById != null">#{updateById},</if>
|
||||
<if test="isDeleted != null">#{isDeleted},</if>
|
||||
<if test="toolId != null">#{toolId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -91,6 +124,12 @@
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="docCategoryId != null">doc_category_id = #{docCategoryId},</if>
|
||||
<if test="isDeleted != null">is_deleted = #{isDeleted},</if>
|
||||
<if test="updateById != null">update_by_id = #{updateById},</if>
|
||||
<if test="createById != null">create_by_id = #{createById},</if>
|
||||
<if test="toolId != null">tool_id = #{toolId},</if>
|
||||
</trim>
|
||||
where doc_id = #{docId}
|
||||
</update>
|
||||
@@ -99,10 +138,29 @@
|
||||
delete from t_document where doc_id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDocumentByIds" parameterType="String">
|
||||
<delete id="isDeleteDocumentByIds" parameterType="Document">
|
||||
<if test="ids != null and ids.size() > 0">
|
||||
update t_document set is_deleted = '1' ,update_by_id = #{updateById},update_by = #{updateBy},update_time = #{updateTime} where doc_id in
|
||||
<foreach item="id" index="index" collection="ids" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<update id="updatePushDoc" parameterType="Document">
|
||||
<if test="ids != null and ids.size() > 0">
|
||||
update t_document set doc_status = #{docStatus} ,update_by_id = #{updateById},update_by = #{updateBy},update_time = #{updateTime} where doc_id in
|
||||
<foreach item="id" index="index" collection="ids" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<delete id="batchDeleteById" parameterType="java.util.List">
|
||||
delete from t_document where doc_id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
<foreach item="id" collection="list" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
103
tool-tech-admin/src/main/resources/mapper/RepliesMapper.xml
Normal file
103
tool-tech-admin/src/main/resources/mapper/RepliesMapper.xml
Normal file
@@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.rzdata.web.mapper.RepliesMapper">
|
||||
|
||||
<resultMap type="Replies" id="RepliesResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="discussionId" column="discussion_id" />
|
||||
<result property="content" column="content" />
|
||||
<result property="isDelete" column="is_delete" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createById" column="create_by_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateById" column="update_by_id" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRepliesVo">
|
||||
select id, discussion_id, content, is_delete, create_by, create_by_id, create_time, update_by, update_by_id, update_time from t_replies
|
||||
</sql>
|
||||
|
||||
<select id="selectRepliesList" parameterType="Replies" resultMap="RepliesResult">
|
||||
select tr.*,su.nick_name
|
||||
from t_replies tr
|
||||
left join sys_user su on su.user_id = tr.create_by_id
|
||||
<where>
|
||||
<if test="discussionId != null and discussionId != ''"> and tr.discussion_id = #{discussionId}</if>
|
||||
<if test="content != null and content != ''"> and tr.content = #{content}</if>
|
||||
<if test="createById != null and createById != ''"> and tr.create_by_id = #{createById}</if>
|
||||
<if test="updateById != null and updateById != ''"> and tr.update_by_id = #{updateById}</if>
|
||||
<if test="discussionIdList != null and discussionIdList.size() > 0">
|
||||
and tr.discussion_id in
|
||||
<foreach item="id" index="index" collection="discussionIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
and tr.is_delete = '0'
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectRepliesById" parameterType="String" resultMap="RepliesResult">
|
||||
<include refid="selectRepliesVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertReplies" parameterType="Replies">
|
||||
insert into t_replies
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="discussionId != null">discussion_id,</if>
|
||||
<if test="content != null">content,</if>
|
||||
<if test="isDelete != null">is_delete,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createById != null">create_by_id,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateById != null">update_by_id,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="discussionId != null">#{discussionId},</if>
|
||||
<if test="content != null">#{content},</if>
|
||||
<if test="isDelete != null">#{isDelete},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createById != null">#{createById},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateById != null">#{updateById},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateReplies" parameterType="Replies">
|
||||
update t_replies
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="discussionId != null">discussion_id = #{discussionId},</if>
|
||||
<if test="content != null">content = #{content},</if>
|
||||
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createById != null">create_by_id = #{createById},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateById != null">update_by_id = #{updateById},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRepliesById" parameterType="String">
|
||||
delete from t_replies where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRepliesByIds" parameterType="String">
|
||||
delete from t_replies where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -145,8 +145,11 @@
|
||||
|
||||
<select id="selectToolList" parameterType="Tool" resultMap="ToolResult">
|
||||
select u.tool_id, u.tool_code, u.tool_name, u.tool_type, u.tool_source, u.tool_use, u.test_situation, u.function_desc, u.apply_condition, u.operate_explain,u.record_status,u.proc_inst_id,
|
||||
u.tool_principals, u.tool_principals_name, u.tool_resp_dept, u.status, u.create_by, u.create_time, u.remark, d.dept_name as tool_resp_dept_name,u.association from t_tool u
|
||||
left join sys_dept d on u.tool_resp_dept = d.dept_id
|
||||
u.tool_principals, u.tool_principals_name, u.tool_resp_dept, u.status, u.create_by, u.create_time, u.remark, sd.dept_name as tool_resp_dept_name,u.association
|
||||
from t_tool u
|
||||
left join sys_user su on u.create_by = su.user_id
|
||||
left join sys_dept d on d.dept_id = su.dept_Id
|
||||
left join sys_dept sd on u.tool_resp_dept = sd.dept_id
|
||||
where 1=1
|
||||
and u.record_status != 'cancel'
|
||||
<if test="toolId != null and toolId != ''">
|
||||
@@ -176,6 +179,7 @@
|
||||
<if test="recordStatus != null and recordStatus != ''">
|
||||
AND u.record_status = #{recordStatus}
|
||||
</if>
|
||||
${params.dataScope}
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.rzdata.common.config;
|
||||
|
||||
import cn.hutool.core.lang.Snowflake;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* 雪花算法订单号生成
|
||||
* @author lanhai
|
||||
*/
|
||||
@Configuration
|
||||
public class SnowflakeConfig {
|
||||
|
||||
@Value("${application.datacenterId}")
|
||||
private Long datacenterId;
|
||||
|
||||
@Value("${application.workerId}")
|
||||
private Long workerId;
|
||||
|
||||
@Bean
|
||||
public Snowflake snowflake() {
|
||||
return new Snowflake(workerId, datacenterId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -182,4 +182,17 @@ public class Constants
|
||||
public static final String DOWNLOAD_TOOL_PERMISSION = "download:done:tool";
|
||||
|
||||
|
||||
/** 文档-状态-已发布 **/
|
||||
public static final String DOC_STATUS_YFB = "yfb";
|
||||
/** 文档-状态-已上传 **/
|
||||
public static final String DOC_STATUS_YSC = "ysc";
|
||||
/** 文档-状态-审核中 **/
|
||||
public static final String DOC_STATUS_SHZ = "shz";
|
||||
|
||||
/** 文档-doc **/
|
||||
public static final String DOC_TYPE_DOC = "doc";
|
||||
|
||||
|
||||
public static final String STR_ZERO = "0";
|
||||
public static final String STR_ONE = "1";
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.rzdata.common.core.domain;
|
||||
|
||||
import com.rzdata.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文档资源分类管理对象 t_document_category
|
||||
*
|
||||
* @author spongepan
|
||||
* @date 2024-08-27
|
||||
*/
|
||||
@Data
|
||||
public class DocumentCategory extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private String id;
|
||||
|
||||
/** 分类名称 */
|
||||
@Excel(name = "分类名称")
|
||||
private String categoryName;
|
||||
|
||||
/** 分类描述 */
|
||||
@Excel(name = "分类描述")
|
||||
private String categoryDescription;
|
||||
|
||||
/** 父分类ID,如果是一级分类,则为空 */
|
||||
@Excel(name = "父分类ID,如果是一级分类,则为空")
|
||||
private String parentId;
|
||||
|
||||
/** 创建人id */
|
||||
@Excel(name = "创建人id")
|
||||
private String createById;
|
||||
|
||||
/** 更新人id */
|
||||
@Excel(name = "更新人id")
|
||||
private String updateById;
|
||||
|
||||
/** 类型(system:系统,user:用户创建) */
|
||||
@Excel(name = "类型")
|
||||
private String types;
|
||||
|
||||
/** 文档分类id */
|
||||
@Excel(name = "文档分类id")
|
||||
private String docCategoryId;
|
||||
|
||||
/** 子分类 */
|
||||
private List<DocumentCategory> children = new ArrayList<DocumentCategory>();
|
||||
|
||||
}
|
||||
@@ -6,12 +6,14 @@ import java.util.stream.Collectors;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.rzdata.common.core.domain.entity.SysDept;
|
||||
import com.rzdata.common.core.domain.entity.SysMenu;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Treeselect树结构实体类
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Data
|
||||
public class TreeSelect implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -22,6 +24,9 @@ public class TreeSelect implements Serializable
|
||||
/** 节点名称 */
|
||||
private String label;
|
||||
|
||||
/** 类型 */
|
||||
private String types;
|
||||
|
||||
/** 子节点 */
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private List<TreeSelect> children;
|
||||
@@ -45,33 +50,14 @@ public class TreeSelect implements Serializable
|
||||
this.children = menu.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
|
||||
public TreeSelect(DocumentCategory docCategory)
|
||||
{
|
||||
return id;
|
||||
this.id = Long.valueOf(docCategory.getId());
|
||||
this.label = docCategory.getCategoryName();
|
||||
this.types = docCategory.getTypes();
|
||||
this.children = docCategory.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getLabel()
|
||||
{
|
||||
return label;
|
||||
}
|
||||
|
||||
public void setLabel(String label)
|
||||
{
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public List<TreeSelect> getChildren()
|
||||
{
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<TreeSelect> children)
|
||||
{
|
||||
this.children = children;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Objects;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.rzdata.common.listener.PutObjectProgressListener;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.springframework.util.Assert;
|
||||
@@ -280,4 +282,58 @@ public class FileUploadUtils
|
||||
}
|
||||
return extension;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成合并后的文件路径
|
||||
*
|
||||
* @param baseDir 文件存储根目录
|
||||
* @param fileName 上传的文件名
|
||||
* @return 合并后文件的完整路径
|
||||
*/
|
||||
public static String generateMergedFilePath(String baseDir, String fileName) {
|
||||
// 获取当前日期路径
|
||||
String datePath = DateUtil.today().replace("-", "/");
|
||||
|
||||
// 获取文件的基本名称和扩展名
|
||||
String baseName = StrUtil.subBefore(fileName, ".", true);
|
||||
String extension = StrUtil.subAfter(fileName, ".", true);
|
||||
|
||||
// 生成唯一文件名,使用时间戳
|
||||
String uniqueFileName = baseName + "_" + System.currentTimeMillis() + "." + extension;
|
||||
|
||||
// 合并文件路径: baseDir/yyyy/MM/dd/uploadId/uniqueFileName
|
||||
String mergedFilePath = Paths.get(baseDir, datePath, uniqueFileName).toString();
|
||||
|
||||
return mergedFilePath;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取文件名称
|
||||
*
|
||||
* @param baseDir 文件存储根目录
|
||||
* @param fileNames 上传的文件名
|
||||
* @return 合并后文件的完整路径
|
||||
*/
|
||||
public static String getFilePath(String baseDir, String fileNames) {
|
||||
String extension = StrUtil.subAfter(fileNames, ".", true);
|
||||
|
||||
String fileName = StringUtils.format("{}/{}_{}.{}", DateUtils.datePath(),
|
||||
FilenameUtils.getBaseName(fileNames), Seq.getId(Seq.uploadSeqType), extension);;
|
||||
|
||||
try {
|
||||
return getPathFileName(baseDir, fileName);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String extractSuffix(String filePath) {
|
||||
int lastDotIndex = filePath.lastIndexOf('.');
|
||||
if (lastDotIndex == -1) {
|
||||
return ""; // 没有后缀
|
||||
}
|
||||
return filePath.substring(lastDotIndex + 1); // 去掉点(.)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,14 @@ public interface SysDictTypeMapper
|
||||
*/
|
||||
public List<SysDictType> selectDictTypeList(SysDictType dictType);
|
||||
|
||||
/**
|
||||
* 根据条件分页查询字典类型
|
||||
*
|
||||
* @param dictType 字典类型信息
|
||||
* @return 字典类型集合信息
|
||||
*/
|
||||
public List<SysDictType> selectBizDictTypeList(SysDictType dictType);
|
||||
|
||||
/**
|
||||
* 根据所有字典类型
|
||||
*
|
||||
|
||||
@@ -19,6 +19,14 @@ public interface ISysDictTypeService
|
||||
*/
|
||||
public List<SysDictType> selectDictTypeList(SysDictType dictType);
|
||||
|
||||
/**
|
||||
* 根据条件分页查询字典类型
|
||||
*
|
||||
* @param dictType 字典类型信息
|
||||
* @return 字典类型集合信息
|
||||
*/
|
||||
public List<SysDictType> selectBizDictTypeList(SysDictType dictType);
|
||||
|
||||
/**
|
||||
* 根据所有字典类型
|
||||
*
|
||||
|
||||
@@ -42,7 +42,6 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||
* @return 部门信息集合
|
||||
*/
|
||||
@Override
|
||||
@DataScope(deptAlias = "d")
|
||||
public List<SysDept> selectDeptList(SysDept dept)
|
||||
{
|
||||
return deptMapper.selectDeptList(dept);
|
||||
@@ -57,7 +56,7 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||
@Override
|
||||
public List<TreeSelect> selectDeptTreeList(SysDept dept)
|
||||
{
|
||||
List<SysDept> depts = SpringUtils.getAopProxy(this).selectDeptList(dept);
|
||||
List<SysDept> depts = this.selectDeptList(dept);
|
||||
return buildDeptTreeSelect(depts);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,18 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
|
||||
return dictTypeMapper.selectDictTypeList(dictType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据条件分页查询字典类型
|
||||
*
|
||||
* @param dictType 字典类型信息
|
||||
* @return 字典类型集合信息
|
||||
*/
|
||||
@Override
|
||||
public List<SysDictType> selectBizDictTypeList(SysDictType dictType)
|
||||
{
|
||||
return dictTypeMapper.selectBizDictTypeList(dictType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据所有字典类型
|
||||
*
|
||||
|
||||
@@ -69,7 +69,6 @@ public class SysUserServiceImpl implements ISysUserService
|
||||
* @return 用户信息集合信息
|
||||
*/
|
||||
@Override
|
||||
@DataScope(deptAlias = "d", userAlias = "u")
|
||||
public List<SysUser> selectUserList(SysUser user)
|
||||
{
|
||||
return userMapper.selectUserList(user);
|
||||
|
||||
@@ -40,6 +40,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 业务字典查询方法-->
|
||||
<select id="selectBizDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
<where>
|
||||
<if test="dictName != null and dictName != ''">
|
||||
AND dict_name like concat('%', #{dictName}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="dictType != null and dictType != ''">
|
||||
AND dict_type like concat('%', #{dictType}, '%')
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
<!-- 锁定某些字段类型 -->
|
||||
AND dict_type in ('tool_type','msg_status','tool_source','tool_status','doc_class','doc_source','doc_upload_status','flow_status')
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectDictTypeAll" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
|
||||
Reference in New Issue
Block a user