|
@@ -3,6 +3,7 @@ package com.css.simulation.resource.system.ctrl;
|
|
|
import api.common.pojo.common.ResponseBodyVO;
|
|
|
import api.common.pojo.constants.DictConstants;
|
|
|
import api.common.pojo.param.scene.SystemScenePackageParam;
|
|
|
+import api.common.pojo.po.scene.SystemScenePackageSublistPO;
|
|
|
import api.common.pojo.po.system.UserPO;
|
|
|
import api.common.pojo.vo.scene.SystemScenePackageVO;
|
|
|
import api.common.pojo.vo.system.ClusterVO;
|
|
@@ -10,6 +11,7 @@ import api.common.pojo.vo.system.ParameterVO;
|
|
|
import api.common.pojo.vo.system.UserVO;
|
|
|
import api.common.util.ObjectUtil;
|
|
|
import com.css.simulation.resource.common.utils.AuthUtil;
|
|
|
+import com.css.simulation.resource.scene.mapper.SystemScenePackageSublistMapper;
|
|
|
import com.css.simulation.resource.scene.service.SystemScenePackageService;
|
|
|
import com.css.simulation.resource.system.service.ClusterService;
|
|
|
import com.css.simulation.resource.system.service.ParameterService;
|
|
@@ -42,6 +44,9 @@ public class UserInfoCtrl {
|
|
|
@Resource
|
|
|
SystemScenePackageService systemScenePackageService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ SystemScenePackageSublistMapper systemScenePackageSublistMapper;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 获取当前登录人详情
|
|
@@ -96,6 +101,27 @@ public class UserInfoCtrl {
|
|
|
SystemScenePackageParam param = new SystemScenePackageParam();
|
|
|
param.setUserId(userId);
|
|
|
List<SystemScenePackageVO> list = systemScenePackageService.querySystemScenePackageList(param);
|
|
|
+
|
|
|
+ for (SystemScenePackageVO vo:list) {
|
|
|
+
|
|
|
+ SystemScenePackageSublistPO sublistPo=new SystemScenePackageSublistPO();
|
|
|
+ sublistPo.setSceneAndPackage(vo.getId());
|
|
|
+ sublistPo.setSceneType("1");
|
|
|
+ List<String> zrList=systemScenePackageSublistMapper.querySceneNaturalList(sublistPo);
|
|
|
+ sublistPo.setSceneType("2");
|
|
|
+ List<String> bzList=systemScenePackageSublistMapper.querySceneStandardsRegulationsList(sublistPo);
|
|
|
+ sublistPo.setSceneType("3");
|
|
|
+ List<String> jtList=systemScenePackageSublistMapper.querySceneAccidentList(sublistPo);
|
|
|
+ sublistPo.setSceneType("4");
|
|
|
+ List<String> fhList=systemScenePackageSublistMapper.querySceneGeneralTemplateList(sublistPo);
|
|
|
+ vo.setZrCount(zrList.size());
|
|
|
+ vo.setBzCount(bzList.size());
|
|
|
+ vo.setJtCount(jtList.size());
|
|
|
+ vo.setFhCount(fhList.size());
|
|
|
+ vo.setTotalCount(zrList.size() + bzList.size() + jtList.size() + fhList.size());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
long zrTotalCount = list.stream().mapToLong(SystemScenePackageVO::getZrCount).sum();
|
|
|
long bzTotalCount = list.stream().mapToLong(SystemScenePackageVO::getBzCount).sum();
|
|
|
long jtTotalCount = list.stream().mapToLong(SystemScenePackageVO::getJtCount).sum();
|