release-v1.0 #1
@ -286,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;
|
||||||
@ -302,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;
|
||||||
@ -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
|
@Override
|
||||||
public List<Document> selectAllList(Document document) {
|
public List<Document> selectAllList(Document document) {
|
||||||
List<Document> documents = documentMapper.selectDocumentList(document);
|
List<Document> documents = documentMapper.selectDocumentList(document);
|
||||||
|
@ -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"));
|
||||||
@ -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
|
@Override
|
||||||
public List<Tool> selectAllList(Tool tool) {
|
public List<Tool> selectAllList(Tool tool) {
|
||||||
|
@ -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') <= date_format(#{params.endTime},'%y%m%d')
|
AND date_format(tdc.create_time,'%y%m%d') <= 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>
|
||||||
|
@ -155,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}, '%')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user