feat: 废止 封存 复审 启用流程草稿和草稿办理接口
This commit is contained in:
+17
-1
@@ -9,6 +9,7 @@ import com.jero.modules.activiti.process.esAbolish.entity.vo.ESAbolishDataVO;
|
|||||||
import com.jero.modules.activiti.process.esAbolish.service.ProcessEsAbolishService;
|
import com.jero.modules.activiti.process.esAbolish.service.ProcessEsAbolishService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -45,7 +46,7 @@ public class ESAbolishController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存到待办
|
* 保存到草稿
|
||||||
* @param abolishData
|
* @param abolishData
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "企标废止发起流程-保存")
|
@AutoLog(value = "企标废止发起流程-保存")
|
||||||
@@ -56,6 +57,21 @@ public class ESAbolishController {
|
|||||||
return Result.OK();
|
return Result.OK();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 草稿办理
|
||||||
|
* @param draftId
|
||||||
|
* @param projectId
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "企标废止发起流程-草稿办理")
|
||||||
|
@ApiOperation(value="企标废止发起流程-草稿办理", notes="企标废止发起流程-草稿办理")
|
||||||
|
@GetMapping("/draftHandle")
|
||||||
|
@Translation
|
||||||
|
public Result<?> draftHandle(@RequestParam("draftId") @ApiParam("草稿Id") String draftId,
|
||||||
|
@RequestParam("projectId") @ApiParam("业务数据Id") String projectId) {
|
||||||
|
return Result.OK(abolishService.getDraftData(draftId, projectId));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存到待办
|
* 保存到待办
|
||||||
* @param taskId
|
* @param taskId
|
||||||
|
|||||||
+2
@@ -18,4 +18,6 @@ public interface ProcessEsAbolishService extends IService<ProcessEsAbolish> {
|
|||||||
ESAbolishDataVO getHandleData(String taskId);
|
ESAbolishDataVO getHandleData(String taskId);
|
||||||
|
|
||||||
void approval(ESAbolishDataVO annualInitData, boolean pass);
|
void approval(ESAbolishDataVO annualInitData, boolean pass);
|
||||||
|
|
||||||
|
ESAbolishDataVO getDraftData(String draftId, String projectId);
|
||||||
}
|
}
|
||||||
|
|||||||
+27
-41
@@ -17,6 +17,8 @@ import com.jero.modules.activiti.process.esAbolish.entity.ProcessEsAbolish;
|
|||||||
import com.jero.modules.activiti.process.esAbolish.entity.vo.ESAbolishDataVO;
|
import com.jero.modules.activiti.process.esAbolish.entity.vo.ESAbolishDataVO;
|
||||||
import com.jero.modules.activiti.process.esAbolish.service.ProcessEsAbolishService;
|
import com.jero.modules.activiti.process.esAbolish.service.ProcessEsAbolishService;
|
||||||
import com.jero.modules.activiti.process.esAbolish.mapper.ProcessEsAbolishMapper;
|
import com.jero.modules.activiti.process.esAbolish.mapper.ProcessEsAbolishMapper;
|
||||||
|
import com.jero.modules.activiti.process.esArchive.entity.ProcessEsArchive;
|
||||||
|
import com.jero.modules.activiti.process.esArchive.entity.vo.ESArchiveDataVO;
|
||||||
import com.jero.modules.activiti.process.esEnable.entity.ProcessEsEnable;
|
import com.jero.modules.activiti.process.esEnable.entity.ProcessEsEnable;
|
||||||
import com.jero.modules.activiti.service.ProcessAllService;
|
import com.jero.modules.activiti.service.ProcessAllService;
|
||||||
import com.jero.modules.activiti.service.ProcessNodeLinkService;
|
import com.jero.modules.activiti.service.ProcessNodeLinkService;
|
||||||
@@ -129,48 +131,11 @@ public class ProcessEsAbolishServiceImpl extends ServiceImpl<ProcessEsAbolishMap
|
|||||||
@Override
|
@Override
|
||||||
public void saveToDraft(ESAbolishDataVO abolishDataVO) {
|
public void saveToDraft(ESAbolishDataVO abolishDataVO) {
|
||||||
CommonVO commonVO = abolishDataVO.getCommon();
|
CommonVO commonVO = abolishDataVO.getCommon();
|
||||||
String taskId = commonVO.getTaskId();
|
|
||||||
ProcessEsAbolish esAbolish = abolishDataVO.getData();
|
ProcessEsAbolish esAbolish = abolishDataVO.getData();
|
||||||
String projectId = esAbolish.getId();
|
ProcessDraft existDraft = actFlowCommonService.getExistDraftAndRemove(commonVO, ProcessTypeEnum.ES_ABOLISH);
|
||||||
if (StrUtil.isBlank(projectId)) {
|
if (existDraft != null) esAbolish.setId(existDraft.getProjectId());
|
||||||
save(esAbolish);
|
saveOrUpdate(esAbolish);
|
||||||
} else {
|
actFlowCommonService.addDraft(commonVO, ProcessTypeEnum.ES_ABOLISH, esAbolish.getId());
|
||||||
// 先删后增
|
|
||||||
LambdaUpdateWrapper<ProcessDraft> draftWrapper = new LambdaUpdateWrapper<>();
|
|
||||||
draftWrapper.eq(ProcessDraft::getPrcType, ProcessTypeEnum.ES_ABOLISH.getValue());
|
|
||||||
draftWrapper.eq(ProcessDraft::getCreateBy, UserUtils.getUserId());
|
|
||||||
draftWrapper.eq(ProcessDraft::getProjectId, projectId);
|
|
||||||
processDraftService.remove(draftWrapper);
|
|
||||||
saveOrUpdate(esAbolish);
|
|
||||||
}
|
|
||||||
String id = esAbolish.getId();
|
|
||||||
if (StrUtil.isBlank(taskId)) {
|
|
||||||
// 第一个节点点击保存没有taskId
|
|
||||||
List<ProcessDraft> draftList = new ArrayList<>();
|
|
||||||
ProcessDraft draft = new ProcessDraft();
|
|
||||||
draft.setProjectId(id);
|
|
||||||
draft.setPrcType(ProcessTypeEnum.ES_ABOLISH.getValue());
|
|
||||||
draft.setPrcName(commonVO.getPrcName());
|
|
||||||
draft.setHandleText(commonVO.getCommitText()); // 流程审批信息-备注
|
|
||||||
draft.setHandleFile(commonVO.getCommitFile()); // 流程审批信息-附件
|
|
||||||
draft.setUserId(CurrentUserUtil.getId()); // 用户id
|
|
||||||
draftList.add(draft);
|
|
||||||
processDraftService.saveBatch(draftList);
|
|
||||||
} else {
|
|
||||||
String processInstanceId = actFlowCommonService.getProcessInstanceIdByTaskId(taskId);
|
|
||||||
List<ProcessDraft> draftList = new ArrayList<>();
|
|
||||||
ProcessDraft draft = new ProcessDraft();
|
|
||||||
draft.setProjectId(id);
|
|
||||||
draft.setProcessInstanceId(processInstanceId);
|
|
||||||
draft.setPrcName(commonVO.getPrcName());
|
|
||||||
draft.setPrcType(ProcessTypeEnum.ES_ABOLISH.getValue());
|
|
||||||
draft.setTaskId(taskId); // 任务id
|
|
||||||
draft.setHandleText(commonVO.getCommitText()); // 流程审批信息-备注
|
|
||||||
draft.setHandleFile(commonVO.getCommitFile()); // 流程审批信息-附件
|
|
||||||
draft.setUserId(CurrentUserUtil.getId()); // 用户id
|
|
||||||
draftList.add(draft);
|
|
||||||
processDraftService.saveBatch(draftList);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startRunTask(ESAbolishDataVO abolishData) {
|
public void startRunTask(ESAbolishDataVO abolishData) {
|
||||||
@@ -219,6 +184,27 @@ public class ProcessEsAbolishServiceImpl extends ServiceImpl<ProcessEsAbolishMap
|
|||||||
actFlowCommonService.updateApprovalInfo(commonVO, taskId, pass);
|
actFlowCommonService.updateApprovalInfo(commonVO, taskId, pass);
|
||||||
// 审批节点
|
// 审批节点
|
||||||
actFlowCommonService.completeTask(taskId, userId);
|
actFlowCommonService.completeTask(taskId, userId);
|
||||||
|
// 删除草稿
|
||||||
|
actFlowCommonService.removeDraft(commonVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ESAbolishDataVO getDraftData(String draftId, String businessId) {
|
||||||
|
ProcessDraft draft = actFlowCommonService.getExistDraft(draftId, businessId, ProcessTypeEnum.ES_ARCHIVE);
|
||||||
|
if (draft != null) {
|
||||||
|
ESAbolishDataVO abolishDataVO = new ESAbolishDataVO();
|
||||||
|
// 获取流程通用数据
|
||||||
|
CommonVO commonVO = actFlowCommonService.getDraftCommon(draft);
|
||||||
|
abolishDataVO.setCommon(commonVO);
|
||||||
|
// 获取流程实例数据
|
||||||
|
LambdaQueryWrapper<ProcessEsAbolish> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.eq(ProcessEsAbolish::getId, businessId);
|
||||||
|
lambdaQueryWrapper.eq(ProcessEsAbolish::getDelFlag, YesOrNoEnum.NO.getValue());
|
||||||
|
ProcessEsAbolish data = getOne(lambdaQueryWrapper);
|
||||||
|
abolishDataVO.setData(data);
|
||||||
|
return abolishDataVO;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+15
@@ -9,6 +9,7 @@ import com.jero.modules.activiti.process.esArchive.entity.vo.ESArchiveDataVO;
|
|||||||
import com.jero.modules.activiti.process.esArchive.service.ProcessEsArchiveService;
|
import com.jero.modules.activiti.process.esArchive.service.ProcessEsArchiveService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -68,6 +69,20 @@ public class ESArchiveController {
|
|||||||
return Result.OK(archiveService.getHandleData(taskId));
|
return Result.OK(archiveService.getHandleData(taskId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 草稿办理
|
||||||
|
* @param draftId
|
||||||
|
* @param projectId
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "企标封存流程-草稿办理")
|
||||||
|
@ApiOperation(value="企标封存流程-草稿办理", notes="企标封存流程-草稿办理")
|
||||||
|
@GetMapping("/draftHandle")
|
||||||
|
@Translation
|
||||||
|
public Result<?> draftHandle(@RequestParam("draftId") @ApiParam("草稿Id") String draftId,
|
||||||
|
@RequestParam("projectId") @ApiParam("业务数据Id") String projectId) {
|
||||||
|
return Result.OK(archiveService.getDraftData(draftId, projectId));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 同意
|
* 同意
|
||||||
*
|
*
|
||||||
|
|||||||
+2
@@ -18,4 +18,6 @@ public interface ProcessEsArchiveService extends IService<ProcessEsArchive> {
|
|||||||
ESArchiveDataVO getHandleData(String taskId);
|
ESArchiveDataVO getHandleData(String taskId);
|
||||||
|
|
||||||
void approval(ESArchiveDataVO archiveData, boolean pass);
|
void approval(ESArchiveDataVO archiveData, boolean pass);
|
||||||
|
|
||||||
|
ESArchiveDataVO getDraftData(String draftId, String projectId);
|
||||||
}
|
}
|
||||||
|
|||||||
+23
-1
@@ -17,6 +17,8 @@ import com.jero.modules.activiti.process.esArchive.entity.ProcessEsArchive;
|
|||||||
import com.jero.modules.activiti.process.esArchive.entity.vo.ESArchiveDataVO;
|
import com.jero.modules.activiti.process.esArchive.entity.vo.ESArchiveDataVO;
|
||||||
import com.jero.modules.activiti.process.esArchive.service.ProcessEsArchiveService;
|
import com.jero.modules.activiti.process.esArchive.service.ProcessEsArchiveService;
|
||||||
import com.jero.modules.activiti.process.esArchive.mapper.ProcessEsArchiveMapper;
|
import com.jero.modules.activiti.process.esArchive.mapper.ProcessEsArchiveMapper;
|
||||||
|
import com.jero.modules.activiti.process.esInitChange.entity.ProcessEsInitChange;
|
||||||
|
import com.jero.modules.activiti.process.esInitChange.entity.vo.InitChangeDataVO;
|
||||||
import com.jero.modules.activiti.service.ProcessAllService;
|
import com.jero.modules.activiti.service.ProcessAllService;
|
||||||
import com.jero.modules.activiti.service.ProcessNodeLinkService;
|
import com.jero.modules.activiti.service.ProcessNodeLinkService;
|
||||||
import com.jero.modules.activiti.service.ProcessNodeService;
|
import com.jero.modules.activiti.service.ProcessNodeService;
|
||||||
@@ -147,7 +149,6 @@ public class ProcessEsArchiveServiceImpl extends ServiceImpl<ProcessEsArchiveMap
|
|||||||
ESArchiveDataVO archiveData = new ESArchiveDataVO();
|
ESArchiveDataVO archiveData = new ESArchiveDataVO();
|
||||||
// 使用流程引擎根据taskId找到流程实例Id
|
// 使用流程引擎根据taskId找到流程实例Id
|
||||||
String processInstanceId = actFlowCommonService.getProcessInstanceIdByTaskId(taskId);
|
String processInstanceId = actFlowCommonService.getProcessInstanceIdByTaskId(taskId);
|
||||||
String processDefinitionId = actFlowCommonService.getProcessDefId(processInstanceId);
|
|
||||||
// 获取流程通用数据
|
// 获取流程通用数据
|
||||||
ProcessAll process = processAllService.getByProcessInstanceId(processInstanceId);
|
ProcessAll process = processAllService.getByProcessInstanceId(processInstanceId);
|
||||||
CommonVO commonVO = new CommonVO();
|
CommonVO commonVO = new CommonVO();
|
||||||
@@ -182,6 +183,27 @@ public class ProcessEsArchiveServiceImpl extends ServiceImpl<ProcessEsArchiveMap
|
|||||||
actFlowCommonService.updateApprovalInfo(commonVO, taskId, pass);
|
actFlowCommonService.updateApprovalInfo(commonVO, taskId, pass);
|
||||||
// 审批节点
|
// 审批节点
|
||||||
actFlowCommonService.completeTask(taskId, userId);
|
actFlowCommonService.completeTask(taskId, userId);
|
||||||
|
// 删除草稿
|
||||||
|
actFlowCommonService.removeDraft(commonVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ESArchiveDataVO getDraftData(String draftId, String businessId) {
|
||||||
|
ProcessDraft draft = actFlowCommonService.getExistDraft(draftId, businessId, ProcessTypeEnum.ES_ARCHIVE);
|
||||||
|
if (draft != null) {
|
||||||
|
ESArchiveDataVO archiveDataVO = new ESArchiveDataVO();
|
||||||
|
// 获取流程通用数据
|
||||||
|
CommonVO commonVO = actFlowCommonService.getDraftCommon(draft);
|
||||||
|
archiveDataVO.setCommon(commonVO);
|
||||||
|
// 获取流程实例数据
|
||||||
|
LambdaQueryWrapper<ProcessEsArchive> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.eq(ProcessEsArchive::getId, businessId);
|
||||||
|
lambdaQueryWrapper.eq(ProcessEsArchive::getDelFlag, YesOrNoEnum.NO.getValue());
|
||||||
|
ProcessEsArchive data = getOne(lambdaQueryWrapper);
|
||||||
|
archiveDataVO.setData(data);
|
||||||
|
return archiveDataVO;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+16
-1
@@ -9,6 +9,7 @@ import com.jero.modules.activiti.process.esEnable.entity.vo.ESEnableDataVO;
|
|||||||
import com.jero.modules.activiti.process.esEnable.service.ProcessEsEnableService;
|
import com.jero.modules.activiti.process.esEnable.service.ProcessEsEnableService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -45,7 +46,7 @@ public class ESEnableController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存到待办
|
* 保存到草稿
|
||||||
* @param enableData
|
* @param enableData
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "企标启用发起流程-保存")
|
@AutoLog(value = "企标启用发起流程-保存")
|
||||||
@@ -56,6 +57,20 @@ public class ESEnableController {
|
|||||||
return Result.OK();
|
return Result.OK();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 草稿办理
|
||||||
|
* @param draftId
|
||||||
|
* @param projectId
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "企标封存流程-草稿办理")
|
||||||
|
@ApiOperation(value="企标封存流程-草稿办理", notes="企标封存流程-草稿办理")
|
||||||
|
@GetMapping("/draftHandle")
|
||||||
|
@Translation
|
||||||
|
public Result<?> draftHandle(@RequestParam("draftId") @ApiParam("草稿Id") String draftId,
|
||||||
|
@RequestParam("projectId") @ApiParam("业务数据Id") String projectId) {
|
||||||
|
return Result.OK(enableService.getDraftData(draftId, projectId));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存到待办
|
* 保存到待办
|
||||||
* @param taskId
|
* @param taskId
|
||||||
|
|||||||
+1
@@ -19,4 +19,5 @@ public interface ProcessEsEnableService extends IService<ProcessEsEnable> {
|
|||||||
|
|
||||||
void approval(ESEnableDataVO enableData, boolean pass);
|
void approval(ESEnableDataVO enableData, boolean pass);
|
||||||
|
|
||||||
|
ESEnableDataVO getDraftData(String draftId, String projectId);
|
||||||
}
|
}
|
||||||
|
|||||||
+28
-41
@@ -13,6 +13,9 @@ import com.jero.modules.activiti.process.common.entity.ProcessDraft;
|
|||||||
import com.jero.modules.activiti.process.common.enums.ProcessType;
|
import com.jero.modules.activiti.process.common.enums.ProcessType;
|
||||||
import com.jero.modules.activiti.process.common.service.ActFlowCommonService;
|
import com.jero.modules.activiti.process.common.service.ActFlowCommonService;
|
||||||
import com.jero.modules.activiti.process.common.service.ProcessDraftService;
|
import com.jero.modules.activiti.process.common.service.ProcessDraftService;
|
||||||
|
import com.jero.modules.activiti.process.esArchive.entity.ProcessEsArchive;
|
||||||
|
import com.jero.modules.activiti.process.esEnable.entity.ProcessEsEnable;
|
||||||
|
import com.jero.modules.activiti.process.esEnable.entity.vo.ESEnableDataVO;
|
||||||
import com.jero.modules.activiti.process.esEnable.entity.ProcessEsEnable;
|
import com.jero.modules.activiti.process.esEnable.entity.ProcessEsEnable;
|
||||||
import com.jero.modules.activiti.process.esEnable.entity.vo.ESEnableDataVO;
|
import com.jero.modules.activiti.process.esEnable.entity.vo.ESEnableDataVO;
|
||||||
import com.jero.modules.activiti.process.esEnable.service.ProcessEsEnableService;
|
import com.jero.modules.activiti.process.esEnable.service.ProcessEsEnableService;
|
||||||
@@ -125,48 +128,11 @@ public class ProcessEsEnableServiceImpl extends ServiceImpl<ProcessEsEnableMappe
|
|||||||
@Override
|
@Override
|
||||||
public void saveToDraft(ESEnableDataVO enableDataVO) {
|
public void saveToDraft(ESEnableDataVO enableDataVO) {
|
||||||
CommonVO commonVO = enableDataVO.getCommon();
|
CommonVO commonVO = enableDataVO.getCommon();
|
||||||
String taskId = commonVO.getTaskId();
|
|
||||||
ProcessEsEnable esEnable = enableDataVO.getData();
|
ProcessEsEnable esEnable = enableDataVO.getData();
|
||||||
String projectId = esEnable.getId();
|
ProcessDraft existDraft = actFlowCommonService.getExistDraftAndRemove(commonVO, ProcessTypeEnum.ES_ARCHIVE);
|
||||||
if (StrUtil.isBlank(projectId)) {
|
if (existDraft != null) esEnable.setId(existDraft.getProjectId());
|
||||||
save(esEnable);
|
saveOrUpdate(esEnable);
|
||||||
} else {
|
actFlowCommonService.addDraft(commonVO, ProcessTypeEnum.ES_ENABLE, esEnable.getId());
|
||||||
// 先删后增
|
|
||||||
LambdaUpdateWrapper<ProcessDraft> draftWrapper = new LambdaUpdateWrapper<>();
|
|
||||||
draftWrapper.eq(ProcessDraft::getPrcType, ProcessTypeEnum.ES_ENABLE.getValue());
|
|
||||||
draftWrapper.eq(ProcessDraft::getCreateBy, UserUtils.getUserId());
|
|
||||||
draftWrapper.eq(ProcessDraft::getProjectId, projectId);
|
|
||||||
processDraftService.remove(draftWrapper);
|
|
||||||
saveOrUpdate(esEnable);
|
|
||||||
}
|
|
||||||
String id = esEnable.getId();
|
|
||||||
if (StrUtil.isBlank(taskId)) {
|
|
||||||
// 第一个节点点击保存没有taskId
|
|
||||||
List<ProcessDraft> draftList = new ArrayList<>();
|
|
||||||
ProcessDraft draft = new ProcessDraft();
|
|
||||||
draft.setProjectId(id);
|
|
||||||
draft.setPrcType(ProcessTypeEnum.ES_ENABLE.getValue());
|
|
||||||
draft.setPrcName(commonVO.getPrcName());
|
|
||||||
draft.setHandleText(commonVO.getCommitText()); // 流程审批信息-备注
|
|
||||||
draft.setHandleFile(commonVO.getCommitFile()); // 流程审批信息-附件
|
|
||||||
draft.setUserId(CurrentUserUtil.getId()); // 用户id
|
|
||||||
draftList.add(draft);
|
|
||||||
processDraftService.saveBatch(draftList);
|
|
||||||
} else {
|
|
||||||
String processInstanceId = actFlowCommonService.getProcessInstanceIdByTaskId(taskId);
|
|
||||||
List<ProcessDraft> draftList = new ArrayList<>();
|
|
||||||
ProcessDraft draft = new ProcessDraft();
|
|
||||||
draft.setProjectId(id);
|
|
||||||
draft.setProcessInstanceId(processInstanceId);
|
|
||||||
draft.setPrcName(commonVO.getPrcName());
|
|
||||||
draft.setPrcType(ProcessTypeEnum.ES_ENABLE.getValue());
|
|
||||||
draft.setTaskId(taskId); // 任务id
|
|
||||||
draft.setHandleText(commonVO.getCommitText()); // 流程审批信息-备注
|
|
||||||
draft.setHandleFile(commonVO.getCommitFile()); // 流程审批信息-附件
|
|
||||||
draft.setUserId(CurrentUserUtil.getId()); // 用户id
|
|
||||||
draftList.add(draft);
|
|
||||||
processDraftService.saveBatch(draftList);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startRunTask(ESEnableDataVO enableData) {
|
public void startRunTask(ESEnableDataVO enableData) {
|
||||||
@@ -215,6 +181,27 @@ public class ProcessEsEnableServiceImpl extends ServiceImpl<ProcessEsEnableMappe
|
|||||||
actFlowCommonService.updateApprovalInfo(commonVO, taskId, pass);
|
actFlowCommonService.updateApprovalInfo(commonVO, taskId, pass);
|
||||||
// 审批节点
|
// 审批节点
|
||||||
actFlowCommonService.completeTask(taskId, userId);
|
actFlowCommonService.completeTask(taskId, userId);
|
||||||
|
// 删除草稿
|
||||||
|
actFlowCommonService.removeDraft(commonVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ESEnableDataVO getDraftData(String draftId, String projectId) {
|
||||||
|
ProcessDraft draft = actFlowCommonService.getExistDraft(draftId, projectId, ProcessTypeEnum.ES_ENABLE);
|
||||||
|
if (draft != null) {
|
||||||
|
ESEnableDataVO enableDataVO = new ESEnableDataVO();
|
||||||
|
// 获取流程通用数据
|
||||||
|
CommonVO commonVO = actFlowCommonService.getDraftCommon(draft);
|
||||||
|
enableDataVO.setCommon(commonVO);
|
||||||
|
// 获取流程实例数据
|
||||||
|
LambdaQueryWrapper<ProcessEsEnable> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.eq(ProcessEsEnable::getId, projectId);
|
||||||
|
lambdaQueryWrapper.eq(ProcessEsEnable::getDelFlag, YesOrNoEnum.NO.getValue());
|
||||||
|
ProcessEsEnable data = getOne(lambdaQueryWrapper);
|
||||||
|
enableDataVO.setData(data);
|
||||||
|
return enableDataVO;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+15
@@ -9,6 +9,7 @@ import com.jero.modules.activiti.process.esRecheck.entity.vo.ESRecheckDataVO;
|
|||||||
import com.jero.modules.activiti.process.esRecheck.service.ProcessEsRecheckService;
|
import com.jero.modules.activiti.process.esRecheck.service.ProcessEsRecheckService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -68,6 +69,20 @@ public class ESRecheckController {
|
|||||||
return Result.OK(recheckService.getHandleData(taskId));
|
return Result.OK(recheckService.getHandleData(taskId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 草稿办理
|
||||||
|
* @param draftId
|
||||||
|
* @param projectId
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "企标复审流程-草稿办理")
|
||||||
|
@ApiOperation(value="企标复审流程-草稿办理", notes="企标复审流程-草稿办理")
|
||||||
|
@GetMapping("/draftHandle")
|
||||||
|
@Translation
|
||||||
|
public Result<?> draftHandle(@RequestParam("draftId") @ApiParam("草稿Id") String draftId,
|
||||||
|
@RequestParam("projectId") @ApiParam("业务数据Id") String projectId) {
|
||||||
|
return Result.OK(recheckService.getDraftData(draftId, projectId));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 同意
|
* 同意
|
||||||
*
|
*
|
||||||
|
|||||||
+2
@@ -18,4 +18,6 @@ public interface ProcessEsRecheckService extends IService<ProcessEsRecheck> {
|
|||||||
ESRecheckDataVO getHandleData(String taskId);
|
ESRecheckDataVO getHandleData(String taskId);
|
||||||
|
|
||||||
void approval(ESRecheckDataVO recheckData, boolean pass);
|
void approval(ESRecheckDataVO recheckData, boolean pass);
|
||||||
|
|
||||||
|
ESRecheckDataVO getDraftData(String draftId, String projectId);
|
||||||
}
|
}
|
||||||
|
|||||||
+27
-41
@@ -15,6 +15,8 @@ import com.jero.modules.activiti.process.common.service.ActFlowCommonService;
|
|||||||
import com.jero.modules.activiti.process.common.service.ProcessDraftService;
|
import com.jero.modules.activiti.process.common.service.ProcessDraftService;
|
||||||
|
|
||||||
import com.jero.modules.activiti.process.esArchive.entity.ProcessEsArchive;
|
import com.jero.modules.activiti.process.esArchive.entity.ProcessEsArchive;
|
||||||
|
import com.jero.modules.activiti.process.esArchive.entity.vo.ESArchiveDataVO;
|
||||||
|
import com.jero.modules.activiti.process.esInitChange.entity.ProcessEsInitChange;
|
||||||
import com.jero.modules.activiti.process.esRecheck.entity.ProcessEsRecheck;
|
import com.jero.modules.activiti.process.esRecheck.entity.ProcessEsRecheck;
|
||||||
import com.jero.modules.activiti.process.esRecheck.entity.vo.ESRecheckDataVO;
|
import com.jero.modules.activiti.process.esRecheck.entity.vo.ESRecheckDataVO;
|
||||||
import com.jero.modules.activiti.process.esRecheck.service.ProcessEsRecheckService;
|
import com.jero.modules.activiti.process.esRecheck.service.ProcessEsRecheckService;
|
||||||
@@ -114,48 +116,11 @@ public class ProcessEsRecheckServiceImpl extends ServiceImpl<ProcessEsRecheckMap
|
|||||||
@Override
|
@Override
|
||||||
public void saveToDraft(ESRecheckDataVO recheckData) {
|
public void saveToDraft(ESRecheckDataVO recheckData) {
|
||||||
CommonVO commonVO = recheckData.getCommon();
|
CommonVO commonVO = recheckData.getCommon();
|
||||||
String taskId = commonVO.getTaskId();
|
|
||||||
ProcessEsRecheck esRecheck = recheckData.getData();
|
ProcessEsRecheck esRecheck = recheckData.getData();
|
||||||
String projectId = esRecheck.getId();
|
ProcessDraft existDraft = actFlowCommonService.getExistDraftAndRemove(commonVO, ProcessTypeEnum.ES_RECHECK);
|
||||||
if (StrUtil.isBlank(projectId)) {
|
if (existDraft != null) esRecheck.setId(existDraft.getProjectId());
|
||||||
save(esRecheck);
|
saveOrUpdate(esRecheck);
|
||||||
} else {
|
actFlowCommonService.addDraft(commonVO, ProcessTypeEnum.ES_RECHECK, esRecheck.getId());
|
||||||
// 先删后增
|
|
||||||
LambdaUpdateWrapper<ProcessDraft> draftWrapper = new LambdaUpdateWrapper<>();
|
|
||||||
draftWrapper.eq(ProcessDraft::getPrcType, ProcessTypeEnum.ES_RECHECK.getValue());
|
|
||||||
draftWrapper.eq(ProcessDraft::getCreateBy, UserUtils.getUserId());
|
|
||||||
draftWrapper.eq(ProcessDraft::getProjectId, projectId);
|
|
||||||
processDraftService.remove(draftWrapper);
|
|
||||||
saveOrUpdate(esRecheck);
|
|
||||||
}
|
|
||||||
String id = esRecheck.getId();
|
|
||||||
if (StrUtil.isBlank(taskId)) {
|
|
||||||
// 第一个节点点击保存没有taskId
|
|
||||||
List<ProcessDraft> draftList = new ArrayList<>();
|
|
||||||
ProcessDraft draft = new ProcessDraft();
|
|
||||||
draft.setProjectId(id);
|
|
||||||
draft.setPrcType(ProcessTypeEnum.ES_RECHECK.getValue());
|
|
||||||
draft.setPrcName(commonVO.getPrcName());
|
|
||||||
draft.setHandleText(commonVO.getCommitText()); // 流程审批信息-备注
|
|
||||||
draft.setHandleFile(commonVO.getCommitFile()); // 流程审批信息-附件
|
|
||||||
draft.setUserId(CurrentUserUtil.getId()); // 用户id
|
|
||||||
draftList.add(draft);
|
|
||||||
processDraftService.saveBatch(draftList);
|
|
||||||
} else {
|
|
||||||
String processInstanceId = actFlowCommonService.getProcessInstanceIdByTaskId(taskId);
|
|
||||||
List<ProcessDraft> draftList = new ArrayList<>();
|
|
||||||
ProcessDraft draft = new ProcessDraft();
|
|
||||||
draft.setProjectId(id);
|
|
||||||
draft.setProcessInstanceId(processInstanceId);
|
|
||||||
draft.setPrcName(commonVO.getPrcName());
|
|
||||||
draft.setPrcType(ProcessTypeEnum.ES_RECHECK.getValue());
|
|
||||||
draft.setTaskId(taskId); // 任务id
|
|
||||||
draft.setHandleText(commonVO.getCommitText()); // 流程审批信息-备注
|
|
||||||
draft.setHandleFile(commonVO.getCommitFile()); // 流程审批信息-附件
|
|
||||||
draft.setUserId(CurrentUserUtil.getId()); // 用户id
|
|
||||||
draftList.add(draft);
|
|
||||||
processDraftService.saveBatch(draftList);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startRunTask(ESRecheckDataVO recheckData) {
|
public void startRunTask(ESRecheckDataVO recheckData) {
|
||||||
@@ -207,6 +172,27 @@ public class ProcessEsRecheckServiceImpl extends ServiceImpl<ProcessEsRecheckMap
|
|||||||
actFlowCommonService.updateApprovalInfo(commonVO, taskId, pass);
|
actFlowCommonService.updateApprovalInfo(commonVO, taskId, pass);
|
||||||
// 审批节点
|
// 审批节点
|
||||||
actFlowCommonService.completeTask(taskId, userId);
|
actFlowCommonService.completeTask(taskId, userId);
|
||||||
|
// 删除草稿
|
||||||
|
actFlowCommonService.removeDraft(commonVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ESRecheckDataVO getDraftData(String draftId, String businessId) {
|
||||||
|
ProcessDraft draft = actFlowCommonService.getExistDraft(draftId, businessId, ProcessTypeEnum.ES_ARCHIVE);
|
||||||
|
if (draft != null) {
|
||||||
|
ESRecheckDataVO recheckDataVO = new ESRecheckDataVO();
|
||||||
|
// 获取流程通用数据
|
||||||
|
CommonVO commonVO = actFlowCommonService.getDraftCommon(draft);
|
||||||
|
recheckDataVO.setCommon(commonVO);
|
||||||
|
// 获取流程实例数据
|
||||||
|
LambdaQueryWrapper<ProcessEsRecheck> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.eq(ProcessEsRecheck::getId, businessId);
|
||||||
|
lambdaQueryWrapper.eq(ProcessEsRecheck::getDelFlag, YesOrNoEnum.NO.getValue());
|
||||||
|
ProcessEsRecheck data = getOne(lambdaQueryWrapper);
|
||||||
|
recheckDataVO.setData(data);
|
||||||
|
return recheckDataVO;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user