Commit 4c272f49 authored by wangqiang's avatar wangqiang

1.将2.1代码获取流程实例逻辑进行修改,适配4.1获取历史流程实例逻辑(2.x是从DxWfActivityVO获取流程实例信息,现修改为DxWfProcess…

1.将2.1代码获取流程实例逻辑进行修改,适配4.1获取历史流程实例逻辑(2.x是从DxWfActivityVO获取流程实例信息,现修改为DxWfProcessTaskVO获取流程实例);2.修改bug(获取monio的bucketId)
parent c97c619c
......@@ -403,4 +403,9 @@ public class Constants {
* 外部技术联系单
*/
public static final String EXT_CONTACT = "ExtContactList";
/**
* app 内部名称
*/
public static final String APPLICATION_INNER_NAME="dcs-doc";
}
......@@ -12,6 +12,7 @@ import com.yonde.dcs.document.common.entity.vo.DxDocumentVO;
import com.yonde.dex.dfs.vo.ObjFileLinkVO;
import com.yonde.dex.wfc.common.vo.DxWfActivityVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
......@@ -92,7 +93,8 @@ public class ContactListUtils {
//校验技术联系单是否有内容附件
this.checkObjFileLinks(jsonObject, v.getObjFileLinks(), "");
//获取参与者
List<DxWfActivityVO> activities = wfProcessInfoVO.getActivityInfo();
// List<DxWfActivityVO> activities = wfProcessInfoVO.getActivityInfo();
List<DxWfProcessTaskVO> activities = wfProcessInfoVO.getHistoryInfo();
if (!CollectionUtils.isEmpty(activities)) {
//写入签名数据
jsonObject.put("bz_photo", extDocService.getSignImage(activities, SignConstants.SIGN_KEY_PREPARED));
......
......@@ -23,6 +23,7 @@ import com.yonde.dex.dao.service.util.DxPageUtils;
import com.yonde.dex.dfs.vo.ObjFileLinkVO;
import com.yonde.dex.wfc.common.vo.DxWfActivityVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
......@@ -94,7 +95,7 @@ public class DENUtils {
jsonObject.put("remark", (String) dynamicAttrs.get("remark"));
//页数
jsonObject.put("pages",v.getDxDocumentExpand().getAttachPages());
List<DxWfActivityVO> activities = wfProcessInfoVO.getActivityInfo();
List<DxWfProcessTaskVO> activities = wfProcessInfoVO.getHistoryInfo();
if (!CollectionUtils.isEmpty(activities)) {
//写入签名数据
jsonObject.put("bz_photo", extDocService.getSignImage(activities, SignConstants.SIGN_KEY_PREPARED));
......
......@@ -22,6 +22,7 @@ import com.yonde.dex.basedata.entity.data.DxPageImpl;
import com.yonde.dex.dao.service.util.DxPageUtils;
import com.yonde.dex.wfc.common.vo.DxWfActivityVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
......@@ -129,7 +130,7 @@ public class DesignChangeUtils {
jsonObject.put("noselect1", "\u00A3");
}
//获取参与者
List<DxWfActivityVO> activities = wfProcessInfoVO.getActivityInfo();
List<DxWfProcessTaskVO> activities = wfProcessInfoVO.getHistoryInfo();
if (!CollectionUtils.isEmpty(activities)) {
//写入签名数据
jsonObject.put("bz_photo", extDocService.getSignImage(activities, SignConstants.SIGN_KEY_PREPARED));
......
......@@ -97,7 +97,7 @@ public class DesignDocApplicatUtils {
List<DesignDocAppPojo> designDocAppPojos = this.searchSendFormLink(v);
jsonObject.put("appFileLists", designDocAppPojos);
//获取参与者
List<DxWfActivityVO> activities = wfProcessInfoVO.getActivityInfo();
List<DxWfProcessTaskVO> activities = wfProcessInfoVO.getHistoryInfo();
Map<String, List<DxWfProcessTaskVO>> wfInfo = workFlowUtil.getWfInfo(v);
if (!CollectionUtils.isEmpty(activities)) {
//写入签名数据
......
......@@ -11,6 +11,7 @@ import com.yonde.dcs.document.common.entity.vo.DxDocumentVO;
import com.yonde.dex.wfc.common.vo.DxWfActivityVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
......@@ -67,7 +68,7 @@ public class DesignEnterUtils {
//页数
jsonObject.put("pages",v.getDxDocumentExpand().getAttachPages());
//获取参与者
List<DxWfActivityVO> activities = wfProcessInfoVO.getActivityInfo();
List<DxWfProcessTaskVO> activities = wfProcessInfoVO.getHistoryInfo();
if (!CollectionUtils.isEmpty(activities)) {
//写入签名数据
jsonObject.put("bz_photo", extDocService.getSignImage(activities, SignConstants.SIGN_KEY_PREPARED));
......
......@@ -121,17 +121,16 @@ public class InternalInterfaceUtils {
List<ObjFileLinkVO> informingVOObjFileLinks = informingVO.getObjFileLinks();
this.checkInforObjFileLinks(jsonObject, informingVOObjFileLinks);
//todo 获取参与者
List<DxWfActivityVO> activities = wfProcessInfoVO.getActivityInfo();
// List<DxWfActivityVO> activities = wfProcessInfoVO.getActivityInfo();
List<DxWfProcessTaskVO> activities = wfProcessInfoVO.getHistoryInfo();
if (!CollectionUtils.isEmpty(activities)) {
for (DxWfActivityVO wf : activities) {
if (SignConstants.SIGN_KEY_PREPARED.equals(wf.getTaskName())) {
List<DxWfProcessTaskVO> taskList = wf.getTaskList();
for (DxWfProcessTaskVO wfPro : taskList) {
for (DxWfProcessTaskVO wf : activities) {
if (SignConstants.SIGN_KEY_PREPARED.equals(wf.getName())) {
//编制且为提交时,把编制人填写备注的属性,写入word文档
if (SignConstants.WfRoutingList.contains(wfPro.getResult())) {
jsonObject.put("decription", ObjectUtils.isEmpty(wfPro.getComments()) ? "" : wfPro.getComments().get(0));
}
if (SignConstants.WfRoutingList.contains(wf.getResult())) {
jsonObject.put("decription", ObjectUtils.isEmpty(wf.getComments()) ? "" : wf.getComments().get(0));
}
}
}
//写入签名数据
......
......@@ -22,6 +22,7 @@ import com.yonde.dex.dao.service.util.DxPageUtils;
import com.yonde.dex.dfs.vo.ObjFileLinkVO;
import com.yonde.dex.wfc.common.vo.DxWfActivityVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
......@@ -170,7 +171,8 @@ public class NCRUtils {
//页数
jsonObject.put("pages", v.getDxDocumentExpand().getAttachPages());
//获取参与者
List<DxWfActivityVO> activities = wfProcessInfoVO.getActivityInfo();
// List<DxWfActivityVO> activities = wfProcessInfoVO.getActivityInfo();
List<DxWfProcessTaskVO> activities = wfProcessInfoVO.getHistoryInfo();
if (!CollectionUtils.isEmpty(activities)) {
//写入签名数据
jsonObject.put("bz_photo", extDocService.getSignImage(activities, SignConstants.SIGN_KEY_PREPARED));
......
......@@ -364,18 +364,16 @@ public class TechnicalFileUtils {
//填充校核、审核、审定内容的多选框
this.settingContentData(jsonObject, doc);
//todo 填充设计者名字
List<DxWfActivityVO> activities = wfProcessInfoVO.getActivityInfo();
// List<DxWfActivityVO> activities = wfProcessInfoVO.getActivityInfo();
List<DxWfProcessTaskVO> activities = wfProcessInfoVO.getHistoryInfo();
//获取参与者
if (!CollectionUtils.isEmpty(activities)) {
//打印总体室备注
for (DxWfActivityVO wf : activities) {
if (SignConstants.ZTSSignTaskList.contains(wf.getTaskName())) {
List<DxWfProcessTaskVO> taskList = wf.getTaskList();
for (DxWfProcessTaskVO wfPro : taskList) {
for (DxWfProcessTaskVO wf : activities) {
if (SignConstants.ZTSSignTaskList.contains(wf.getName())) {
//总体室且为通过时,把编制人填写备注的属性,写入word文档
if (SignConstants.WfRoutingList.contains(wfPro.getResult())) {
jsonObject.put("decription", ObjectUtils.isEmpty(wfPro.getComments()) ? "" : wfPro.getComments().get(0));
}
if (SignConstants.WfRoutingList.contains(wf.getResult())) {
jsonObject.put("decription", ObjectUtils.isEmpty(wf.getComments()) ? "" : wf.getComments().get(0));
}
}
}
......@@ -498,7 +496,8 @@ public class TechnicalFileUtils {
List<ExtAuditRecordCardVO> interfaceHQList = this.interAndSpecialData(documentVO, jsonObject, INTERFACE_SIGN_NAME);
//定义接口会签或者专项审查集合
List<DxWfProcessVarVO> wfProcessVarVOList = new ArrayList<>();
List<DxWfActivityVO> activities = wfProcessInfoVO.getActivityInfo();
// List<DxWfActivityVO> activities = wfProcessInfoVO.getActivityInfo();
List<DxWfProcessTaskVO> activities = wfProcessInfoVO.getHistoryInfo();
if (!CollectionUtils.isEmpty(activities)) {
//写入签名数据
jsonObject.put("sh_photo", extDocService.getSignImage(activities, SignConstants.SIGN_KEY_JKHQ));
......@@ -559,7 +558,8 @@ public class TechnicalFileUtils {
JSONObject jsonObject = new JSONObject();
List<ExtAuditRecordCardVO> auditRecordRecursionList = this.interAndSpecialData(documentVO, jsonObject, AUDIT_SIGN_NAME);
//定义接口会签或者专项审查集合
List<DxWfActivityVO> activities = wfProcessInfoVO.getActivityInfo();
// List<DxWfActivityVO> activities = wfProcessInfoVO.getActivityInfo();
List<DxWfProcessTaskVO> activities = wfProcessInfoVO.getHistoryInfo();
if (!CollectionUtils.isEmpty(activities)) {
//专项审查签字
jsonObject.put("sc_photo", extDocService.getSignImage(activities, SignConstants.SIGN_KEY_ZXSC));
......@@ -781,7 +781,8 @@ public class TechnicalFileUtils {
if (Constants.PRINCIPLE_DRAWINGS.equals(subTypeName) || Constants.LAYOUT_DRAWINGS.equals(subTypeName) || Constants.PART_DRAWINGS.equals(subTypeName)) {
Map<String, String> map = new HashMap();
//原理布置图、零件图
List<DxWfActivityVO> activities = wfProcessInfoVO.getActivityInfo();
// List<DxWfActivityVO> activities = wfProcessInfoVO.getActivityInfo();
List<DxWfProcessTaskVO> activities = wfProcessInfoVO.getHistoryInfo();
if (!CollectionUtils.isEmpty(activities)) {
//写入签名数据
map.put("SJPHOTO", extDocService.getSignImage(activities, SignConstants.SIGN_KEY_PREPARED));
......@@ -911,11 +912,11 @@ public class TechnicalFileUtils {
* @param activityName
* @return
*/
private String getMultiEndDate(List<DxWfActivityVO> activities, String activityName, Long userId,
private String getMultiEndDate(List<DxWfProcessTaskVO> activities, String activityName, Long userId,
int number) {
List<String> list = new ArrayList<>();
for (DxWfActivityVO wf : activities) {
if (wf.getTaskName().equals(activityName)) {
for (DxWfProcessTaskVO wf : activities) {
if (wf.getName().equals(activityName)) {
list = getMultiActivityEndDate(wf, userId);
}
}
......@@ -929,21 +930,17 @@ public class TechnicalFileUtils {
/**
* 获取环节所有执行者,以,隔开
*
* @param activity
* @param wf
* @return
*/
private List<String> getMultiActivityEndDate(DxWfActivityVO activity, Long userId) {
private List<String> getMultiActivityEndDate(DxWfProcessTaskVO wf, Long userId) {
List<String> list = new ArrayList<>();
List<DxWfProcessTaskVO> taskList = activity.getTaskList();
SimpleDateFormat dateFm = new SimpleDateFormat("yyyy-MM-dd");
if (!CollectionUtils.isEmpty(taskList)) {
for (DxWfProcessTaskVO wf : taskList) {
String assignee = wf.getAssignee();
if (Long.parseLong(assignee) == userId && wf.getState().equals(TaskStateEnum.COMPLETE.name()) && (SignConstants.WfResultList.contains(wf.getResult()))) {
Date endDate = wf.getEndTime();
list.add(dateFm.format(endDate).replace("-", "."));
}
}
return list;
}
return null;
......
......@@ -12,6 +12,7 @@ import com.yonde.dcs.document.common.entity.vo.DxDocumentVO;
import com.yonde.dex.wfc.common.vo.DxWfActivityVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
......@@ -109,7 +110,8 @@ public class WorkContactListUtils {
//页数
jsonObject.put("pages", v.getDxDocumentExpand().getAttachPages());
//获取参与者
List<DxWfActivityVO> activities = wfProcessInfoVO.getActivityInfo();
// List<DxWfActivityVO> activities = wfProcessInfoVO.getActivityInfo();
List<DxWfProcessTaskVO> activities = wfProcessInfoVO.getHistoryInfo();
if (!CollectionUtils.isEmpty(activities)) {
//todo wq 断点这里报空指针
//写入签名数据
......
......@@ -6,6 +6,7 @@ import com.yonde.dcs.document.common.entity.vo.DxDocumentVO;
import com.yonde.dcs.entity.po.ExtAtlasDrawingLink;
import com.yonde.dex.wfc.common.vo.DxWfActivityVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
......@@ -116,24 +117,25 @@ public interface ExtDocService {
/**
* 获取签名图片
* 获取签名图片(4.1新)
*
* @param activities
* @param dxWfProcessTaskVO
* @param activityName
* @return
*/
// TODO: xpc 将WfTaskDefinitionVO改为DxWfActivityVO
String getSignImage(List<DxWfActivityVO> activities, String activityName);
String getSignImage(List<DxWfProcessTaskVO> dxWfProcessTaskVO, String activityName);
/**
* 获取签名日期
* 获取签名日期(4.1新)
*
* @param activities
* @param dxWfProcessTaskVO
* @param activityName
* @return
*/
// TODO: xpc 将WfTaskDefinitionVO改为DxWfActivityVO
String getEndDate(List<DxWfActivityVO> activities, String activityName);
String getEndDate(List<DxWfProcessTaskVO> dxWfProcessTaskVO, String activityName);
Boolean validate(DxDocumentVO documentVO);
......
......@@ -59,6 +59,7 @@ import org.apache.http.client.utils.CloneUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.domain.Page;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
......@@ -913,9 +914,11 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
// TODO: xpc 此方法不存在 getProcessInstDetailById(processId),改为wfcActivityFeign.getActivities()
// DxWfProcessInfoVO wfProcessInfoVO = dexWorkFlowService.getProcessInstDetailById(processId);
// List<WfTaskDefinitionVO> activities = wfProcessInfoVO.getActivityInfo();
List<DxWfActivityVO> activities = wfcActivityFeign.getActivities(context.getProcessId(), context.getProcessDefId());
// List<DxWfActivityVO> activities = wfcActivityFeign.getActivities(context.getProcessId(), context.getProcessDefId());
Page<DxWfProcessTaskVO> DxWfProcessTaskVOPage = wfcTaskFeign.getHisTaskList(context.getProcessId(), null, 0, 0);
Map<String, Object> dynamicAttrs = documentVO.getDynamicAttrs();
if (!org.springframework.util.CollectionUtils.isEmpty(activities)) {
if (!org.springframework.util.CollectionUtils.isEmpty(DxWfProcessTaskVOPage.getContent())) {
List<DxWfProcessTaskVO> activities = DxWfProcessTaskVOPage.getContent();
//申请审核
dynamicAttrs.replace("appReviewer", this.getUserName(activities, SignConstants.SIGN_KEY_SQSH));
dynamicAttrs.replace("appReviewerDate", extDocService.getEndDate(activities, SignConstants.SIGN_KEY_SQSH));
......@@ -928,9 +931,9 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
}
// TODO: xpc WfTaskDefinitionVO改为DxWfActivityVO
public String getUserName(List<DxWfActivityVO> activities, String activityName) {
for (DxWfActivityVO wf : activities) {
if (wf.getTaskName().equals(activityName)) {
public String getUserName(List<DxWfProcessTaskVO> activities, String activityName) {
for (DxWfProcessTaskVO wf : activities) {
if (wf.getName().equals(activityName)) {
return getActivityUserName(wf);
}
}
......@@ -941,10 +944,8 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
* 获取用户名称及用户id
*/
// TODO: xpc WfTaskDefinitionVO改为DxWfActivityVO
public String getActivityUserName(DxWfActivityVO activity) {
public String getActivityUserName(DxWfProcessTaskVO wf) {
String str = "";
List<DxWfProcessTaskVO> taskList = activity.getTaskList();
for (DxWfProcessTaskVO wf : taskList) {
if (wf.getState().equals(TaskStateEnum.COMPLETE.name()) && (SignConstants.WfResultList.contains(wf.getResult()))) {
//获取用户名称和id
String userName = wf.getAssigneeName();
......@@ -952,7 +953,6 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
DxUserInfoVO userVO = (DxUserInfoVO) userService.get(Long.parseLong(userId));
str = userVO.getUserAccount();
}
}
return str;
}
......
......@@ -43,12 +43,13 @@ import com.yonde.dex.dfs.vo.RepoFileVO;
import com.yonde.dex.dfs.vo.view.FileDownLoadInfoVO;
import com.yonde.dex.dict.feign.DictDataFeignService;
import com.yonde.dex.dict.service.vo.DictDataVO;
import com.yonde.dex.feign.info.DxApplicationFeignService;
import com.yonde.dex.user.common.vo.DxUserInfoVO;
import com.yonde.dex.user.feign.DxUserInfoFeign;
import com.yonde.dex.user.feign.SwitchUserService;
import com.yonde.dex.version.plugin.common.entity.DxVersionVO;
import com.yonde.dex.version.plugin.core.service.VersionService;
import com.yonde.dex.version.plugin.entities.DxVersion;
import com.yonde.dex.vo.info.DxApplicationVO;
import com.yonde.dex.wfc.common.enums.TaskStateEnum;
import com.yonde.dex.wfc.common.vo.DxWfActivityVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO;
......@@ -140,6 +141,9 @@ public class ExtDocServiceImpl implements ExtDocService {
@Autowired
private SwitchUserService changeUserHelper;
@Autowired
DxApplicationFeignService feignService;
@Override
@Transactional
public DxDocumentVO reviseDocVersion(Long id, ExtReviseVersionVO reviseVersionVO) {
......@@ -588,6 +592,8 @@ public class ExtDocServiceImpl implements ExtDocService {
DxObjFileUtils.addFile(documentVo, fileVO, fileType);
}
/**
* 上传附件(事件专用上传附件)
*
......@@ -613,7 +619,8 @@ public class ExtDocServiceImpl implements ExtDocService {
// multipartFile = new MockMultipartFile("file", fileName + ".pdf",
// Constants.CONTENT_TYPE_PDF, inputStreamPdf);
// }
RepoFileVO field = fileManagerService.uploadFile(multipartFile, Long.valueOf(Constants.BUCKET_NAME));
RepoFileVO field = fileManagerService.uploadFile(multipartFile,getBucketId());
if (field == null) {
log.error("文件上传失败!");
} else {
......@@ -806,25 +813,71 @@ public class ExtDocServiceImpl implements ExtDocService {
}
/**
* 获取图片名称
* 获取图片名称 (2.1旧)
*
* @param activities
* @param activityName
* @return
*/
// TODO: xpc 将WfTaskDefinitionVO改为DxWfActivityVO
// @Override
// public String getSignImage(List<DxWfActivityVO> activities, String activityName) {
// for (DxWfActivityVO wf : activities) {
// if (wf.getTaskName().equals(activityName)) {
// return getActivityUserName(wf);
// }
// }
// return " ";
// }
/**
* 获取图片名称 (4.1新)
*
* @param activities
* @param activityName
* @return
*/
@Override
public String getSignImage(List<DxWfActivityVO> activities, String activityName) {
for (DxWfActivityVO wf : activities) {
if (wf.getTaskName().equals(activityName)) {
public String getSignImage(List<DxWfProcessTaskVO> activities, String activityName) {
for (DxWfProcessTaskVO wf : activities) {
if (wf.getName().equals(activityName)) {
return getActivityUserName(wf);
}
}
return " ";
}
// TODO: xpc 将WfTaskDefinitionVO改为DxWfActivityVO
@Override
public String getEndDate(List<DxWfProcessTaskVO> activities, String activityName) {
for (DxWfProcessTaskVO wf : activities) {
if (wf.getName().equals(activityName)) {
return Optional.ofNullable(getActiveEndDate(wf)).orElse("");
}
}
return " ";
}
/**
* 获取用户名称及用户id(4.1新)
*/
// TODO: xpc 将WfTaskDefinitionVO改为DxWfActivityVO
public String getActivityUserName(DxWfProcessTaskVO wf) {
String str = " ";
if (wf.getState().equals(TaskStateEnum.COMPLETE.name()) && (SignConstants.WfResultList.contains(wf.getResult()))) {
//获取用户名称和id
String userName = wf.getAssigneeName();
String userId = wf.getAssignee();
DxUserInfoVO userVO = (DxUserInfoVO) userService.get(Long.parseLong(userId));
str = userVO.getUserAccount() + ".png";
}
return str;
}
/**
* 获取用户名称及用户id
* 获取用户名称及用户id(2.x旧)
*/
// TODO: xpc 将WfTaskDefinitionVO改为DxWfActivityVO
public String getActivityUserName(DxWfActivityVO activity) {
......@@ -842,27 +895,18 @@ public class ExtDocServiceImpl implements ExtDocService {
return str;
}
/**
* 获取某个环节结束时间
* 获取某个环节结束时间(2.x旧)
*
* @param activities
* @param activityName
* @return
*/
// TODO: xpc 将WfTaskDefinitionVO改为DxWfActivityVO
@Override
public String getEndDate(List<DxWfActivityVO> activities, String activityName) {
for (DxWfActivityVO wf : activities) {
if (wf.getTaskName().equals(activityName)) {
return Optional.ofNullable(getActiveEndDate(wf)).orElse("");
}
}
return " ";
}
/**
* 修改后的处理获取日期
* 修改后的处理获取日期(2.1旧)
*
* @param activity
* @return
......@@ -883,6 +927,24 @@ public class ExtDocServiceImpl implements ExtDocService {
return date;
}
/**
* 修改后的处理获取日期(4.1新)
*
* @param wf
* @return
*/
// TODO: xpc 将WfTaskDefinitionVO改为DxWfActivityVO
private String getActiveEndDate(DxWfProcessTaskVO wf) {
String date = "";
SimpleDateFormat dateFm = new SimpleDateFormat("yyyy-MM-dd");
if (wf.getState().equals(TaskStateEnum.COMPLETE.name()) && (SignConstants.WfResultList.contains(wf.getResult()))) {
return dateFm.format(wf.getEndTime()).replace(".", "-");
}
return date;
}
/**
* 获取升版的图册图纸
*
......@@ -905,4 +967,13 @@ public class ExtDocServiceImpl implements ExtDocService {
return resultList;
}
public Long getBucketId(){
DxApplicationVO applicationVO = feignService.findApplicationByInnerName(Constants.APPLICATION_INNER_NAME);
if(!ObjectUtils.isEmpty(applicationVO)){
return Long.valueOf(applicationVO.getBucketId());
}
return null;
}
}
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