Commit 59c2174b authored by wei's avatar wei 🎱

会议纪要,外部收文

parent 66253206
......@@ -516,4 +516,18 @@ public class Constants {
put("DesignReview", "设计评审和确认");
put("DesignInterface", "设计接口");
}};
/**
* 会议纪要流程模板
*/
public static final Map<String, String> MINUTES_MEETING_MAP = new HashMap<String, String>() {{
put("MinutesMeeting", "会议纪要");
}};
/**
* 外部收文流程模板
*/
public static final Map<String, String> INCOMING_DISPATCHES_MAP = new HashMap<String, String>() {{
put("IncomingDispatches", "外部收文");
}};
}
......@@ -11,7 +11,10 @@ import com.inet.dcs.document.core.excel.ExtCatalogExcelVO;
import com.inet.dcs.document.core.service.ExtDxDocumentFolderService;
import com.inet.dcs.document.core.service.expand.ExtDxDocumentService;
import com.inet.dcs.document.core.util.*;
import com.yonde.dcs.plan.common.vo.ExtSupplierManageVO;
import com.yonde.dcs.document.common.entity.vo.DxDocumentVO;
import com.yonde.dcs.document.core.repository.DocumentRepository;
import com.yonde.dcs.document.core.service.impl.DocumentServiceImpl;
import com.yonde.dcs.document.entity.po.DxDocument;
import com.yonde.dex.basedata.data.search.SearchItem;
import com.yonde.dex.basedata.data.search.SearchItems;
import com.yonde.dex.basedata.data.search.SearchQueryBuilder;
......@@ -23,21 +26,17 @@ import com.yonde.dex.dfs.feign.FileManagerFeignService;
import com.yonde.dex.dfs.vo.RepoFileVO;
import com.yonde.dex.wfc.feign.api.WfcProcessFeign;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.io.FileInputStream;
import java.util.*;
import com.yonde.dcs.document.common.entity.vo.DxDocumentVO;
import org.springframework.beans.factory.annotation.Autowired;
import lombok.extern.slf4j.Slf4j;
import com.yonde.dcs.document.core.repository.DocumentRepository;
import com.yonde.dcs.document.entity.po.DxDocument;
import com.yonde.dcs.document.core.service.impl.DocumentServiceImpl;
import org.springframework.web.multipart.MultipartFile;
/**
* @description: DxDocument-ServiceImpl
* @author: dexadmin
......@@ -50,7 +49,6 @@ public class ExtDxDocumentServiceImpl<V extends DxDocumentVO> extends DocumentSe
public static final String BEAN_NAME = "documentServiceImpl";
public static final String EXT_DOC_WF = "ExtDocWF";
@Autowired
private ExtDxDocumentFolderService dxDocumentFolderService;
......@@ -98,14 +96,50 @@ public class ExtDxDocumentServiceImpl<V extends DxDocumentVO> extends DocumentSe
throw new DxBusinessException("500", "该对象不是编制状态");
}
String subTypeName = dxDocumentVO.getSubTypeName();
String processDefKey = "";
if (Constants.EXT_DOC_WF_MAP.containsKey(subTypeName)) {
processDefKey = EXT_DOC_WF;
String processDefKey = this.getProcessDefKey(subTypeName);
log.info("startWorkflow.processDefKey:{}", processDefKey);
if (StringUtils.isBlank(processDefKey)) {
throw new DxBusinessException("500", "该对象没有配置流程模板");
}
wfcProcessFeign.startProcessByKey(processDefKey, dxDocumentVO);
return this.changeStatus(dxDocumentVO.getId(), Constants.SUBMIT_REVIEWING, true);
}
private String getProcessDefKey(String subTypeName) {
log.info("getProcessDefKey.subTypeName:{}", subTypeName);
if (Constants.EXT_DOC_WF_MAP.containsKey(subTypeName)) {
return "ExtDocWF";
}
if (Constants.MINUTES_MEETING_MAP.containsKey(subTypeName)) {
return "meetingWF";
}
if (Constants.INCOMING_DISPATCHES_MAP.containsKey(subTypeName)) {
return "IncomingDispatchesWF";
}
if (Constants.EXT_DOC_WF_MAP.containsKey(subTypeName)) {
return "ExtDocWF";
}
if (Constants.EXT_DOC_WF_MAP.containsKey(subTypeName)) {
return "ExtDocWF";
}
if (Constants.EXT_DOC_WF_MAP.containsKey(subTypeName)) {
return "ExtDocWF";
}
if (Constants.EXT_DOC_WF_MAP.containsKey(subTypeName)) {
return "ExtDocWF";
}
if (Constants.EXT_DOC_WF_MAP.containsKey(subTypeName)) {
return "ExtDocWF";
}
if (Constants.EXT_DOC_WF_MAP.containsKey(subTypeName)) {
return "ExtDocWF";
}
if (Constants.EXT_DOC_WF_MAP.containsKey(subTypeName)) {
return "ExtDocWF";
}
return null;
}
@Override
public Map<String, DxPageImpl> getDocAndFolder(Long dxContextId, Long parentId,Long dxDocumentFolderId) {
Map<String, DxPageImpl> result = new HashMap<>();
......
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