1.1.75 合同重新发起审批流程优化。

dev
yinq 6 days ago
parent 4a6f01d08b
commit 360c3ba125

@ -813,7 +813,7 @@ public class ErpContractInfoServiceImpl implements IErpContractInfoService {
}
/**
* 便
* /便
*/
private boolean resetFinishedContractFlowForResubmit(ErpContractInfoBo bo) {
if (bo == null || bo.getContractId() == null) {
@ -823,15 +823,15 @@ public class ErpContractInfoServiceImpl implements IErpContractInfoService {
if (current == null) {
return false;
}
if (!OAStatusEnum.COMPLETED.getStatus().equals(current.getContractStatus())) {
return false;
}
String wfStatus = remoteWorkflowService.getBusinessStatus(String.valueOf(bo.getContractId()));
if (!BusinessStatusEnum.FINISH.getStatus().equals(wfStatus)) {
return false;
}
log.info("合同[{}]重新发起审批:删除已结束流程实例后重新发起", bo.getContractId());
remoteWorkflowService.deleteInstance(Collections.singletonList(bo.getContractId()));
boolean deleted = remoteWorkflowService.deleteInstance(Collections.singletonList(bo.getContractId()));
if (!deleted) {
throw new ServiceException("清理已完成合同审批流程失败,请稍后重试");
}
bo.setContractStatus(null);
bo.setFlowStatus(null);
return true;

Loading…
Cancel
Save