Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
66356dd6c6
|
@ -232,15 +232,17 @@ public class ActivitiNoticeAspect {
|
||||||
Long resourceId = null;
|
Long resourceId = null;
|
||||||
if (kv.containsKey("resourceId") && kv.get("resourceId") != null) {
|
if (kv.containsKey("resourceId") && kv.get("resourceId") != null) {
|
||||||
resourceId = Long.valueOf(kv.get("resourceId").toString());
|
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());
|
resourceId = Long.valueOf(kv.get("id").toString());
|
||||||
|
} else {
|
||||||
|
resourceId = 0L;
|
||||||
}
|
}
|
||||||
Optional<ResourceDTO> resourceDTO = Optional.ofNullable(resourceService.get(resourceId));
|
Optional<ResourceDTO> resourceDTO = Optional.ofNullable(resourceService.get(resourceId));
|
||||||
CompletableFuture.runAsync(() -> { // 发起人
|
CompletableFuture.runAsync(() -> { // 发起人
|
||||||
SysUserDTO userDTO = sysUserService.get(Long.valueOf(finalCreator));
|
SysUserDTO userDTO = sysUserService.get(Long.valueOf(finalCreator));
|
||||||
kv.get("resourceId");
|
kv.get("resourceId");
|
||||||
kv.get("id");
|
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();
|
SysNoticeDTO dto = new SysNoticeDTO();
|
||||||
dto.setType(2);
|
dto.setType(2);
|
||||||
dto.setTitle("流程结束系统通知");
|
dto.setTitle("流程结束系统通知");
|
||||||
|
|
|
@ -145,10 +145,9 @@ public class AbilityCenterControllerV2 {
|
||||||
Boolean basic_facilities =
|
Boolean basic_facilities =
|
||||||
dtoList.stream().map(index -> {
|
dtoList.stream().map(index -> {
|
||||||
Optional<ResourceDTO> resourceDTOOptional =
|
Optional<ResourceDTO> resourceDTOOptional =
|
||||||
Optional.ofNullable(resourceService.get(Long.valueOf(index.getResourceId()))); //
|
Optional.ofNullable(resourceService.get(Long.valueOf(index.getResourceId()))); // 从本库内查不到 视为其它平台的基础设施资源
|
||||||
return !resourceDTOOptional.isPresent() || !"基础设施".equals(resourceDTOOptional.get().getType());
|
return !resourceDTOOptional.isPresent() || !"基础设施".equals(resourceDTOOptional.get().getType());
|
||||||
}
|
}
|
||||||
|
|
||||||
)
|
)
|
||||||
.filter(index -> !index).findAny().orElse(Boolean.TRUE);
|
.filter(index -> !index).findAny().orElse(Boolean.TRUE);
|
||||||
logger.error("--------------------是否全是基础设施{}----------------------------------------------", basic_facilities);
|
logger.error("--------------------是否全是基础设施{}----------------------------------------------", basic_facilities);
|
||||||
|
@ -156,7 +155,8 @@ public class AbilityCenterControllerV2 {
|
||||||
// 仿照请求接口 /act/running/startOfBusinessKey
|
// 仿照请求接口 /act/running/startOfBusinessKey
|
||||||
ProcessStartDTO processStartDTO = new ProcessStartDTO();
|
ProcessStartDTO processStartDTO = new ProcessStartDTO();
|
||||||
processStartDTO.setBusinessKey(basic_facilities ?
|
processStartDTO.setBusinessKey(basic_facilities ?
|
||||||
tAbilityApplicationDTOList.stream().filter(index -> StringUtils.isNotEmpty(index.getResourceId()))
|
tAbilityApplicationDTOList.stream()
|
||||||
|
.filter(index -> StringUtils.isNotEmpty(index.getResourceId()))
|
||||||
.map(TAbilityApplicationDTO::getResourceId)
|
.map(TAbilityApplicationDTO::getResourceId)
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.orElse(null)
|
.orElse(null)
|
||||||
|
|
|
@ -135,8 +135,8 @@ public class HistoryController {
|
||||||
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"),
|
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"),
|
||||||
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int")
|
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int")
|
||||||
})
|
})
|
||||||
public Result<Page<ProcessActivityDTO>> getDeptHandledInstancePage(@ApiIgnore @RequestParam Map<String, Object> params){
|
public Result<Page<ProcessActivityDTO>> getDeptHandledInstancePage(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||||
Page<ProcessActivityDTO> page=activitiService.getDeptProcessInstancePage(params);
|
Page<ProcessActivityDTO> page = activitiService.getDeptProcessInstancePage(params);
|
||||||
setExtraProcessProperties(page.getRecords());
|
setExtraProcessProperties(page.getRecords());
|
||||||
return new Result().ok(page);
|
return new Result().ok(page);
|
||||||
}
|
}
|
||||||
|
@ -153,7 +153,7 @@ public class HistoryController {
|
||||||
return new Result().ok(list);
|
return new Result().ok(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setExtraProcessProperties(List<ProcessActivityDTO> list){
|
private void setExtraProcessProperties(List<ProcessActivityDTO> list) {
|
||||||
for (ProcessActivityDTO activityDTO : list) {
|
for (ProcessActivityDTO activityDTO : list) {
|
||||||
if (StringUtils.isNotEmpty(activityDTO.getStartUserId())) {
|
if (StringUtils.isNotEmpty(activityDTO.getStartUserId())) {
|
||||||
SysUserDTO userDTO = sysUserService.get(Long.valueOf(activityDTO.getStartUserId()));
|
SysUserDTO userDTO = sysUserService.get(Long.valueOf(activityDTO.getStartUserId()));
|
||||||
|
@ -163,12 +163,22 @@ public class HistoryController {
|
||||||
SysUserDTO userDTO = sysUserService.get(Long.valueOf(activityDTO.getAssignee()));
|
SysUserDTO userDTO = sysUserService.get(Long.valueOf(activityDTO.getAssignee()));
|
||||||
activityDTO.setAssigneeName(userDTO != null ? userDTO.getRealName() : "");
|
activityDTO.setAssigneeName(userDTO != null ? userDTO.getRealName() : "");
|
||||||
}
|
}
|
||||||
TAbilityApplicationDTO abilityApplicationDTO =
|
List<TAbilityApplicationDTO> abilityApplicationDTOS =
|
||||||
abilityApplicationService.get(Long.valueOf(activityDTO.getBusinessKey()));
|
abilityApplicationService.getByInstanceId(activityDTO.getProcessInstanceId());
|
||||||
TResourceMountApplyDTO tResourceMountApplyDTO = tResourceMountApplyService.get(Long.valueOf(activityDTO.getBusinessKey()));
|
TResourceMountApplyDTO tResourceMountApplyDTO = null;
|
||||||
TDemandDataDTO tDemandDataDTO = tDemandDataService.get(Long.valueOf(activityDTO.getBusinessKey()));
|
TDemandDataDTO tDemandDataDTO = null;
|
||||||
if (abilityApplicationDTO != null) {
|
if (!activityDTO.getBusinessKey().startsWith("[") && !activityDTO.getBusinessKey().startsWith("{")) { // json 内容(批量申请)
|
||||||
activityDTO.setResourceName(abilityApplicationDTO.getSystem());
|
tResourceMountApplyDTO = tResourceMountApplyService.get(Long.valueOf(activityDTO.getBusinessKey()));
|
||||||
|
tDemandDataDTO = tDemandDataService.get(Long.valueOf(activityDTO.getBusinessKey()));
|
||||||
|
}
|
||||||
|
if (abilityApplicationDTOS != null && !abilityApplicationDTOS.isEmpty()) {
|
||||||
|
StringBuffer stringBuffer = new StringBuffer();
|
||||||
|
abilityApplicationDTOS.stream().map(TAbilityApplicationDTO::getSystem).filter(index -> StringUtils.isNotEmpty(index)).forEach(index -> {
|
||||||
|
stringBuffer.append(index);
|
||||||
|
stringBuffer.append(",");
|
||||||
|
});
|
||||||
|
stringBuffer.deleteCharAt(stringBuffer.length() - 1);
|
||||||
|
activityDTO.setResourceName(stringBuffer.toString());
|
||||||
} else if (tResourceMountApplyDTO != null) {
|
} else if (tResourceMountApplyDTO != null) {
|
||||||
activityDTO.setResourceName(tResourceMountApplyDTO.getResourceDTO().getName());
|
activityDTO.setResourceName(tResourceMountApplyDTO.getResourceDTO().getName());
|
||||||
} else if (tDemandDataDTO != null) {
|
} else if (tDemandDataDTO != null) {
|
||||||
|
|
|
@ -262,6 +262,10 @@ public class ActHistoryService {
|
||||||
for (ProcessInstanceDTO dto : list) {
|
for (ProcessInstanceDTO dto : list) {
|
||||||
List<TAbilityApplicationDTO> abilityApplicationDTO = tAbilityApplicationService.getByInstanceId(dto.getProcessInstanceId()); // 获取申请表单
|
List<TAbilityApplicationDTO> abilityApplicationDTO = tAbilityApplicationService.getByInstanceId(dto.getProcessInstanceId()); // 获取申请表单
|
||||||
if (abilityApplicationDTO != null && !abilityApplicationDTO.isEmpty()) {
|
if (abilityApplicationDTO != null && !abilityApplicationDTO.isEmpty()) {
|
||||||
|
if (abilityApplicationDTO.stream().filter(index -> StringUtils.isNotEmpty(index.getCameraList())).findAny().isPresent()) { // 存在摄像头
|
||||||
|
dto.setName("申请摄像头列表");
|
||||||
|
dto.setResourceId(null);
|
||||||
|
} else {
|
||||||
StringBuffer stringBuffer = new StringBuffer();
|
StringBuffer stringBuffer = new StringBuffer();
|
||||||
abilityApplicationDTO.stream().map(TAbilityApplicationDTO::getSystem).filter(index -> StringUtils.isNotEmpty(index)).forEach(index -> {
|
abilityApplicationDTO.stream().map(TAbilityApplicationDTO::getSystem).filter(index -> StringUtils.isNotEmpty(index)).forEach(index -> {
|
||||||
stringBuffer.append(index);
|
stringBuffer.append(index);
|
||||||
|
@ -270,6 +274,7 @@ public class ActHistoryService {
|
||||||
stringBuffer.deleteCharAt(stringBuffer.length() - 1);
|
stringBuffer.deleteCharAt(stringBuffer.length() - 1);
|
||||||
dto.setName(stringBuffer.toString());
|
dto.setName(stringBuffer.toString());
|
||||||
dto.setResourceId(null);
|
dto.setResourceId(null);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
TAbilityApplicationDTO abilityApplicationDTO1 = tAbilityApplicationService.getByBusinessKey(dto.getBusinessKey());
|
TAbilityApplicationDTO abilityApplicationDTO1 = tAbilityApplicationService.getByBusinessKey(dto.getBusinessKey());
|
||||||
if (abilityApplicationDTO1 != null) {
|
if (abilityApplicationDTO1 != null) {
|
||||||
|
|
|
@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
|
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
|
||||||
import io.renren.modules.monitor.entity.CameraChannel;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
@ -98,7 +97,7 @@ public class TAbilityApplicationEntity implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 摄像头列表
|
* 摄像头列表
|
||||||
*/
|
*/
|
||||||
@TableField(value = "camera_list", typeHandler = FastjsonTypeHandler.class)
|
// @TableField(value = "camera_list", typeHandler = FastjsonTypeHandler.class)
|
||||||
private String cameraList;
|
private String cameraList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -68,7 +68,7 @@ public class CorrectionListenerV2 implements TaskListener, ExecutionListener, Ac
|
||||||
private TAbilityApplicationService tAbilityApplicationService;
|
private TAbilityApplicationService tAbilityApplicationService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ActivitiNoticeOperation(value = "资源部门负责人审批", process = "能力申请流程")
|
@ActivitiNoticeOperation(value = "资源部门负责人审批", process = "能力申请流程v2")
|
||||||
public void notify(DelegateTask delegateTask) {
|
public void notify(DelegateTask delegateTask) {
|
||||||
logger.error("-------------------------进入部门动态审批人流程-------------------------------");
|
logger.error("-------------------------进入部门动态审批人流程-------------------------------");
|
||||||
final String eventName = delegateTask.getEventName();
|
final String eventName = delegateTask.getEventName();
|
||||||
|
@ -85,7 +85,7 @@ public class CorrectionListenerV2 implements TaskListener, ExecutionListener, Ac
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ActivitiNoticeOperation(value = "流程结束", process = "能力申请流程", type = 2)
|
@ActivitiNoticeOperation(value = "流程结束", process = "能力申请流程v2", type = 2)
|
||||||
public void notify(DelegateExecution delegateExecution) throws Exception {
|
public void notify(DelegateExecution delegateExecution) throws Exception {
|
||||||
logger.error("----------------------进入部门审批结束节点---------------------------");
|
logger.error("----------------------进入部门审批结束节点---------------------------");
|
||||||
delegateExecution.getProcessBusinessKey();
|
delegateExecution.getProcessBusinessKey();
|
||||||
|
|
|
@ -20,8 +20,7 @@
|
||||||
<result property="delFlag" column="del_flag"/>
|
<result property="delFlag" column="del_flag"/>
|
||||||
<result property="enclosure" column="enclosure"/>
|
<result property="enclosure" column="enclosure"/>
|
||||||
<result property="gatewayCode" column="gateway_code"/>
|
<result property="gatewayCode" column="gateway_code"/>
|
||||||
<result property="cameraList" column="camera_list"
|
<result property="cameraList" column="camera_list"/>
|
||||||
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
|
||||||
<result property="applicationScene" column="application_scene"
|
<result property="applicationScene" column="application_scene"
|
||||||
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
@ -30,7 +29,7 @@
|
||||||
update t_ability_application set instance_id = #{instanceId} where id = #{id}
|
update t_ability_application set instance_id = #{instanceId} where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="getByInstanceId" resultType="io.renren.modules.processForm.entity.TAbilityApplicationEntity">
|
<select id="getByInstanceId" resultMap="tAbilityApplicationMap">
|
||||||
SELECT
|
SELECT
|
||||||
t1.*
|
t1.*
|
||||||
FROM
|
FROM
|
||||||
|
@ -39,7 +38,7 @@
|
||||||
t1.instance_id = #{instanceId}
|
t1.instance_id = #{instanceId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getByBusinessKey" resultType="io.renren.modules.processForm.entity.TAbilityApplicationEntity">
|
<select id="getByBusinessKey" resultMap="tAbilityApplicationMap">
|
||||||
SELECT
|
SELECT
|
||||||
t1.*
|
t1.*
|
||||||
FROM
|
FROM
|
||||||
|
|
Loading…
Reference in New Issue