fix(bug): 临时提交
This commit is contained in:
+5
-8
@@ -1,11 +1,7 @@
|
|||||||
package com.jero.modules.activiti.process.esinspectrectify.service.impl;
|
package com.jero.modules.activiti.process.esinspectrectify.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.jero.modules.activiti.entity.ProcessAll;
|
import com.jero.modules.activiti.entity.ProcessAll;
|
||||||
import com.jero.modules.activiti.process.esinspectrectify.entity.ProcessEsInspectRectify;
|
|
||||||
import com.jero.modules.activiti.process.esinspectrectify.service.IProcessEsInspectRectifyService;
|
|
||||||
import com.jero.modules.activiti.service.WorkCenterService;
|
import com.jero.modules.activiti.service.WorkCenterService;
|
||||||
import com.jero.modules.activiti.util.SpringContextUtil;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -27,10 +23,11 @@ public class EsInspectRectifyFlow implements WorkCenterService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void changeToDraft(ProcessAll processAll) {
|
public void changeToDraft(ProcessAll processAll) {
|
||||||
IProcessEsInspectRectifyService processEsInspectRectifyService = SpringContextUtil.getBean(IProcessEsInspectRectifyService.class);
|
|
||||||
// 删除业务表数据
|
// 删除业务表数据
|
||||||
processEsInspectRectifyService.remove(
|
/** IProcessEsInspectRectifyService processEsInspectRectifyService = SpringContextUtil.getBean(IProcessEsInspectRectifyService.class);
|
||||||
new LambdaQueryWrapper<ProcessEsInspectRectify>()
|
* processEsInspectRectifyService.remove(
|
||||||
.eq(ProcessEsInspectRectify::getProjectId, processAll.getProjectId()));
|
* new LambdaQueryWrapper<ProcessEsInspectRectify>()
|
||||||
|
* .eq(ProcessEsInspectRectify::getProjectId, processAll.getProjectId()));
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+36
@@ -124,6 +124,42 @@ public class EsInspectRectifyFlowServiceImpl implements IEsInspectRectifyFlowSer
|
|||||||
|
|
||||||
// 新增流程实例节点关联用户表
|
// 新增流程实例节点关联用户表
|
||||||
processNodeLinkService.saveNodeUserLink(processInstance.getProcessDefinitionId(), processInstance.getId(), listToString(map));
|
processNodeLinkService.saveNodeUserLink(processInstance.getProcessDefinitionId(), processInstance.getId(), listToString(map));
|
||||||
|
|
||||||
|
// 保存新草稿(强制撤回用)
|
||||||
|
saveDraft(esInspectReportFlowVO, processAll, processApprovalRecord);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void saveDraft(EsInspectRectifyFlowVO esInspectReportFlowVO, ProcessAll processAll, ProcessApprovalRecord processApprovalRecord) {
|
||||||
|
ProcessDraft processDraft = new ProcessDraft();
|
||||||
|
// 属性拷贝
|
||||||
|
BeanUtils.copyProperties(processAll, processDraft);
|
||||||
|
processDraft.setCreateBy("");
|
||||||
|
processDraft.setId("");
|
||||||
|
processDraft.setUpdateBy("");
|
||||||
|
Date dateNow = new Date();
|
||||||
|
processDraft.setCreateTime(dateNow);
|
||||||
|
processDraft.setUpdateBy("");
|
||||||
|
processDraft.setUpdateTime(dateNow);
|
||||||
|
// 保存草稿表
|
||||||
|
if (StringUtils.isNotBlank(processApprovalRecord.getCommitFile())){
|
||||||
|
processDraft.setHandleFile(processApprovalRecord.getCommitFile());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(processApprovalRecord.getCommitText())){
|
||||||
|
processDraft.setHandleText(processApprovalRecord.getCommitText());
|
||||||
|
}
|
||||||
|
if (!Objects.isNull(processAll.getDueTime())){
|
||||||
|
processDraft.setProcessDueDate(processAll.getDueTime());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(processAll.getPrcMes())){
|
||||||
|
processDraft.setProcessDescription(processAll.getPrcMes());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(esInspectReportFlowVO.getInfoJsonStr())){
|
||||||
|
processDraft.setInfoJsonStr(esInspectReportFlowVO.getInfoJsonStr());
|
||||||
|
}
|
||||||
|
processDraft.setUserId(processApprovalRecord.getUserId());
|
||||||
|
processDraft.setId(String.valueOf(SnowflakeUtils.snowflake()).replaceFirst("\\{", "{\"revocation\": true,"));
|
||||||
|
processDraft.setSaveSource("3");
|
||||||
|
processDraftService.save(processDraft);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleBusinessData(EsInspectRectifyFlowVO esInspectReportFlowVO) {
|
private void handleBusinessData(EsInspectRectifyFlowVO esInspectReportFlowVO) {
|
||||||
|
|||||||
Reference in New Issue
Block a user