Merge branch 'dev'
This commit is contained in:
commit
6714446624
|
@ -183,6 +183,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
@Value("${big_date.assignee_meet_role_id}")
|
@Value("${big_date.assignee_meet_role_id}")
|
||||||
private String defaultAssigneeRoleId; // 会客厅审核人角色
|
private String defaultAssigneeRoleId; // 会客厅审核人角色
|
||||||
|
|
||||||
|
@Value("#{new Boolean(${cloud.enable})}")
|
||||||
|
private Boolean cloud; // 是否进行云资源统计
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ResourceDao resourceDao;
|
private ResourceDao resourceDao;
|
||||||
|
|
||||||
|
@ -2365,7 +2368,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
sb.deleteCharAt(sb.length() - 2);
|
sb.deleteCharAt(sb.length() - 2);
|
||||||
sb.append(")");
|
sb.append(")");
|
||||||
try {
|
try {
|
||||||
zwyCountListByapplyDept.addAll(lcJdbcTemplate.queryForList(sb.toString()));
|
if (cloud) {
|
||||||
|
zwyCountListByapplyDept.addAll(lcJdbcTemplate.queryForList(sb.toString()));
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("查询浪潮数据库申SQL语句--->{}", sb);
|
logger.error("查询浪潮数据库申SQL语句--->{}", sb);
|
||||||
logger.error("查询浪潮数据库异常", e);
|
logger.error("查询浪潮数据库异常", e);
|
||||||
|
@ -2418,7 +2423,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
if ("250000".equals(params.get("region").toString())) {
|
if ("250000".equals(params.get("region").toString())) {
|
||||||
List<Map<String, Object>> zwyCountListByApplyDept = new ArrayList<>();
|
List<Map<String, Object>> zwyCountListByApplyDept = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
zwyCountListByApplyDept = lcJdbcTemplate.queryForList(getAllsql);
|
if (cloud) {
|
||||||
|
zwyCountListByApplyDept = lcJdbcTemplate.queryForList(getAllsql);
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error(getAllsql, e);
|
logger.error(getAllsql, e);
|
||||||
}
|
}
|
||||||
|
@ -2478,7 +2485,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
} else {
|
} else {
|
||||||
List<Map<String, Object>> zwyCountListByApplyDept = new ArrayList<>();
|
List<Map<String, Object>> zwyCountListByApplyDept = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
zwyCountListByApplyDept = lcJdbcTemplate.queryForList(getAllsql);
|
if (cloud) {
|
||||||
|
zwyCountListByApplyDept = lcJdbcTemplate.queryForList(getAllsql);
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.info(getAllsql, e);
|
logger.info(getAllsql, e);
|
||||||
}
|
}
|
||||||
|
@ -2513,7 +2522,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
|
|
||||||
resultList = resultList.stream().map(index -> {
|
resultList = resultList.stream().map(index -> {
|
||||||
if (typeCountListMap.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
|
if (typeCountListMap.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
|
||||||
|
index.put("level", "municipal"); // 市级别
|
||||||
index.put("count", typeCountListMap.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
index.put("count", typeCountListMap.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
||||||
typeCountListMap.get(index.get("dept_id").toString()).stream().forEach(count -> {
|
typeCountListMap.get(index.get("dept_id").toString()).stream().forEach(count -> {
|
||||||
|
|
||||||
|
@ -2533,6 +2542,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
typeCountListByApplyDept.stream().filter(index -> index.get("deptType").toString().equals("3"))
|
typeCountListByApplyDept.stream().filter(index -> index.get("deptType").toString().equals("3"))
|
||||||
.collect(Collectors.groupingBy(m -> m.get("district").toString()));
|
.collect(Collectors.groupingBy(m -> m.get("district").toString()));
|
||||||
resultList = resultList.stream().map(index -> {
|
resultList = resultList.stream().map(index -> {
|
||||||
|
index.put("level", "county"); // 区县级别
|
||||||
if (typeCountListMap1.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
|
if (typeCountListMap1.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
|
||||||
index.put("count", typeCountListMap1.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
index.put("count", typeCountListMap1.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
||||||
typeCountListMap1.get(index.get("dept_id").toString()).stream().forEach(count -> {
|
typeCountListMap1.get(index.get("dept_id").toString()).stream().forEach(count -> {
|
||||||
|
@ -2553,6 +2563,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
typeCountListByApplyDept.stream().filter(index -> index.get("deptType").toString().equals("4"))
|
typeCountListByApplyDept.stream().filter(index -> index.get("deptType").toString().equals("4"))
|
||||||
.collect(Collectors.groupingBy(m -> m.get("dept_id").toString()));
|
.collect(Collectors.groupingBy(m -> m.get("dept_id").toString()));
|
||||||
resultList = resultList.stream().map(index -> {
|
resultList = resultList.stream().map(index -> {
|
||||||
|
index.put("level", "other"); // 企业级别
|
||||||
if (typeCountListMap2.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
|
if (typeCountListMap2.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
|
||||||
index.put("count", typeCountListMap2.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
index.put("count", typeCountListMap2.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
||||||
typeCountListMap2.get(index.get("dept_id").toString()).stream().forEach(count -> {
|
typeCountListMap2.get(index.get("dept_id").toString()).stream().forEach(count -> {
|
||||||
|
@ -2711,6 +2722,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
resultList.addAll(getDeptTemp4()); // 企业
|
resultList.addAll(getDeptTemp4()); // 企业
|
||||||
Map<String, Integer> countMap = new HashMap<>();
|
Map<String, Integer> countMap = new HashMap<>();
|
||||||
resultList = resultList.stream().map(index -> {
|
resultList = resultList.stream().map(index -> {
|
||||||
|
index.put("level", "municipal"); // 市级别
|
||||||
if (typeCountListMap.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
|
if (typeCountListMap.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
|
||||||
index.put("count", typeCountListMap.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
index.put("count", typeCountListMap.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
||||||
typeCountListMap.get(index.get("dept_id").toString()).stream().forEach(count -> {
|
typeCountListMap.get(index.get("dept_id").toString()).stream().forEach(count -> {
|
||||||
|
@ -2728,6 +2740,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
typeCountListByDept.stream().filter(index -> index.get("deptType").toString().equals("3"))
|
typeCountListByDept.stream().filter(index -> index.get("deptType").toString().equals("3"))
|
||||||
.collect(Collectors.groupingBy(m -> m.get("district").toString()));
|
.collect(Collectors.groupingBy(m -> m.get("district").toString()));
|
||||||
resultList = resultList.stream().map(index -> {
|
resultList = resultList.stream().map(index -> {
|
||||||
|
index.put("level", "county"); // 区县级别
|
||||||
if (typeCountListMap1.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
|
if (typeCountListMap1.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
|
||||||
index.put("count", typeCountListMap1.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
index.put("count", typeCountListMap1.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
||||||
typeCountListMap1.get(index.get("dept_id").toString()).stream().forEach(count -> {
|
typeCountListMap1.get(index.get("dept_id").toString()).stream().forEach(count -> {
|
||||||
|
@ -2745,6 +2758,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
typeCountListByDept.stream().filter(index -> index.get("deptType").toString().equals("4"))
|
typeCountListByDept.stream().filter(index -> index.get("deptType").toString().equals("4"))
|
||||||
.collect(Collectors.groupingBy(m -> m.get("dept_id").toString()));
|
.collect(Collectors.groupingBy(m -> m.get("dept_id").toString()));
|
||||||
resultList = resultList.stream().map(index -> {
|
resultList = resultList.stream().map(index -> {
|
||||||
|
index.put("level", "other"); // 企业级别
|
||||||
if (typeCountListMap2.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
|
if (typeCountListMap2.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
|
||||||
index.put("count", typeCountListMap2.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
index.put("count", typeCountListMap2.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
||||||
typeCountListMap2.get(index.get("dept_id").toString()).stream().forEach(count -> {
|
typeCountListMap2.get(index.get("dept_id").toString()).stream().forEach(count -> {
|
||||||
|
@ -3035,7 +3049,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
sb.append(" ORDER BY apply.\"createDate\" DESC");
|
sb.append(" ORDER BY apply.\"createDate\" DESC");
|
||||||
List<Map<String, Object>> list = new ArrayList<>();
|
List<Map<String, Object>> list = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
list = lcJdbcTemplate.queryForList(sb.toString());
|
if (cloud) {
|
||||||
|
list = lcJdbcTemplate.queryForList(sb.toString());
|
||||||
|
}
|
||||||
list = list.stream().map(index -> {
|
list = list.stream().map(index -> {
|
||||||
logger.info("云资源使用信息信息:" + JSON.toJSONString(index));
|
logger.info("云资源使用信息信息:" + JSON.toJSONString(index));
|
||||||
switch (index.get("type").toString()) { // 根据类型填充其审核状态
|
switch (index.get("type").toString()) { // 根据类型填充其审核状态
|
||||||
|
|
|
@ -185,4 +185,7 @@ enke:
|
||||||
# 开启审核组成员支持
|
# 开启审核组成员支持
|
||||||
auditteam:
|
auditteam:
|
||||||
enable: true
|
enable: true
|
||||||
|
# 是否统计云资源
|
||||||
|
cloud:
|
||||||
|
enable: false
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue