|
|
@@ -12,6 +12,7 @@ import com.fs.company.domain.Company;
|
|
|
import com.fs.company.service.ICompanyService;
|
|
|
import com.fs.framework.web.service.TokenService;
|
|
|
import com.fs.his.utils.ConfigUtil;
|
|
|
+import com.fs.his.vo.SysDeptConfigLogVo;
|
|
|
import com.fs.his.vo.SystemGoodsStatisticsVo;
|
|
|
import com.fs.his.vo.SystemOrderStatisticsVo;
|
|
|
import com.fs.his.vo.SystemUserStatisticsVo;
|
|
|
@@ -990,6 +991,35 @@ public class IndexStatisticsController {
|
|
|
if(automaticTodayUserList != null && !automaticTodayUserList.isEmpty()) {
|
|
|
userInfoVo.setAutomaticTodayUser(fileStatistics(automaticTodayUserList, param));
|
|
|
}
|
|
|
+
|
|
|
+ //部门信息数据
|
|
|
+ List<SysDeptConfigLogVo> configLogVoList = redisCache.getCacheObject(REDIS_KEY_PREFIX+"dept");
|
|
|
+ if(configLogVoList != null && !configLogVoList.isEmpty()){
|
|
|
+ List<SysDeptConfigLogVo> filteredList = configLogVoList.stream()
|
|
|
+ .filter(vo -> {
|
|
|
+ if (param.getDeptId() == null && param.getCompanyId() == null) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ if (param.getDeptId() != null) {
|
|
|
+ return Objects.equals(vo.getDeptId(), param.getDeptId());
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ })
|
|
|
+ .collect(Collectors.toList());
|
|
|
+
|
|
|
+ if(!filteredList.isEmpty()){
|
|
|
+ BigDecimal totalRedPackage = filteredList.stream()
|
|
|
+ .map(SysDeptConfigLogVo::getRedPackage)
|
|
|
+ .reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ Long totalFlowNum = filteredList.stream()
|
|
|
+ .mapToLong(SysDeptConfigLogVo::getFlowNum)
|
|
|
+ .sum();
|
|
|
+ userInfoVo.setRedPackage(totalRedPackage);
|
|
|
+ userInfoVo.setFlowNum(totalFlowNum);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
return R.ok().put("data",userInfoVo);
|
|
|
}
|
|
|
|
|
|
@@ -1023,6 +1053,8 @@ public class IndexStatisticsController {
|
|
|
return num;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 校验是否总公司部门
|
|
|
* **/
|