|
@@ -190,9 +190,8 @@ public class UseMoneyServiceImpl implements UseMoneyService {
|
|
|
Set<String> dept=commonService.getDeptCondition(pageReqVO.getDeptId());
|
|
|
List<String> stringList = Arrays.asList(dept.toArray(new String[0]));
|
|
|
//如果是代码,详情中有该部门的也要查询出来
|
|
|
- List<UseMoneyDetailDO> detail=useMoneyDetailService.getListByDeptId(deptProjectIds,stringList);
|
|
|
- List<String> listString = detail.stream().map(map -> map.getId()).collect(Collectors.toList());
|
|
|
- PageResult<UseMoneyDO> pageResult = useMoneyDao.getUseMoneyDeptPage(pageReqVO, deptProjectIds,stringList,listString);
|
|
|
+ List<String> ids=useMoneyDetailService.getListByDeptId(deptProjectIds,stringList);
|
|
|
+ PageResult<UseMoneyDO> pageResult = useMoneyDao.getUseMoneyDeptPage(pageReqVO, deptProjectIds,stringList,ids);
|
|
|
PageResult<UseMoneyRespVO> useMoneyRespVOPageResult = getUseMoneyRespVOPageResult(pageResult);
|
|
|
return useMoneyRespVOPageResult;
|
|
|
}
|
|
@@ -321,7 +320,11 @@ public class UseMoneyServiceImpl implements UseMoneyService {
|
|
|
public UseMoneyOverviewVO getUseMoneyOverviewDept(UseMoneyPageReqVO pageReqVO) {
|
|
|
List<Project> projects = projectService.selectByDeptId(pageReqVO.getDeptId());
|
|
|
List<String> deptProjectIds = convertList(projects, Project::getId);
|
|
|
- List<UseMoneyDO> useMoneyDeptList = useMoneyDao.getUseMoneyDeptList(pageReqVO, deptProjectIds);
|
|
|
+ Set<String> dept=commonService.getDeptCondition(pageReqVO.getDeptId());
|
|
|
+ List<String> stringList = Arrays.asList(dept.toArray(new String[0]));
|
|
|
+ //如果是代码,详情中有该部门的也要查询出来
|
|
|
+ List<String> ids=useMoneyDetailService.getListByDeptId(deptProjectIds,stringList);
|
|
|
+ List<UseMoneyDO> useMoneyDeptList = useMoneyDao.getUseMoneyDeptList(pageReqVO, deptProjectIds,stringList,ids);
|
|
|
UseMoneyOverviewVO result = new UseMoneyOverviewVO();
|
|
|
double totalAmount = useMoneyDeptList.stream().collect(Collectors.summarizingDouble(value -> value.getTotalAmount().doubleValue())).getSum();
|
|
|
double totalUseAmount = useMoneyDeptList.stream().filter(useMoneyDO -> useMoneyDO.getFlowStatus() == FLOW_FINISHED).collect(Collectors.summarizingDouble(value -> value.getTotalAmount().doubleValue())).getSum();
|