|
@@ -25,19 +25,29 @@
|
|
*/
|
|
*/
|
|
package org.springblade.modules.project.service.impl;
|
|
package org.springblade.modules.project.service.impl;
|
|
|
|
|
|
|
|
+import org.springblade.common.cache.DictCache;
|
|
|
|
+import org.springblade.common.enums.DictEnum;
|
|
import org.springblade.core.tool.utils.BeanUtil;
|
|
import org.springblade.core.tool.utils.BeanUtil;
|
|
|
|
+import org.springblade.core.tool.utils.DateUtil;
|
|
|
|
+import org.springblade.core.tool.utils.Func;
|
|
import org.springblade.modules.project.pojo.excel.WorkFocusExcel;
|
|
import org.springblade.modules.project.pojo.excel.WorkFocusExcel;
|
|
import org.springblade.modules.project.pojo.entity.WorkFocusEntity;
|
|
import org.springblade.modules.project.pojo.entity.WorkFocusEntity;
|
|
|
|
+import org.springblade.modules.project.pojo.vo.WorkFocusDataInfoVO;
|
|
|
|
+import org.springblade.modules.project.pojo.vo.WorkFocusProgressDataInfoVO;
|
|
import org.springblade.modules.project.pojo.vo.WorkFocusVO;
|
|
import org.springblade.modules.project.pojo.vo.WorkFocusVO;
|
|
import org.springblade.modules.project.mapper.WorkFocusMapper;
|
|
import org.springblade.modules.project.mapper.WorkFocusMapper;
|
|
import org.springblade.modules.project.service.IWorkFocusService;
|
|
import org.springblade.modules.project.service.IWorkFocusService;
|
|
|
|
+import org.springblade.modules.project.wrapper.WorkFocusWrapper;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import org.springblade.core.mp.base.BaseServiceImpl;
|
|
import org.springblade.core.mp.base.BaseServiceImpl;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
|
+import java.util.Comparator;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.TreeSet;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 附件表 服务实现类
|
|
* 附件表 服务实现类
|
|
@@ -50,7 +60,8 @@ public class WorkFocusServiceImpl extends BaseServiceImpl<WorkFocusMapper, WorkF
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public IPage<WorkFocusVO> selectWorkFocusPage(IPage<WorkFocusVO> page, WorkFocusVO workfocus) {
|
|
public IPage<WorkFocusVO> selectWorkFocusPage(IPage<WorkFocusVO> page, WorkFocusVO workfocus) {
|
|
- return page.setRecords(baseMapper.selectWorkFocusPage(page, workfocus));
|
|
|
|
|
|
+ List<WorkFocusVO> workFocusEntities = baseMapper.selectWorkFocusPage(page, workfocus);
|
|
|
|
+ return page.setRecords(workFocusEntities);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -78,4 +89,19 @@ public class WorkFocusServiceImpl extends BaseServiceImpl<WorkFocusMapper, WorkF
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public WorkFocusDataInfoVO queryWorkFocusDataInfo(WorkFocusVO workfocus) {
|
|
|
|
+ WorkFocusDataInfoVO focusDataInfoVO = new WorkFocusDataInfoVO();
|
|
|
|
+ List<WorkFocusProgressDataInfoVO> data = baseMapper.queryWorkFocusDataInfo(workfocus);
|
|
|
|
+ focusDataInfoVO.setTabList(data);
|
|
|
|
+ focusDataInfoVO.setLastDate(DateUtil.time());
|
|
|
|
+ focusDataInfoVO.setTaskCount(data.size());
|
|
|
|
+
|
|
|
|
+ List<WorkFocusProgressDataInfoVO> data2 = data.stream().filter(o -> o.getWorkFocusStageName() != null).collect(
|
|
|
|
+ Collectors.collectingAndThen(Collectors.toCollection(
|
|
|
|
+ () -> new TreeSet<>(Comparator.comparing(o -> o.getWorkFocusStageName()))), ArrayList<WorkFocusProgressDataInfoVO>::new));
|
|
|
|
+ focusDataInfoVO.setStagesCount(data2.size());
|
|
|
|
+ return focusDataInfoVO;
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|