1.所有搜索样式调整

2.统计分析调整
3.导出word格式调整
This commit is contained in:
pan 2024-09-03 16:16:36 +08:00
parent e690285338
commit df7e623f4f
4 changed files with 64 additions and 7 deletions

View File

@ -286,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;
@ -302,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;
@ -312,6 +317,27 @@ 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);

View File

@ -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"));
@ -340,6 +345,26 @@ 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) {

View File

@ -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') &lt;= 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>

View File

@ -155,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}, '%')