Merge branch 'dev' of http://192.168.124.50:3000/wangliwen/share-platform into dev
This commit is contained in:
commit
38bd349887
|
@ -201,7 +201,7 @@ public class ActTaskController {
|
||||||
.map(index_ -> index_.getMember())
|
.map(index_ -> index_.getMember())
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.flatMap(index_ -> index_.stream())
|
.flatMap(index_ -> index_.stream())
|
||||||
.map(index_ -> (String) index_.get("id"))
|
.map(index_ -> index_.get("id").toString())
|
||||||
.filter(index_ -> !userId.equals(index_)) // 过滤非本人
|
.filter(index_ -> !userId.equals(index_)) // 过滤非本人
|
||||||
.distinct()
|
.distinct()
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
|
@ -153,7 +153,7 @@ public class ActTaskService extends BaseServiceImpl {
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.filter(index -> !index.isEmpty())
|
.filter(index -> !index.isEmpty())
|
||||||
.flatMap(index -> index.stream())
|
.flatMap(index -> index.stream())
|
||||||
.map(index -> (String) index.get("id"))
|
.map(index -> index.get("id").toString())
|
||||||
.filter(index -> !userId.equals(index)) // 过滤非本人
|
.filter(index -> !userId.equals(index)) // 过滤非本人
|
||||||
.distinct()
|
.distinct()
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
|
@ -129,6 +129,8 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
|
|
||||||
private static final String selectCensusApplyTableKey = "selectCensusApplyTable";
|
private static final String selectCensusApplyTableKey = "selectCensusApplyTable";
|
||||||
|
|
||||||
|
private static final String resourceSelectTotalKey = "resourceSelectTotal";
|
||||||
|
|
||||||
@Value("${system.startDay}")
|
@Value("${system.startDay}")
|
||||||
private String systemDay;
|
private String systemDay;
|
||||||
|
|
||||||
|
@ -666,6 +668,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Cacheable(value = resourceSelectTotalKey, key = "'totle'")
|
||||||
public Object selectTotal() {
|
public Object selectTotal() {
|
||||||
HashMap<String, Object> resultMap = new HashMap<>();
|
HashMap<String, Object> resultMap = new HashMap<>();
|
||||||
List<Map> re = resourceDao.selectTypeCount(null);
|
List<Map> re = resourceDao.selectTypeCount(null);
|
||||||
|
@ -2235,14 +2238,14 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
lcDept.forEach(x -> sb.append("'").append(x.get("lc_name").toString()).append("', "));
|
lcDept.forEach(x -> sb.append("'").append(x.get("lc_name").toString()).append("', "));
|
||||||
sb.deleteCharAt(sb.length() - 2);
|
sb.deleteCharAt(sb.length() - 2);
|
||||||
sb.append(") UNION ALL " +
|
sb.append(") UNION ALL " +
|
||||||
"SELECT " +
|
"SELECT " +
|
||||||
" COUNT( BSNUM ) AS \"count\", " +
|
" COUNT( BSNUM ) AS \"count\", " +
|
||||||
" 'ysp' AS \"type\" " +
|
" 'ysp' AS \"type\" " +
|
||||||
"FROM " +
|
"FROM " +
|
||||||
" VIEW_VIDEO_BUSINESS_INDEX " +
|
" VIEW_VIDEO_BUSINESS_INDEX " +
|
||||||
"WHERE " +
|
"WHERE " +
|
||||||
" 1 = 1 " +
|
" 1 = 1 " +
|
||||||
" AND ORG_NAME IN (");
|
" AND ORG_NAME IN (");
|
||||||
lcDept.forEach(x -> sb.append("'").append(x.get("lc_name").toString()).append("', "));
|
lcDept.forEach(x -> sb.append("'").append(x.get("lc_name").toString()).append("', "));
|
||||||
sb.deleteCharAt(sb.length() - 2);
|
sb.deleteCharAt(sb.length() - 2);
|
||||||
sb.append(")");
|
sb.append(")");
|
||||||
|
@ -2257,14 +2260,14 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
|
|
||||||
List<Map<String, Object>> typeCountListByApplyDept = resourceDao.selectApplyDeptDetailTypeCountList(params);
|
List<Map<String, Object>> typeCountListByApplyDept = resourceDao.selectApplyDeptDetailTypeCountList(params);
|
||||||
zwyCountListMap.forEach((k, v) -> {
|
zwyCountListMap.forEach((k, v) -> {
|
||||||
Map<String, Object> zwyCountMap = new HashMap<>();
|
Map<String, Object> zwyCountMap = new HashMap<>();
|
||||||
zwyCountMap.put("count", v.stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
zwyCountMap.put("count", v.stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
||||||
zwyCountMap.put("type", k);
|
zwyCountMap.put("type", k);
|
||||||
zwyCountMap.put("deptName", params.get("deptId").toString());
|
zwyCountMap.put("deptName", params.get("deptId").toString());
|
||||||
zwyCountMap.put("district", 250000);
|
zwyCountMap.put("district", 250000);
|
||||||
zwyCountMap.put("deptType", 2);
|
zwyCountMap.put("deptType", 2);
|
||||||
typeCountListByApplyDept.add(zwyCountMap);
|
typeCountListByApplyDept.add(zwyCountMap);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, List<Map<String, Object>>> typeCountListMap = typeCountListByApplyDept.stream().collect(Collectors.groupingBy(m -> m.get("deptName").toString()));
|
Map<String, List<Map<String, Object>>> typeCountListMap = typeCountListByApplyDept.stream().collect(Collectors.groupingBy(m -> m.get("deptName").toString()));
|
||||||
|
@ -2313,8 +2316,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
x.put("deptType", ucsDept.get("type"));
|
x.put("deptType", ucsDept.get("type"));
|
||||||
x.put("district", ucsDept.get("district"));
|
x.put("district", ucsDept.get("district"));
|
||||||
x.replace("deptName", ucsDept.get("ucs_name"));
|
x.replace("deptName", ucsDept.get("ucs_name"));
|
||||||
} {
|
}
|
||||||
logger.error("未在ucs系统中找到浪潮{}单位对应部门", x.get("deptName").toString());
|
{
|
||||||
|
logger.error("未在ucs系统中找到浪潮{}单位对应部门", x.get("deptName").toString());
|
||||||
x.put("dept_id", "");
|
x.put("dept_id", "");
|
||||||
x.put("deptType", 2);
|
x.put("deptType", 2);
|
||||||
x.put("district", 250000);
|
x.put("district", 250000);
|
||||||
|
@ -2519,7 +2523,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
logger.error("区域管理员只出本部门区域:{}", sysDeptDTO.getDistrict());
|
logger.error("区域管理员只出本部门区域:{}", sysDeptDTO.getDistrict());
|
||||||
}
|
}
|
||||||
if (params.containsKey("deptId") && org.apache.commons.lang3.StringUtils.isNotEmpty(params.get("deptId").toString())
|
if (params.containsKey("deptId") && org.apache.commons.lang3.StringUtils.isNotEmpty(params.get("deptId").toString())
|
||||||
|| params.containsKey("region") && org.apache.commons.lang3.StringUtils.isNotEmpty(params.get("region").toString())
|
|| params.containsKey("region") && org.apache.commons.lang3.StringUtils.isNotEmpty(params.get("region").toString())
|
||||||
) {
|
) {
|
||||||
List<Map<String, Object>> typeCountListByDept = resourceDao.selectDeptDetailTypeCountList(params);
|
List<Map<String, Object>> typeCountListByDept = resourceDao.selectDeptDetailTypeCountList(params);
|
||||||
Map<String, List<Map<String, Object>>> typeCountListMap = typeCountListByDept.stream().collect(Collectors.groupingBy(m -> m.get("deptName").toString()));
|
Map<String, List<Map<String, Object>>> typeCountListMap = typeCountListByDept.stream().collect(Collectors.groupingBy(m -> m.get("deptName").toString()));
|
||||||
|
|
|
@ -110,4 +110,13 @@
|
||||||
diskPersistent="true"
|
diskPersistent="true"
|
||||||
memoryStoreEvictionPolicy="LRU"/>
|
memoryStoreEvictionPolicy="LRU"/>
|
||||||
|
|
||||||
|
<!-- selectTotal缓存 -->
|
||||||
|
<cache name="resourceSelectTotal"
|
||||||
|
maxElementsInMemory="1000"
|
||||||
|
eternal="false"
|
||||||
|
timeToIdleSeconds="15"
|
||||||
|
timeToLiveSeconds="60"
|
||||||
|
overflowToDisk="true"
|
||||||
|
diskPersistent="true"
|
||||||
|
memoryStoreEvictionPolicy="LRU"/>
|
||||||
</ehcache>
|
</ehcache>
|
Loading…
Reference in New Issue