Merge branch 'master' into docker_package

This commit is contained in:
wangliwen 2022-07-01 11:16:06 +08:00
commit 68f9685daa
6 changed files with 71 additions and 16 deletions

View File

@ -232,15 +232,17 @@ public class ActivitiNoticeAspect {
Long resourceId = null;
if (kv.containsKey("resourceId") && kv.get("resourceId") != null) {
resourceId = Long.valueOf(kv.get("resourceId").toString());
} else if (kv.containsKey("id") && kv.get("id") != null) {
} else if (kv.containsKey("id") && kv.get("id") != null && kv.containsKey("-")) {
resourceId = Long.valueOf(kv.get("id").toString());
} else {
resourceId = 0L;
}
Optional<ResourceDTO> resourceDTO = Optional.ofNullable(resourceService.get(resourceId));
CompletableFuture.runAsync(() -> { // 发起人
SysUserDTO userDTO = sysUserService.get(Long.valueOf(finalCreator));
kv.get("resourceId");
kv.get("id");
String content = "【通知】" + userDTO.getRealName() + ",您发起的" + (resourceDTO.isPresent() ? resourceDTO.get().getName() : "") + activitiNoticeOperation.process() + "已完成,审核结果为:" + finalResult;
String content = "【通知】" + userDTO.getRealName() + ",您发起的" + (resourceDTO.isPresent() ? resourceDTO.get().getName() : "申请摄像头列表") + activitiNoticeOperation.process() + "已完成,审核结果为:" + finalResult;
SysNoticeDTO dto = new SysNoticeDTO();
dto.setType(2);
dto.setTitle("流程结束系统通知");

View File

@ -375,7 +375,7 @@ public class CensusControllerV3 {
public Result<List<Map<String,Object>>> applicationUsedCapabilityNum(Long id){
Object[] ps = {id,id};
List<Map<String, Object>> maps = jdbcTemplate.queryForList("SELECT COUNT(distinct(a.key_id)) as appNum,c.attr_value FROM (\n" +
"SELECT a.key_id ,a.reference_id FROM tb_data_resource_rel a INNER JOIN tb_data_resource b ON a.key_id = b.id INNER JOIN sys_dept c on b.dept_id = c.id WHERE a.del_flag = 0 AND c.id = ? OR INSTR(c.pids,?) ORDER BY a.key_id \n" +
"SELECT a.key_id ,a.reference_id FROM tb_data_resource_rel a INNER JOIN tb_data_resource b ON a.key_id = b.id INNER JOIN sys_dept c on b.dept_id = c.id WHERE a.del_flag = 0 AND (c.id = ? OR INSTR(c.pids,?)) ORDER BY a.key_id \n" +
") a \n" +
"INNER JOIN tb_data_resource b ON a.reference_id = b.id INNER JOIN tb_data_attr c ON a.reference_id = c.data_resource_id \n" +
"WHERE c.attr_type = '组件类型' GROUP BY c.attr_value", ps);

View File

@ -68,7 +68,7 @@ public class CorrectionListenerV2 implements TaskListener, ExecutionListener, Ac
private TAbilityApplicationService tAbilityApplicationService;
@Override
@ActivitiNoticeOperation(value = "资源部门负责人审批", process = "能力申请流程")
@ActivitiNoticeOperation(value = "资源部门负责人审批", process = "能力申请流程v2")
public void notify(DelegateTask delegateTask) {
logger.error("-------------------------进入部门动态审批人流程-------------------------------");
final String eventName = delegateTask.getEventName();
@ -85,7 +85,7 @@ public class CorrectionListenerV2 implements TaskListener, ExecutionListener, Ac
}
@Override
@ActivitiNoticeOperation(value = "流程结束", process = "能力申请流程", type = 2)
@ActivitiNoticeOperation(value = "流程结束", process = "能力申请流程v2", type = 2)
public void notify(DelegateExecution delegateExecution) throws Exception {
logger.error("----------------------进入部门审批结束节点---------------------------");
delegateExecution.getProcessBusinessKey();

View File

@ -904,7 +904,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
.eq("approve_status", "通过");
List<TAbilityApplicationEntity> applicationEntities = tAbilityApplicationDao.selectList(queryWrapper);
ArrayList cameraList = new ArrayList();
applicationEntities.forEach(index -> cameraList.add(resourceDao.selectCameraDTOById(Long.parseLong(index.getResourceId()))));
applicationEntities.forEach(index -> cameraList.add(cameraChannelMapper.selectByChannelCode(index.getCameraList())));
return cameraList;
}

View File

@ -29,7 +29,7 @@
update t_ability_application set instance_id = #{instanceId} where id = #{id}
</update>
<select id="getByInstanceId" resultType="io.renren.modules.processForm.entity.TAbilityApplicationEntity">
<select id="getByInstanceId" resultMap="tAbilityApplicationMap">
SELECT
t1.*
FROM
@ -38,7 +38,7 @@
t1.instance_id = #{instanceId}
</select>
<select id="getByBusinessKey" resultType="io.renren.modules.processForm.entity.TAbilityApplicationEntity">
<select id="getByBusinessKey" resultMap="tAbilityApplicationMap">
SELECT
t1.*
FROM
@ -49,22 +49,73 @@
<select id="countApplyAll" resultType="java.lang.Long">
SELECT
COUNT(*)
SUM( count )
FROM
( SELECT DISTINCT instance_id FROM t_ability_application WHERE 1 = 1 ) temp
(
SELECT
COUNT( 1 ) AS count
FROM
(
SELECT
COUNT( id )
FROM
t_ability_application
WHERE
resource_id != 8888888880000000001
AND instance_id != ''
AND instance_id IS NOT NULL
AND camera_list != ''
AND camera_list IS NOT NULL
GROUP BY
instance_id
) temp UNION
SELECT
COUNT( taa.id )
FROM
t_ability_application taa,
tb_data_resource tdr
WHERE
1 = 1
AND taa.resource_id = tdr.id
AND tdr.type != '赋能案例'
AND tdr.del_flag = 0
GROUP BY
tdr.type
) temp2
</select>
<select id="getAmountGroupByType" resultType="java.util.Map">
SELECT
tbr.type AS type,
COUNT( taa.id ) AS amount
'基础设施' AS 'type',
COUNT( 1 ) AS 'amount'
FROM
t_ability_application AS taa
INNER JOIN tb_data_resource AS tbr ON taa.resource_id = tbr.id
(
SELECT
COUNT( id )
FROM
t_ability_application
WHERE
resource_id != 8888888880000000001
AND instance_id != ''
AND instance_id IS NOT NULL
AND camera_list != ''
AND camera_list IS NOT NULL
GROUP BY
instance_id
) temp UNION
SELECT
tdr.type,
COUNT( taa.id )
FROM
t_ability_application taa,
tb_data_resource tdr
WHERE
taa.approve_status = '通过'
1 = 1
AND taa.resource_id = tdr.id
AND tdr.type != '赋能案例'
AND tdr.del_flag = 0
GROUP BY
tbr.type
tdr.type
</select>
<select id="selectDeptApplyCount" resultType="java.util.Map">

View File

@ -108,6 +108,8 @@
<select id="selectWithAttrs" resultMap="resourceDTO">
SELECT
DISTINCT tdr.id,
tdr.create_date,
tdr.visits,
IFNULL(taa2.approve_status, '未申请') AS "applyState",
IFNULL(trs.score, 0 ) AS "score",
IFNULL(taa.applyCount, 0 ) AS "applyCount",