|
|
|
@ -41,6 +41,7 @@ import org.springblade.system.feign.ISysClient;
|
|
|
|
|
import org.springblade.system.user.cache.UserCache; |
|
|
|
|
import org.springblade.system.user.entity.User; |
|
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
|
import org.springframework.beans.BeansException; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
import javax.servlet.ServletOutputStream; |
|
|
|
@ -157,7 +158,7 @@ public class OperationTicketServiceImpl implements OperationTicketService {
|
|
|
|
|
log.info("获取下一个审批人是: {} ", response.getNextStepOperator()); |
|
|
|
|
log.info("获取下一个用户Id是: {} ", response.getUserId()); |
|
|
|
|
log.info("获取当前任务名称是: {} ", response.getTaskName()); |
|
|
|
|
log.info("获取根据handleType区分是用户还是候选组角色: {}", response.getHandleType()); |
|
|
|
|
log.info("获取根据handleType区分是用户还是候选组角色: {}", response.getHandleType()); |
|
|
|
|
//json转换表单
|
|
|
|
|
String formData = JSON.toJSONString(response.getVariables()); |
|
|
|
|
log.info("获取表单的数据:{}", formData); |
|
|
|
@ -177,6 +178,7 @@ public class OperationTicketServiceImpl implements OperationTicketService {
|
|
|
|
|
log.error("获取操作票不存在"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//设置id
|
|
|
|
|
StandardTicketInfoEntity newStandardTicketInfoEntity = new StandardTicketInfoEntity(); |
|
|
|
|
BeanUtils.copyProperties(standardTicketInfoVo, newStandardTicketInfoEntity); |
|
|
|
@ -186,6 +188,7 @@ public class OperationTicketServiceImpl implements OperationTicketService {
|
|
|
|
|
newStandardTicketInfoEntity.setProcessInstanceId(response.getProcessInstanceId()); |
|
|
|
|
standardTicketInfoService.updateById(newStandardTicketInfoEntity); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//更新安全措施
|
|
|
|
|
List<StandardTicketMeasureVo> standardTicketMeasureVos = standardTicketInfoVo.getStandardTicketMeasureVos(); |
|
|
|
|
if (CollectionUtils.isNotEmpty(standardTicketMeasureVos)) { |
|
|
|
@ -196,6 +199,7 @@ public class OperationTicketServiceImpl implements OperationTicketService {
|
|
|
|
|
}).collect(Collectors.toList()); |
|
|
|
|
standardTicketMeasureService.updateBatchById(standardTicketMeasureEntities); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//推送消息
|
|
|
|
|
if (response.getTaskId() != null) { |
|
|
|
|
MessagePushRecordDto message = new MessagePushRecordDto(); |
|
|
|
@ -236,6 +240,7 @@ public class OperationTicketServiceImpl implements OperationTicketService {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -247,19 +252,23 @@ public class OperationTicketServiceImpl implements OperationTicketService {
|
|
|
|
|
*/ |
|
|
|
|
private void saveStandardTicketInfoEntity(StandardTicketInfoEntity newStandardTicketInfoEntity, ProcessWorkFlowResponse response) { |
|
|
|
|
String flowDescription = ""; |
|
|
|
|
//如果response.getHandleType() 是0使用户
|
|
|
|
|
newStandardTicketInfoEntity.setFlowUserId(response.getUserId()); |
|
|
|
|
newStandardTicketInfoEntity.setNextStepOperator(response.getNextStepOperator()); |
|
|
|
|
flowDescription = "审批中,当前环节是".concat(response.getTaskName()).concat(",待").concat(response.getNextStepOperator()).concat("审批"); |
|
|
|
|
|
|
|
|
|
if (response.getNextStepOperator() != null) { |
|
|
|
|
flowDescription = "审批中,当前环节是".concat(response.getTaskName()).concat(",待").concat(response.getNextStepOperator()).concat("审批"); |
|
|
|
|
} |
|
|
|
|
//如果taskId为空
|
|
|
|
|
String taskId = response.getTaskId(); |
|
|
|
|
if (StringUtils.isEmpty(taskId)) { |
|
|
|
|
log.info("StringUtils.isBlank(taskId) = " + StringUtils.isBlank(taskId)); |
|
|
|
|
if (StringUtils.isBlank(taskId)) { |
|
|
|
|
newStandardTicketInfoEntity.setFlowDescription("结束"); |
|
|
|
|
newStandardTicketInfoEntity.setFlowTaskId(" "); |
|
|
|
|
newStandardTicketInfoEntity.setFlowTaskName("结束"); |
|
|
|
|
newStandardTicketInfoEntity.setNextStepOperator(" "); |
|
|
|
|
newStandardTicketInfoEntity.setFlowStatus(999); |
|
|
|
|
} else { |
|
|
|
|
//如果response.getHandleType() 是0使用户
|
|
|
|
|
newStandardTicketInfoEntity.setFlowUserId(response.getUserId()); |
|
|
|
|
newStandardTicketInfoEntity.setNextStepOperator(response.getNextStepOperator()); |
|
|
|
|
newStandardTicketInfoEntity.setFlowTaskId(taskId); |
|
|
|
|
newStandardTicketInfoEntity.setFlowTaskName(response.getTaskName()); |
|
|
|
|
newStandardTicketInfoEntity.setFlowDescription(flowDescription); |
|
|
|
|