Browse Source

修改操作票

zhongwei
段飞宇 1 year ago
parent
commit
face537c38
  1. 1
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/OperationTicketController.java
  2. 1
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/StandardTicketInfoController.java
  3. 21
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java

1
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/OperationTicketController.java

@ -54,6 +54,7 @@ public class OperationTicketController {
operationTicketService.findPending(response);
return true;
} catch (Exception e) {
e.printStackTrace();
throw new ServiceException("操作票待处理:" + e.getMessage());
}
}

1
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/StandardTicketInfoController.java

@ -113,7 +113,6 @@ public class StandardTicketInfoController extends BladeController {
/**
* 根据月份区域 获取操作详情数据
*
* @return
*/
@GetMapping("/areaMonthlyWithOperation/{page}/{size}")

21
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java

@ -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);

Loading…
Cancel
Save