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;
|
||||
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("流程结束系统通知");
|
||||
|
|
|
@ -145,10 +145,9 @@ public class AbilityCenterControllerV2 {
|
|||
Boolean basic_facilities =
|
||||
dtoList.stream().map(index -> {
|
||||
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());
|
||||
}
|
||||
|
||||
)
|
||||
.filter(index -> !index).findAny().orElse(Boolean.TRUE);
|
||||
logger.error("--------------------是否全是基础设施{}----------------------------------------------", basic_facilities);
|
||||
|
@ -156,7 +155,8 @@ public class AbilityCenterControllerV2 {
|
|||
// 仿照请求接口 /act/running/startOfBusinessKey
|
||||
ProcessStartDTO processStartDTO = new ProcessStartDTO();
|
||||
processStartDTO.setBusinessKey(basic_facilities ?
|
||||
tAbilityApplicationDTOList.stream().filter(index -> StringUtils.isNotEmpty(index.getResourceId()))
|
||||
tAbilityApplicationDTOList.stream()
|
||||
.filter(index -> StringUtils.isNotEmpty(index.getResourceId()))
|
||||
.map(TAbilityApplicationDTO::getResourceId)
|
||||
.findFirst()
|
||||
.orElse(null)
|
||||
|
|
|
@ -135,8 +135,8 @@ public class HistoryController {
|
|||
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", 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){
|
||||
Page<ProcessActivityDTO> page=activitiService.getDeptProcessInstancePage(params);
|
||||
public Result<Page<ProcessActivityDTO>> getDeptHandledInstancePage(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||
Page<ProcessActivityDTO> page = activitiService.getDeptProcessInstancePage(params);
|
||||
setExtraProcessProperties(page.getRecords());
|
||||
return new Result().ok(page);
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ public class HistoryController {
|
|||
return new Result().ok(list);
|
||||
}
|
||||
|
||||
private void setExtraProcessProperties(List<ProcessActivityDTO> list){
|
||||
private void setExtraProcessProperties(List<ProcessActivityDTO> list) {
|
||||
for (ProcessActivityDTO activityDTO : list) {
|
||||
if (StringUtils.isNotEmpty(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()));
|
||||
activityDTO.setAssigneeName(userDTO != null ? userDTO.getRealName() : "");
|
||||
}
|
||||
TAbilityApplicationDTO abilityApplicationDTO =
|
||||
abilityApplicationService.get(Long.valueOf(activityDTO.getBusinessKey()));
|
||||
TResourceMountApplyDTO tResourceMountApplyDTO = tResourceMountApplyService.get(Long.valueOf(activityDTO.getBusinessKey()));
|
||||
TDemandDataDTO tDemandDataDTO = tDemandDataService.get(Long.valueOf(activityDTO.getBusinessKey()));
|
||||
if (abilityApplicationDTO != null) {
|
||||
activityDTO.setResourceName(abilityApplicationDTO.getSystem());
|
||||
List<TAbilityApplicationDTO> abilityApplicationDTOS =
|
||||
abilityApplicationService.getByInstanceId(activityDTO.getProcessInstanceId());
|
||||
TResourceMountApplyDTO tResourceMountApplyDTO = null;
|
||||
TDemandDataDTO tDemandDataDTO = null;
|
||||
if (!activityDTO.getBusinessKey().startsWith("[") && !activityDTO.getBusinessKey().startsWith("{")) { // json 内容(批量申请)
|
||||
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) {
|
||||
activityDTO.setResourceName(tResourceMountApplyDTO.getResourceDTO().getName());
|
||||
} else if (tDemandDataDTO != null) {
|
||||
|
|
|
@ -262,6 +262,10 @@ public class ActHistoryService {
|
|||
for (ProcessInstanceDTO dto : list) {
|
||||
List<TAbilityApplicationDTO> abilityApplicationDTO = tAbilityApplicationService.getByInstanceId(dto.getProcessInstanceId()); // 获取申请表单
|
||||
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();
|
||||
abilityApplicationDTO.stream().map(TAbilityApplicationDTO::getSystem).filter(index -> StringUtils.isNotEmpty(index)).forEach(index -> {
|
||||
stringBuffer.append(index);
|
||||
|
@ -270,6 +274,7 @@ public class ActHistoryService {
|
|||
stringBuffer.deleteCharAt(stringBuffer.length() - 1);
|
||||
dto.setName(stringBuffer.toString());
|
||||
dto.setResourceId(null);
|
||||
}
|
||||
} else {
|
||||
TAbilityApplicationDTO abilityApplicationDTO1 = tAbilityApplicationService.getByBusinessKey(dto.getBusinessKey());
|
||||
if (abilityApplicationDTO1 != null) {
|
||||
|
|
|
@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
|||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
|
||||
import io.renren.modules.monitor.entity.CameraChannel;
|
||||
import lombok.Data;
|
||||
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;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -20,8 +20,7 @@
|
|||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="enclosure" column="enclosure"/>
|
||||
<result property="gatewayCode" column="gateway_code"/>
|
||||
<result property="cameraList" column="camera_list"
|
||||
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
||||
<result property="cameraList" column="camera_list"/>
|
||||
<result property="applicationScene" column="application_scene"
|
||||
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
||||
</resultMap>
|
||||
|
@ -30,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
|
||||
|
@ -39,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
|
||||
|
|
Loading…
Reference in New Issue