Merge remote-tracking branch 'origin/v1.0' into v1.0

This commit is contained in:
hanjian 2024-09-04 22:16:02 +08:00
commit 3b86d79ea0
13 changed files with 192 additions and 16 deletions

View File

@ -191,6 +191,7 @@ public class CommonController
response.put("status", "200"); response.put("status", "200");
return ResponseEntity.ok(response); return ResponseEntity.ok(response);
} catch (IOException e) { } catch (IOException e) {
log.error("CommonController-->uploadChunk----e###", e);
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null); return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
} }
} }
@ -222,6 +223,7 @@ public class CommonController
response.put("originalFilename", fileName); response.put("originalFilename", fileName);
return ResponseEntity.ok(response); return ResponseEntity.ok(response);
} catch (IOException e) { } catch (IOException e) {
log.error("CommonController-->uploadChunk----e###", e);
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null); return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
} finally { } finally {
// 清理临时文件 // 清理临时文件

View File

@ -38,7 +38,7 @@ public class DocumentCategoryController extends BaseController
/** /**
* 查询文档资源分类管理列表 * 查询文档资源分类管理列表
*/ */
@PreAuthorize("@ss.hasPermi('system:category:list')") //@PreAuthorize("@ss.hasPermi('system:category:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(DocumentCategory documentCategory) public TableDataInfo list(DocumentCategory documentCategory)
{ {
@ -50,7 +50,7 @@ public class DocumentCategoryController extends BaseController
/** /**
* 导出文档资源分类管理列表 * 导出文档资源分类管理列表
*/ */
@PreAuthorize("@ss.hasPermi('system:category:export')") //@PreAuthorize("@ss.hasPermi('system:category:export')")
@Log(title = "文档资源分类管理", businessType = BusinessType.EXPORT) @Log(title = "文档资源分类管理", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, DocumentCategory documentCategory) public void export(HttpServletResponse response, DocumentCategory documentCategory)
@ -63,7 +63,7 @@ public class DocumentCategoryController extends BaseController
/** /**
* 获取文档资源分类管理详细信息 * 获取文档资源分类管理详细信息
*/ */
@PreAuthorize("@ss.hasPermi('system:category:query')") //@PreAuthorize("@ss.hasPermi('system:category:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id) public AjaxResult getInfo(@PathVariable("id") String id)
{ {
@ -73,7 +73,7 @@ public class DocumentCategoryController extends BaseController
/** /**
* 新增文档资源分类管理 * 新增文档资源分类管理
*/ */
@PreAuthorize("@ss.hasPermi('system:category:add')") //@PreAuthorize("@ss.hasPermi('system:category:add')")
@Log(title = "文档资源分类管理", businessType = BusinessType.INSERT) @Log(title = "文档资源分类管理", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody DocumentCategory documentCategory) public AjaxResult add(@RequestBody DocumentCategory documentCategory)
@ -84,7 +84,7 @@ public class DocumentCategoryController extends BaseController
/** /**
* 修改文档资源分类管理 * 修改文档资源分类管理
*/ */
@PreAuthorize("@ss.hasPermi('system:category:edit')") //@PreAuthorize("@ss.hasPermi('system:category:edit')")
@Log(title = "文档资源分类管理", businessType = BusinessType.UPDATE) @Log(title = "文档资源分类管理", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody DocumentCategory documentCategory) public AjaxResult edit(@RequestBody DocumentCategory documentCategory)
@ -95,7 +95,7 @@ public class DocumentCategoryController extends BaseController
/** /**
* 删除文档资源分类管理 * 删除文档资源分类管理
*/ */
@PreAuthorize("@ss.hasPermi('system:category:remove')") //@PreAuthorize("@ss.hasPermi('system:category:remove')")
@Log(title = "文档资源分类管理", businessType = BusinessType.DELETE) @Log(title = "文档资源分类管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids) public AjaxResult remove(@PathVariable String[] ids)

View File

@ -120,4 +120,12 @@ public class DocumentController extends BaseController
{ {
return AjaxResult.success(documentService.statistics()); return AjaxResult.success(documentService.statistics());
} }
@GetMapping("/all/list")
public AjaxResult allList(Document Document)
{
List<Document> list = documentService.selectAllList(Document);
return AjaxResult.success(list);
}
} }

View File

@ -103,6 +103,19 @@ public class ToolController extends BaseController
util.exportExcel(response, list, "工具信息数据",tTool.getExcludeFields()); util.exportExcel(response, list, "工具信息数据",tTool.getExcludeFields());
} }
/**
* 导出工具信息列表
*/
@Log(title = "工具信息", businessType = BusinessType.EXPORT)
@GetMapping("/export/word/list")
public AjaxResult exportWordList(Tool tool)
{
List<Tool> list = toolService.selectAllList(tool);
return AjaxResult.success(list);
}
/** /**
* 获取工具信息详细信息 * 获取工具信息详细信息
*/ */

View File

@ -104,4 +104,9 @@ public class Document extends BaseEntity {
private Boolean permissionCheck; private Boolean permissionCheck;
private Boolean permission; private Boolean permission;
private String docTypeName;
private String docSourceName;
private String statusName;
private String createNowTime;
} }

View File

@ -33,9 +33,11 @@ public class Tool extends BaseEntity
private String toolType; private String toolType;
/** 来源 */ /** 来源 */
@Excel(name = "工具来源",sort=3) @Excel(name = "工具来源",dictType="tool_source",sort=3)
private String toolSource; private String toolSource;
private String toolSourceName;
/** 用途 */ /** 用途 */
@Excel(name = "工具用途",sort=7) @Excel(name = "工具用途",sort=7)
private String toolUse; private String toolUse;
@ -70,7 +72,7 @@ public class Tool extends BaseEntity
private String toolRespDeptName; private String toolRespDeptName;
/** 状态 */ /** 状态 */
@Excel(name = "状态",dictType="sys_normal_disable",sort=6) @Excel(name = "状态",dictType="tool_status",sort=6)
private String status; private String status;
/** 备注 */ /** 备注 */
@ -102,4 +104,10 @@ public class Tool extends BaseEntity
private List<String> excludeFields; private List<String> excludeFields;
private List<Document> documentList; private List<Document> documentList;
/** 工具类型名称 **/
private String toolTypeName;
/** 状态名称 **/
private String statusName;
} }

View File

@ -77,4 +77,6 @@ public interface IDocumentService
public int batchDeleteById(List<String> docIds); public int batchDeleteById(List<String> docIds);
Map<String, Object> statistics(); Map<String, Object> statistics();
List<Document> selectAllList(Document document);
} }

View File

@ -84,4 +84,6 @@ public interface IToolService
void sendTzMessage(Tool tTool); void sendTzMessage(Tool tTool);
Map<String, Object> statistics(); Map<String, Object> statistics();
List<Tool> selectAllList(Tool tool);
} }

View File

@ -1,6 +1,7 @@
package com.rzdata.web.service.impl; package com.rzdata.web.service.impl;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.BooleanUtil; import cn.hutool.core.util.BooleanUtil;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
@ -10,6 +11,7 @@ import com.rzdata.common.core.domain.entity.SysDictData;
import com.rzdata.common.core.domain.entity.SysUser; import com.rzdata.common.core.domain.entity.SysUser;
import com.rzdata.common.utils.DateUtils; import com.rzdata.common.utils.DateUtils;
import com.rzdata.common.utils.SecurityUtils; import com.rzdata.common.utils.SecurityUtils;
import com.rzdata.system.service.ISysDeptService;
import com.rzdata.system.service.ISysDictTypeService; import com.rzdata.system.service.ISysDictTypeService;
import com.rzdata.web.domain.Attachment; import com.rzdata.web.domain.Attachment;
import com.rzdata.web.domain.Document; import com.rzdata.web.domain.Document;
@ -46,6 +48,10 @@ public class DocumentServiceImpl implements IDocumentService
@Autowired @Autowired
private ISysDictTypeService sysDictTypeService; private ISysDictTypeService sysDictTypeService;
@Autowired
private ISysDeptService sysDeptService;
/** /**
* 查询请填写功能名称 * 查询请填写功能名称
* *
@ -280,12 +286,17 @@ public class DocumentServiceImpl implements IDocumentService
private void assembleData(List<Map<String, Object>> countType, List<Map<String, Object>> countSource) { private void assembleData(List<Map<String, Object>> countType, List<Map<String, Object>> countSource) {
// //
List<SysDictData> toolTypeList = sysDictTypeService.selectDictDataByType("doc_class"); List<SysDictData> docClassList = sysDictTypeService.selectDictDataByType("doc_class");
List<SysDictData> toolSourceList = sysDictTypeService.selectDictDataByType("doc_source"); List<SysDictData> docSourceList = sysDictTypeService.selectDictDataByType("doc_source");
//初始化数据
initDictData(docClassList,countType);
initDictData(docSourceList, countSource);
if(CollUtil.isNotEmpty(countType)){ if(CollUtil.isNotEmpty(countType)){
for (Map<String, Object> map : countType) { for (Map<String, Object> map : countType) {
map.put("value", map.get("statistics")); map.put("value", map.get("statistics"));
for (SysDictData sysDictData : toolTypeList) { for (SysDictData sysDictData : docClassList) {
if(sysDictData.getDictValue().equals(map.get("types"))){ if(sysDictData.getDictValue().equals(map.get("types"))){
map.put("name", sysDictData.getDictLabel()); map.put("name", sysDictData.getDictLabel());
break; break;
@ -296,7 +307,7 @@ public class DocumentServiceImpl implements IDocumentService
if(CollUtil.isNotEmpty(countSource)){ if(CollUtil.isNotEmpty(countSource)){
for (Map<String, Object> map : countSource) { for (Map<String, Object> map : countSource) {
map.put("value", map.get("statistics")); map.put("value", map.get("statistics"));
for (SysDictData sysDictData : toolSourceList) { for (SysDictData sysDictData : docSourceList) {
if(sysDictData.getDictValue().equals(map.get("types"))){ if(sysDictData.getDictValue().equals(map.get("types"))){
map.put("name", sysDictData.getDictLabel()); map.put("name", sysDictData.getDictLabel());
break; break;
@ -305,5 +316,61 @@ public class DocumentServiceImpl implements IDocumentService
} }
} }
} }
private void initDictData(List<SysDictData> dictDataList, List<Map<String, Object>> mapTypeList) {
for (SysDictData sysDictData : dictDataList) {
boolean flag = false;
for (Map<String, Object> map : mapTypeList) {
if(sysDictData.getDictValue().equals(map.get("types"))){
flag = true;
break;
}
}
if(!flag){
Map<String, Object> map = new HashMap<>();
map.put("value", "0");
map.put("name", sysDictData.getDictLabel());
map.put("types", sysDictData.getDictValue());
map.put("statistics", "0");
mapTypeList.add(map);
}
}
}
@Override
public List<Document> selectAllList(Document document) {
List<Document> documents = documentMapper.selectDocumentList(document);
List<SysDictData> docClassList = sysDictTypeService.selectDictDataByType("doc_class");
List<SysDictData> docSourceList = sysDictTypeService.selectDictDataByType("doc_source");
List<SysDictData> docStatusList = sysDictTypeService.selectDictDataByType("doc_upload_status");
for (Document item : documents) {
for (SysDictData sysDictData : docClassList) {
if(sysDictData.getDictValue().equals(item.getDocType())){
item.setDocTypeName(sysDictData.getDictLabel());
break;
}
}
for (SysDictData sysDictData : docSourceList) {
if(sysDictData.getDictValue().equals(item.getDocSource())){
item.setDocSourceName(sysDictData.getDictLabel());
break;
}
}
for (SysDictData sysDictData : docStatusList) {
if(sysDictData.getDictValue().equals(item.getDocStatus())){
item.setStatusName(sysDictData.getDictLabel());
break;
}
}
if( StrUtil.isNotBlank(item.getDocRespDept())){
item.setDocRespDeptName(sysDeptService.getDeptName(item.getDocRespDept()));
}
item.setCreateNowTime(DateUtil.format(item.getCreateTime(), "yyyy-MM-dd hh:mm"));
}
return documents;
}
} }

View File

@ -286,7 +286,7 @@ public class ToolServiceImpl implements IToolService
List<Map<String, Object>> countToolType = toolMapper.countToolType(); List<Map<String, Object>> countToolType = toolMapper.countToolType();
List<Map<String, Object>> toolSource = toolMapper.toolSource(); List<Map<String, Object>> toolSource = toolMapper.toolSource();
List<Map<String, Object>> recordStatus = toolMapper.recordStatus(); List<Map<String, Object>> recordStatus = toolMapper.recordStatus();
//数据 //数据
assembleData(countToolType, toolSource, recordStatus); assembleData(countToolType, toolSource, recordStatus);
result.put("countToolType", countToolType); result.put("countToolType", countToolType);
@ -298,9 +298,14 @@ public class ToolServiceImpl implements IToolService
private void assembleData(List<Map<String, Object>> countToolType, List<Map<String, Object>> toolSource, List<Map<String, Object>> recordStatus) { private void assembleData(List<Map<String, Object>> countToolType, List<Map<String, Object>> toolSource, List<Map<String, Object>> recordStatus) {
List<SysDictData> toolTypeList = sysDictTypeService.selectDictDataByType("tool_type"); List<SysDictData> toolTypeList = sysDictTypeService.selectDictDataByType("tool_type");
List<SysDictData> flowStatusList = sysDictTypeService.selectDictDataByType("flow_status"); List<SysDictData> flowStatusList = sysDictTypeService.selectDictDataByType("flow_status").stream().filter(item -> !item.getDictValue().equals("cancel")).collect(Collectors.toList());
List<SysDictData> toolSourceList = sysDictTypeService.selectDictDataByType("tool_source"); List<SysDictData> toolSourceList = sysDictTypeService.selectDictDataByType("tool_source");
//初始化数据
initDictData(toolTypeList, countToolType);
initDictData(toolSourceList, toolSource);
initDictData(flowStatusList, recordStatus);
if(CollUtil.isNotEmpty(countToolType)){ if(CollUtil.isNotEmpty(countToolType)){
for (Map<String, Object> map : countToolType) { for (Map<String, Object> map : countToolType) {
map.put("value", map.get("statistics")); map.put("value", map.get("statistics"));
@ -339,4 +344,61 @@ public class ToolServiceImpl implements IToolService
} }
} }
} }
private void initDictData(List<SysDictData> dictDataList, List<Map<String, Object>> mapTypeList) {
for (SysDictData sysDictData : dictDataList) {
boolean flag = false;
for (Map<String, Object> map : mapTypeList) {
if(sysDictData.getDictValue().equals(map.get("types"))){
flag = true;
break;
}
}
if(!flag){
Map<String, Object> map = new HashMap<>();
map.put("value", "0");
map.put("name", sysDictData.getDictLabel());
map.put("types", sysDictData.getDictValue());
map.put("statistics", "0");
mapTypeList.add(map);
}
}
}
@Override
public List<Tool> selectAllList(Tool tool) {
List<Tool> tools = toolMapper.selectToolList(tool);
List<SysDictData> toolSource = sysDictTypeService.selectDictDataByType("tool_source");
List<SysDictData> toolTypeList = sysDictTypeService.selectDictDataByType("tool_type");
List<SysDictData> toolStatus = sysDictTypeService.selectDictDataByType("tool_status");
for (Tool item : tools) {
for (SysDictData sysDictData : toolSource) {
if(sysDictData.getDictValue().equals(item.getToolSource())){
item.setToolSourceName(sysDictData.getDictLabel());
break;
}
}
for (SysDictData sysDictData : toolTypeList) {
if(sysDictData.getDictValue().equals(item.getToolType())){
item.setToolTypeName(sysDictData.getDictLabel());
break;
}
}
for (SysDictData sysDictData : toolStatus) {
if(sysDictData.getDictValue().equals(item.getStatus())){
item.setStatusName(sysDictData.getDictLabel());
break;
}
}
if( StrUtil.isNotBlank(tool.getToolRespDept())){
item.setToolRespDeptName(sysDeptService.getDeptName(tool.getToolRespDept()));
}
}
return tools;
}
} }

View File

@ -24,6 +24,8 @@
<result property="toolId" column="tool_id" /> <result property="toolId" column="tool_id" />
<result property="toolName" column="tool_name" /> <result property="toolName" column="tool_name" />
<result property="docRespDeptName" column="doc_resp_dept_name" /> <result property="docRespDeptName" column="doc_resp_dept_name" />
<result property="createById" column="create_by_id" />
<result property="updateById" column="update_by_id" />
</resultMap> </resultMap>
<sql id="selectDocumentVo"> <sql id="selectDocumentVo">

View File

@ -35,6 +35,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
AND date_format(tdc.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d') AND date_format(tdc.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if> </if>
<if test="toolCode != null and toolCode != ''">
AND tl.tool_code like concat('%', #{toolCode}, '%')
</if>
<if test="toolName != null and toolName != ''">
AND tl.tool_name like concat('%', #{toolName}, '%')
</if>
</where> </where>
group by tdc.tool_id,tl.tool_code,tl.tool_name group by tdc.tool_id,tl.tool_code,tl.tool_name
</select> </select>

View File

@ -148,7 +148,6 @@
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 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 from t_tool u
left join sys_user su on u.create_by = su.user_id 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 d on u.tool_resp_dept = d.dept_id left join sys_dept d on u.tool_resp_dept = d.dept_id
where 1=1 where 1=1
and u.record_status != 'cancel' and u.record_status != 'cancel'
@ -156,7 +155,7 @@
AND u.tool_id = #{toolId} AND u.tool_id = #{toolId}
</if> </if>
<if test="toolCode != null and toolCode != ''"> <if test="toolCode != null and toolCode != ''">
AND u.tool_code = #{toolCode} AND u.tool_code like concat('%', #{toolCode}, '%')
</if> </if>
<if test="toolName != null and toolName != ''"> <if test="toolName != null and toolName != ''">
AND u.tool_name like concat('%', #{toolName}, '%') AND u.tool_name like concat('%', #{toolName}, '%')