Commit 4036e65d authored by pchxue's avatar pchxue

配置文件修改

parent cd6d2dcc
// TODO: 2024/8/1 4.1 LifecycleManageBaseVO 这个类不存在
//package com.yonde.dcs.document.common.vo;
//
//import com.fasterxml.jackson.annotation.JsonTypeInfo;
//import com.yonde.dex.basedata.entity.annotation.ModelConfigProperty;
//import com.yonde.dex.basedata.entity.annotation.RelationProperty;
//import lombok.Data;
//import lombok.EqualsAndHashCode;
//import lombok.ToString;
//
//import java.util.Map;
//
///**
// * @description:
// * @version: 0
// * @date: 2021-09-15 02:27:18
// **/
//@Data
//@EqualsAndHashCode(callSuper = true)
//@ToString(callSuper = true)
//@JsonTypeInfo(
// use = JsonTypeInfo.Id.CLASS,
// property = "dxClassname",
// defaultImpl = ECRVO.class
//)
//@ModelConfigProperty(syncES = true)
//
//public class ECRVO extends LifecycleManageBaseVO<ECRVO> {
// /**LifecycleManageBaseVO
// * 升版后对象集合
// */
// @RelationProperty(refProperty = "source")
// private List<ExtUpgradeObjLinkVO> sourceExtUpgradeObjLink;
//
// /**
// * 原因说明
// */
// private String causeDescript;
//
// /**
// * 更改原因
// */
// private String changeReason;
//
// /**
// * 改前对象集合
// */
// @RelationProperty(refProperty = "source")
// private List<ExtOriginObjLinkVO> sourceExtOriginObjLink;
//
//
// private Map<String, Object> dynamicAttrs;
//
//
//}
//
package com.yonde.dcs.document.common.vo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.yonde.dex.basedata.entity.annotation.DexEmbedded;
import com.yonde.dex.basedata.entity.annotation.ModelConfigProperty;
import com.yonde.dex.basedata.entity.vo.DxIdVOEmbeddable;
import com.yonde.dex.basedata.entity.vo.IdOnlyVO;
import com.yonde.dex.basedata.entity.vo.IdVO;
import com.yonde.dex.linkdata.plugin.common.DxLinkDataVOEmbeddable;
import com.yonde.dex.logicdelete.plugin.common.entity.DxLogicDeleteVOEmbeddable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.util.Map;
/**
* @description:
* @version: 0
* @date: 2021-09-24 03:02:10
**/
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@JsonTypeInfo(
use = JsonTypeInfo.Id.CLASS,
property = "dxClassname",
defaultImpl = ExtOriginObjLinkVO.class
)
@ModelConfigProperty(syncES = true)
public class ExtOriginObjLinkVO extends IdOnlyVO implements IdVO {
/**
* dao扩展对象
*/
@DexEmbedded()
@JsonIgnore
private DxIdVOEmbeddable dxIdEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLogicDeleteVOEmbeddable dxLogicDeleteEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLinkDataVOEmbeddable<DxDocumentVO, DxDocumentVO> dxLinkDataEmbeddable;
// TODO: 2024/8/1 ECRVO这个类不存在
// /**
// * 更改请求
// */
// @ReferenceProperty(baseProperty = "sourceId")
// private ECRVO source;
// TODO: 2024/8/1 DxIterationVO这个类不存在
// /**
// * 版本基类
// */
// @ReferenceProperty(baseProperty = "targetId")
// @VersionProperty(curVersion = VersionRelationType.NONE, refVersion = VersionRelationType.VERSION)
// private DxIterationVO target;
/**
* source对应的属性
*/
private Long sourceId;
/**
* sourceId对应的类型
*/
private String sourceIdType;
/**
* target对应的属性
*/
private Long targetId;
/**
* targetId对应的类型
*/
private String targetIdType;
private Map<String, Object> dynamicAttrs;
/**
* 关联描述
*/
private String linkDescript;
}
package com.yonde.dcs.document.common.vo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.yonde.dex.basedata.entity.annotation.DexEmbedded;
import com.yonde.dex.basedata.entity.annotation.ModelConfigProperty;
import com.yonde.dex.basedata.entity.annotation.ReferenceProperty;
import com.yonde.dex.basedata.entity.annotation.VersionProperty;
import com.yonde.dex.basedata.entity.data.VersionRelationType;
import com.yonde.dex.basedata.entity.vo.DxIdVOEmbeddable;
import com.yonde.dex.basedata.entity.vo.IdOnlyVO;
import com.yonde.dex.basedata.entity.vo.IdVO;
import com.yonde.dex.linkdata.plugin.common.DxLinkDataVOEmbeddable;
import com.yonde.dex.linkdata.plugin.common.DxLinkDataVOHolder;
import com.yonde.dex.logicdelete.plugin.common.entity.DxLogicDeleteVOEmbeddable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.util.Map;
/**
* @author: xfchai
* @description: 计划文档关系实体VO
* @version: 1
* @date: 2021-09-03 04:42:12
**/
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@JsonTypeInfo(
use = JsonTypeInfo.Id.CLASS,
property = "dxClassname",
defaultImpl = ExtPlanDocLinkVO.class
)
@ModelConfigProperty(syncES = true)
public class ExtPlanDocLinkVO extends IdOnlyVO implements IdVO, DxLinkDataVOHolder<DxDocumentVO, DxDocumentVO> {
/**
* dao扩展对象
*/
@DexEmbedded()
@JsonIgnore
private DxIdVOEmbeddable dxIdEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLogicDeleteVOEmbeddable dxLogicDeleteEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLinkDataVOEmbeddable<DxDocumentVO, DxDocumentVO> dxLinkDataEmbeddable;
/**
* 文档
*/
@ReferenceProperty(baseProperty = "targetId")
@VersionProperty(curVersion = VersionRelationType.NONE, refVersion = VersionRelationType.MASTER)
private DxDocumentVO target;
/**
* 计划
*/
@ReferenceProperty(baseProperty = "sourceId")
@VersionProperty(curVersion = VersionRelationType.NONE, refVersion = VersionRelationType.MASTER)
private ExtPlanVO source;
/**
* target对应的属性
*/
private Long targetId;
/**
* targetId对应的类型
*/
private String targetIdType;
/**
* source对应的属性
*/
private Long sourceId;
/**
* sourceId对应的类型
*/
private String sourceIdType;
private Map<String, Object> dynamicAttrs;
}
package com.yonde.dcs.document.common.vo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.yonde.dex.basedata.entity.annotation.*;
import com.yonde.dex.basedata.entity.data.VersionRelationType;
import com.yonde.dex.basedata.entity.vo.DxIdVOEmbeddable;
import com.yonde.dex.basedata.entity.vo.IdOnlyVO;
import com.yonde.dex.context.plugin.common.entity.DxContextVOEmbeddable;
import com.yonde.dex.context.plugin.common.entity.DxContextVOHolder;
import com.yonde.dex.dfs.vo.ObjFileLinkVO;
import com.yonde.dex.lcycle.plugin.common.entity.DxLifecycleManageBaseVOEmbeddable;
import com.yonde.dex.lcycle.plugin.common.entity.DxLifecycleManageBaseVOHolder;
import com.yonde.dex.linkdata.plugin.common.DxLinkDataVOEmbeddable;
import com.yonde.dex.logicdelete.plugin.common.entity.DxLogicDeleteVOEmbeddable;
import com.yonde.dex.logicdelete.plugin.common.entity.DxLogicDeleteVOHolder;
import com.yonde.dex.secretcode.plugin.common.entity.DxSecretVOEmbeddable;
import com.yonde.dex.secretcode.plugin.common.entity.DxSecretVOHolder;
import com.yonde.dex.version.plugin.common.entity.DxIterationVOEmbeddable;
import com.yonde.dex.version.plugin.common.entity.DxIterationVOHolder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* @author: xfchai
* @description: 计划实体
* @version: 2
* @date: 2021-09-03 02:32:41
**/
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@JsonTypeInfo(
use = JsonTypeInfo.Id.CLASS,
property = "dxClassname",
defaultImpl = ExtPlanVO.class
)
@ModelConfigProperty(syncES = true)
public class ExtPlanVO extends IdOnlyVO implements DxIterationVOHolder<ExtPlanVO>, DxLogicDeleteVOHolder, DxLifecycleManageBaseVOHolder, DxSecretVOHolder, DxContextVOHolder {
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxContextVOEmbeddable dxContextEmbeddable;
/**
* dao扩展对象
*/
@DexEmbedded()
@JsonIgnore
private DxIdVOEmbeddable dxIdEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLogicDeleteVOEmbeddable dxLogicDeleteEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLinkDataVOEmbeddable<ExtPlanVO, ExtPlanVO> dxLinkDataEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxIterationVOEmbeddable<ExtPlanVO> dxIterationEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLifecycleManageBaseVOEmbeddable dxLifecycleManageBaseEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxSecretVOEmbeddable dxSecretEmbeddable;
/**
* 业务计划类型
*/
private String businessPlanType;
/**
* 反馈类型
*/
private String feedbackType;
/**
* 开始时间
*/
private Date startTime;
/**
* 关联附件集合
*/
@RelationProperty(refProperty = "source")
private List<ObjFileLinkVO> objFileLinks;
/**
* 父Id
*/
private Long parentId;
/**
* 子集合
*/
private List<ExtPlanVO> children;
/**
* 父集合
*/
private List<ExtPlanVO> parentList;
/**
* 工期
*/
private String constructPeriod;
/**
* 是否产生计划任务
*/
private Boolean hasPlanTasks;
/**
* 合同编号
*/
private String contractNo;
/**
* 计划执行人
*/
private String planExecutor;
/**
* 上级计划编码
*/
private String superPlanCode;
/**
* 完成时间
*/
private Date completeTime;
/**
* 计划文档关系集合
*/
@RelationProperty(refProperty = "source")
@VersionProperty(curVersion = VersionRelationType.MASTER, refVersion = VersionRelationType.NONE)
private List<ExtPlanDocLinkVO> sourcePlanDocLink;
private Map<String, Object> dynamicAttrs;
/**
* 操作
*/
private String operate;
/**
* 实际开始时间
*/
private Date actualStartTime;
/**
* 实际完成时间
*/
private Date actualComplateTime;
/**
* 文件分类
*/
private String fileType;
/**
* 文件名称
*/
private String fileName;
/**
* 文件编号
*/
private String fileNumber;
/**
* 文件代号
*/
private String fileCode;
/**
* 项目代号
*/
private String projectCode;
/**
* 管理信息系统编码
*/
private String systemCode;
/**
* 审核者
*/
private String review;
/**
* 批准者
*/
private String approver;
/**
* 审定者
*/
private String verifier;
/**
* 完成情况
*/
private String completion;
/**
* 未完成情况
*/
private String unfinishSituat;
/**
* 反馈情况说明
*/
private String feedbackDescript;
/**
* 阶段状态
*/
private String phaseState;
/**
* 计划级别
*/
private String planLevel;
/**
* 任务完成状态
*/
@DictProperty(baseProperty = "taskState", dictType = "TaskState")
private String taskState;
}
package com.yonde.dcs.document.common.vo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.yonde.dex.basedata.entity.annotation.DexEmbedded;
import com.yonde.dex.basedata.entity.annotation.ModelConfigProperty;
import com.yonde.dex.basedata.entity.annotation.ReferenceProperty;
import com.yonde.dex.basedata.entity.annotation.VersionProperty;
import com.yonde.dex.basedata.entity.data.VersionRelationType;
import com.yonde.dex.basedata.entity.vo.DxIdVOEmbeddable;
import com.yonde.dex.basedata.entity.vo.IdOnlyVO;
import com.yonde.dex.basedata.entity.vo.IdVO;
import com.yonde.dex.linkdata.plugin.common.DxLinkDataVOEmbeddable;
import com.yonde.dex.logicdelete.plugin.common.entity.DxLogicDeleteVOEmbeddable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.util.Map;
/**
* @description:
* @version: 1
* @date: 2021-09-24 02:58:31
**/
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@JsonTypeInfo(
use = JsonTypeInfo.Id.CLASS,
property = "dxClassname",
defaultImpl = ExtUpgradeObjLinkVO.class
)
@ModelConfigProperty(syncES = true)
public class ExtUpgradeObjLinkVO extends IdOnlyVO implements IdVO{
/**
* dao扩展对象
*/
@DexEmbedded()
@JsonIgnore
private DxIdVOEmbeddable dxIdEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLogicDeleteVOEmbeddable dxLogicDeleteEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLinkDataVOEmbeddable<DxDocumentVO, DxDocumentVO> dxLinkDataEmbeddable;
// TODO: 2024/8/1 ECRVO不存在
// /**
// * 更改请求
// */
// @ReferenceProperty(baseProperty = "sourceId")
// private ECRVO source;
// TODO: 2024/8/1 DxIterationVO不存在
// /**
// * 版本基类
// */
// @ReferenceProperty(baseProperty = "targetId")
// @VersionProperty(curVersion = VersionRelationType.NONE, refVersion = VersionRelationType.VERSION)
// private DxIterationVO target;
/**
* source对应的属性
*/
private Long sourceId;
/**
* sourceId对应的类型
*/
private String sourceIdType;
/**
* target对应的属性
*/
private Long targetId;
/**
* targetId对应的类型
*/
private String targetIdType;
private Map<String, Object> dynamicAttrs;
/**
* 关联描述
*/
private String linkDescript;
}
package com.yonde.dcs.document.core.factory;
import com.alibaba.fastjson.JSONObject;
import com.yonde.dcs.document.common.vo.DxDocumentVO;
import com.yonde.dcs.document.core.constants.Constants;
import com.yonde.dcs.document.core.constants.SignConstants;
import com.yonde.dcs.document.core.service.ExtDocService;
import com.yonde.dex.user.common.vo.DxUserInfoVO;
import com.yonde.dex.user.feign.DxUserInfoFeign;
import com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map;
import java.util.Objects;
/**
* @author xfchai
* @ClassName NCRSCUtils.java
* @Description NCR审查单
* @createTime 2021/12/27 10:53:00
*/
@Component
public class NCRSCUtils {
@Autowired
private ExtDocService extDocService;
@Autowired
private DxUserInfoFeign userService;
/**
* 填充数据
*
* @param
* @return
*/
public JSONObject settingData(DxDocumentVO v, DxWfProcessTaskVO wf, JSONObject jsonObject) {
Map<String, Object> dynamicAttrs = v.getDynamicAttrs();
//供方
String supplier = Objects.isNull(dynamicAttrs.get("supplier")) ? "" : (String) dynamicAttrs.get("supplier");
//不符合处理单编号
jsonObject.put("number", ObjectUtils.isEmpty(v.getNumber()) ? "" : v.getNumber());
//不符合处理单版次
jsonObject.put("version", ObjectUtils.isEmpty(v.getVersionKey()) ? "" : v.getVersionKey());
jsonObject.put("supplierName", extDocService.searchDictDataByDictCode(Constants.NCR_SUPPLIER, supplier));
this.selectData(v, jsonObject);
this.generateData(wf, jsonObject);
return jsonObject;
}
/**
* 填充流程数据
*
* @param processName
* @param remarkName
* @param fzrImgName
* @param fzrDateName
* @param jsonObject
* @param wf
*/
private void settingInfoData(String processName, String remarkName, String fzrImgName, String fzrDateName, JSONObject jsonObject, DxWfProcessTaskVO wf) {
//审查单名称
jsonObject.put(processName, ObjectUtils.isEmpty(wf.getAliasName()) ? "审查单" : wf.getAliasName() + "单");
//审查单备注
jsonObject.put(remarkName, ObjectUtils.isEmpty(wf.getDescription()) ? "" : wf.getDescription());
if ("通过".equals(wf.getResult())) {
SimpleDateFormat sdf = new SimpleDateFormat(" yyyy-MM-dd");
String userId = wf.getAssignee();
DxUserInfoVO userVO = (DxUserInfoVO) userService.get(Long.parseLong(userId));
//负责人签字
jsonObject.put(fzrImgName, userVO.getUserAccount() + ".png");
jsonObject.put(fzrDateName, sdf.format(new Date()));
}
}
/**
* 根据不同节点处理不同数据
*
* @param wfProcessTaskVO
* @param jsonObject
*/
private void generateData(DxWfProcessTaskVO wfProcessTaskVO, JSONObject jsonObject) {
String aliasName = wfProcessTaskVO.getAliasName();
switch (aliasName) {
//质保部签审
case SignConstants.SIGN_ZBB:
this.settingInfoData(SignConstants.ZBBprocessName, SignConstants.ZBBremark, SignConstants.ZBBfzr_photo, SignConstants.ZBBfzr_date, jsonObject, wfProcessTaskVO);
break;
//工程部签审
case SignConstants.SIGN_GCB:
this.settingInfoData(SignConstants.GCBprocessName, SignConstants.GCBremark, SignConstants.GCBfzr_photo, SignConstants.GCBfzr_date, jsonObject, wfProcessTaskVO);
break;
//设计项签审
case SignConstants.SIGN_SJX:
this.settingInfoData(SignConstants.SJXprocessName, SignConstants.SJXremark, SignConstants.SJXfzr_photo, SignConstants.SJXfzr_date, jsonObject, wfProcessTaskVO);
break;
//总体室签审
case SignConstants.SIGN_ZTS:
this.settingInfoData(SignConstants.ZTSprocessName, SignConstants.ZTSremark, SignConstants.ZTSfzr_photo, SignConstants.ZTSfzr_date, jsonObject, wfProcessTaskVO);
break;
//批准
case SignConstants.SIGN_KEY_APPROVED:
this.settingInfoData(SignConstants.ZBBprocessName, SignConstants.ZBBremark, SignConstants.ZBBfzr_photo, SignConstants.ZBBfzr_date, jsonObject, wfProcessTaskVO);
break;
}
}
/**
* 填充多选框的值
*
* @param v
* @param jsonObject
*/
private void selectData(DxDocumentVO v, JSONObject jsonObject) {
//获取动态属性
Map<String, Object> dynamicAttrs = v.getDynamicAttrs();
String classify = Objects.isNull(dynamicAttrs.get("classify")) ? "" : (String) dynamicAttrs.get("classify");
if ("C2".equals(classify)) {
//分类
jsonObject.put("C2", "\u0052");
jsonObject.put("C3", "\u00A3");
}
if ("C3".equals(classify)) {
jsonObject.put("C2", "\u00A3");
jsonObject.put("C3", "\u0052");
}
String grade = Objects.isNull(dynamicAttrs.get("grade")) ? "" : (String) dynamicAttrs.get("grade");
if ("Major".equals(grade)) {
//分级
jsonObject.put("bigger", "\u00A3");
jsonObject.put("major", "\u0052");
}
if ("Bigger".equals(grade)) {
jsonObject.put("bigger", "\u0052");
jsonObject.put("major", "\u00A3");
}
}
}
...@@ -2,7 +2,7 @@ package com.yonde.dcs.document.core.service; ...@@ -2,7 +2,7 @@ package com.yonde.dcs.document.core.service;
import com.yonde.dcs.document.common.vo.DxDocumentVO; import com.yonde.dcs.document.common.vo.DxDocumentVO;
import com.yonde.dcs.document.common.vo.ExtPlanVO; import com.yonde.dcs.plan.common.vo.ExtPlanVO;
import com.yonde.dex.user.common.vo.DxOrganizationVO; import com.yonde.dex.user.common.vo.DxOrganizationVO;
......
...@@ -221,12 +221,7 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService { ...@@ -221,12 +221,7 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
//得到souceId获取计划,更新计划状态 //得到souceId获取计划,更新计划状态
ExtPlanVO source = planDocLinkVO.getSource(); ExtPlanVO source = planDocLinkVO.getSource();
source.setTaskState(Constants.COMPLETED); source.setTaskState(Constants.COMPLETED);
if (ObjectUtils.isEmpty(source.getId())){ extPlanService.saveAndChangeState(source);
extPlanService.save(source);
}else {
extPlanService.update(source);
}
} }
} }
documentVO.setState(state); documentVO.setState(state);
......
...@@ -9,9 +9,16 @@ import cn.hutool.extra.spring.SpringUtil; ...@@ -9,9 +9,16 @@ import cn.hutool.extra.spring.SpringUtil;
import com.yonde.dcs.document.common.vo.*; import com.yonde.dcs.document.common.vo.*;
import com.yonde.dcs.document.core.constants.Constants; import com.yonde.dcs.document.core.constants.Constants;
import com.yonde.dcs.document.core.service.*; import com.yonde.dcs.document.core.service.*;
import com.yonde.dcs.document.core.util.CommonUtil;
import com.yonde.dcs.document.core.util.ExtDocUtil; import com.yonde.dcs.document.core.util.ExtDocUtil;
import com.yonde.dcs.document.core.util.FileUtils; import com.yonde.dcs.document.core.util.FileUtils;
import com.yonde.dcs.document.entity.po.ExtAtlasDrawingLink; import com.yonde.dcs.document.entity.po.ExtAtlasDrawingLink;
import com.yonde.dcs.plan.common.vo.ExtECRVO;
import com.yonde.dcs.plan.common.vo.ExtOriginObjLinkVO;
import com.yonde.dcs.plan.common.vo.ExtUpgradeObjLinkVO;
import com.yonde.dcs.plan.feign.ExtECRServiceFeign;
import com.yonde.dcs.plan.feign.ExtOriginObjLinkServiceFeign;
import com.yonde.dcs.plan.feign.ExtUpgradeObjLinkServiceFeign;
import com.yonde.dex.basedata.data.search.SearchItem; import com.yonde.dex.basedata.data.search.SearchItem;
import com.yonde.dex.basedata.data.search.SearchItems; import com.yonde.dex.basedata.data.search.SearchItems;
import com.yonde.dex.basedata.data.search.SearchQueryCondition; import com.yonde.dex.basedata.data.search.SearchQueryCondition;
...@@ -34,7 +41,6 @@ import com.yonde.dex.dict.service.vo.DictDataVO; ...@@ -34,7 +41,6 @@ import com.yonde.dex.dict.service.vo.DictDataVO;
import com.yonde.dex.user.feign.DxUserInfoFeign; import com.yonde.dex.user.feign.DxUserInfoFeign;
import com.yonde.dex.version.plugin.core.service.VersionService; import com.yonde.dex.version.plugin.core.service.VersionService;
import com.yonde.dex.version.plugin.entities.DxVersion; import com.yonde.dex.version.plugin.entities.DxVersion;
import com.yonde.dex.wfc.common.enums.TaskStateEnum;
import com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO; import com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO;
import com.yonde.dex.wfc.feign.api.WfcProcessFeign; import com.yonde.dex.wfc.feign.api.WfcProcessFeign;
...@@ -54,7 +60,6 @@ import javax.servlet.http.HttpServletResponse; ...@@ -54,7 +60,6 @@ import javax.servlet.http.HttpServletResponse;
import java.io.*; import java.io.*;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -73,20 +78,21 @@ public class ExtDocServiceImpl implements ExtDocService { ...@@ -73,20 +78,21 @@ public class ExtDocServiceImpl implements ExtDocService {
@Autowired @Autowired
private ExtAtlasDrawingLinkService atlasDrawingLinkService; private ExtAtlasDrawingLinkService atlasDrawingLinkService;
@Autowired
// TODO: 2024/8/1 ECRService引用的po,vo继承的类不存在 private ExtECRServiceFeign ecrService;
// @Autowired
// private ECRService ecrService;
/** /**
* 改前对象 * 改前对象
*/ */
@Autowired @Autowired
private ExtOriginObjLinkService extOriginObjLinkService; private ExtOriginObjLinkServiceFeign extOriginObjLinkService;
/** /**
* 改后对象 * 改后对象
*/ */
@Autowired @Autowired
private ExtUpgradeObjLinkService extUpgradeObjLinkService; private ExtUpgradeObjLinkServiceFeign extUpgradeObjLinkService;
@Autowired
private ExtObsoleteDocLinkService obsoleteDocLinkService;
@Autowired @Autowired
private VersionService versionService; private VersionService versionService;
...@@ -95,8 +101,6 @@ public class ExtDocServiceImpl implements ExtDocService { ...@@ -95,8 +101,6 @@ public class ExtDocServiceImpl implements ExtDocService {
@Autowired @Autowired
private FileManagerFeignService fileManagerService; private FileManagerFeignService fileManagerService;
@Autowired @Autowired
private ObsoleteDocLinkService obsoleteDocLinkService;
@Autowired
private DictDataFeignService dictDataService; private DictDataFeignService dictDataService;
@Autowired @Autowired
private FileManagerFeignService fileManagerFeignService; private FileManagerFeignService fileManagerFeignService;
...@@ -112,6 +116,7 @@ public class ExtDocServiceImpl implements ExtDocService { ...@@ -112,6 +116,7 @@ public class ExtDocServiceImpl implements ExtDocService {
//生成过时文件通知单编码 //生成过时文件通知单编码
// @Autowired // @Autowired
// private SerialNumberService serialNumberService; // private SerialNumberService serialNumberService;
//
// @Autowired // @Autowired
// private IUserService userService; // private IUserService userService;
...@@ -127,25 +132,22 @@ public class ExtDocServiceImpl implements ExtDocService { ...@@ -127,25 +132,22 @@ public class ExtDocServiceImpl implements ExtDocService {
@Transactional @Transactional
public DxDocumentVO reviseDocVersion(Long id, ExtReviseVersionVO reviseVersionVO) { public DxDocumentVO reviseDocVersion(Long id, ExtReviseVersionVO reviseVersionVO) {
//创建ECR对象 //创建ECR对象
ExtECRVO ecrvo = new ExtECRVO();
// TODO: 2024/8/1 ECR对象不存在 ecrvo.setCauseDescript(reviseVersionVO.getCauseDescript());
// ECRVO ecrvo = new ECRVO(); ecrvo.setChangeReason(reviseVersionVO.getChangeReason());
// ecrvo.setCauseDescript(reviseVersionVO.getCauseDescript()); ExtECRVO ecrSave = (ExtECRVO) ecrService.save(ecrvo);
// ecrvo.setChangeReason(reviseVersionVO.getChangeReason());
// ECRVO ecrSave = (ECRVO) ecrService.save(ecrvo);
ExtOriginObjLinkVO ecrLink = new ExtOriginObjLinkVO(); ExtOriginObjLinkVO ecrLink = new ExtOriginObjLinkVO();
DxDocumentVO currentDoc = (DxDocumentVO) documentService.get(id); DxDocumentVO currentDoc = (DxDocumentVO) documentService.get(id);
//创建改前对象Link //创建改前对象Link
// ecrLink.setSource(ecrSave); ecrLink.setSource(ecrSave);
// ecrLink.setSourceId(ecrSave.getId()); ecrLink.setSourceId(ecrSave.getId());
// ecrLink.setTarget(currentDoc); ecrLink.setTarget(currentDoc.getVersion());
ExtOriginObjLinkVO extOriginObjLinkVO = (ExtOriginObjLinkVO) extOriginObjLinkService.save(ecrLink); ExtOriginObjLinkVO extOriginObjLinkVO = (ExtOriginObjLinkVO) extOriginObjLinkService.save(ecrLink);
DxDocumentVO dxDocumentVO; DxDocumentVO dxDocumentVO;
// 切换用户(升版后创建人保持不变) // 切换用户(升版后创建人保持不变)
try { try {
// TODO: 2024/8/1 getAccount属性不存在 // TODO: 2024/8/1 getAccount字段不存在
// String userAccount = currentDoc.getCreator().getAccount(); // String userAccount = currentDoc.getCreator().getAccount();
// TODO: 2024/8/1 switchServiceUser方法不存在 // TODO: 2024/8/1 switchServiceUser方法不存在
// changeUserHelper.switchServiceUser(userAccount); // changeUserHelper.switchServiceUser(userAccount);
//切换后升版 //切换后升版
...@@ -188,11 +190,9 @@ public class ExtDocServiceImpl implements ExtDocService { ...@@ -188,11 +190,9 @@ public class ExtDocServiceImpl implements ExtDocService {
} }
//创建ECR的改后对象 //创建ECR的改后对象
ExtUpgradeObjLinkVO upgradeObjLinkVO = new ExtUpgradeObjLinkVO(); ExtUpgradeObjLinkVO upgradeObjLinkVO = new ExtUpgradeObjLinkVO();
upgradeObjLinkVO.setSource(ecrSave);
// TODO: 2024/8/1 setSource,setTarget属性不存在 upgradeObjLinkVO.setSourceId(ecrSave.getId());
// upgradeObjLinkVO.setSource(ecrSave); upgradeObjLinkVO.setTarget(dxDocumentVO.getVersion());
// upgradeObjLinkVO.setSourceId(ecrSave.getId());
// upgradeObjLinkVO.setTarget(dxDocumentVO);
extUpgradeObjLinkService.save(upgradeObjLinkVO); extUpgradeObjLinkService.save(upgradeObjLinkVO);
this.processTechnicalFileState(dxDocumentVO); this.processTechnicalFileState(dxDocumentVO);
return dxDocumentVO; return dxDocumentVO;
......
...@@ -3,6 +3,7 @@ package com.yonde.dcs.document.core.util; ...@@ -3,6 +3,7 @@ package com.yonde.dcs.document.core.util;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import com.yonde.dcs.document.common.vo.DxDocumentVO; import com.yonde.dcs.document.common.vo.DxDocumentVO;
import com.yonde.dcs.document.common.vo.ExtObsoleteDocLinkVO;
import com.yonde.dcs.document.common.vo.ObsoleteDocLinkVO; import com.yonde.dcs.document.common.vo.ObsoleteDocLinkVO;
import com.yonde.dcs.document.core.constants.Constants; import com.yonde.dcs.document.core.constants.Constants;
import com.yonde.dcs.document.core.service.ExtObsoleteDocLinkService; import com.yonde.dcs.document.core.service.ExtObsoleteDocLinkService;
...@@ -12,6 +13,7 @@ import com.yonde.dex.basedata.data.search.SearchQueryCondition; ...@@ -12,6 +13,7 @@ import com.yonde.dex.basedata.data.search.SearchQueryCondition;
import com.yonde.dex.basedata.entity.data.DxPageImpl; import com.yonde.dex.basedata.entity.data.DxPageImpl;
import com.yonde.dex.dao.service.util.DxPageUtils; import com.yonde.dex.dao.service.util.DxPageUtils;
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.user.feign.DxUserInfoFeign; import com.yonde.dex.user.feign.DxUserInfoFeign;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
...@@ -78,8 +80,8 @@ public class ExtDocUtil { ...@@ -78,8 +80,8 @@ public class ExtDocUtil {
* @param dxDocumentVo * @param dxDocumentVo
* @return * @return
*/ */
public PapersVO getPrimaryFile(DxDocumentVO dxDocumentVo) { public RepoFileVO getPrimaryFile(DxDocumentVO dxDocumentVo) {
PapersVO fileVO = new PapersVO(); RepoFileVO fileVO = new RepoFileVO();
if (CollectionUtils.isNotEmpty(dxDocumentVo.getObjFileLinks())) { if (CollectionUtils.isNotEmpty(dxDocumentVo.getObjFileLinks())) {
fileVO = dxDocumentVo.getObjFileLinks().stream().filter(objFileLinkVO -> Constants.PDF_FILE.equals(objFileLinkVO.getContentType())) fileVO = dxDocumentVo.getObjFileLinks().stream().filter(objFileLinkVO -> Constants.PDF_FILE.equals(objFileLinkVO.getContentType()))
.map(ObjFileLinkVO::getTarget).findFirst().orElse(null); .map(ObjFileLinkVO::getTarget).findFirst().orElse(null);
...@@ -171,12 +173,12 @@ public class ExtDocUtil { ...@@ -171,12 +173,12 @@ public class ExtDocUtil {
* @param targetId * @param targetId
* @return * @return
*/ */
public List<ObsoleteDocLinkVO> recursionObsoleteDocLinkByTargetId(Long targetId) { public List<ExtObsoleteDocLinkVO> recursionObsoleteDocLinkByTargetId(Long targetId) {
SearchQueryCondition condition = SearchQueryCondition.builder() SearchQueryCondition condition = SearchQueryCondition.builder()
.openProp(SearchQueryCondition.builder().name("source") .openProp(SearchQueryCondition.builder().name("source")
.openProp(SearchQueryCondition.builder().name("objFileLinks").openProp(SearchQueryCondition.builder().name("target").build()).build()).build()) .openProp(SearchQueryCondition.builder().name("objFileLinks").openProp(SearchQueryCondition.builder().name("target").build()).build()).build())
.searchItems(SearchItems.builder().item(new SearchItem("targetId", SearchItem.Operator.EQ, targetId, null)).build()).build(); .searchItems(SearchItems.builder().item(new SearchItem("targetId", SearchItem.Operator.EQ, targetId, null)).build()).build();
DxPageImpl<ObsoleteDocLinkVO> recursion = obsoleteDocLinkService.findRecursion(condition); DxPageImpl<ExtObsoleteDocLinkVO> recursion = obsoleteDocLinkService.findRecursion(condition);
if (!CollectionUtils.isEmpty(recursion.getContent())) { if (!CollectionUtils.isEmpty(recursion.getContent())) {
return recursion.getContent(); return recursion.getContent();
} }
......
...@@ -2,19 +2,15 @@ package com.yonde.dcs.document.core.util; ...@@ -2,19 +2,15 @@ package com.yonde.dcs.document.core.util;
import cn.hutool.core.io.FileUtil; import cn.hutool.core.io.FileUtil;
import cn.hutool.core.io.IoUtil; import cn.hutool.core.io.IoUtil;
import com.inet.pdm.constants.Constants;
import com.jacob.activeX.ActiveXComponent; import com.yonde.dcs.document.common.vo.DxDocumentVO;
import com.jacob.com.Dispatch; import com.yonde.dcs.document.core.constants.Constants;
import com.jacob.com.Variant;
import com.yonde.dcs.document.common.entity.vo.DxDocumentVO;
import com.yonde.dex.basedata.entity.data.OperatorType; import com.yonde.dex.basedata.entity.data.OperatorType;
import com.yonde.dex.basedata.entity.vo.IdVO; import com.yonde.dex.basedata.entity.vo.IdVO;
import com.yonde.dex.valut.handler.ContentHolder;
import com.yonde.dex.valut.vo.ObjFileLinkVO;
import lombok.SneakyThrows; import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.pdfbox.io.MemoryUsageSetting;
import org.apache.pdfbox.multipdf.PDFMergerUtility;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
......
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