Merge remote-tracking branch 'origin/v1.0' into v1.0
This commit is contained in:
commit
3b86d79ea0
@ -191,6 +191,7 @@ public class CommonController
|
||||
response.put("status", "200");
|
||||
return ResponseEntity.ok(response);
|
||||
} catch (IOException e) {
|
||||
log.error("CommonController-->uploadChunk----e###", e);
|
||||
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
|
||||
}
|
||||
}
|
||||
@ -222,6 +223,7 @@ public class CommonController
|
||||
response.put("originalFilename", fileName);
|
||||
return ResponseEntity.ok(response);
|
||||
} catch (IOException e) {
|
||||
log.error("CommonController-->uploadChunk----e###", e);
|
||||
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
|
||||
} finally {
|
||||
// 清理临时文件
|
||||
|
@ -38,7 +38,7 @@ public class DocumentCategoryController extends BaseController
|
||||
/**
|
||||
* 查询文档资源分类管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:category:list')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:category:list')")
|
||||
@GetMapping("/list")
|
||||
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)
|
||||
@PostMapping("/export")
|
||||
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}")
|
||||
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)
|
||||
@PostMapping
|
||||
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)
|
||||
@PutMapping
|
||||
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)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
|
@ -120,4 +120,12 @@ public class DocumentController extends BaseController
|
||||
{
|
||||
return AjaxResult.success(documentService.statistics());
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/all/list")
|
||||
public AjaxResult allList(Document Document)
|
||||
{
|
||||
List<Document> list = documentService.selectAllList(Document);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
}
|
||||
|
@ -103,6 +103,19 @@ public class ToolController extends BaseController
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工具信息详细信息
|
||||
*/
|
||||
|
@ -104,4 +104,9 @@ public class Document extends BaseEntity {
|
||||
private Boolean permissionCheck;
|
||||
|
||||
private Boolean permission;
|
||||
|
||||
private String docTypeName;
|
||||
private String docSourceName;
|
||||
private String statusName;
|
||||
private String createNowTime;
|
||||
}
|
||||
|
@ -33,9 +33,11 @@ public class Tool extends BaseEntity
|
||||
private String toolType;
|
||||
|
||||
/** 来源 */
|
||||
@Excel(name = "工具来源",sort=3)
|
||||
@Excel(name = "工具来源",dictType="tool_source",sort=3)
|
||||
private String toolSource;
|
||||
|
||||
private String toolSourceName;
|
||||
|
||||
/** 用途 */
|
||||
@Excel(name = "工具用途",sort=7)
|
||||
private String toolUse;
|
||||
@ -70,7 +72,7 @@ public class Tool extends BaseEntity
|
||||
private String toolRespDeptName;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态",dictType="sys_normal_disable",sort=6)
|
||||
@Excel(name = "状态",dictType="tool_status",sort=6)
|
||||
private String status;
|
||||
|
||||
/** 备注 */
|
||||
@ -102,4 +104,10 @@ public class Tool extends BaseEntity
|
||||
private List<String> excludeFields;
|
||||
|
||||
private List<Document> documentList;
|
||||
|
||||
|
||||
/** 工具类型名称 **/
|
||||
private String toolTypeName;
|
||||
/** 状态名称 **/
|
||||
private String statusName;
|
||||
}
|
||||
|
@ -77,4 +77,6 @@ public interface IDocumentService
|
||||
public int batchDeleteById(List<String> docIds);
|
||||
|
||||
Map<String, Object> statistics();
|
||||
|
||||
List<Document> selectAllList(Document document);
|
||||
}
|
||||
|
@ -84,4 +84,6 @@ public interface IToolService
|
||||
void sendTzMessage(Tool tTool);
|
||||
|
||||
Map<String, Object> statistics();
|
||||
|
||||
List<Tool> selectAllList(Tool tool);
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.rzdata.web.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.BooleanUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
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.utils.DateUtils;
|
||||
import com.rzdata.common.utils.SecurityUtils;
|
||||
import com.rzdata.system.service.ISysDeptService;
|
||||
import com.rzdata.system.service.ISysDictTypeService;
|
||||
import com.rzdata.web.domain.Attachment;
|
||||
import com.rzdata.web.domain.Document;
|
||||
@ -46,6 +48,10 @@ public class DocumentServiceImpl implements IDocumentService
|
||||
@Autowired
|
||||
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) {
|
||||
//
|
||||
List<SysDictData> toolTypeList = sysDictTypeService.selectDictDataByType("doc_class");
|
||||
List<SysDictData> toolSourceList = sysDictTypeService.selectDictDataByType("doc_source");
|
||||
List<SysDictData> docClassList = sysDictTypeService.selectDictDataByType("doc_class");
|
||||
List<SysDictData> docSourceList = sysDictTypeService.selectDictDataByType("doc_source");
|
||||
|
||||
//初始化数据
|
||||
initDictData(docClassList,countType);
|
||||
initDictData(docSourceList, countSource);
|
||||
|
||||
if(CollUtil.isNotEmpty(countType)){
|
||||
for (Map<String, Object> map : countType) {
|
||||
map.put("value", map.get("statistics"));
|
||||
for (SysDictData sysDictData : toolTypeList) {
|
||||
for (SysDictData sysDictData : docClassList) {
|
||||
if(sysDictData.getDictValue().equals(map.get("types"))){
|
||||
map.put("name", sysDictData.getDictLabel());
|
||||
break;
|
||||
@ -296,7 +307,7 @@ public class DocumentServiceImpl implements IDocumentService
|
||||
if(CollUtil.isNotEmpty(countSource)){
|
||||
for (Map<String, Object> map : countSource) {
|
||||
map.put("value", map.get("statistics"));
|
||||
for (SysDictData sysDictData : toolSourceList) {
|
||||
for (SysDictData sysDictData : docSourceList) {
|
||||
if(sysDictData.getDictValue().equals(map.get("types"))){
|
||||
map.put("name", sysDictData.getDictLabel());
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -286,7 +286,7 @@ public class ToolServiceImpl implements IToolService
|
||||
List<Map<String, Object>> countToolType = toolMapper.countToolType();
|
||||
List<Map<String, Object>> toolSource = toolMapper.toolSource();
|
||||
List<Map<String, Object>> recordStatus = toolMapper.recordStatus();
|
||||
//组织数据
|
||||
//组装数据
|
||||
assembleData(countToolType, toolSource, recordStatus);
|
||||
|
||||
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) {
|
||||
|
||||
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");
|
||||
|
||||
//初始化数据
|
||||
initDictData(toolTypeList, countToolType);
|
||||
initDictData(toolSourceList, toolSource);
|
||||
initDictData(flowStatusList, recordStatus);
|
||||
|
||||
if(CollUtil.isNotEmpty(countToolType)){
|
||||
for (Map<String, Object> map : countToolType) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,8 @@
|
||||
<result property="toolId" column="tool_id" />
|
||||
<result property="toolName" column="tool_name" />
|
||||
<result property="docRespDeptName" column="doc_resp_dept_name" />
|
||||
<result property="createById" column="create_by_id" />
|
||||
<result property="updateById" column="update_by_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDocumentVo">
|
||||
|
@ -35,6 +35,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
AND date_format(tdc.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</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>
|
||||
group by tdc.tool_id,tl.tool_code,tl.tool_name
|
||||
</select>
|
||||
|
@ -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
|
||||
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 d on u.tool_resp_dept = d.dept_id
|
||||
where 1=1
|
||||
and u.record_status != 'cancel'
|
||||
@ -156,7 +155,7 @@
|
||||
AND u.tool_id = #{toolId}
|
||||
</if>
|
||||
<if test="toolCode != null and toolCode != ''">
|
||||
AND u.tool_code = #{toolCode}
|
||||
AND u.tool_code like concat('%', #{toolCode}, '%')
|
||||
</if>
|
||||
<if test="toolName != null and toolName != ''">
|
||||
AND u.tool_name like concat('%', #{toolName}, '%')
|
||||
|
Loading…
x
Reference in New Issue
Block a user