Commit f027690a authored by xuzhang's avatar xuzhang

Merge branch 'master' into 'INET0716'

# Conflicts:
#   dcs-doc-core/pom.xml
parents 87af35f4 8116f58d
Manifest-Version: 1.0
Main-Class: com.yonde.dcs.document.server.ServerApplication
...@@ -66,6 +66,11 @@ ...@@ -66,6 +66,11 @@
<artifactId>dex-basic-service-common</artifactId> <artifactId>dex-basic-service-common</artifactId>
<version>4.1-RELEASE</version> <version>4.1-RELEASE</version>
</dependency> </dependency>
<dependency>
<groupId>com.yonde.dcs</groupId>
<artifactId>dcs-plan-common</artifactId>
<version>4.1-RELEASE</version>
</dependency>
</dependencies> </dependencies>
......
...@@ -616,6 +616,25 @@ public class DxDocumentVO extends IdOnlyVO implements DxIterationVOHolder<DxDocu ...@@ -616,6 +616,25 @@ public class DxDocumentVO extends IdOnlyVO implements DxIterationVOHolder<DxDocu
@DexEmbedded() @DexEmbedded()
private DxDocumentVOExpand<DxDocumentVO> dxDocumentExpand; private DxDocumentVOExpand<DxDocumentVO> dxDocumentExpand;
/**
* 一级分类
*/
private String oneLevCategory;
/**
* 二级分类
*/
private String twoLevCategory;
/**
* 三级分类
*/
private String threeLevCategory;
/**
* 阶段状态
*/
private String phaseState;
} }
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.vo.DxIdVOEmbeddable;
import com.yonde.dex.basedata.entity.vo.IdOnlyVO;
import com.yonde.dex.basedata.entity.vo.IdVO;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.math.BigDecimal;
import java.util.Map;
/**
* @description:
* @version: 0
* @date: 2022-02-24 04:32:14
**/
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@JsonTypeInfo(
use = JsonTypeInfo.Id.CLASS,
property = "dxClassname",
defaultImpl = ExpectPayDetailsVO.class
)
@ModelConfigProperty(syncES = true)
public class ExpectPayDetailsVO extends IdOnlyVO implements IdVO {
/**
* dao扩展对象
*/
@DexEmbedded()
@JsonIgnore
private DxIdVOEmbeddable dxIdEmbeddable;
/**
* 金额
*/
private BigDecimal amount;
/**
* 收入合同
*/
@ReferenceProperty(baseProperty = "extIncomeContractId")
private ExtIncomeContractVO extIncomeContract;
/**
* 年份
*/
private String years;
/**
* extIncomeContract对应的属性
*/
private Long extIncomeContractId;
/**
* extIncomeContractId对应的类型
*/
private String extIncomeContractIdType;
private Map<String, Object> dynamicAttrs;
}
package com.yonde.dcs.document.common.vo;
import lombok.Data;
/**
* @author wyy
* @date 2024-1-21 15:07
* @describe
*/
@Data
public class ExtAuditlogSecrectVo {
private String name;
private Long number;
}
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.vo.DxIdVOEmbeddable;
import com.yonde.dex.basedata.entity.vo.IdOnlyVO;
import com.yonde.dex.basedata.entity.vo.IdVO;
import com.yonde.dex.context.plugin.common.entity.DxContextVOEmbeddable;
import com.yonde.dex.context.plugin.common.entity.DxContextVOHolder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.math.BigDecimal;
import java.util.Map;
/**
* @description:
* @version: 1
* @date: 2022-02-24 03:07:53
**/
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@JsonTypeInfo(
use = JsonTypeInfo.Id.CLASS,
property = "dxClassname",
defaultImpl = ExtContractExpensesVO.class
)
@ModelConfigProperty(syncES = true)
public class ExtContractExpensesVO extends IdOnlyVO implements IdVO, DxContextVOHolder {
/**
* dao扩展对象
*/
@DexEmbedded()
@JsonIgnore
private DxIdVOEmbeddable dxIdEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxContextVOEmbeddable dxContextEmbeddable;
/**
* 收入合同
*/
@ReferenceProperty(baseProperty = "extIncomeContractId")
private ExtIncomeContractVO extIncomeContract;
/**
* extIncomeContract对应的属性
*/
private Long extIncomeContractId;
/**
* extIncomeContractId对应的类型
*/
private String extIncomeContractIdType;
/**
* 条目内容
*/
private String content;
/**
* 金额
*/
private BigDecimal itemAmount;
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.annotation.ReferenceProperty;
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 com.yonde.dex.logicdelete.plugin.common.entity.DxLogicDeleteVOHolder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.util.Map;
/**
* @description:
* @version: 0
* @date: 2022-04-06 03:50:21
**/
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@JsonTypeInfo(
use = JsonTypeInfo.Id.CLASS,
property = "dxClassname",
defaultImpl = ExtContractLinkVO.class
)
@ModelConfigProperty(syncES = true)
public class ExtContractLinkVO extends IdOnlyVO implements IdVO,DxLinkDataVOHolder<ExtIncomeContractVO, ExtSpendingContractVO>, DxLogicDeleteVOHolder {
public static final String DX_ID_EMBEDDABLE_PROP_NAME = "dxIdEmbeddable";
public static final String DX_LOGIC_DELETE_EMBEDDABLE_PROP_NAME = "dxLogicDeleteEmbeddable";
public static final String DX_LINK_DATA_EMBEDDABLE_PROP_NAME = "dxLinkDataEmbeddable";
public static final String LINK_DESCRIPT_PROP_NAME = "linkDescript";
/**
* dao扩展对象
*/
@DexEmbedded()
@JsonIgnore
private DxIdVOEmbeddable dxIdEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLogicDeleteVOEmbeddable dxLogicDeleteEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLinkDataVOEmbeddable<ExtIncomeContractVO, ExtSpendingContractVO> dxLinkDataEmbeddable;
/**
* 支出合同
*/
@ReferenceProperty(baseProperty = "targetId")
private ExtSpendingContractVO target;
/**
* 收入合同
*/
@ReferenceProperty(baseProperty = "sourceId")
private ExtIncomeContractVO 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.dcs.plan.common.vo.ExtPlanVO;
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.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
* @description:
* @version: 0
* @date: 2021-09-14 11:08:37
**/
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@JsonTypeInfo(
use = JsonTypeInfo.Id.CLASS,
property = "dxClassname",
defaultImpl = ExtDisReocredLinkVO.class
)
@ModelConfigProperty(syncES = true)
public class ExtDisReocredLinkVO extends IdOnlyVO implements IdVO, DxLinkDataVOHolder<ExtDistributeRecordVO, ExtPlanVO> {
/**
* dao扩展对象
*/
@DexEmbedded()
@JsonIgnore
private DxIdVOEmbeddable dxIdEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLogicDeleteVOEmbeddable dxLogicDeleteEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLinkDataVOEmbeddable<ExtDistributeRecordVO, ExtPlanVO> dxLinkDataEmbeddable;
/**
* DxObject
*/
@ReferenceProperty(baseProperty = "targetId")
private ExtPlanVO target;
/**
* 分发记录
*/
@ReferenceProperty(baseProperty = "sourceId")
private ExtDistributeRecordVO 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.DexEmbedded;
import com.yonde.dex.basedata.entity.annotation.ModelConfigProperty;
import com.yonde.dex.basedata.entity.annotation.ReferenceProperty;
import com.yonde.dex.basedata.entity.annotation.RelationProperty;
import com.yonde.dex.basedata.entity.users.DxUserVO;
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.dfs.vo.ObjFileLinkVO;
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 com.yonde.dex.logicdelete.plugin.common.entity.DxLogicDeleteVOHolder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* @author xfchai
* @description: 分发记录实体VO
* @version: 1
* @date: 2021-09-14 11:11:01
**/
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@JsonTypeInfo(
use = JsonTypeInfo.Id.CLASS,
property = "dxClassname",
defaultImpl = ExtDistributeRecordVO.class
)
@ModelConfigProperty(syncES = true)
public class ExtDistributeRecordVO extends IdOnlyVO implements IdVO, DxLinkDataVOHolder<DxDocumentVO, DxDocumentVO>, DxLogicDeleteVOHolder {
public static final String DX_ID_EMBEDDABLE_PROP_NAME = "dxIdEmbeddable";
public static final String DX_LOGIC_DELETE_EMBEDDABLE_PROP_NAME = "dxLogicDeleteEmbeddable";
public static final String DX_LINK_DATA_EMBEDDABLE_PROP_NAME = "dxLinkDataEmbeddable";
public static final String LINK_DESCRIPT_PROP_NAME = "linkDescript";
/**
* dao扩展对象
*/
@DexEmbedded()
@JsonIgnore
private DxIdVOEmbeddable dxIdEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLogicDeleteVOEmbeddable dxLogicDeleteEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLinkDataVOEmbeddable<DxDocumentVO, DxDocumentVO> dxLinkDataEmbeddable;
/**
* 分发记录对象Link模型集合
*/
@RelationProperty(refProperty = "source")
private List<ExtDisReocredLinkVO> sourceDisReocredLink;
/**
* 分发类型
*/
private String distributeType;
/**
* 操作时间
*/
private Date operationTime;
/**
* 工作说明
*/
private String workDesc;
/**
* 接收备注
*/
private String receiveRemark;
/**
* 完成接收任务时间
*/
private Date comReceiveTime;
/**
* 分发人
*/
@ReferenceProperty(baseProperty = "senderId")
private DxUserVO sender;
/**
* 显示名称
*/
private String boTitle;
/**
* 是否处理
*/
private Boolean completed;
/**
* 截止时间
*/
private Date dueTime;
/**
* 关联附件集合
*/
@RelationProperty(refProperty = "source")
private List<ObjFileLinkVO> objFileLinks;
/**
* 分发单位
*/
private String distributDepart;
/**
* 分发时间
*/
private Date distributTime;
/**
* 发送人
*/
@ReferenceProperty(baseProperty = "handlerId")
private DxUserVO handler;
/**
* 分发备注
*/
private String distributeRemark;
/**
* 分发是否需回复
*/
private String replyDistribute;
/**
* 要求回复日期
*/
private Date replyDate;
/**
* 接收单位
*/
private String receiver;
/**
* 接收任务类型
*/
private String receiveTaskType;
/**
* 接收时间
*/
private Date receiveTime;
/**
* 接收类型
*/
private String receiveType;
/**
* 发送人对应的属性
*/
private Long senderId;
/**
* 发送人对应的类型
*/
private String senderIdType;
/**
* 接收人对应的属性
*/
private Long handlerId;
/**
* 接收人对应的类型
*/
private String handlerIdType;
/**
* 外单位(收)
*/
private String foreignUnitReceive;
/**
* 外单位(发)
*/
private String foreignUnitIssued;
/**
* 发送任务是否结束
*/
private Boolean sendFinish;
/**
* 分发编号
*/
private String disNumber;
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.annotation.ReferenceProperty;
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.context.plugin.common.entity.DxContextVOEmbeddable;
import com.yonde.dex.context.plugin.common.entity.DxContextVOHolder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Map;
/**
* @description:
* @version: 3
* @date: 2022-02-24 03:26:09
**/
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@JsonTypeInfo(
use = JsonTypeInfo.Id.CLASS,
property = "dxClassname",
defaultImpl = ExtIncomeBillInfoVO.class
)
@ModelConfigProperty(syncES = true)
public class ExtIncomeBillInfoVO extends IdOnlyVO implements IdVO, DxContextVOHolder {
/**
* dao扩展对象
*/
@DexEmbedded()
@JsonIgnore
private DxIdVOEmbeddable dxIdEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxContextVOEmbeddable dxContextEmbeddable;
/**
* 收入明细
*/
@ReferenceProperty(baseProperty = "extIncomeDetailId")
private ExtIncomeDetailVO extIncomeDetail;
/**
* 票据号码
*/
private String ticketNumber;
/**
* 票据金额
*/
private BigDecimal ticketAmount;
/**
* 开具时间
*/
private Date issuingTime;
/**
* 税率
*/
private Float taxRate;
/**
* extIncomeDetail对应的属性
*/
private Long extIncomeDetailId;
/**
* extIncomeDetailId对应的类型
*/
private String extIncomeDetailIdType;
/**
* 票据类型
*/
private String billType;
private Map<String, Object> dynamicAttrs;
/**
* 备注
*/
private String remark;
}
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.RelationProperty;
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.logicdelete.plugin.common.entity.DxLogicDeleteVOEmbeddable;
import com.yonde.dex.logicdelete.plugin.common.entity.DxLogicDeleteVOHolder;
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.dao.entity.base.IdOnlyEntity;
import com.yonde.dex.logicdelete.plugin.common.entity.DxLogicDeleteVOEmbeddable;
import com.yonde.dex.secretcode.plugin.common.entity.DxSecretVOEmbeddable;
import com.yonde.dex.secretcode.plugin.common.entity.DxSecretVOHolder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* @author: xfchai
* @description: 收入合同实体VO
* @version: 1
* @date: 2021-09-03 03:41:00
**/
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@JsonTypeInfo(
use = JsonTypeInfo.Id.CLASS,
property = "dxClassname",
defaultImpl = ExtIncomeContractVO.class
)
@ModelConfigProperty(syncES = true)
public class ExtIncomeContractVO extends IdOnlyVO implements DxSecretVOHolder, DxContextVOHolder {
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxContextVOEmbeddable dxContextEmbeddable;
/**
* dao扩展对象
*/
@DexEmbedded()
@JsonIgnore
private DxIdVOEmbeddable dxIdEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLogicDeleteVOEmbeddable dxLogicDeleteEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxSecretVOEmbeddable dxSecretEmbeddable;
/**
* 项目属性
*/
private String itemProperties;
/**
* 项目名称
*/
private String itemName;
/**
* 项目来源
*/
private String itemOrigin;
/**
* 合同编号
*/
private String contractNo;
/**
* 合同名称
*/
private String contractName;
/**
* 合同生效时间
*/
private Date startTime;
/**
* 合同结束时间
*/
private Date endTime;
/**
* 校内科研代码
*/
private String researchCode;
/**
* 校内财务代码
*/
private String financialCode;
/**
* 执行财务规定
*/
private String financialRegul;
/**
* 合同价款类型
*/
private String contractPriceType;
/**
* 合同额
*/
private BigDecimal contractPrice;
/**
* 审价额
*/
private BigDecimal trialPrice;
/**
* 项目编号
*/
private String itemNumber;
/**
* 合同经费构成
*/
private String contractfunding;
/**
* 支付时间
*/
private Date payTime;
/**
* 支付金额
*/
private BigDecimal payPrice;
/**
* 到款情况
*/
private String paymentSituat;
/**
* 票据开具情况
*/
private String billStatus;
/**
* 票据开具时间
*/
private Date issuanceTime;
/**
* 票据号码
*/
private String billNumber;
/**
* 票据类型
*/
private String billType;
/**
* 税率
*/
private String tariff;
/**
* 票据金额
*/
private BigDecimal billAmount;
/**
* 收入明细集合
*/
@RelationProperty(refProperty = "extIncomeContract")
private List<ExtIncomeDetailVO> extIncomeDetails;
/**
* 合同经费条目构成集合
*/
@RelationProperty(refProperty = "extIncomeContract")
private List<ExtContractExpensesVO> contractExpensess;
/**
* 已到款
*/
private BigDecimal paid;
/**
* 预计到款明细集合
*/
@RelationProperty(refProperty = "extIncomeContract")
private List<ExpectPayDetailsVO> expectPayDetailss;
/**
* 到款明细集合
*/
@RelationProperty(refProperty = "extIncomeContract")
private List<ExtPaymentDetailsVO> paymentDetailss;
/**
* 待拨付
*/
private BigDecimal toBedisbursed;
private Map<String, Object> dynamicAttrs;
/**
* 合同link集合
*/
@RelationProperty(refProperty = "source")
private List<ExtContractLinkVO> sourceContractLink;
}
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.RelationProperty;
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.context.common.vo.DxContextVO;
import com.yonde.dex.context.plugin.common.entity.DxContextVOEmbeddable;
import com.yonde.dex.context.plugin.common.entity.DxContextVOHolder;
import com.yonde.dex.logicdelete.plugin.common.entity.DxLogicDeleteVOEmbeddable;
import com.yonde.dex.secretcode.plugin.common.entity.DxSecretVOEmbeddable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* @description:
* @version: 1
* @date: 2022-02-24 02:58:51
**/
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@JsonTypeInfo(
use = JsonTypeInfo.Id.CLASS,
property = "dxClassname",
defaultImpl = ExtIncomeDetailVO.class
)
@ModelConfigProperty(syncES = true)
public class ExtIncomeDetailVO extends IdOnlyVO implements IdVO, DxContextVOHolder {
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxContextVOEmbeddable dxContextEmbeddable;
/**
* dao扩展对象
*/
@DexEmbedded()
@JsonIgnore
private DxIdVOEmbeddable dxIdEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLogicDeleteVOEmbeddable dxLogicDeleteEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxSecretVOEmbeddable dxSecretEmbeddable;
/**
* IncomeBillInfo集合
*/
@RelationProperty(refProperty = "extIncomeDetail")
private List<ExtIncomeBillInfoVO> IncomeBillInfos;
/**
* 收入合同
*/
@ReferenceProperty(baseProperty = "extIncomeContractId")
private ExtIncomeContractVO extIncomeContract;
/**
* 支付进度安排时间
*/
private Date payTime;
/**
* 到款情况
*/
private String paySituation;
/**
* 票据开具
*/
private String billing;
/**
* 支付进度安排金额
*/
private BigDecimal payAmount;
/**
* 到账时间
*/
private Date arrivalTime;
/**
* extIncomeContract对应的属性
*/
private Long extIncomeContractId;
/**
* extIncomeContractId对应的类型
*/
private String extIncomeContractIdType;
private Map<String, Object> dynamicAttrs;
/**
* 金额
*/
private BigDecimal amount;
/**
* 时间
*/
private Date incomeTime;
}
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.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 com.yonde.dex.logicdelete.plugin.common.entity.DxLogicDeleteVOHolder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.math.BigDecimal;
import java.util.Map;
/**
* @description:
* @version: 0
* @date: 2022-02-24 04:30:52
**/
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@JsonTypeInfo(
use = JsonTypeInfo.Id.CLASS,
property = "dxClassname",
defaultImpl = ExtPaymentDetailsVO.class
)
@ModelConfigProperty(syncES = true)
public class ExtPaymentDetailsVO extends IdOnlyVO implements IdVO, DxLinkDataVOHolder<DxDocumentVO, DxDocumentVO>, DxLogicDeleteVOHolder {
/**
* dao扩展对象
*/
@DexEmbedded()
@JsonIgnore
private DxIdVOEmbeddable dxIdEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLogicDeleteVOEmbeddable dxLogicDeleteEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLinkDataVOEmbeddable<DxDocumentVO, DxDocumentVO> dxLinkDataEmbeddable;
/**
* 收入合同
*/
@ReferenceProperty(baseProperty = "extIncomeContractId")
private ExtIncomeContractVO extIncomeContract;
/**
* 年份
*/
private String years;
/**
* 金额
*/
private BigDecimal amount;
/**
* extIncomeContract对应的属性
*/
private Long extIncomeContractId;
/**
* extIncomeContractId对应的类型
*/
private String extIncomeContractIdType;
private Map<String, Object> dynamicAttrs;
}
package com.yonde.dcs.document.common.vo;
import lombok.Data;
/**
* @author xfchai
* @ClassName ReviseVersionVO.java
* @Description 升版变更VO
* @createTime 2021/09/26 10:10:00
*/
@Data
public class ExtReviseVersionVO {
/**
* 阶段
*/
private String phaseState;
/**
* 原因说明
*/
private String causeDescript;
/**
* 更改原因
*/
private String changeReason;
}
package com.yonde.dcs.document.common.vo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yonde.dex.basedata.entity.annotation.DexEmbedded;
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;
/**
* @program: service
* @description: 系统流水码VO
* @author: dang wei
* @create: 2021-05-31 14:14
*/
@Data
public class ExtSerialNumberVO extends IdOnlyVO implements IdVO {
/**
* dao扩展对象
*/
@DexEmbedded()
@JsonIgnore
private DxIdVOEmbeddable dxIdEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLogicDeleteVOEmbeddable dxLogicDeleteEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLinkDataVOEmbeddable<DxDocumentVO, DxDocumentVO> dxLinkDataEmbeddable;
private Long contextId;
private String contextIdType;
private String className;
private String subTypeName;
private Long maxNumber;
}
package com.yonde.dcs.document.common.vo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yonde.dex.basedata.entity.annotation.DexEmbedded;
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;
/**
* @author xfchai
* @ClassName SignWfInfoVO.java
* @Description 客制化签名工作流信息vo
* @createTime 2022/02/22 09:56:00
*/
@Data
public class ExtSignWfInfoVO extends IdOnlyVO implements IdVO, DxLinkDataVOHolder<ExtSignWfInfoVO,ExtSignWfInfoVO> {
/**
* dao扩展对象
*/
@DexEmbedded()
@JsonIgnore
private DxIdVOEmbeddable dxIdEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLogicDeleteVOEmbeddable dxLogicDeleteEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLinkDataVOEmbeddable<ExtSignWfInfoVO, ExtSignWfInfoVO> dxLinkDataEmbeddable;
/**
* 对象id
*/
private String pboId;
/**
* 对象类型
*/
private String pboIdType;
/**
* 流程id
*/
private String processId;
/**
* 节点名称
*/
private String nodeName;
/**
* 所在组名称
*/
private String groupName;
/**
* 所选用户名称
*/
private String signUser;
}
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.ReferenceProperty;
import com.yonde.dex.dao.entity.base.IdOnlyEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.util.Date;
import java.util.Map;
/**
* @description:
* @version: 1
* @date: 2022-02-24 03:26:49
**/
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@JsonTypeInfo(
use = JsonTypeInfo.Id.CLASS,
property = "dxClassname",
defaultImpl = ExtSpendingBillInfoVO.class
)
@ModelConfigProperty(syncES = true)
public class ExtSpendingBillInfoVO extends IdOnlyEntity {
/**
* 支出明细
*/
@ReferenceProperty(baseProperty = "extSpendingDetailId")
private ExtSpendingDetailVO extSpendingDetail;
/**
* 开具时间
*/
private Date issuingTime;
/**
* 开具单位
*/
private String issuingUnit;
/**
* 发票内容
*/
private String invoiceContent;
/**
* 规格型号
*/
private String specifications;
/**
* 单位
*/
private String unit;
/**
* 开具金额发票类型
*/
private String amountInvoiceType;
/**
* 数量
*/
private Integer amounts;
/**
* 发票号码
*/
private String invoiceNumber;
/**
* 税率
*/
private Float taxRate;
/**
* extSpendingDetail对应的属性
*/
private Long extSpendingDetailId;
/**
* extSpendingDetailId对应的类型
*/
private String extSpendingDetailIdType;
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.annotation.RelationProperty;
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.context.plugin.common.entity.DxContextVOEmbeddable;
import com.yonde.dex.context.plugin.common.entity.DxContextVOHolder;
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 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 lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* @author: xfchai
* @description: 支出合同VO
* @version: 1
* @date: 2021-09-03 03:43:35
**/
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@JsonTypeInfo(
use = JsonTypeInfo.Id.CLASS,
property = "dxClassname",
defaultImpl = ExtSpendingContractVO.class
)
@ModelConfigProperty(syncES = true)
public class ExtSpendingContractVO extends IdOnlyVO implements IdVO , DxLinkDataVOHolder<DxDocumentVO, DxDocumentVO>, DxLogicDeleteVOHolder, 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<DxDocumentVO, DxDocumentVO> dxLinkDataEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxSecretVOEmbeddable dxSecretEmbeddable;
/**
* 支出明细集合
*/
@RelationProperty(refProperty = "extSpendingContract")
private List<ExtSpendingDetailVO> extSpendingDetails;
/**
* 合同link集合
*/
@RelationProperty(refProperty = "target")
private List<ExtContractLinkVO> targetContractLink;
/**
* 合同编号
*/
private String contractNumber;
/**
* 审批日期
*/
private Date approvalDate;
/**
* 预计结算额
*/
private BigDecimal perSettleAmount;
/**
* 所属课题
*/
private String subject;
/**
* 合同成果
*/
private String contractOutcome;
/**
* 支付申请
*/
private String payApplication;
/**
* 已付金额
*/
private BigDecimal paidAmount;
/**
* 付款比例
*/
private String paymentRatio;
/**
* 费用大类
*/
private String expenseCategory;
/**
* 合同名称
*/
private String contractName;
/**
* 合作方
*/
private String partner;
/**
* 合同工期
*/
private Date contractDur;
/**
* 合同金额
*/
private BigDecimal contractAmount;
/**
* 技术负责人
*/
private String techLeader;
/**
* 合同内容
*/
private String contractContent;
/**
* 支付节点
*/
private String payNode;
/**
* 验收方法
*/
private String acceptMethod;
/**
* 未付金额
*/
private BigDecimal unpaidAmount;
/**
* 备注
*/
private String remark;
/**
* 费用小类
*/
private String feeSubCategory;
/**
* 结算额
*/
private BigDecimal settleAmount;
/**
* 收入合同编号
*/
private String revContractNo;
/**
* 签订部门
*/
private String signDepar;
/**
* 合同结束工期
*/
private Date contractEndDur;
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.annotation.ReferenceProperty;
import com.yonde.dex.basedata.entity.annotation.RelationProperty;
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.context.plugin.common.entity.DxContextVOEmbeddable;
import com.yonde.dex.context.plugin.common.entity.DxContextVOHolder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* @author: xfchai
* @description: 支出明细VO
* @version: 1
* @date: 2021-09-03 03:44:53
**/
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@JsonTypeInfo(
use = JsonTypeInfo.Id.CLASS,
property = "dxClassname",
defaultImpl = ExtSpendingDetailVO.class
)
@ModelConfigProperty(syncES = true)
public class ExtSpendingDetailVO extends IdOnlyVO implements IdVO, DxContextVOHolder {
/**
* dao扩展对象
*/
@DexEmbedded()
@JsonIgnore
private DxIdVOEmbeddable dxIdEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxContextVOEmbeddable dxContextEmbeddable;
/**
* 支出合同
*/
@ReferenceProperty(baseProperty = "extSpendingContractId")
private ExtSpendingContractVO extSpendingContract;
/**
* 付款次数
*/
private Integer payments;
/**
* 时间
*/
private Date payTime;
/**
* 凭证号
*/
private String voucherNumber;
/**
* 金额
*/
private BigDecimal amount;
/**
* 支出合同发票信息集合
*/
@RelationProperty(refProperty = "extSpendingDetail")
private List<ExtSpendingBillInfoVO> spendingBillInfos;
/**
* extSpendingContract对应的属性
*/
private Long extSpendingContractId;
/**
* extSpendingContractId对应的类型
*/
private String extSpendingContractIdType;
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.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;
/**
* @author xfchai
* @description: 过时文件通知单实体VO
* @version: 0
* @date: 2021-09-27 10:48:22
**/
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@JsonTypeInfo(
use = JsonTypeInfo.Id.CLASS,
property = "dxClassname",
defaultImpl = ObsoleteDocLinkVO.class
)
@ModelConfigProperty(syncES = true)
public class ObsoleteDocLinkVO extends IdOnlyVO implements IdVO {
/**
* dao扩展对象
*/
@DexEmbedded()
@JsonIgnore
private DxIdVOEmbeddable dxIdEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLogicDeleteVOEmbeddable dxLogicDeleteEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLinkDataVOEmbeddable<DxDocumentVO, DxDocumentVO> dxLinkDataEmbeddable;
/**
* 文档
*/
@ReferenceProperty(baseProperty = "sourceId")
@VersionProperty(curVersion = VersionRelationType.NONE, refVersion = VersionRelationType.VERSION)
private DxDocumentVO source;
/**
* 文档
*/
@ReferenceProperty(baseProperty = "targetId")
@VersionProperty(curVersion = VersionRelationType.NONE, refVersion = VersionRelationType.VERSION)
private DxDocumentVO 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;
}
...@@ -88,6 +88,62 @@ ...@@ -88,6 +88,62 @@
<artifactId>dcs-doc-autotask-interface</artifactId> <artifactId>dcs-doc-autotask-interface</artifactId>
<version>4.1-RELEASE</version> <version>4.1-RELEASE</version>
</dependency> </dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>5.2.12.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.jacob</groupId>
<artifactId>jacob</artifactId>
<version>1.19</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jacob.jar</systemPath>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-scratchpad</artifactId>
<version>3.15</version>
</dependency>
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>2.5.0</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.24</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.1.2</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>4.1.2</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>ooxml-schemas</artifactId>
<version>1.4</version>
</dependency>
</dependencies> </dependencies>
</project> </project>
package com.yonde.dcs.document.core.constants;
/**
* @author xfchai
* @ClassName DictConstants.java
* @Description 关于字典的通用变量
* @createTime 2022/01/25 16:06:00
*/
public class DictConstants {
/**
* DCR更改原因字典
*/
//设计方案更改
public static final String DESIGN_CHANGES = "DesignChanges";
//接口变更
public static final String INTERFACE_CHANGE = "InterfaceChange";
//材料代换
public static final String MATERIAL_SUBSTITUT = "MaterialSubstitut";
//其他
public static final String OTHERS = "Others";
/**
* DCR更改答复字典
*/
//同意
public static final String AGREE = "agree";
//不同意
public static final String DISAGREE = "disagree";
/**
* 更改类型
*/
//1类
public static final String CLASS_ONE = "classOne";
//2a类
public static final String CLASS_TWOA = "classTwoA";
//2b类
public static final String CLASS_TWOB = "classTwoB";
/**
* 建议更改方案
*/
//需要改设计方案
public static final String SuggestChangePlan_CHANGE_DESIGN = "changeDesign";
//需要更改设计文件/图样
public static final String SuggestChangePlan_CHANGE_DESIGN_DOC = "changeDesignDoc";
//需现场返工
public static final String SuggestChangePlan_REWORK = "reworkSite";
//其他
public static final String SuggestChangePlan_OTHER = "other";
/**
* 校核内容
*/
public static final String CheckContent = "CheckContent";
/**
* (校核)标准化审查内容
*/
public static final String CheckStandardReview = "CheckStandardReview";
/**
* 审核内容
*/
public static final String ReviewContent = "ReviewContent";
/**
* (审核)标准化审查内容
*/
public static final String ReviewContentStandardReview = "ReviewContentStandardReview";
/**
* 审定内容
*/
public static final String verifierContent = "verifierContent";
}
package com.yonde.dcs.document.core.constants;
import java.util.Arrays;
import java.util.List;
/**
* @author xfchai
* @ClassName SignConstants.java
* @Description 常量属性
* @createTime 2021/09/02 14:42:00
*/
public final class SignConstants {
//签名取值
public static final String SIGN_KEY_PREPARED = "编制";
public static final String SIGN_KEY_TSSH = "同室审核";
public static final String SIGN_KEY_FXTZSSH = "分系统总师审核";
public static final String SIGN_KEY_GY = "工艺";
public static final String SIGN_KEY_QF = "签发";
public static final String SIGN_KEY_ZTSSH = "总体室审核";
public static final String SIGN_KEY_APPROVED = "批准";
public static final String SIGN_KEY_STANDARD = "标准化";
public static final String SIGN_KEY_ZTS = "总体室";
public static final String SIGN_KEY_ZTSQS = "总体室签审";
public static final String SIGN_KEY_TZSH = "提资审核";
public static final String SIGN_KEY_SH = "审核";
public static final String SIGN_KEY_CLJD = "编制不符合项处理单处理决定任务";
public static final String SIGN_KEY_SWYZ = "编制不符合项处理单实物验证项任务";
public static final String SIGN_KEY_SQSH = "申请审核";
public static final String SIGN_KEY_CHECKER = "校核";
public static final String SIGN_KEY_SD = "审定";
public static final String SIGN_KEY_JKHQ = "接口会签";
public static final String SIGN_KEY_CGB = "采购部会签";
public static final String SIGN_KEY_SCB = "市场部会签";
public static final String SIGN_KEY_CPYF = "产品研发部复核";
public static final String SIGN_KEY_PBB = "品保部";
public static final String SIGN_ZBB = "质保部签审";
public static final String SIGN_SJX = "设计项签审";
public static final String SIGN_ZTS = "总体室签审";
public static final String SIGN_GCB = "工程部签审";
public static final String SIGN_SD = "审定";
public static final String SIGN_KEY_ZTSJKSC = "总体室接口审查";
public static final String SIGN_KEY_ZXSC = "专项审查";
public static final String SIGN_KEY_JKHQSC = "接口会签审查";
//NCR审查单模板变量(质保部签审)
public static final String ZBBprocessName = "ZBBprocessName";
public static final String ZBBremark = "ZBBremark";
public static final String ZBBfzr_photo = "ZBBfzr_photo";
public static final String ZBBfzr_date = "ZBBfzr_date";
//NCR审查单模板变量(设计项签审)
public static final String SJXprocessName = "SJXprocessName";
public static final String SJXremark = "SJXremark";
public static final String SJXfzr_photo = "SJXfzr_photo";
public static final String SJXfzr_date = "SJXfzr_date";
//NCR审查单模板变量(总体室签审)
public static final String ZTSprocessName = "ZTSprocessName";
public static final String ZTSremark = "ZTSremark";
public static final String ZTSfzr_photo = "ZTSfzr_photo";
public static final String ZTSfzr_date = "ZTSfzr_date";
//NCR审查单模板变量(工程部签审)
public static final String GCBprocessName = "GCBprocessName";
public static final String GCBremark = "GCBremark";
public static final String GCBfzr_photo = "GCBfzr_photo";
public static final String GCBfzr_date = "GCBfzr_date";
/**
* 定义流程判断节点常量
*/
public final static List WfResultList = Arrays.asList("通过", "提交签审", "提交审阅", "提交", "提交提资审阅", "不需要总体室会签", "外协采购单位(过工程部)", "设计协同单位及其他");
/**
* 定义NCR审查单流程节点常量
*/
public final static List NCRSignTaskList = Arrays.asList(SignConstants.SIGN_ZBB, SignConstants.SIGN_GCB, SignConstants.SIGN_SJX, SignConstants.SIGN_ZTS, SignConstants.SIGN_KEY_APPROVED);
/**
* 定义总体室签审节点名称
*/
public final static List ZTSSignTaskList = Arrays.asList(SIGN_KEY_ZTS, SIGN_ZTS, SIGN_KEY_ZTSJKSC);
/**
* 定义流程路由常量
*/
public final static List WfRoutingList = Arrays.asList("通过", "提交");
}
\ No newline at end of file
package com.yonde.dcs.document.core.constants;
/**
* @author xfchai
* @ClassName TemplateConstants.java
* @Description 各个模板名称
* @createTime 2021/11/15 14:50:00
*/
public class TemplateConstants {
/**
* 内部接口模板名称
*/
public static final String INTERFACE_TEMPLATE = "InterfaceTemplate.ftl";
/**
* 技术联系单模板名称
*/
public static final String CONTACTLIST_TEMPLATE = "ContactListTemplate.ftl";
/**
* 工作联系单模板名称
*/
public static final String WORK_CONTACTLIST_TEMPLATE = "WorkContactListTemplate.ftl";
/**
* 设计变更模板名称
*/
public static final String DESIGN_CHANGE_TEMPLATE = "DesignChangeTemplate.ftl";
/**
* 过时文件通知单模板名称
*/
public static final String OUTDATED_NOTIFY_TEMPLATE = "OutdatedDocNotifyTemplate.ftl";
/**
* 设计文件需求申请单
*/
public static final String DESIGN_DOC_APPLICATION_TEMPLATE = "DesignDocApplicatTemplate.ftl";
/**
* 设计输入资料单
*/
public static final String DESIGN_ENTER_TEMPLATE = "DesignEnterTemplate.ftl";
/**
* 设计输入资料单
*/
public static final String NCR_TEMPLATE = "NCRTemplate.ftl";
/**
* NCR审查模板
*/
public static final String NCR_REVIEW_TEMPLATE = "NCRReviewTemplate.ftl";
}
package com.yonde.dcs.document.core.controller;
import cn.hutool.core.collection.CollectionUtil;
import com.yonde.dcs.document.common.vo.DxDocumentVO;
import com.yonde.dcs.document.core.constants.Constants;
import com.yonde.dcs.document.core.service.ExtAutoTaskService;
import com.yonde.dcs.document.core.service.ExtSendFormLinkService;
import com.yonde.dcs.document.core.util.ExtDocUtil;
import com.yonde.dex.basedata.entity.api.ApiResult;
import com.yonde.dex.basedata.entity.vo.IdVO;
import com.yonde.dex.taskmonitor.api.interfaces.TaskMessagePusher;
import com.yonde.dex.wfc.common.vo.DxWfProcessSearchVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessVO;
import com.yonde.dex.wfc.feign.api.WfcProcessFeign;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.*;
/**
* @program: service
* @description: 自动任务服务接口
* @author: dang wei
* @create: 2021-07-13 10:01
*/
@RestController
@RequestMapping("/task")
@Api(tags = "自动任务服务接口")
public class ExtAutoTaskController {
@Autowired
WfcProcessFeign wfcProcessFeign;
@Autowired
TaskMessagePusher taskMessagePusher;
@Autowired
private ExtAutoTaskService autoTaskService;
@Autowired
private ExtDocUtil extDocUtil;
@Autowired
private ExtSendFormLinkService sendFormLinkService;
@ApiOperation("电子签名")
@PostMapping({"/esign"})
public ApiResult esign(@RequestBody IdVO entity) {
DxWfProcessSearchVO dxWfProcessSearchVO = new DxWfProcessSearchVO();
dxWfProcessSearchVO.setPboClass(entity.getDxClassname());
dxWfProcessSearchVO.setPboId(entity.getId());
Page<DxWfProcessVO> dxWfProcessVODxPage = this.wfcProcessFeign.getProcessList(dxWfProcessSearchVO, 1, 1);
if (CollectionUtil.isNotEmpty(dxWfProcessVODxPage.getContent())) {
DxWfProcessVO dxWfProcessVO = dxWfProcessVODxPage.getContent().get(0);
String pboKey = "";
String signNode = "";
if (DxDocumentVO.class.getName().equals(entity.getDxClassname())) {
pboKey = "doc";
signNode = "Activity_0st1yf8";
}
// DxWfTaskContext dxWfTaskContext = new DxWfTaskContext(dxWfProcessVO.getBusinessKey(), dxWfProcessVO.getId(), dxWfProcessVO.getProcessDef().getId(), signNode, null, (Map) null);
//todo 在4.1中未找到WfcSignMessage 注释了71-74行
// WfcSignMessage wfcSignMessage = new WfcSignMessage(new HashMap());
// wfcSignMessage.setWfTaskContext(dxWfTaskContext);
// wfcSignMessage.setSignType(pboKey);
// TaskMessage taskMessage = (new WfcSignMessageBuilder()).newTasks(wfcSignMessage);
// this.taskMessagePusher.sendMessage(taskMessage);
this.taskMessagePusher.sendMessage(null);
return ApiResult.ok("重新发送电子签名请求成功!");
} else {
return ApiResult.ok("该对象未走签审流程!");
}
}
@ApiOperation(value = "更新PDF", notes = "更新PDF", httpMethod = "GET")
@GetMapping(value = "/updatePdf/{id}")
public ApiResult updatePdf(@PathVariable Long id) {
DxDocumentVO documentVO = extDocUtil.findDocObjFileLinks(id);
//重新生成设计图册签名
autoTaskService.generateQHTechDoc(documentVO, null);
if (Constants.OUTDATED_NOTIFY.equals(documentVO.getSubTypeName())) {
//特殊处理过时文件通知单
autoTaskService.generateOutdatedDocNotify(documentVO);
} else {
//重新生成单据签名
autoTaskService.generateDocWordSign(documentVO, null, "二");
}
return ApiResult.ok("更新成功!");
}
}
...@@ -29,6 +29,12 @@ import org.springframework.stereotype.Controller; ...@@ -29,6 +29,12 @@ import org.springframework.stereotype.Controller;
@BasePermission("dcs-doc:ExtInforming") @BasePermission("dcs-doc:ExtInforming")
public class ExtInformingController<V extends ExtInformingVO, S extends ExtInformingService<V>> extends ExtInformingControllerShadow<V, S> { public class ExtInformingController<V extends ExtInformingVO, S extends ExtInformingService<V>> extends ExtInformingControllerShadow<V, S> {
@ApiOperation("获取接口提资信息")
@GetMapping(value = "/getInforming")
public ApiResult getInforming(@RequestParam("id") Long id) {
List informing = getService().getInforming(id);
return ApiResult.ok(informing, "查询成功");
}
} }
......
package com.yonde.dcs.document.core.controller; package com.yonde.dcs.document.core.controller;
import org.springframework.stereotype.Controller;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import java.util.List;
import com.yonde.dcs.document.common.vo.ExtReviewDocLinkVO; import com.yonde.dcs.document.common.vo.ExtReviewDocLinkVO;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Autowired;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;
import com.yonde.dcs.document.core.service.ExtReviewDocLinkService;
import com.yonde.dex.basedata.entity.api.ApiResult;
import com.yonde.dcs.document.core.controller.shadow.ExtReviewDocLinkControllerShadow; import com.yonde.dcs.document.core.controller.shadow.ExtReviewDocLinkControllerShadow;
import javax.annotation.Resource; import com.yonde.dcs.document.core.service.ExtReviewDocLinkService;
import com.yonde.dex.basedata.auth.annos.BasePermission; import com.yonde.dex.basedata.auth.annos.BasePermission;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/** /**
* @description: ExtReviewDocLink-Controller * @description: ExtReviewDocLink-Controller
...@@ -29,7 +29,22 @@ import org.springframework.stereotype.Controller; ...@@ -29,7 +29,22 @@ import org.springframework.stereotype.Controller;
@Controller(ExtReviewDocLinkController.BEAN_NAME) @Controller(ExtReviewDocLinkController.BEAN_NAME)
public class ExtReviewDocLinkController<V extends ExtReviewDocLinkVO, S extends ExtReviewDocLinkService<V>> extends ExtReviewDocLinkControllerShadow<V, S> { public class ExtReviewDocLinkController<V extends ExtReviewDocLinkVO, S extends ExtReviewDocLinkService<V>> extends ExtReviewDocLinkControllerShadow<V, S> {
@Autowired
private ExtReviewDocLinkService reviewDocLinkService;
/**
* 导出主审文件清单
* ”评审”类文件给出“导出主审文件清单”、“导出副审文件清单”功能
*
* @param response
* @param id (versionId)
* @throws IOException
*/
@ApiOperation(value = "导出主审副审文件清单", notes = "导出主审副审文件清单", httpMethod = "GET")
@GetMapping(value = "/exportMainReviewFileList")
public void exportMainReviewFileList(HttpServletResponse response, @RequestParam("id") Long id) throws IOException {
reviewDocLinkService.exportMainAndSubReviewFileList(response, id);
}
} }
package com.yonde.dcs.document.core.events;
import com.yonde.dcs.document.common.vo.DxDocumentVO;
import com.yonde.dcs.document.common.vo.ExtIncomeDetailVO;
import com.yonde.dcs.document.common.vo.ExtSpendingDetailVO;
import com.yonde.dcs.document.core.service.DxDocumentService;
import com.yonde.dcs.document.core.service.ExtDocService;
import com.yonde.dcs.document.core.util.ExtDocUtil;
import com.yonde.dcs.plan.feign.ExtIncomeContractServiceFeign;
import com.yonde.dcs.plan.feign.ExtSpendingContractServiceFeign;
import com.yonde.dex.dao.service.BaseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import org.springframework.transaction.event.TransactionPhase;
import org.springframework.transaction.event.TransactionalEventListener;
/**
* @program: inet-pdm-service
* @description: 文档事务事件
* @author: dang wei
* @create: 2021-11-23 14:23
*/
@Component
@Slf4j
public class DocTransactionEvent {
@Autowired
private ExtDocService extDocService;
@Autowired
@Qualifier("documentServiceImpl")
DxDocumentService documentService;
@Autowired
private ExtIncomeContractServiceFeign extIncomeContractService;
@Autowired
private ExtSpendingContractServiceFeign extSpendingContractService;
@Autowired
private ExtDocUtil extDocUtil;
@TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT)
public void afterCommit(BaseService.DataChangeEvent event) {
final String eventType = event.getEventType();
final BaseService.ChangeType changeType = BaseService.ChangeType.valueOf(eventType);
if (changeType == BaseService.ChangeType.POST_CREATE || changeType == BaseService.ChangeType.POST_UPDATE || changeType == BaseService.ChangeType.POST_DELETE) {
event.getEventTargets().forEach(t -> {
DxDocumentVO doc = new DxDocumentVO();
if (t instanceof ExtIncomeDetailVO) {
//刷新收入合同相关金额
ExtIncomeDetailVO extIncomeDetailVO = (ExtIncomeDetailVO) t;
this.refreshInContractAmount(extIncomeDetailVO.getExtIncomeContractId());
} else if (t instanceof ExtSpendingDetailVO) {
//刷新支出合同相关金额
ExtSpendingDetailVO spendingDetailVO = (ExtSpendingDetailVO) t;
this.refreshSpeContractAmount(spendingDetailVO.getExtSpendingContractId());
}
});
}
}
/**
* 刷新收入合同金额
*
* @param contractId
*/
private void refreshInContractAmount(Long contractId) {
//已到款
//待拨付
//todo feign添加
// extIncomeContractService.calculateIncome(contractId);
//XXX年到款
//todo feign添加
// extIncomeContractService.reCalculIncomeById(contractId);
}
/**
* 刷新支出合同金额
*
* @param contractId
*/
private void refreshSpeContractAmount(Long contractId) {
//已付金额
//未付金额
//付款比例
//todo feign添加
// extSpendingContractService.calculateSpending(contractId);
}
}
package com.yonde.dcs.document.core.events;
import cn.hutool.core.io.FileUtil;
import cn.hutool.extra.spring.SpringUtil;
import com.alibaba.fastjson.JSONObject;
import com.yonde.dcs.document.common.vo.DxDocumentVO;
import com.yonde.dcs.document.common.vo.ExtInterfaceInfoLinkVO;
import com.yonde.dcs.document.core.constants.Constants;
import com.yonde.dcs.document.core.factory.InternalInterfaceUtils;
import com.yonde.dcs.document.core.factory.OutdatedDocNotifyUtils;
import com.yonde.dcs.document.core.service.ExtDocService;
import com.yonde.dcs.document.core.util.ExtDocUtil;
import com.yonde.dcs.document.core.util.FileUtils;
import com.yonde.dcs.document.core.util.WorkFlowUtil;
import com.yonde.dcs.document.core.word.ImportWordService;
import com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import java.io.File;
import java.io.FileInputStream;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* @author xfchai
* @ClassName ProcessDataUtils.java
* @Description 数据处理工具类
* @createTime 2022/02/23 16:11:00
*/
@Component
@Slf4j
public class ProcessDataUtils {
//word模板路径
public static final String PATH = Constants.MTEMPLATE_ABSOLUTE_PATH;
@Autowired
private ExtDocService extDocService;
@Autowired
private ImportWordService importWordService;
@Autowired
private ExtDocUtil extDocUtil;
@Autowired
private WorkFlowUtil workFlowUtil;
// @Autowired
// private DexWorkFlowService dexWorkFlowService;
/**
* 单独处理过时文件通知单数据
*/
public void processOutdatedDocNotify(DxDocumentVO documentVo) {
extDocService.getDocWord(documentVo, OutdatedDocNotifyUtils.class, new DxWfProcessInfoVO(), "");
}
/**
* 处理单据word数据
*
* @param documentVo
*/
public void processData(DxDocumentVO documentVo) {
String subTypeName = documentVo.getSubTypeName();
//todo
// WfProcessInstVO DxWfProcessInstVO = workFlowUtil.getWfProcessInst(documentVo);
// DxWfProcessInfoVO wfProcessInfoVO = dexWorkFlowService.getProcessInstDetailById(DxWfProcessInstVO.getId());
// switch (subTypeName) {
// case Constants.INTERNAL_INTERFACE:
// this.generateInterFaceWord(documentVo, new InterfaceInfoLinkVO(), wfProcessInfoVO);
// break;
// case Constants.CONTACTLIST:
// extDocService.getDocWord(documentVo, ContactListUtils.class, wfProcessInfoVO, "一");
// break;
// case Constants.WORK_CONTACTLIST:
// extDocService.getDocWord(documentVo, WorkContactListUtils.class, wfProcessInfoVO, "");
// break;
// case Constants.DESIGN_CHANGE:
// extDocService.getDocWord(documentVo, DesignChangeUtils.class, wfProcessInfoVO, "");
// break;
// case Constants.DESIGN_APPLICATION:
// extDocService.getDocWord(documentVo, DesignDocApplicatUtils.class, wfProcessInfoVO, "");
// break;
// case Constants.DESIGN_ENTER:
// extDocService.getDocWord(documentVo, DesignEnterUtils.class, wfProcessInfoVO, "");
// break;
// case Constants.NCR:
// extDocService.getDocWord(documentVo, NCRUtils.class, wfProcessInfoVO, "");
// break;
// case Constants.DEN:
// //根据模板生成两张不同澄清单
// extDocService.getDocWord(documentVo, DENUtils.class, wfProcessInfoVO, "");
// break;
// }
}
/**
* 新建内部接口文档-生成内部接口的word
*
* @param documentVo
* @param infoLinkVO 提资人信息
*/
public void generateInterFaceWord(DxDocumentVO documentVo, ExtInterfaceInfoLinkVO infoLinkVO, DxWfProcessInfoVO wfProcessInfoVO) {
try {
String file = documentVo.getSubTypeName();
String outWordFilePath = Constants.MERGER_FILE_ABSOLUTE_PATH + documentVo.getSubTypeName() + "\\" + documentVo.getNumber() + "\\";
//生成特定的文档目录,保存生成的word文件
FileUtil.mkdir(outWordFilePath);
Class<?> clazz = Class.forName("com.inet.pdm.factory.InternalInterfaceUtils");
Method settingDataMethod = clazz.getMethod("settingData", DxDocumentVO.class, ExtInterfaceInfoLinkVO.class, DxWfProcessInfoVO.class);
JSONObject jsonObject = (JSONObject) settingDataMethod.invoke(SpringUtil.getBean(InternalInterfaceUtils.class), documentVo, infoLinkVO, wfProcessInfoVO);
//生成word文件方法
importWordService.getWordAllTable(jsonObject, PATH + file + ".docx", outWordFilePath + "outFile.docx");
log.info("生成word文件内容结束====");
//获取文件夹的所有文件--绝对路径
List<String> fileList = new ArrayList<>();
File[] files = FileUtil.ls(outWordFilePath);
Arrays.stream(files).forEach(item -> {
fileList.add(item.getAbsolutePath());
});
if (CollectionUtils.isEmpty(fileList)) {
log.error("生成的word文件目录内容为空====");
} else {
// String filePath = fileList.stream().filter(item -> item.endsWith(".docx")).findFirst().get();
String pdfFilePath = fileList.stream().filter(item -> item.endsWith(".pdf")).findFirst().get();
//将pdf上传到附件中
extDocService.extractedAttachFile(documentVo, new FileInputStream(pdfFilePath), "", Constants.ATTACH_FILE);
log.info("获取生成的word文件内容结束====");
}
//删除生成后的临时文件
FileUtils.deleteDirectory(Constants.MERGER_FILE_ABSOLUTE_PATH + documentVo.getSubTypeName() + "\\" + documentVo.getNumber());
} catch (Exception e) {
log.error("新建内部接口文档-生成内部接口的word错误:{}" + e.getMessage());
}
}
}
package com.yonde.dcs.document.core.events;
import com.yonde.dex.basedata.exception.DxBusinessException;
import com.yonde.dex.context.common.vo.DxContextVO;
import com.yonde.dex.context.feign.ContextServiceFeign;
import com.yonde.dex.dao.service.BaseService;
import com.yonde.dex.dao.service.listener.AbstractEventListener;
import com.yonde.dex.dict.feign.DictDataFeignService;
import com.yonde.dex.dict.service.vo.DictDataVO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
@Service
@Slf4j
public class ValidateSecretListener extends AbstractEventListener<BaseService.DataChangeEvent> {
@Autowired
private DictDataFeignService dictDataService;
@Autowired
private ContextServiceFeign contextServiceFeign;
@Override
public void onAsynEvent(BaseService.DataChangeEvent event) {
}
@Override
public void onEvent(BaseService.DataChangeEvent event) {
// 页面资源变更的时候
switch (event.operationType) {
case POST_CREATE:
extValidateSecret(event.eventTargets);
break;
case POST_UPDATE:
extValidateSecret(event.eventTargets);
break;
case POST_DELETE:
break;
default:
break;
}
}
@Transactional(rollbackFor = {Exception.class, Error.class})
void extValidateSecret(Iterable<?> objects) {
for (Object data : objects) {
log.info(">>>>>extValidateSecret data:" + data);
log.info(">>>>>extValidateSecret data.getClass:" + data.getClass());
//校验项目中心相关对象密级和计划密级
if (data instanceof DxContextVO) {
String checkResultStr = checkDxObjectSecret((DxContextVO) data);
if (!StringUtils.isEmpty(checkResultStr)) {
throw new DxBusinessException("500", checkResultStr);
}
}
}
}
/**
* 校验计划、收入合同、支出合同密级与项目的关系
*
* @param dxObjectVo
* @return
*/
private String checkDxObjectSecret(DxContextVO dxObjectVo) {
String checkResultStr = "";
Boolean checkResult = true;
//todo
// if (dxObjectVo instanceof ExtPlanVO) {
// checkResult = checkDxObjectVoSecret(dxObjectVo);
// checkResultStr = "计划密级不能高于项目密级!";
// }
// if (dxObjectVo instanceof ExtIncomeContractVO) {
// checkResult = checkDxObjectVoSecret(dxObjectVo);
// checkResultStr = "收入合同密级不能高于项目密级!";
// }
// if (dxObjectVo instanceof ExtSpendingContractVO) {
// checkResult = checkDxObjectVoSecret(dxObjectVo);
// checkResultStr = "支出合同密级不能高于项目密级!";
// }
if (checkResult) {
checkResultStr = "";
}
return checkResultStr;
}
/**
* 校验计划、收入合同、支出合同密级与项目的关系
*
* @return
*/
//todo
private Boolean checkDxObjectVoSecret(DxContextVO dxObjectVo) {
// if (StringUtils.isBlank(dxObjectVo.getSecretCode())) {
// return true;
// }
// DxContextVO dxContextVO = contextServiceFeign.get(dxObjectVo.getDxContextId());
// return checkTargetSecret(dxContextVO.getSecretCode(), dxObjectVo.getSecretCode());
return false;
}
/**
* 校验密级信息
*
* @param sourceSecret
* @param targetSecret
* @return
*/
private Boolean checkTargetSecret(String sourceSecret, String targetSecret) {
DictDataVO docSecretCodeDict;
if (StringUtils.isEmpty(sourceSecret)) {
//密级为空则获取默认密级
docSecretCodeDict = dictDataService.getMarkDictData("SecretCode");
} else {
docSecretCodeDict = dictDataService.getDictCode("SecretCode", sourceSecret);
}
List<DictDataVO> secretCodeDictList = dictDataService.getDictDatas("SecretCode");
if (CollectionUtils.isNotEmpty(secretCodeDictList)) {
Set<String> enableSecretCodeSet = secretCodeDictList.stream()
.filter(x -> x.getDictSeq() <= docSecretCodeDict.getDictSeq())
.map(DictDataVO::getDictKey)
.collect(Collectors.toSet());
if (enableSecretCodeSet != null && enableSecretCodeSet.contains(targetSecret)) {
return true;
}
}
return false;
}
}
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.common.vo.ExtInterfaceInfoLinkVO;
import com.yonde.dcs.document.core.constants.Constants;
import com.yonde.dcs.document.core.service.ExtDocService;
import com.yonde.dex.dfs.vo.ObjFileLinkVO;
import com.yonde.dex.user.feign.DxUserInfoFeign;
import com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author xfchai
* @ClassName InterfaceUtils.java
* @Description 内部接口
* @createTime 2021/11/16 14:13:00
*/
@Component
@Slf4j
public class InternalInterfaceUtils {
@Autowired
private ExtDocService extDocService;
@Autowired
private DxUserInfoFeign userService;
/**
* 填充数据
*
* @param
* @return
*/
public JSONObject settingData(DxDocumentVO v, ExtInterfaceInfoLinkVO infoLinkVO, DxWfProcessInfoVO wfProcessInfoVO) {
//获取动态属性
// Map<String, Object> dynamicAttrs = v.getDynamicAttrs();
// String designPhase = Objects.isNull(dynamicAttrs.get("designPhase")) ? "" : (String) dynamicAttrs.get("designPhase");
// String content = Objects.isNull(dynamicAttrs.get("content")) ? "" : (String) dynamicAttrs.get("content");
// String applicant = Objects.isNull(dynamicAttrs.get("applicant")) ? "" : (String) dynamicAttrs.get("applicant");
// String aplicationDate = Objects.isNull(dynamicAttrs.get("aplicationDate")) ? "" : (String) dynamicAttrs.get("aplicationDate");
// String requestDate = Objects.isNull(dynamicAttrs.get("requestDate")) ? "" : (String) dynamicAttrs.get("requestDate");
// String appReviewerDate = Objects.isNull(dynamicAttrs.get("appReviewerDate")) ? "" : (String) dynamicAttrs.get("appReviewerDate");
// String ztsSignDate = Objects.isNull(dynamicAttrs.get("ztsSignDate")) ? "" : (String) dynamicAttrs.get("ztsSignDate");
// JSONObject jsonObject = new JSONObject();
// //项目代号
// String projectCode = ObjectUtils.isEmpty(v.getProjectCode()) ? "" : v.getProjectCode();
// jsonObject.put("apply", "\u0052");
// //密级
// jsonObject.put("SecretCode", extDocService.searchDictDataByDictCode(Constants.SECRET_CODE, v.getSecretCode()));
// jsonObject.put("projectCode", projectCode);
// //设计阶段
// jsonObject.put("designPhase", extDocService.searchDictDataByDictCode(Constants.DESIGN_STAGE, designPhase));
// //接口资料编号
// jsonObject.put("number", ObjectUtils.isEmpty(v.getNumber()) ? "" : v.getNumber());
// //接口名称
// jsonObject.put("name", ObjectUtils.isEmpty(v.getName()) ? "" : v.getName());
// //申请方
// jsonObject.put("applicant", applicant);
// //申请人日期
// jsonObject.put("aplicationDate", DateUtils.conversionDate(aplicationDate));
// String userId = (String) dynamicAttrs.get("applicantorId");
// DxUserInfoVO userVO = (DxUserInfoVO) userService.get(Long.parseLong(userId));
// //申请人签审
// jsonObject.put("sqr_photo", userVO.getUserAccount() + ".png");
// //内容
// jsonObject.put("content", content);
// //要求提交日期
// jsonObject.put("requestDate", DateUtils.conversionDate(requestDate));
// String appReviewer = (String) dynamicAttrs.get("appReviewer");
// if (StringUtils.isEmpty(appReviewer)) {
// log.error("申请审核人为空!");
// }
// if (StringUtils.isEmpty((String) dynamicAttrs.get("ztsSign"))) {
// log.error("总体室签审为空!");
// }
// //申请审核人
// jsonObject.put("sqshr_photo", (String) dynamicAttrs.get("appReviewer") + ".png");
// //总体室签审/日期
// jsonObject.put("ztsSign", (String) dynamicAttrs.get("ztsSign") + ".png");
// //申请审核人日期
// jsonObject.put("appReviewerDate", DateUtils.conversionDate(appReviewerDate));
// jsonObject.put("ztsSignDate", DateUtils.conversionDate(ztsSignDate));
// //页数
// jsonObject.put("pages", v.getAttachPages());
// //判断内部接口基本信息有无附件属性
// checkObjFileLinks(jsonObject, v.getObjFileLinks());
// ExtInformingVO informingVO = infoLinkVO.getTarget();
// if (ObjectUtils.isEmpty(informingVO)) {
// jsonObject.put("infoAttach", "\u00A3");
// jsonObject.put("infoNoAttach", "\u00A3");
// return jsonObject;
// } else {
// jsonObject.put("informativeUnit", Objects.isNull(informingVO.getInformativeUnit()) ? "" : informingVO.getInformativeUnit());
// //提交人日期
// DxUserInfoVO informativeUser = informingVO.getInformativeUser();
// if (!ObjectUtils.isEmpty(informativeUser)) {
// String user = informativeUser.getUserAccount() + ".png";
// //提交人
// jsonObject.put("tjr_photo", user);
// }
// //提交人日期
// jsonObject.put("informativeDate", DateUtils.converLocalDateToString(informingVO.getCreateTime()));
// jsonObject.put("infoContent", Objects.isNull(informingVO.getInfoContent()) ? "" : informingVO.getInfoContent());
// jsonObject.put("remark", Objects.isNull(informingVO.getInfoComment()) ? "" : informingVO.getInfoComment());
// //有无附件属性
// List<ObjFileLinkVO> informingVOObjFileLinks = informingVO.getObjFileLinks();
// this.checkInforObjFileLinks(jsonObject, informingVOObjFileLinks);
// //todo 获取参与者
// List<WfTaskDefinitionVO> activities = wfProcessInfoVO.getActivityInfo();
// if (!CollectionUtils.isEmpty(activities)) {
// for (WfTaskDefinitionVO wf : activities) {
// if (SignConstants.SIGN_KEY_PREPARED.equals(wf.getTaskName())) {
// List<WfProcessTaskVO> taskList = wf.getTaskList();
// for (WfProcessTaskVO wfPro : taskList) {
// //编制且为提交时,把编制人填写备注的属性,写入word文档
// if (SignConstants.WfRoutingList.contains(wfPro.getResult())) {
// jsonObject.put("decription", ObjectUtils.isEmpty(wfPro.getComments()) ? "" : wfPro.getComments().get(0));
// }
// }
// }
// }
// //写入签名数据
// //负责人签字
// jsonObject.put("sqfqr_photo", extDocService.getSignImage(activities, SignConstants.SIGN_KEY_PREPARED));
// jsonObject.put("sqfqr_date", extDocService.getEndDate(activities, SignConstants.SIGN_KEY_PREPARED));
// //总体室签审/日期
// jsonObject.put("zts_photo", extDocService.getSignImage(activities, SignConstants.SIGN_KEY_ZTSQS));
// jsonObject.put("zts_date", extDocService.getEndDate(activities, SignConstants.SIGN_KEY_ZTSQS));
// //提资审核
// jsonObject.put("sh_photo", extDocService.getSignImage(activities, SignConstants.SIGN_KEY_TZSH));
// jsonObject.put("sh_date", extDocService.getEndDate(activities, SignConstants.SIGN_KEY_TZSH));
// //批准
// jsonObject.put("pz_photo", extDocService.getSignImage(activities, SignConstants.SIGN_KEY_APPROVED));
// jsonObject.put("pz_date", extDocService.getEndDate(activities, SignConstants.SIGN_KEY_APPROVED));
// }
// return jsonObject;
// }
return null;
}
/**
* 校验提资信息是否有附件
*
* @param jsonObject
* @param informingVOObjFileLinks
*/
private void checkInforObjFileLinks(JSONObject jsonObject, List<ObjFileLinkVO> informingVOObjFileLinks) {
if (CollectionUtils.isEmpty(informingVOObjFileLinks)) {
jsonObject.put("infoNoAttach", "\u0052");
jsonObject.put("infoAttach", "\u00A3");
} else {
List<ObjFileLinkVO> collect = informingVOObjFileLinks.stream().filter(item ->
Constants.ATTACH_FILE.equals(item.getContentType())
).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(collect)) {
jsonObject.put("infoAttach", "\u0052");
jsonObject.put("infoNoAttach", "\u00A3");
} else {
jsonObject.put("infoNoAttach", "\u0052");
jsonObject.put("infoAttach", "\u00A3");
}
}
}
/**
* 校验内部接口基本信息内容是否附件
*
* @param jsonObject
* @param objFileLinks
*/
private void checkObjFileLinks(JSONObject jsonObject, List<ObjFileLinkVO> objFileLinks) {
if (CollectionUtils.isEmpty(objFileLinks)) {
jsonObject.put("interNoAttach", "\u0052");
jsonObject.put("interAttach", "\u00A3");
} else {
List<ObjFileLinkVO> collect = objFileLinks.stream().filter(item ->
Constants.APP_CONTENT_ATTCH.equals(item.getContentType())
).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(collect)) {
//对号
jsonObject.put("interAttach", "\u0052");
jsonObject.put("interNoAttach", "\u00A3");
} else {
jsonObject.put("interNoAttach", "\u0052");
jsonObject.put("interAttach", "\u00A3");
}
}
}
}
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.common.vo.ExtCheckedFileLinkVO;
import com.yonde.dcs.document.common.vo.ExtReviewDocLinkVO;
import com.yonde.dcs.document.core.constants.Constants;
import com.yonde.dcs.document.core.service.ExtDocService;
import com.yonde.dcs.document.core.util.DateUtils;
import com.yonde.dcs.document.entity.excel.MeetingPojo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
* @author xfchai
* @ClassName MeetingUtils.java
* @Description 评审会议资料
* @createTime 2022/02/22 14:35:00
*/
@Component
public class MeetingUtils {
@Autowired
private ExtDocService extDocService;
/**
* 填充评审会议资料数据
*
* @param
* @return
*/
public JSONObject settingDocData(DxDocumentVO doc, List<ExtReviewDocLinkVO> reviewDocLinkVOList, List<ExtCheckedFileLinkVO> checkedFileLinkVOList) {
JSONObject jsonObject = new JSONObject();
if (!ObjectUtils.isEmpty(doc)) {
Map<String, Object> dynamicAttrs = doc.getDynamicAttrs();
//会议日期
String mettingDate = Objects.isNull(dynamicAttrs.get("mettingDate")) ? "" : (String) dynamicAttrs.get("mettingDate");
// String secret = Objects.isNull(dynamicAttrs.get("secret")) ? "" : (String) dynamicAttrs.get("secret");
String secret = doc.getSecretCode();
jsonObject.put("number", doc.getNumber());
jsonObject.put("name", doc.getName());
jsonObject.put("meetDate", DateUtils.conversionDate(mettingDate));
jsonObject.put("secret", extDocService.searchDictDataByDictCode(Constants.SECRET_CODE, secret));
}
List<MeetingPojo> meetingPojos = new ArrayList<>();
//送审文件
if (!CollectionUtils.isEmpty(reviewDocLinkVOList)) {
for (int i = 0; i < reviewDocLinkVOList.size(); i++) {
ExtReviewDocLinkVO item = reviewDocLinkVOList.get(i);
MeetingPojo meeting = new MeetingPojo();
meeting.setSnumber(Integer.toString(i + 1));
meeting.setRemark(item.getRemark());
meeting.setSecret(item.getSecret());
meeting.setCopies(item.getCopies());
meeting.setPages(item.getPages());
meeting.setFileName(item.getDocName());
DxDocumentVO target = item.getTarget();
if (!ObjectUtils.isEmpty(target)) {
//“文件代号”-“版本”-“阶段状态”-“份数”(QH03-J036-207-B-PRE-01~17)
meeting.setBatchName(item.getDocNumber() + "-" + target.getDisplayVersion() + "-" + target.getPhaseState() + "-" + item.getCopies());
} else {
//“文件代号”-“版本”-“阶段状态”-“份数”(QH03-J036-207-B-PRE-01~17)
meeting.setBatchName(item.getDocNumber() + "-" + item.getCopies());
}
meetingPojos.add(meeting);
}
}
//集合设置值
jsonObject.put("reviewDocList", meetingPojos);
List<MeetingPojo> checkedFilePojo = new ArrayList<>();
//被查文件
if (!CollectionUtils.isEmpty(checkedFileLinkVOList)) {
for (int i = 0; i < checkedFileLinkVOList.size(); i++) {
ExtCheckedFileLinkVO item = checkedFileLinkVOList.get(i);
MeetingPojo meeting = new MeetingPojo();
meeting.setSnumber(Integer.toString(i + 1));
meeting.setRemark(item.getRemark());
meeting.setSecret(item.getSecret());
meeting.setCopies(item.getCopies());
meeting.setPages(item.getPages());
meeting.setFileName(item.getDocName());
DxDocumentVO target = item.getTarget();
if (!ObjectUtils.isEmpty(target)) {
//“文件代号”-“版本”-“阶段状态”-“份数”(QH03-J036-207-B-PRE-01~17)
meeting.setBatchName(item.getDocNumber() + "-" + target.getDisplayVersion() + "-" + target.getPhaseState() + "-" + item.getCopies());
} else {
//“文件代号”-“版本”-“阶段状态”-“份数”(QH03-J036-207-B-PRE-01~17)
meeting.setBatchName(item.getDocNumber() + "-" + item.getCopies());
}
checkedFilePojo.add(meeting);
}
jsonObject.put("checkedFileLink", checkedFilePojo);
}
return jsonObject;
}
}
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");
}
}
}
package com.yonde.dcs.document.core.factory;
import cn.hutool.core.io.FileUtil;
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.service.ExtDocService;
import com.yonde.dcs.document.core.util.DateUtils;
import com.yonde.dcs.document.core.util.WorkFlowUtil;
import com.yonde.dcs.document.core.word.ImportWordService;
import com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
import java.util.Map;
import java.util.Objects;
/**
* @author xfchai
* @ClassName OutdatedDocNotifyUtils.java
* @Description 过时文件通知
* @createTime 2021/11/23 09:54:00
*/
@Component
public class OutdatedDocNotifyUtils {
@Autowired
private ExtDocService extDocService;
@Autowired
private ImportWordService importWordService;
@Autowired
private WorkFlowUtil workFlowUtil;
/**
* 填充数据
*
* @param
* @return
*/
public JSONObject settingData(DxDocumentVO v, DxWfProcessInfoVO wfProcessInfoVO) {
String path = Constants.MTEMPLATE_ABSOLUTE_PATH;
String file = v.getSubTypeName();
String outFilePath = Constants.MERGER_FILE_ABSOLUTE_PATH + v.getSubTypeName() + "\\" + v.getNumber() + "\\";
//生成特定的文档目录,保存生成的word文件
FileUtil.mkdir(outFilePath);
//获取动态属性
Map<String, Object> dynamicAttrs = v.getDynamicAttrs();
String distributNumber = Objects.isNull(dynamicAttrs.get("distributNumber")) ? "" : (String) dynamicAttrs.get("distributNumber");
String obsoletedDocNo = Objects.isNull(dynamicAttrs.get("obsoletedDocNo")) ? "" : (String) dynamicAttrs.get("obsoletedDocNo");
String obsoleteDocVer = Objects.isNull(dynamicAttrs.get("obsoleteDocVer")) ? "" : (String) dynamicAttrs.get("obsoleteDocVer");
String obsoleteDocName = Objects.isNull(dynamicAttrs.get("obsoleteDocName")) ? "" : (String) dynamicAttrs.get("obsoleteDocName");
String copies = Objects.isNull(dynamicAttrs.get("copies")) ? "" : (String) dynamicAttrs.get("copies");
Integer pages = Objects.isNull(dynamicAttrs.get("pages")) ? 0 : (Integer) dynamicAttrs.get("pages");
String distributDate = Objects.isNull(dynamicAttrs.get("distributDate")) ? "" : (String) dynamicAttrs.get("distributDate");
JSONObject jsonObject = new JSONObject();
//文件分发号
jsonObject.put("disNumber", distributNumber);
//文件编号
jsonObject.put("obsoDocNo", obsoletedDocNo);
//过时文件通知单编号
jsonObject.put("number", ObjectUtils.isEmpty(v.getNumber()) ? "" : v.getNumber());
//版本
jsonObject.put("version", obsoleteDocVer);
//文件名称
jsonObject.put("docName", obsoleteDocName);
//分发日期
jsonObject.put("disDate", DateUtils.conversionDate(distributDate));
//份数
jsonObject.put("copies", copies);
//页数
jsonObject.put("page", pages);
//todo 获取参与者
// List<WfTaskDefinitionVO> activities = wfProcessInfoVO.getActivityInfo();
// if (!CollectionUtils.isEmpty(activities)) {
// //写入签名数据(总体室)
// jsonObject.put("bmfzr_photo", workFlowUtil.getSignImage(activities, SignConstants.ZTSSignTaskList));
// jsonObject.put("bmfzr_date", workFlowUtil.getEndDate(activities, SignConstants.ZTSSignTaskList));
// }
//模板名称
importWordService.getWordAllTable(jsonObject, path + file + ".docx", outFilePath + "outFile.docx");
return jsonObject;
}
}
package com.yonde.dcs.document.core.repository;
import com.yonde.dcs.document.core.repository.shadow.ExtSerialNumberRepositoryShadow;
import com.yonde.dcs.document.entity.po.SerialNumber;
/**
* @program: service
* @description: 系统流水码仓储类
* @author: dang wei
* @create: 2021-05-31 14:09
*/
public interface ExtSerialNumberRepository<P extends SerialNumber> extends ExtSerialNumberRepositoryShadow<P> {
SerialNumber findByContextIdAndOneLevCategoryAndClassName(Long contextId, String oneLevCategory, String className);
}
package com.yonde.dcs.document.core.repository.shadow;
import com.yonde.dcs.document.entity.po.SerialNumber;
import com.yonde.dex.dao.business.repository.BaseRepository;
import org.springframework.data.repository.NoRepositoryBean;
@NoRepositoryBean
public interface ExtSerialNumberRepositoryShadow<P extends SerialNumber> extends BaseRepository<P>{
String BEAN_NAME = "extSerialNumberRepository";
}
...@@ -2,6 +2,9 @@ package com.yonde.dcs.document.core.service; ...@@ -2,6 +2,9 @@ package com.yonde.dcs.document.core.service;
import com.yonde.dcs.document.common.vo.ExtApplyDocVO; import com.yonde.dcs.document.common.vo.ExtApplyDocVO;
import com.yonde.dcs.document.core.service.shadow.ExtApplyDocServiceShadow; import com.yonde.dcs.document.core.service.shadow.ExtApplyDocServiceShadow;
import com.yonde.dcs.document.entity.po.ExtApplyDoc;
import com.yonde.dex.dao.business.repository.BaseRepository;
/** /**
* @description: ExtApplyDoc-service * @description: ExtApplyDoc-service
* @author: dexadmin * @author: dexadmin
...@@ -10,4 +13,5 @@ import com.yonde.dcs.document.core.service.shadow.ExtApplyDocServiceShadow; ...@@ -10,4 +13,5 @@ import com.yonde.dcs.document.core.service.shadow.ExtApplyDocServiceShadow;
**/ **/
public interface ExtApplyDocService<V extends ExtApplyDocVO> extends ExtApplyDocServiceShadow<V> { public interface ExtApplyDocService<V extends ExtApplyDocVO> extends ExtApplyDocServiceShadow<V> {
BaseRepository<ExtApplyDoc> getRepository();
} }
package com.yonde.dcs.document.core.service;
import com.yonde.dcs.document.common.vo.DxDocumentVO;
import com.yonde.dcs.plan.common.vo.ExtPlanVO;
import com.yonde.dex.user.common.vo.DxOrganizationVO;
import java.util.List;
import java.util.Map;
/**
* @program: inet-pdm-service
* @description: 自动任务服务接口
* @author: dang wei
* @create: 2021-09-27 09:41
*/
public interface ExtAutoTaskService {
/**
* 客户化文档修改状态
*
* @param documentVO
*/
void extChangeDocState(DxDocumentVO documentVO, String state);
/**
* 给选择的提资方人员发放通知
*
* @param documentVO
* @param userId
*/
void informativeUser(DxDocumentVO documentVO, String userId);
/**
* 设置提资审核
*
* @param taskParticipant
* @param processInstId
* @param key
* @param value
*/
void extSetProcessVariable(Map<String, Object> taskParticipant, String processInstId, String key, Object value);
/**
* 设置提资人变量
*
* @param processInstId
* @param varKey
* @param informativeUser
*/
void setInformativeUser(String processInstId, String varKey, String informativeUser);
/**
* 通过userId和组织code获取组织信息
*
* @param userId
* @return
*/
List<DxOrganizationVO> searchOrgNameByUserId(Long userId, String code);
/**
* 自动发送联系单
*/
void sendContractDoc(DxDocumentVO documentVO, String contractName);
/**
* 创建过时文件通知单
*
* @param documentVO
*/
void createDocNotify(DxDocumentVO documentVO);
/**
* 设置编制节点人员回显事件
*
* @param taskId
* @param documentVO
*/
void setProcessSelectionInfo(String taskId, DxDocumentVO documentVO);
/**
* 任务完成后更新pbo属性,驳回操作,设置编制节点人员回显
*
* @param taskId
* @param documentVO
*/
void getProcessSelectionInfo(String taskId, DxDocumentVO documentVO);
/**
* 计划生命周期事件
*
* @param extPlanVO
*/
void pressPlanInfo(ExtPlanVO extPlanVO) throws Exception;
/**
* 内部接口-生成提资信息word
*
* @param documentVO
*/
void generateInformationWord(DxDocumentVO documentVO);
/**
* 生成NCR审查单word
*/
void generateNcrReviewWord(DxDocumentVO documentVO, Map<String, Object> wfTaskContext);
/**
* 生成word签字
*
* @param documentVO
* @param wfTaskContext
* @param fileName 同室审核完生成签名附件为(附件1),签审流程走完后生成签名附件为(附件2),没有是为""。
*/
void generateDocWordSign(DxDocumentVO documentVO, Map<String, Object> wfTaskContext, String fileName);
/**
* 内部接口-保存内部接口信息的总体室、审核签审信息值
*/
void savedInterfaceWf(DxDocumentVO documentVO, Map<String, Object> wfTaskContext);
/**
* 自动任务-编制节点后生成word方法(自动任务修改方法)
*/
void generateWordByAutoMethod(DxDocumentVO documentVo);
/**
* 自动任务-校验图册下的图纸是否检入
*/
void checkLockerUtil(DxDocumentVO documentVo);
/**
* 自动任务-生成QH技术文件签审页
*/
void generateQHTechDoc(DxDocumentVO documentVO, Map<String, Object> wfTaskContext);
/**
* 结束流程实例
*
* @param iterationObject
*/
// TODO: 2024/7/31 DxIterationVO在4.1不存在
// void endProcess(DxIterationVO iterationObject);
/**
* 生成过时文件通知单word
*
* @param documentVO
*/
void generateOutdatedDocNotify(DxDocumentVO documentVO);
/**
* 已发布后修改状态已过时
*/
void changeOldDataState(DxDocumentVO documentVO);
}
...@@ -2,6 +2,7 @@ package com.yonde.dcs.document.core.service; ...@@ -2,6 +2,7 @@ package com.yonde.dcs.document.core.service;
import com.yonde.dcs.document.common.vo.ExtDocumentReferentLinkVO; import com.yonde.dcs.document.common.vo.ExtDocumentReferentLinkVO;
import com.yonde.dcs.document.core.service.shadow.ExtDocumentReferentLinkServiceShadow; import com.yonde.dcs.document.core.service.shadow.ExtDocumentReferentLinkServiceShadow;
/** /**
* @description: ExtDocumentReferentLink-service * @description: ExtDocumentReferentLink-service
* @author: dexadmin * @author: dexadmin
......
...@@ -2,6 +2,11 @@ package com.yonde.dcs.document.core.service; ...@@ -2,6 +2,11 @@ package com.yonde.dcs.document.core.service;
import com.yonde.dcs.document.common.vo.ExtInformingVO; import com.yonde.dcs.document.common.vo.ExtInformingVO;
import com.yonde.dcs.document.core.service.shadow.ExtInformingServiceShadow; import com.yonde.dcs.document.core.service.shadow.ExtInformingServiceShadow;
import com.yonde.dcs.document.entity.po.ExtInforming;
import com.yonde.dex.dao.business.repository.BaseRepository;
import java.util.List;
/** /**
* @description: ExtInforming-service * @description: ExtInforming-service
* @author: dexadmin * @author: dexadmin
...@@ -9,5 +14,12 @@ import com.yonde.dcs.document.core.service.shadow.ExtInformingServiceShadow; ...@@ -9,5 +14,12 @@ import com.yonde.dcs.document.core.service.shadow.ExtInformingServiceShadow;
* @date: 2024-7-15 15:32:37 * @date: 2024-7-15 15:32:37
**/ **/
public interface ExtInformingService<V extends ExtInformingVO> extends ExtInformingServiceShadow<V> { public interface ExtInformingService<V extends ExtInformingVO> extends ExtInformingServiceShadow<V> {
BaseRepository<ExtInforming> getRepository();
/**
* 获取提资信息
*
* @param id
*/
List<ExtInformingVO> getInforming(Long id);
} }
...@@ -2,6 +2,9 @@ package com.yonde.dcs.document.core.service; ...@@ -2,6 +2,9 @@ package com.yonde.dcs.document.core.service;
import com.yonde.dcs.document.common.vo.ExtReviewDocLinkVO; import com.yonde.dcs.document.common.vo.ExtReviewDocLinkVO;
import com.yonde.dcs.document.core.service.shadow.ExtReviewDocLinkServiceShadow; import com.yonde.dcs.document.core.service.shadow.ExtReviewDocLinkServiceShadow;
import javax.servlet.http.HttpServletResponse;
/** /**
* @description: ExtReviewDocLink-service * @description: ExtReviewDocLink-service
* @author: dexadmin * @author: dexadmin
...@@ -9,5 +12,11 @@ import com.yonde.dcs.document.core.service.shadow.ExtReviewDocLinkServiceShadow; ...@@ -9,5 +12,11 @@ import com.yonde.dcs.document.core.service.shadow.ExtReviewDocLinkServiceShadow;
* @date: 2024-7-15 15:32:35 * @date: 2024-7-15 15:32:35
**/ **/
public interface ExtReviewDocLinkService<V extends ExtReviewDocLinkVO> extends ExtReviewDocLinkServiceShadow<V> { public interface ExtReviewDocLinkService<V extends ExtReviewDocLinkVO> extends ExtReviewDocLinkServiceShadow<V> {
/**
* 导出主审文件清单
*
* @param response
* @param id
*/
void exportMainAndSubReviewFileList(HttpServletResponse response, Long id);
} }
package com.yonde.dcs.document.core.service;
import com.yonde.dcs.document.common.vo.DxDocumentVO;
import com.yonde.dcs.document.common.vo.ExtSendFormLinkVO;
import com.yonde.dcs.document.common.vo.ExtSerialNumberVO;
import com.yonde.dcs.document.core.service.shadow.ExtSendFormLinkServiceShadow;
import com.yonde.dcs.document.core.service.shadow.ExtSerialNumberServiceShadow;
import com.yonde.dex.dao.service.BaseIdEntityService;
import com.yonde.dcs.document.entity.po.SerialNumber;
/**
* @program: service
* @description: 系统流水码服务接口
* @author: dang wei
* @create: 2021-05-31 14:11
*/
public interface ExtSerialNumberService<V extends ExtSerialNumberVO> extends ExtSerialNumberServiceShadow<V> {
/**
* 根据条件查询系统流水码最大值
*
* @param contextId
* @param contextIdType
* @param className
* @return
*/
SerialNumber findSerialNumber(Long contextId, String contextIdType, String className);
/**
* 保存系统流水码
*
* @param serialNumber
* @return
*/
SerialNumber save(SerialNumber serialNumber);
/**
* 生成新的编码规则
*
* @param documentVO
* @return
*/
String generateEncode(DxDocumentVO documentVO);
}
package com.yonde.dcs.document.core.repository.shadow;
import com.yonde.dcs.document.entity.po.ObsoleteDocLink;
import com.yonde.dex.dao.business.repository.BaseRepository;
import org.springframework.data.repository.NoRepositoryBean;
/**
* @description: ExtApplicant-repository
* @author: dexadmin
* @version: V
* @date: 2024-7-15 15:32:39
**/
@NoRepositoryBean
public interface ObsoleteDocLinkRepositoryShadow<P extends ObsoleteDocLink> extends BaseRepository<P> {
String BEAN_NAME = "obsoleteDocLinkRepository";
}
...@@ -20,6 +20,7 @@ import javax.annotation.Resource; ...@@ -20,6 +20,7 @@ import javax.annotation.Resource;
* @date: 2024-7-15 15:32:33 * @date: 2024-7-15 15:32:33
**/ **/
@Slf4j @Slf4j
@Service(DxDocTreeTemplateServiceImpl.BEAN_NAME)
public class DxDocTreeTemplateServiceImpl<V extends DxDocTreeTemplateVO> implements DxDocTreeTemplateService<V>{ public class DxDocTreeTemplateServiceImpl<V extends DxDocTreeTemplateVO> implements DxDocTreeTemplateService<V>{
......
...@@ -20,6 +20,7 @@ import javax.annotation.Resource; ...@@ -20,6 +20,7 @@ import javax.annotation.Resource;
* @date: 2024-7-15 15:32:34 * @date: 2024-7-15 15:32:34
**/ **/
@Slf4j @Slf4j
@Service(DxDocumentServiceImpl.BEAN_NAME)
public class DxDocumentServiceImpl<V extends DxDocumentVO> implements DxDocumentService<V>{ public class DxDocumentServiceImpl<V extends DxDocumentVO> implements DxDocumentService<V>{
......
package com.yonde.dcs.document.core.service.shadow;
import com.yonde.dcs.document.common.vo.ExtSerialNumberVO;
import com.yonde.dex.dao.service.BaseIdEntityService;
public interface ExtSerialNumberServiceShadow<V extends ExtSerialNumberVO> extends BaseIdEntityService<V>{
}
This diff is collapsed.
...@@ -45,6 +45,11 @@ ...@@ -45,6 +45,11 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId> <artifactId>spring-boot-starter-actuator</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
</dependency>
<!--限流熔断降级--> <!--限流熔断降级-->
<dependency> <dependency>
<groupId>com.alibaba.cloud</groupId> <groupId>com.alibaba.cloud</groupId>
......
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