融合服务场景入口、首页资源统计、已办bug

This commit is contained in:
lizhicheng 2022-10-03 11:46:20 +08:00
parent 7163b83c2a
commit 4a5ef24d0c
13 changed files with 81 additions and 4 deletions

View File

@ -0,0 +1,2 @@
ALTER TABLE `tb_fuse`
ADD COLUMN `scene_url` varchar(255) COMMENT '场景入口'

View File

@ -7,6 +7,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import io.renren.common.annotation.LogOperation;
import io.renren.common.utils.Result;
import io.renren.modules.processForm.service.TAbilityApplicationService;
import io.renren.modules.resource.dao.ResourceDao;
import io.renren.modules.resource.service.ResourceService;
import io.renren.modules.resourceBrowse.service.ResourceBrowseService;
import io.renren.modules.sys.dto.SysDeptDTO;
@ -50,6 +51,8 @@ public class CensusController {
private ResourceBrowseService resourceBrowseService;
@Autowired
private SysDeptService sysDeptService;
@Autowired
private ResourceDao resourceDao;
@Value("${census.type}")
private String[] censusTypes; // 需要进行统计的资源类型
@ -126,12 +129,12 @@ public class CensusController {
}
}));
CompletableFuture<Void> deptAmount = CompletableFuture.supplyAsync(() -> { // 覆盖部门量
return resourceService.countAllDept();
CompletableFuture<Void> deptAmount = CompletableFuture.supplyAsync(() -> { // 资源汇聚部门量
return resourceDao.selectDeptCount();
}, executor).thenAccept(sum -> result.add(new HashMap<String, Object>() {
{
put("amount", sum);
put("type", "覆盖部门量");
put("type", "资源汇聚部门量");
}
}));

View File

@ -155,7 +155,6 @@ public class HistoryController {
if (params.containsKey("processDefinitionKey") && StringUtils.isNotEmpty(params.get("processDefinitionKey").toString())) {
params.replace("processDefinitionKey", params.get("processDefinitionKey").toString() + "%");
}
params.put("ended", "true");
PageData<ProcessActivityDTO> page = activitiService.getMyProcessInstancePage(params);
setExtraProcessProperties(Optional.ofNullable(page.getList()).orElse(new ArrayList<>()));
return new Result().ok(page);

View File

@ -33,6 +33,8 @@ public class TbFuseDTO {
private Long applyCount;
@ApiModelProperty(value = "所属部门")
private Long deptId;
@ApiModelProperty(value = "场景入口")
private String sceneUrl;
@ApiModelProperty(value = "创建人")
private Long creator;
@ApiModelProperty(value = "创建时间")

View File

@ -46,6 +46,10 @@ public class TbFuseEntity extends BaseEntity {
* 申请量
*/
private Long applyCount;
/**
* 场景入口
*/
private String sceneUrl;
/**
* 所属部门
*/

View File

@ -603,6 +603,20 @@ public class ResourceController {
return new Result().ok(resourceService.selectInfrastructureList());
}
@GetMapping("/selectCollectComponentList")
@ApiOperation("共享门户-能力汇聚-查询组件服务列表")
@LogOperation("共享门户-能力汇聚-查询组件服务列表")
public Result selectCollectComponentList() {
return new Result().ok(resourceService.selectCollectComponentList());
}
@GetMapping("/selectCollectResourceList")
@ApiOperation("共享门户-能力汇聚-查询应用资源列表")
@LogOperation("共享门户-能力汇聚-查询应用资源列表")
public Result selectCollectResourceList() {
return new Result().ok(resourceService.selectCollectResourceList());
}
@GetMapping("/selectDevelopDoc")
@ApiOperation("查询能力开发文档目录")
@LogOperation("查询能力开发文档目录")

View File

@ -193,4 +193,8 @@ public interface ResourceDao extends BaseDao<ResourceEntity> {
List<Map> selectCensusResourceTable(Map params);
List<Map> selectCensusApplyTable(Map params);
List<Map> selectCollectList(@Param("resourceType") String resourceType, @Param("attrType") String attrType);
List<Map> selectCollectResourceList();
}

View File

@ -128,6 +128,9 @@ public interface ResourceService extends CrudService<ResourceEntity, ResourceDTO
Object selectInfrastructureList();
Object selectCollectComponentList();
Object selectCollectResourceList();
void createMixAbility(ResourceDTO dto);

View File

@ -1882,6 +1882,22 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
return resultMap;
}
@Override
public Object selectCollectComponentList(){
List<Map> resourceCountList=baseDao.selectCollectList("组件服务","组件类型");
Map result=new HashMap();
resourceCountList.stream().forEach(it->result.put(it.get("type"), it.get("count")));
return result;
}
@Override
public Object selectCollectResourceList(){
List<Map> resourceCountList=baseDao.selectCollectResourceList();
Map result=new HashMap();
resourceCountList.stream().filter(it->!it.get("type").equals("")).forEach(it->result.put(it.get("type"), it.get("count")));
return result;
}
private List<Long> getSourceIdsByProcess(List<HistoricProcessInstance> list) {
List<Long> resourceIds = new ArrayList<>();
for (HistoricProcessInstance his : list) {

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
ALTER TABLE `tb_fuse`
ADD COLUMN `scene_url` varchar(255) COMMENT '场景入口'

View File

@ -11,6 +11,7 @@
<result property="deptId" column="dept_id"/>
<result property="deptUser" column="dept_user"/>
<result property="mobile" column="mobile"/>
<result property="sceneUrl" column="scene_url"/>
<result property="provider" column="provider"/>
<result property="providerUser" column="provider_user"/>
<result property="providerMobile" column="provider_mobile"/>

View File

@ -1851,4 +1851,22 @@
</if>
ORDER BY taa.create_date DESC
</select>
<select id="selectCollectList" resultType="java.util.Map">
SELECT tda.attr_value as type, count(*) as count FROM tb_data_resource tdr
LEFT JOIN tb_data_attr tda ON tdr.id=tda.data_resource_id AND tda.attr_type=#{attrType} AND tda.del_flag=0
WHERE 1=1 AND tdr.del_flag=0 AND tdr.type=#{resourceType}
GROUP BY tda.attr_value
ORDER BY count DESC
</select>
<select id="selectCollectResourceList" resultType="java.util.Map">
SELECT tda.attr_value as type, count(*) as count FROM tb_data_resource tdr LEFT JOIN
(SELECT a.data_resource_id, a.id, a.attr_type, substring_index(substring_index(a.attr_value, ';', b.help_topic_id + 1), ';', - 1) AS attr_value
FROM tb_data_attr a INNER JOIN mysql.help_topic b ON a.attr_type='应用领域' AND a.del_flag=0 AND b.help_topic_id <![CDATA[ < ]]> (length(a.attr_value) - length(REPLACE(a.attr_value, ';', '')) + 1)) tda
ON tdr.id=tda.data_resource_id
WHERE 1=1 AND tdr.del_flag=0 AND tdr.type='应用资源'
GROUP BY tda.attr_value
ORDER BY count DESC
</select>
</mapper>