fix: 企标修改流程新增文件不生成docx
This commit is contained in:
+19
-3
@@ -98,6 +98,11 @@ public class ProcessESChangeEndListener implements ExecutionListener {
|
|||||||
@Resource
|
@Resource
|
||||||
private IBusProcessModelHisService busProcessModelHisService;
|
private IBusProcessModelHisService busProcessModelHisService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ILawsCommonService lawsCommonService;
|
||||||
|
|
||||||
|
private static final String MODULE_VALUE = TableNameEnum.ENTERPRISE_STANDARDS.getValue();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void notify(DelegateExecution delegateExecution) {
|
public void notify(DelegateExecution delegateExecution) {
|
||||||
log.info("企标更改流程结束 监听执行器开始执行");
|
log.info("企标更改流程结束 监听执行器开始执行");
|
||||||
@@ -111,12 +116,23 @@ public class ProcessESChangeEndListener implements ExecutionListener {
|
|||||||
// 根据标准编号找到标准Id
|
// 根据标准编号找到标准Id
|
||||||
LawsEnterpriseStandard es = esService.getOne(new LambdaQueryWrapper<LawsEnterpriseStandard>()
|
LawsEnterpriseStandard es = esService.getOne(new LambdaQueryWrapper<LawsEnterpriseStandard>()
|
||||||
.eq(LawsEnterpriseStandard::getStandardNumber, standNo));
|
.eq(LawsEnterpriseStandard::getStandardNumber, standNo));
|
||||||
|
Map<String, Object> esDataMap = lawsCommonService.getByIdAndModule(es.getId(), MODULE_VALUE, "2", null);
|
||||||
// 转换成Map 然后走commonEdit接口
|
// 转换成Map 然后走commonEdit接口
|
||||||
Map<String, Object> parameterMap = new HashMap<>();
|
Map<String, Object> parameterMap = new HashMap<>();
|
||||||
this.buildMap(parameterMap, change);
|
this.buildMap(parameterMap, change);
|
||||||
// 替换相应文件的url
|
String onEditFileId = change.getOnEditFile();
|
||||||
if (StrUtil.isNotBlank(change.getReplaceFileId()) && StrUtil.isNotBlank(change.getOnEditFile())) {
|
String replaceFileId = change.getReplaceFileId();
|
||||||
busProcessModelHisService.replaceFile(change.getOnEditFile(), change.getReplaceFileId());
|
if (StrUtil.isNotBlank(onEditFileId)) {
|
||||||
|
if (StrUtil.isNotBlank(replaceFileId)) {
|
||||||
|
busProcessModelHisService.replaceFile(onEditFileId, replaceFileId);
|
||||||
|
} else {
|
||||||
|
String fileId = busProcessModelHisService.saveProcessFileToOss(onEditFileId);
|
||||||
|
String existFileIds = (String) esDataMap.get(FieldCommon.FILE_PUBLISH_OF_ORIGINAL);
|
||||||
|
if (StrUtil.isNotBlank(existFileIds)) {
|
||||||
|
fileId += "," + existFileIds;
|
||||||
|
}
|
||||||
|
parameterMap.put(FieldCommon.FILE_PUBLISH_OF_ORIGINAL, fileId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 保存修改的文件
|
// 保存修改的文件
|
||||||
commonService.commonEdit(parameterMap);
|
commonService.commonEdit(parameterMap);
|
||||||
|
|||||||
Reference in New Issue
Block a user