Commit 3f96fec0 authored by wei's avatar wei 🎱

文档类型创建即发布

parent d4046a48
......@@ -2,6 +2,9 @@ package com.inet.dcs.document.core.constants;
import com.inet.dcs.document.core.util.ResourceHelper;
import java.util.HashMap;
import java.util.Map;
/**
* @author xfchai
* @ClassName Constants.java
......@@ -147,6 +150,10 @@ public class Constants {
* 已发放
*/
public static final String RELEASED = "released";
/**
* 已发放
*/
public static final String RELEASE = "release";
/**
* 文档-图纸-已发布
*/
......@@ -427,4 +434,31 @@ public class Constants {
* app 内部名称
*/
public static final String APPLICATION_DOC_INNER_NAME ="dcs-doc";
/**
* 部分文档类型无流程
*/
public static final Map<String, String> DOCUMENT_TYPE_MAP = new HashMap<String, String>() {{
put("OutdatedDocNotify", "过时文件通知");
put("BidProcessReport", "招标过程报告");
put("CommentsDoc", "招标文件评审意见");
put("BiddingFile", "招标文件");
put("SingleSourceDoc", "单一来源采购文件");
put("NegotiationDoc", "竞争性谈判文件");
put("InquiryOrder", "询价采购单");
put("PrototypeFile", "样机竞优文件");
put("ComparisonDoc", "比质比价文件");
put("OtherResponseDoc", "其他响应文件");
put("BiddingDocument", "投标文件");
put("CompletReport", "完工报告");
put("WitnessRecord", "见证记录");
put("SupervisionRecord", "监造记录");
put("ContractAcceptMeeting", "合同验收会议纪要");
put("InstallAcceptRecord", "安装调试验收记录");
put("UnpackAcceptRecord", "开箱验收记录");
put("SourceAcceptMeeting", "源地验收会议纪要");
put("PreInspectMeeting", "开工前检查会议纪要");
put("PotSupplierQuestion", "潜在供方调查表");
put("EngineeOther", "其他");
}};
}
......@@ -411,4 +411,15 @@ public class DocumentEvent {
}
return false;
}
/**
* 创建即发布
* @param documentVO
*/
public void changeDocumentStatus(DxDocumentVO documentVO) {
String subTypeName = documentVO.getSubTypeName();
if (Constants.DOCUMENT_TYPE_MAP.containsKey(subTypeName)) {
documentService.changeStatus(documentVO.getId(), Constants.RELEASE, true);
}
}
}
......@@ -5,12 +5,12 @@ import cn.hutool.core.io.FileUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
import com.inet.dcs.document.common.vo.ExtAtlasDrawingLinkVO;
import com.inet.dcs.document.core.constants.Constants;
import com.inet.dcs.document.core.event.DocumentEvent;
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.constants.Constants;
import com.yonde.dex.basedata.data.search.SearchItem;
import com.yonde.dex.basedata.data.search.SearchItems;
import com.yonde.dex.basedata.data.search.SearchQueryBuilder;
......@@ -69,7 +69,15 @@ public class ExtDxDocumentServiceImpl<V extends DxDocumentVO> extends DocumentSe
@Override
public void beforeUpdate(Collection<V> target, Collection<V> origin) {
for (V v : target) {
//documentEvent.updateDocListener(v);
documentEvent.updateDocListener(v);
}
}
@Override
public void postSave(Collection<V> target) {
// 创建即发布
for (V v : target) {
documentEvent.changeDocumentStatus(v);
}
}
......
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