Commit 394aaeb0 authored by wangqiang's avatar wangqiang

修改bug:创建文档时重新又启一新流程

parent de24f3cd
...@@ -118,13 +118,17 @@ public class DocumentEvent { ...@@ -118,13 +118,17 @@ public class DocumentEvent {
*/ */
public void updateDocListener(DxDocumentVO documentVO) { public void updateDocListener(DxDocumentVO documentVO) {
DxDocumentVO docObjFileLinks = extDocUtil.findDocObjFileLinks(documentVO.getId()); DxDocumentVO docObjFileLinks = extDocUtil.findDocObjFileLinks(documentVO.getId());
//20240820 将documentVO的状态重新赋值给docObjFileLinks,因为docObjFileLinks是从数据库中查询出的状态是待审阅,而documentVO的状态是审阅中,processUpdateData方法需要是审阅中才能执行。
docObjFileLinks.setState(documentVO.getState());
processUpdateData(docObjFileLinks); processUpdateData(docObjFileLinks);
String subTypeName = documentVO.getSubTypeName(); String subTypeName = documentVO.getSubTypeName();
//处理过时文件通知单 //处理过时文件通知单
if (Constants.OUTDATED_NOTIFY.equals(subTypeName)) { if (Constants.OUTDATED_NOTIFY.equals(subTypeName)) {
processDataUtils.processOutdatedDocNotify(docObjFileLinks); processDataUtils.processOutdatedDocNotify(docObjFileLinks);
} }
BeanUtils.copyProperties(docObjFileLinks, documentVO); // 修改bug,原BeanUtils.copyProperties(docObjFileLinks, documentVO)方法会将数据库中的状态覆盖了documentVO的状态,导致又启了一个新流程。
documentVO.setObjFileLinks(docObjFileLinks.getObjFileLinks());
//BeanUtils.copyProperties(docObjFileLinks, documentVO);
} }
/** /**
...@@ -174,7 +178,7 @@ public class DocumentEvent { ...@@ -174,7 +178,7 @@ public class DocumentEvent {
String outWordFilePath = Constants.MERGER_FILE_ABSOLUTE_PATH + documentVo.getSubTypeName() + "\\" + documentVo.getNumber() + "\\" + Constants.MERGER_SOURCE + "\\"; String outWordFilePath = Constants.MERGER_FILE_ABSOLUTE_PATH + documentVo.getSubTypeName() + "\\" + documentVo.getNumber() + "\\" + Constants.MERGER_SOURCE + "\\";
//生成特定的文档目录,保存生成的word文件 //生成特定的文档目录,保存生成的word文件
FileUtil.mkdir(outWordFilePath); FileUtil.mkdir(outWordFilePath);
Class<?> clazz = Class.forName("com.inet.pdm.factory.InternalInterfaceUtils"); Class<?> clazz = Class.forName("com.yonde.dcs.core.factory.InternalInterfaceUtils");
Method settingDataMethod = clazz.getMethod("settingData", DxDocumentVO.class, ExtInterfaceInfoLinkVO.class, DxWfProcessInfoVO.class); Method settingDataMethod = clazz.getMethod("settingData", DxDocumentVO.class, ExtInterfaceInfoLinkVO.class, DxWfProcessInfoVO.class);
JSONObject jsonObject = (JSONObject) settingDataMethod.invoke(SpringUtil.getBean(InternalInterfaceUtils.class), documentVo, infoLinkVO, wfProcessInfoVO); JSONObject jsonObject = (JSONObject) settingDataMethod.invoke(SpringUtil.getBean(InternalInterfaceUtils.class), documentVo, infoLinkVO, wfProcessInfoVO);
String generateWordFilePath = FileUtils.generateWordFile(outWordFilePath); String generateWordFilePath = FileUtils.generateWordFile(outWordFilePath);
......
...@@ -111,6 +111,7 @@ public class WorkContactListUtils { ...@@ -111,6 +111,7 @@ public class WorkContactListUtils {
//获取参与者 //获取参与者
List<DxWfActivityVO> activities = wfProcessInfoVO.getActivityInfo(); List<DxWfActivityVO> activities = wfProcessInfoVO.getActivityInfo();
if (!CollectionUtils.isEmpty(activities)) { if (!CollectionUtils.isEmpty(activities)) {
//todo wq 断点这里报空指针
//写入签名数据 //写入签名数据
jsonObject.put("bz_photo", extDocService.getSignImage(activities, SignConstants.SIGN_KEY_PREPARED)); jsonObject.put("bz_photo", extDocService.getSignImage(activities, SignConstants.SIGN_KEY_PREPARED));
jsonObject.put("bz_date", extDocService.getEndDate(activities, SignConstants.SIGN_KEY_PREPARED)); jsonObject.put("bz_date", extDocService.getEndDate(activities, SignConstants.SIGN_KEY_PREPARED));
......
...@@ -770,7 +770,7 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService { ...@@ -770,7 +770,7 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
if (!CollectionUtils.isEmpty(taskList)) { if (!CollectionUtils.isEmpty(taskList)) {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
for (DxWfProcessTaskVO wf : taskList) { for (DxWfProcessTaskVO wf : taskList) {
Class<?> clazz = Class.forName("com.inet.pdm.factory.NCRSCUtils"); Class<?> clazz = Class.forName("com.yonde.dcs.core.factory.NCRSCUtils");
Method settingDataMethod = clazz.getMethod("settingData", DxDocumentVO.class, DxWfProcessTaskVO.class, JSONObject.class); Method settingDataMethod = clazz.getMethod("settingData", DxDocumentVO.class, DxWfProcessTaskVO.class, JSONObject.class);
jsonObject = (JSONObject) settingDataMethod.invoke(SpringUtil.getBean(NCRSCUtils.class), documentVO, wf, jsonObject); jsonObject = (JSONObject) settingDataMethod.invoke(SpringUtil.getBean(NCRSCUtils.class), documentVO, wf, jsonObject);
} }
......
...@@ -729,7 +729,7 @@ public class ExtDocServiceImpl implements ExtDocService { ...@@ -729,7 +729,7 @@ public class ExtDocServiceImpl implements ExtDocService {
@Override @Override
public void getDocWord(DxDocumentVO documentVo, Class classType, DxWfProcessInfoVO wfProcessInfoVO, String fileName) { public void getDocWord(DxDocumentVO documentVo, Class classType, DxWfProcessInfoVO wfProcessInfoVO, String fileName) {
try { try {
Class<?> clazz = Class.forName("com.inet.pdm.factory." + documentVo.getSubTypeName() + "Utils"); Class<?> clazz = Class.forName("com.yonde.dcs.core.factory." + documentVo.getSubTypeName() + "Utils");
Method settingDataMethod = clazz.getMethod("settingData", DxDocumentVO.class, DxWfProcessInfoVO.class); Method settingDataMethod = clazz.getMethod("settingData", DxDocumentVO.class, DxWfProcessInfoVO.class);
settingDataMethod.invoke(SpringUtil.getBean(classType), documentVo, wfProcessInfoVO); settingDataMethod.invoke(SpringUtil.getBean(classType), documentVo, wfProcessInfoVO);
log.info("生成word文件内容结束===="); log.info("生成word文件内容结束====");
...@@ -771,7 +771,7 @@ public class ExtDocServiceImpl implements ExtDocService { ...@@ -771,7 +771,7 @@ public class ExtDocServiceImpl implements ExtDocService {
@Override @Override
public void generateDocWordSign(DxDocumentVO documentVo, Class classType, DxWfProcessInfoVO wfProcessInfoVO, String fileName) { public void generateDocWordSign(DxDocumentVO documentVo, Class classType, DxWfProcessInfoVO wfProcessInfoVO, String fileName) {
try { try {
Class<?> clazz = Class.forName("com.inet.pdm.factory." + documentVo.getSubTypeName() + "Utils"); Class<?> clazz = Class.forName("com.yonde.dcs.core.factory." + documentVo.getSubTypeName() + "Utils");
Method settingDataMethod = clazz.getMethod("settingData", DxDocumentVO.class, DxWfProcessInfoVO.class); Method settingDataMethod = clazz.getMethod("settingData", DxDocumentVO.class, DxWfProcessInfoVO.class);
settingDataMethod.invoke(SpringUtil.getBean(classType), documentVo, wfProcessInfoVO); settingDataMethod.invoke(SpringUtil.getBean(classType), documentVo, wfProcessInfoVO);
log.info("签名----生成word文件内容结束===="); log.info("签名----生成word文件内容结束====");
......
...@@ -107,7 +107,7 @@ public class ProcessDataUtils { ...@@ -107,7 +107,7 @@ public class ProcessDataUtils {
String outWordFilePath = Constants.MERGER_FILE_ABSOLUTE_PATH + documentVo.getSubTypeName() + "\\" + documentVo.getNumber() + "\\"; String outWordFilePath = Constants.MERGER_FILE_ABSOLUTE_PATH + documentVo.getSubTypeName() + "\\" + documentVo.getNumber() + "\\";
//生成特定的文档目录,保存生成的word文件 //生成特定的文档目录,保存生成的word文件
FileUtil.mkdir(outWordFilePath); FileUtil.mkdir(outWordFilePath);
Class<?> clazz = Class.forName("com.inet.pdm.factory.InternalInterfaceUtils"); Class<?> clazz = Class.forName("com.yonde.dcs.core.factory.InternalInterfaceUtils");
Method settingDataMethod = clazz.getMethod("settingData", DxDocumentVO.class, ExtInterfaceInfoLinkVO.class, DxWfProcessInfoVO.class); Method settingDataMethod = clazz.getMethod("settingData", DxDocumentVO.class, ExtInterfaceInfoLinkVO.class, DxWfProcessInfoVO.class);
JSONObject jsonObject = (JSONObject) settingDataMethod.invoke(SpringUtil.getBean(InternalInterfaceUtils.class), documentVo, infoLinkVO, wfProcessInfoVO); JSONObject jsonObject = (JSONObject) settingDataMethod.invoke(SpringUtil.getBean(InternalInterfaceUtils.class), documentVo, infoLinkVO, wfProcessInfoVO);
//生成word文件方法 //生成word文件方法
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment