Merge branch 'master' into docker_package

This commit is contained in:
DESKTOP-VA9NQUP\liwen 2022-10-03 20:33:27 +08:00
commit d2a26c959f
13 changed files with 85 additions and 7 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

@ -604,6 +604,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

@ -1785,12 +1785,13 @@
<select id="selectCensusResourceTable" resultType="java.util.Map">
SELECT sd.name AS deptName, tdr.name AS resourceName, tdr.type, tdr.create_date AS createDate,
if(tdr.del_flag=0, '审核通过', '审核中') AS approveStatus
if(tdr.del_flag=0, '审核通过', '审核中') AS approveStatus, trma.apply_number AS applyNumber
FROM (SELECT IF(d.type='组件服务', A.attr_value, d.type) AS type, d.id, d.del_flag, d.dept_id, d.create_date,
d.name
FROM tb_data_resource d LEFT JOIN tb_data_attr a ON d.id=a.data_resource_id AND a.attr_type='组件类型' AND
a.del_flag=0
WHERE d.type NOT IN ('知识库','基础设施','数据资源')) tdr,
WHERE d.type NOT IN ('知识库','基础设施','数据资源')) tdr
LEFT JOIN t_resource_mount_apply trma on tdr.id=trma.resource_id,
sys_dept sd
WHERE 1=1 AND tdr.dept_id=sd.id
<choose>
@ -1818,7 +1819,7 @@
<select id="selectCensusApplyTable" resultType="java.util.Map">
SELECT sd.name AS deptName, tdr.name AS resourceName, tdr.type, taa.create_date AS createDate,
taa.approve_status AS approveStatus
taa.approve_status AS approveStatus, taa.apply_number AS applyNumber
FROM (SELECT IF(d.type='组件服务', A.attr_value, d.type) AS type, d.id, d.del_flag, d.dept_id, d.create_date,
d.name
FROM tb_data_resource d LEFT JOIN tb_data_attr a ON d.id=a.data_resource_id AND a.attr_type='组件类型' AND
@ -1851,4 +1852,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>