Commit bb00b9c7 authored by xuzhang's avatar xuzhang

[fix][DOC]迁移类缺失问题修改

parent 5ae287fc
...@@ -16,7 +16,11 @@ import com.yonde.dex.dao.service.util.DxPageUtils; ...@@ -16,7 +16,11 @@ import com.yonde.dex.dao.service.util.DxPageUtils;
import com.yonde.dex.dfs.feign.FileManagerFeignService; import com.yonde.dex.dfs.feign.FileManagerFeignService;
import com.yonde.dex.dfs.vo.ObjFileLinkVO; import com.yonde.dex.dfs.vo.ObjFileLinkVO;
import com.yonde.dex.dfs.vo.RepoFileVO; import com.yonde.dex.dfs.vo.RepoFileVO;
import com.yonde.dex.dfs.vo.SiteCleanLogVO;
import com.yonde.dex.user.feign.DxUserInfoFeign; import com.yonde.dex.user.feign.DxUserInfoFeign;
import com.yonde.dex.utils.common.transfer.MinioTranser;
import com.yonde.dex.utils.common.transfer.properties.MinioProperties;
import com.yonde.dex.utils.common.utils.MinioUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
...@@ -117,8 +121,8 @@ public class ExtDocUtil { ...@@ -117,8 +121,8 @@ public class ExtDocUtil {
public InputStream obtainPrimaryFileInputStream(RepoFileVO fileVO) { public InputStream obtainPrimaryFileInputStream(RepoFileVO fileVO) {
InputStream inputStream = null; InputStream inputStream = null;
if (!ObjectUtils.isEmpty(fileVO)) { if (!ObjectUtils.isEmpty(fileVO)) {
// log.info("开始下载主内容======》" + fileVO.getId()); log.info("开始下载主内容======》" + fileVO.getId());
// RepoFileVO fileEntity = this.fileService.findFileInfoById(fileVO.getId()); RepoFileVO fileEntity = this.fileService.findFileInfoById(fileVO.getId());
// Site siteEntity = this.siteService.findByIsDefault(true); // Site siteEntity = this.siteService.findByIsDefault(true);
// if (Objects.isNull(fileEntity)) { // if (Objects.isNull(fileEntity)) {
// log.error("下载主内容失败!====》" + DxValutErrorCodeData.FILE_NOT_EXISTS); // log.error("下载主内容失败!====》" + DxValutErrorCodeData.FILE_NOT_EXISTS);
......
...@@ -5,7 +5,11 @@ import cn.hutool.core.map.MapUtil; ...@@ -5,7 +5,11 @@ import cn.hutool.core.map.MapUtil;
import com.yonde.dcs.core.constants.SignConstants; import com.yonde.dcs.core.constants.SignConstants;
import com.yonde.dex.dao.service.util.ApplicationContextUtil; import com.yonde.dex.dao.service.util.ApplicationContextUtil;
import com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO; import com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessSearchVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO; import com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessVO;
import com.yonde.dex.wfc.feign.api.WfcProcessFeign;
import com.yonde.dex.wfc.feign.api.WfcTaskFeign;
import lombok.SneakyThrows; import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.http.client.utils.CloneUtils; import org.apache.http.client.utils.CloneUtils;
...@@ -35,19 +39,18 @@ public class ExtWfcUtil { ...@@ -35,19 +39,18 @@ public class ExtWfcUtil {
*/ */
public static Map<String, String> getProcessTeam(Class clsObj, Long versionId, HashMap<String, String> signMap) { public static Map<String, String> getProcessTeam(Class clsObj, Long versionId, HashMap<String, String> signMap) {
//TODO //TODO
// IInstanceService processService = ApplicationContextUtil.getBean(IInstanceService.class); WfcProcessFeign processService = ApplicationContextUtil.getBean(WfcProcessFeign.class);
// WfProcessInstSearchVO searchVO = new WfProcessInstSearchVO(); DxWfProcessSearchVO searchVO = new DxWfProcessSearchVO();
// searchVO.setPboId(versionId); searchVO.setPboId(versionId);
// searchVO.setPboClass(clsObj.getCanonicalName()); searchVO.setPboClass(clsObj.getCanonicalName());
// Page<WfProcessInstVO> processList = processService.getProcessInstList(searchVO, 1, 100); Page<DxWfProcessVO> processList = processService.getProcessList(searchVO, 1, 100);
// if (Objects.isNull(processList) || CollectionUtils.isEmpty(processList.getContent())) { if (Objects.isNull(processList) || CollectionUtils.isEmpty(processList.getContent())) {
// log.error("[EXT流程]:根据pbo的versionId和cls类型未获取到团队成员:{}", versionId + clsObj.getCanonicalName()); log.error("[EXT流程]:根据pbo的versionId和cls类型未获取到团队成员:{}", versionId + clsObj.getCanonicalName());
// return new HashMap<>(); return new HashMap<>();
// } }
// WfProcessInstVO dxWfProcessVO = processList.getContent().get(0); DxWfProcessVO dxWfProcessVO = processList.getContent().get(0);
// String instId = dxWfProcessVO.getId(); String instId = dxWfProcessVO.getId();
// return getTaskParticipants(instId, clsObj, signMap); return getTaskParticipants(instId, clsObj, signMap);
return null;
} }
...@@ -60,24 +63,25 @@ public class ExtWfcUtil { ...@@ -60,24 +63,25 @@ public class ExtWfcUtil {
*/ */
public static Long getProcessTiZiId(Class clsObj, Long versionId) { public static Long getProcessTiZiId(Class clsObj, Long versionId) {
//TODO //TODO
// IInstanceService processService = ApplicationContextUtil.getBean(IInstanceService.class); WfcProcessFeign processService = ApplicationContextUtil.getBean(WfcProcessFeign.class);
// WfProcessInstSearchVO searchVO = new WfProcessInstSearchVO(); DxWfProcessSearchVO searchVO = new DxWfProcessSearchVO();
// searchVO.setPboId(versionId); searchVO.setPboId(versionId);
// searchVO.setPboClass(clsObj.getCanonicalName()); searchVO.setPboClass(clsObj.getCanonicalName());
// Page<WfProcessInstVO> processList = processService.getProcessInstList(searchVO, 1, 100); Page<DxWfProcessVO> processList = processService.getProcessList(searchVO, 1, 100);
// if (Objects.isNull(processList) || CollectionUtils.isEmpty(processList.getContent())) { if (Objects.isNull(processList) || CollectionUtils.isEmpty(processList.getContent())) {
// log.error("[EXT流程]:根据pbo的versionId和cls类型未获取到团队成员:{}", versionId + clsObj.getCanonicalName()); log.error("[EXT流程]:根据pbo的versionId和cls类型未获取到团队成员:{}", versionId + clsObj.getCanonicalName());
// return null; return null;
// } }
// WfProcessInstVO dxWfProcessVO = processList.getContent().get(0); DxWfProcessVO dxWfProcessVO = processList.getContent().get(0);
// String instId = dxWfProcessVO.getId(); // String instId = dxWfProcessVO.getId();
// DexWorkFlowService dexWorkFlowService = ApplicationContextUtil.getBean(DexWorkFlowService.class); // DexWorkFlowService dexWorkFlowService = ApplicationContextUtil.getBean(DexWorkFlowService.class);
// DxWfProcessInfoVO wfProcessInfoVO = dexWorkFlowService.getProcessInstSimpleDetailById(instId); // DxWfProcessInfoVO wfProcessInfoVO = dexWorkFlowService.getProcessInstSimpleDetailById(instId);
// List<DxWfProcessTaskVO> activities = wfProcessInfoVO.getHistoryInfo(); // List<DxWfProcessTaskVO> activities = wfProcessInfoVO.getHistoryInfo();
// DxWfProcessTaskVO resolver = activities.stream() WfcTaskFeign wfcTaskFeign = ApplicationContextUtil.getBean(WfcTaskFeign.class);
// .filter(wfProcessTaskVO -> wfProcessTaskVO.getName().equals("提资中") && ("通过".equals(wfProcessTaskVO.getResult()) || "提交审阅".equals(wfProcessTaskVO.getResult()) || "提交签审".equalsIgnoreCase(wfProcessTaskVO.getResult()))).findFirst().orElse(null); List<DxWfProcessTaskVO> activities = wfcTaskFeign.getHisTaskList(dxWfProcessVO.getId(),null, 1, Integer.MAX_VALUE).getContent();
// return Long.valueOf(resolver.getAssignee()); DxWfProcessTaskVO resolver = activities.stream()
return null; .filter(wfProcessTaskVO -> wfProcessTaskVO.getName().equals("提资中") && ("通过".equals(wfProcessTaskVO.getResult()) || "提交审阅".equals(wfProcessTaskVO.getResult()) || "提交签审".equalsIgnoreCase(wfProcessTaskVO.getResult()))).findFirst().orElse(null);
return Long.valueOf(resolver.getAssignee());
} }
...@@ -91,24 +95,26 @@ public class ExtWfcUtil { ...@@ -91,24 +95,26 @@ public class ExtWfcUtil {
@SneakyThrows @SneakyThrows
public static Map<String, String> getTaskParticipants(String processId, Class clsObj, HashMap<String, String> signMap) { public static Map<String, String> getTaskParticipants(String processId, Class clsObj, HashMap<String, String> signMap) {
//TODO //TODO
// Map<String, String> data = new HashMap<>(); Map<String, String> data = new HashMap<>();
// DexWorkFlowService dexWorkFlowService = ApplicationContextUtil.getBean(DexWorkFlowService.class); // DexWorkFlowService dexWorkFlowService = ApplicationContextUtil.getBean(DexWorkFlowService.class);
// DxWfProcessInfoVO wfProcessInfoVO = dexWorkFlowService.getProcessInstSimpleDetailById(processId); // DxWfProcessInfoVO wfProcessInfoVO = dexWorkFlowService.getProcessInstSimpleDetailById(processId);
// List<DxWfProcessTaskVO> activities = wfProcessInfoVO.getHistoryInfo(); // List<DxWfProcessTaskVO> activities = wfProcessInfoVO.getHistoryInfo();
// String dateStr = "";
// if (MapUtil.isEmpty(signMap)) { WfcTaskFeign wfcTaskFeign = ApplicationContextUtil.getBean(WfcTaskFeign.class);
// signMap = CloneUtils.cloneObject(SignConstants.SignNodeMap); List<DxWfProcessTaskVO> activities = wfcTaskFeign.getHisTaskList(processId,null, 1, Integer.MAX_VALUE).getContent();
// } String dateStr = "";
// for (Map.Entry<String, String> entry : signMap.entrySet()) { if (MapUtil.isEmpty(signMap)) {
// dateStr = new StringBuffer(entry.getValue()).reverse().toString(); signMap = CloneUtils.cloneObject(SignConstants.SignNodeMap);
// //节点参与人 }
// data.put(entry.getValue(), getResolverName(activities, entry.getKey())); for (Map.Entry<String, String> entry : signMap.entrySet()) {
// //节点时间 dateStr = new StringBuffer(entry.getValue()).reverse().toString();
// data.put(dateStr, getResolverData(activities, entry.getKey())); //节点参与人
// } data.put(entry.getValue(), getResolverName(activities, entry.getKey()));
// data.entrySet().removeIf(o -> org.springframework.util.StringUtils.isEmpty(o.getValue())); //节点时间
// return data; data.put(dateStr, getResolverData(activities, entry.getKey()));
return null; }
data.entrySet().removeIf(o -> org.springframework.util.StringUtils.isEmpty(o.getValue()));
return data;
} }
......
...@@ -6,8 +6,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -6,8 +6,7 @@ import com.alibaba.fastjson.JSONObject;
import com.yonde.dcs.common.vo.ExtInterfaceInfoLinkVO; import com.yonde.dcs.common.vo.ExtInterfaceInfoLinkVO;
import com.yonde.dcs.core.constants.Constants; import com.yonde.dcs.core.constants.Constants;
import com.yonde.dcs.core.factory.InternalInterfaceUtils; import com.yonde.dcs.core.factory.*;
import com.yonde.dcs.core.factory.OutdatedDocNotifyUtils;
import com.yonde.dcs.core.service.ExtDocService; import com.yonde.dcs.core.service.ExtDocService;
import com.yonde.dcs.core.util.ExtDocUtil; import com.yonde.dcs.core.util.ExtDocUtil;
import com.yonde.dcs.core.util.FileUtils; import com.yonde.dcs.core.util.FileUtils;
...@@ -15,6 +14,8 @@ import com.yonde.dcs.core.util.WorkFlowUtil; ...@@ -15,6 +14,8 @@ import com.yonde.dcs.core.util.WorkFlowUtil;
import com.yonde.dcs.core.word.ImportWordService; import com.yonde.dcs.core.word.ImportWordService;
import com.yonde.dcs.document.common.entity.vo.DxDocumentVO; import com.yonde.dcs.document.common.entity.vo.DxDocumentVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO; import com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessVO;
import com.yonde.dex.wfc.feign.api.WfcProcessFeign;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -46,8 +47,6 @@ public class ProcessDataUtils { ...@@ -46,8 +47,6 @@ public class ProcessDataUtils {
private ExtDocUtil extDocUtil; private ExtDocUtil extDocUtil;
@Autowired @Autowired
private WorkFlowUtil workFlowUtil; private WorkFlowUtil workFlowUtil;
// @Autowired
// private DexWorkFlowService dexWorkFlowService;
/** /**
* 单独处理过时文件通知单数据 * 单独处理过时文件通知单数据
...@@ -64,35 +63,36 @@ public class ProcessDataUtils { ...@@ -64,35 +63,36 @@ public class ProcessDataUtils {
public void processData(DxDocumentVO documentVo) { public void processData(DxDocumentVO documentVo) {
String subTypeName = documentVo.getSubTypeName(); String subTypeName = documentVo.getSubTypeName();
//todo //todo
// WfProcessInstVO DxWfProcessInstVO = workFlowUtil.getWfProcessInst(documentVo); DxWfProcessVO dxWfProcessVO = workFlowUtil.getWfProcessInst(documentVo);
// DxWfProcessInfoVO wfProcessInfoVO = dexWorkFlowService.getProcessInstDetailById(DxWfProcessInstVO.getId()); DxWfProcessInfoVO wfProcessInfoVO = workFlowUtil.getProcessInstDetail(dxWfProcessVO);
// switch (subTypeName) { // DxWfProcessInfoVO wfProcessInfoVO = wfcProcessFeign.getProcessInstDetailById(dxWfProcessVO.getId());
// case Constants.INTERNAL_INTERFACE: switch (subTypeName) {
// this.generateInterFaceWord(documentVo, new InterfaceInfoLinkVO(), wfProcessInfoVO); case Constants.INTERNAL_INTERFACE:
// break; this.generateInterFaceWord(documentVo, new ExtInterfaceInfoLinkVO(), wfProcessInfoVO);
// case Constants.CONTACTLIST: break;
// extDocService.getDocWord(documentVo, ContactListUtils.class, wfProcessInfoVO, "一"); case Constants.CONTACTLIST:
// break; extDocService.getDocWord(documentVo, ContactListUtils.class, wfProcessInfoVO, "一");
// case Constants.WORK_CONTACTLIST: break;
// extDocService.getDocWord(documentVo, WorkContactListUtils.class, wfProcessInfoVO, ""); case Constants.WORK_CONTACTLIST:
// break; extDocService.getDocWord(documentVo, WorkContactListUtils.class, wfProcessInfoVO, "");
// case Constants.DESIGN_CHANGE: break;
// extDocService.getDocWord(documentVo, DesignChangeUtils.class, wfProcessInfoVO, ""); case Constants.DESIGN_CHANGE:
// break; extDocService.getDocWord(documentVo, DesignChangeUtils.class, wfProcessInfoVO, "");
// case Constants.DESIGN_APPLICATION: break;
// extDocService.getDocWord(documentVo, DesignDocApplicatUtils.class, wfProcessInfoVO, ""); case Constants.DESIGN_APPLICATION:
// break; extDocService.getDocWord(documentVo, DesignDocApplicatUtils.class, wfProcessInfoVO, "");
// case Constants.DESIGN_ENTER: break;
// extDocService.getDocWord(documentVo, DesignEnterUtils.class, wfProcessInfoVO, ""); case Constants.DESIGN_ENTER:
// break; extDocService.getDocWord(documentVo, DesignEnterUtils.class, wfProcessInfoVO, "");
// case Constants.NCR: break;
// extDocService.getDocWord(documentVo, NCRUtils.class, wfProcessInfoVO, ""); case Constants.NCR:
// break; extDocService.getDocWord(documentVo, NCRUtils.class, wfProcessInfoVO, "");
// case Constants.DEN: break;
// //根据模板生成两张不同澄清单 case Constants.DEN:
// extDocService.getDocWord(documentVo, DENUtils.class, wfProcessInfoVO, ""); //根据模板生成两张不同澄清单
// break; extDocService.getDocWord(documentVo, DENUtils.class, wfProcessInfoVO, "");
// } break;
}
} }
/** /**
......
...@@ -99,7 +99,7 @@ public class WorkFlowUtil { ...@@ -99,7 +99,7 @@ public class WorkFlowUtil {
// TODO: xpc getProcessInstList方法不存在,根据逻辑改为getHisTaskList // TODO: xpc getProcessInstList方法不存在,根据逻辑改为getHisTaskList
// WfProcessInfoVO wfProcessInfo = this.instanceService.getProcessInstSimpleDetailById(wfProcessInstVO.getId()); // WfProcessInfoVO wfProcessInfo = this.instanceService.getProcessInstSimpleDetailById(wfProcessInstVO.getId());
// List<DxWfProcessTaskVO> historyInfoList = wfProcessInfo.getHistoryInfo(); // List<DxWfProcessTaskVO> historyInfoList = wfProcessInfo.getHistoryInfo();
Page<DxWfProcessTaskVO> taskList = wfcTaskFeign.getHisTaskList(wfProcessInstVO.getId(), null, 1, Integer.MAX_VALUE); List<DxWfProcessTaskVO> taskList = wfcTaskFeign.getHisTaskList(wfProcessInstVO.getId(), null, 1, Integer.MAX_VALUE).getContent();
List<String> checkResult = Arrays.asList("提交", "通过"); List<String> checkResult = Arrays.asList("提交", "通过");
Map<String, List<DxWfProcessTaskVO>> wfHistoryMap = taskList.stream().filter(p -> TaskStateEnum.COMPLETE.name().equals(p.getState()) && checkResult.contains(p.getResult())) Map<String, List<DxWfProcessTaskVO>> wfHistoryMap = taskList.stream().filter(p -> TaskStateEnum.COMPLETE.name().equals(p.getState()) && checkResult.contains(p.getResult()))
.sorted(Comparator.comparing(DxWfProcessTaskVO::getEndTime).reversed()) .sorted(Comparator.comparing(DxWfProcessTaskVO::getEndTime).reversed())
......
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