Merge branch 'dev' of http://221.0.232.152:9393/ability-center/share-platform into dev
* 'dev' of http://221.0.232.152:9393/ability-center/share-platform: 主动终止时 驳回置false getByApplyFlag增加backToFirst标识 驳回重复通知
This commit is contained in:
commit
086c9ff165
|
@ -149,7 +149,11 @@ public class ActivitiNoticeAspect {
|
|||
Boolean termination = Boolean.valueOf(kv.get("termination") != null ? kv.get("termination").toString() : Boolean.FALSE.toString()); // 直接终结
|
||||
Boolean endByUser = Boolean.valueOf(kv.get("endByUser") != null ? kv.get("endByUser").toString() : Boolean.FALSE.toString()); // 用户终止
|
||||
Boolean reject = Boolean.valueOf(kv.get("reject") != null ? kv.get("reject").toString() : Boolean.FALSE.toString()); // 被拒绝
|
||||
if (Boolean.TRUE.equals(endByUser)) {
|
||||
Boolean backToFirst = Boolean.valueOf(kv.get("backToFirst") != null ? kv.get("backToFirst").toString() : Boolean.FALSE.toString()); // 驳回
|
||||
if (Boolean.TRUE.equals(backToFirst)) {
|
||||
result = " 被驳回";
|
||||
return;
|
||||
} else if (Boolean.TRUE.equals(endByUser)) {
|
||||
result = " 发起者终止";
|
||||
} else if (Boolean.TRUE.equals(termination)) {
|
||||
result = " 终止被拒";
|
||||
|
@ -225,7 +229,10 @@ public class ActivitiNoticeAspect {
|
|||
Boolean termination = Boolean.valueOf(kv.get("termination") != null ? kv.get("termination").toString() : Boolean.FALSE.toString()); // 直接终结
|
||||
Boolean endByUser = Boolean.valueOf(kv.get("endByUser") != null ? kv.get("endByUser").toString() : Boolean.FALSE.toString()); // 用户终止
|
||||
Boolean reject = Boolean.valueOf(kv.get("reject") != null ? kv.get("reject").toString() : Boolean.FALSE.toString()); // 被拒绝
|
||||
if (Boolean.TRUE.equals(endByUser)) {
|
||||
Boolean backToFirst = Boolean.valueOf(kv.get("backToFirst") != null ? kv.get("backToFirst").toString() : Boolean.FALSE.toString()); // 驳回
|
||||
if (Boolean.TRUE.equals(backToFirst)) {
|
||||
result = " 被驳回";
|
||||
} else if (Boolean.TRUE.equals(endByUser)) {
|
||||
result = " 发起者终止";
|
||||
} else if (Boolean.TRUE.equals(termination)) {
|
||||
result = "终止被拒";
|
||||
|
|
|
@ -643,6 +643,7 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
taskService.addComment(task.getId(), task.getProcessInstanceId(), comment);
|
||||
taskService.setVariable(task.getId(), Task_HANDLE_STATE, Task_HANDLE_STATE_STOP);
|
||||
taskService.setVariable(task.getId(), "reject", Boolean.TRUE); // 存在被拒绝的批示
|
||||
taskService.setVariable(task.getId(), "backToFirst", Boolean.FALSE); // 驳回
|
||||
taskService.complete(taskId);
|
||||
pointActivity.getIncomingTransitions().remove(newTransition);
|
||||
List<PvmTransition> pvmTransitionListC = currActivity.getOutgoingTransitions();
|
||||
|
@ -700,6 +701,7 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
taskService.setVariable(task.getId(), Task_HANDLE_STATE, Task_HANDLE_STATE_STOP);
|
||||
taskService.setVariable(task.getId(), "endByUser", Boolean.TRUE); // 主动终止流程
|
||||
taskService.setVariable(task.getId(), "reject", Boolean.TRUE); // 存在被拒绝的批示
|
||||
taskService.setVariable(task.getId(), "backToFirst", Boolean.FALSE); // 驳回
|
||||
taskService.complete(task.getId());
|
||||
pointActivity.getIncomingTransitions().remove(newTransition);
|
||||
List<PvmTransition> pvmTransitionListC = currActivity.getOutgoingTransitions();
|
||||
|
|
|
@ -32,7 +32,11 @@ import io.swagger.annotations.Api;
|
|||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.activiti.engine.HistoryService;
|
||||
import org.activiti.engine.history.HistoricProcessInstance;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
@ -55,6 +59,7 @@ import java.util.stream.Collectors;
|
|||
@RequestMapping("processForm/tabilityapplication")
|
||||
@Api(tags = "能力申请表单")
|
||||
public class TAbilityApplicationController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(TAbilityApplicationController.class);
|
||||
@Autowired
|
||||
private TAbilityApplicationService tAbilityApplicationService;
|
||||
@Autowired
|
||||
|
@ -69,6 +74,8 @@ public class TAbilityApplicationController {
|
|||
private CameraChannelMapper cameraChannelMapper;
|
||||
@Autowired
|
||||
private SysDeptService sysDeptService;
|
||||
@Autowired
|
||||
protected HistoryService historyService;
|
||||
@Value("${project.place}")
|
||||
private Integer projectPlace;
|
||||
|
||||
|
@ -169,6 +176,21 @@ public class TAbilityApplicationController {
|
|||
return new Result<String>().ok(LocalDateTime.now().toString());
|
||||
}
|
||||
|
||||
// 获取流程内参数
|
||||
// @GetMapping("test")
|
||||
// public Result<String> tt(String id) {
|
||||
// HistoricProcessInstance processInstanceDTO =
|
||||
// historyService.createHistoricProcessInstanceQuery().processInstanceId(id).includeProcessVariables().singleResult();
|
||||
// if (processInstanceDTO != null) {
|
||||
// logger.info(processInstanceDTO.getProcessVariables().toString());
|
||||
// if (processInstanceDTO.getProcessVariables().containsKey("backToFirst")) {
|
||||
// logger.info(processInstanceDTO.getProcessVariables().getOrDefault("backToFirst", "false") + "");
|
||||
// }
|
||||
// return new Result<String>().ok(JSON.toJSONString(processInstanceDTO.getProcessVariables()));
|
||||
// }
|
||||
// return new Result<String>().ok(LocalDateTime.now().toString());
|
||||
// }
|
||||
|
||||
@GetMapping("getByApplyFlag/{applyFlag}")
|
||||
@ApiOperation("根据申请标识获取能力申请信息")
|
||||
@LogOperation("根据申请标识获取能力申请信息")
|
||||
|
@ -226,6 +248,23 @@ public class TAbilityApplicationController {
|
|||
camera = cameraList;
|
||||
|
||||
List<Object> finalCamera = camera;
|
||||
|
||||
boolean backToFirst = false;
|
||||
|
||||
HistoricProcessInstance processInstanceDTO =
|
||||
historyService.createHistoricProcessInstanceQuery().processInstanceId(tAbilityApplicationDTOList.get(0).getInstanceId()).includeProcessVariables().singleResult();
|
||||
if (processInstanceDTO != null) {
|
||||
logger.info(JSON.toJSONString(processInstanceDTO.getProcessVariables()));
|
||||
if (processInstanceDTO.getProcessVariables().containsKey("backToFirst")) {
|
||||
try {
|
||||
backToFirst = Boolean.parseBoolean(processInstanceDTO.getProcessVariables().getOrDefault("backToFirst", "false").toString());
|
||||
} catch (Exception exception) {
|
||||
logger.info("{}未被驳回", tAbilityApplicationDTOList.get(0).getInstanceId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
boolean finalBackToFirst = backToFirst;
|
||||
return new HashMap<String, Object>() {
|
||||
{
|
||||
put("instanceId", tAbilityApplicationDTOList.get(0).getInstanceId()); // 流程id
|
||||
|
@ -241,6 +280,7 @@ public class TAbilityApplicationController {
|
|||
if (!finalCamera.isEmpty()) {
|
||||
put("camera", finalCamera); // 流程详情
|
||||
}
|
||||
put("backToFirst", finalBackToFirst);
|
||||
}
|
||||
};
|
||||
}).filter(Objects::nonNull).collect(Collectors.groupingBy(t -> {
|
||||
|
|
Loading…
Reference in New Issue