Commit f46a9062 authored by pchxue's avatar pchxue

问题处理

parent dbb73923
......@@ -8,6 +8,7 @@ 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;
/**
* @program: service
......@@ -15,6 +16,7 @@ import lombok.Data;
* @author: dang wei
* @create: 2021-05-31 14:14
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class ExtSerialNumberVO extends IdOnlyVO implements IdVO {
......
......@@ -9,6 +9,7 @@ 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;
/**
* @author xfchai
......@@ -16,6 +17,7 @@ import lombok.Data;
* @Description 客制化签名工作流信息vo
* @createTime 2022/02/22 09:56:00
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class ExtSignWfInfoVO extends IdOnlyVO implements IdVO, DxLinkDataVOHolder<ExtSignWfInfoVO,ExtSignWfInfoVO> {
......
......@@ -50,14 +50,6 @@ public interface ExtAutoTaskService {
*/
void setInformativeUser(String processInstId, String varKey, String informativeUser);
/**
* 通过userId和组织code获取组织信息
*
* @param userId
* @return
*/
List<DxOrganizationVO> searchOrgNameByUserId(Long userId, String code);
/**
* 自动发送联系单
*/
......
......@@ -38,6 +38,7 @@ import com.yonde.dex.user.common.vo.DxUserInfoVO;
import com.yonde.dex.user.feign.DxOrganizationFeign;
import com.yonde.dex.user.feign.DxUserInfoFeign;
import com.yonde.dex.user.feign.SwitchUserService;
import com.yonde.dex.wfc.common.vo.DxWfParticipantInfoVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessVO;
import com.yonde.dex.wfc.common.vo.DxWfTaskContext;
......@@ -62,6 +63,7 @@ import java.io.FileInputStream;
import java.io.InputStream;
import java.lang.reflect.Method;
import java.util.*;
import java.util.stream.Collectors;
/**
* @program: inet-pdm-service
......@@ -223,8 +225,8 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
//得到souceId获取计划,更新计划状态
ExtPlanVO source = planDocLinkVO.getSource();
source.setTaskState(Constants.COMPLETED);
// TODO: 2024/8/1 extPlanService.saveOrUpdate这个方法不存在
// extPlanService.saveOrUpdate(source);
// TODO: 2024/8/1 将extPlanService.saveOrUpdate改为update
extPlanService.update(source);
}
}
documentVO.setState(state);
......@@ -376,13 +378,13 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
//分发时间
recordVO.setDistributTime(new Date());
//获取分发单位
List<DxOrganizationVO> organizationVOS = this.searchOrgNameByUserId(documentVO.getCreatorId(), "002");
if (CollectionUtils.isEmpty(organizationVOS)) {
DxOrganizationVO organizationVOS = dxOrganizationFeign.findOrgByUser(documentVO.getCreatorId());
if (null!=organizationVOS) {
//分发单位
recordVO.setDistributDepart(null);
} else {
//分发单位
recordVO.setDistributDepart(organizationVOS.get(0).getName());
recordVO.setDistributDepart(organizationVOS.getName());
}
//发送者
recordVO.setSenderId(documentVO.getCreatorId());
......@@ -390,13 +392,13 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
recordVO.setHandlerId(Long.valueOf(userId));
//接收时间
recordVO.setReceiveTime(new Date());
List<DxOrganizationVO> orgReceiver = this.searchOrgNameByUserId(Long.valueOf(userId), code);
if (CollectionUtils.isEmpty(orgReceiver)) {
DxOrganizationVO orgReceiver = dxOrganizationFeign.findOrgByUser(Long.valueOf(userId));
if (null!=organizationVOS) {
//接收单位
recordVO.setReceiver(null);
} else {
//接收单位
recordVO.setReceiver(orgReceiver.get(0).getName());
recordVO.setReceiver(orgReceiver.getName());
}
//是否需回复
recordVO.setReplyDistribute("是");
......@@ -411,19 +413,6 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
distributeRecordService.saveRecursion(recordVO);
}
/**
* 通过userId获取组织名
*
* @param userId
* @return
*/
@Override
public List<DxOrganizationVO> searchOrgNameByUserId(Long userId, String code) {
// TODO: 2024/8/1 searchOrgNameByUserId这个方法不存在
// return extPlanService.searchOrgNameByUserId(userId, code);
return null;
}
/**
* 自动发送联系单
*
......@@ -527,7 +516,6 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
taskParticipant.put("wf_act_TeamRole_review_userList", Objects.isNull(dynamicAttrs.get("review")) ? new Long[]{} : Convert.toLongArray(dynamicAttrs.get("review").toString().split(",")));
taskParticipant.put("wf_act_TeamRole_Approver_userList", Objects.isNull(dynamicAttrs.get("approver")) ? new String[]{} : Convert.toLongArray(dynamicAttrs.get("approver").toString().split(",")));
taskParticipant.put("wf_act_TeamRole_approve_userList", Objects.isNull(dynamicAttrs.get("verifier")) ? new String[]{} : Convert.toLongArray(dynamicAttrs.get("verifier").toString().split(",")));
//todo
Map<String, Object> taskMap = new HashMap<>();
taskMap.put("participantList",taskParticipant);
taskMap.put("routeSelect","pass");
......@@ -544,6 +532,7 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
@Override
public void getProcessSelectionInfo(String taskId, DxDocumentVO documentVO) {
// TODO: 2024/7/31 4.1 taskService.getTaskSelectionInfo(taskId)此方法不存在
List<DxWfParticipantInfoVO> processTeamParticipantList = dexWorkFlowService.getProcessTeamParticipantList(taskId);
// WfTaskSelectionVo taskSelectionInfo = this.taskService.getTaskSelectionInfo(taskId);
// Map<String, Object> participantList = taskSelectionInfo.getParticipantList();
// Long[] review = (Long[]) participantList.get("wf_act_TeamRole_review_userList");
......@@ -553,7 +542,7 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
// Map<String, Object> dynamicAttrs = documentVO.getDynamicAttrs();
// dynamicAttrs.put("review", review.toString());
// dynamicAttrs.put("approver", approver.toString());
// dynamicAttrs.put("verifier", verifier.toString());
// dynamicAttrs.put("verifier", verifier.toString()·);
// documentVO.setOperator(OperatorType.MODIFY);
// documentService.saveRecursion(documentVO);
}
......
......@@ -39,6 +39,7 @@ import com.yonde.dex.dict.feign.DictDataFeignService;
import com.yonde.dex.dict.service.vo.DictDataVO;
import com.yonde.dex.user.feign.DxUserInfoFeign;
import com.yonde.dex.user.feign.SwitchUserService;
import com.yonde.dex.version.plugin.core.service.VersionService;
import com.yonde.dex.version.plugin.entities.DxVersion;
......@@ -126,7 +127,7 @@ public class ExtDocServiceImpl implements ExtDocService {
}
@Autowired
private DxUserInfoFeign changeUserHelper;
private SwitchUserService changeUserHelper;
@Override
@Transactional
......@@ -146,10 +147,9 @@ public class ExtDocServiceImpl implements ExtDocService {
DxDocumentVO dxDocumentVO;
// 切换用户(升版后创建人保持不变)
try {
// TODO: 2024/8/1 getAccount字段不存在
// String userAccount = currentDoc.getCreator().getAccount();
// TODO: 2024/8/1 switchServiceUser方法不存在
// changeUserHelper.switchServiceUser(userAccount);
// TODO: 2024/8/2 将String userAccount = currentDoc.getCreator().getAccount();修改成 Long userId = currentDoc.getCreator().getUserId();
Long userId = currentDoc.getCreator().getUserId();
changeUserHelper.switchUser(userId);
//切换后升版
//判断当前阶段状态和参数阶段状态是否相等
if (reviseVersionVO.getPhaseState().equals(currentDoc.getState())) {
......@@ -161,9 +161,6 @@ public class ExtDocServiceImpl implements ExtDocService {
}
} catch (Exception e) {
throw new DxBusinessException("-1", e.getMessage());
} finally {
// TODO: 2024/8/1 closeSwitchUser方法不存在
// changeUserHelper.closeSwitchUser();
}
String subTypeName = currentDoc.getSubTypeName();
if (Constants.DESIGN_ATLAS.equals(subTypeName) || Constants.INSTALL_ATLAS.equals(subTypeName)) {
......
package com.yonde.dcs.document.entity.po;
import com.vladmihalcea.hibernate.type.json.JsonStringType;
import com.yonde.dex.basedata.data.expands.DxExpandPO;
import com.yonde.dex.basedata.entity.annotation.DexDeleteOption;
import com.yonde.dex.basedata.entity.annotation.DexEmbedded;
import com.yonde.dex.dao.entity.base.DxIdEntityEmbeddable;
import com.yonde.dex.dao.entity.base.IdEntity;
import com.yonde.dex.dao.entity.base.IdOnlyEntity;
import com.yonde.dex.dfs.objfilelink.plugin.entities.DxObjFileLinkEmbeddable;
import com.yonde.dex.logicdelete.plugin.entities.DxLogicDeleteEmbeddable;
import com.yonde.dex.logicdelete.plugin.entities.DxLogicDeleteHolder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.hibernate.annotations.Type;
import org.hibernate.annotations.TypeDef;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Map;
/**
* @author xfchai
* @description: 分发记录关联实体
* @version: 0
* @date: 2021-09-14 11:08:37
**/
@Entity
@Table(name = "EXT_DIS_REOCRED_LINK")
@TypeDef(name = "json", typeClass = JsonStringType.class)
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@DexDeleteOption(physicsDelete = true)
public class ExtDisReocredLink extends IdOnlyEntity implements IdEntity, DxLogicDeleteHolder {
/**
* 扩展PO属性
*/
@DexEmbedded()
@Embedded()
private DxObjFileLinkEmbeddable dxObjFileLinkEmbeddable;
/**
* dao扩展对象
*/
@DexEmbedded()
@Embedded()
private DxIdEntityEmbeddable dxIdEmbeddable;
/**
* 扩展PO属性
*/
@DexEmbedded()
@Embedded()
private DxLogicDeleteEmbeddable dxLogicDeleteEmbeddable;
/**
* DxObject
*/
private Long targetId;
/**
* 分发记录
*/
private Long sourceId;
/**
* targetId类型
*/
private String targetIdType;
/**
* sourceId类型
*/
private String sourceIdType;
@Type(type = "json")
@Column(columnDefinition = "json")
private Map<String, Object> dynamicAttrs;
/**
* 关联描述
*/
private String linkDescript;
}
package com.yonde.dcs.document.entity.po;
import com.vladmihalcea.hibernate.type.json.JsonStringType;
import com.yonde.dex.basedata.entity.annotation.DexDeleteOption;
import com.yonde.dex.basedata.entity.annotation.DexEmbedded;
import com.yonde.dex.dao.entity.base.DxIdEntityEmbeddable;
import com.yonde.dex.dao.entity.base.IdEntity;
import com.yonde.dex.dao.entity.base.IdOnlyEntity;
import com.yonde.dex.dfs.objfilelink.plugin.entities.DxObjFileLinkEmbeddable;
import com.yonde.dex.logicdelete.plugin.entities.DxLogicDeleteEmbeddable;
import com.yonde.dex.logicdelete.plugin.entities.DxLogicDeleteHolder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.hibernate.annotations.Type;
import org.hibernate.annotations.TypeDef;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
import java.util.Map;
/**
* @author xfchai
* @description: 分发记录实体
* @version: 1
* @date: 2021-09-14 11:11:01
**/
@Entity
@Table(name = "EXT_DISTRIBUTE_RECORD")
@TypeDef(name = "json", typeClass = JsonStringType.class)
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@DexDeleteOption(physicsDelete = true)
public class ExtDistributeRecord extends IdOnlyEntity implements IdEntity, DxLogicDeleteHolder {
/**
* 扩展PO属性
*/
@DexEmbedded()
@Embedded()
private DxObjFileLinkEmbeddable dxObjFileLinkEmbeddable;
/**
* dao扩展对象
*/
@DexEmbedded()
@Embedded()
private DxIdEntityEmbeddable dxIdEmbeddable;
/**
* 扩展PO属性
*/
@DexEmbedded()
@Embedded()
private DxLogicDeleteEmbeddable dxLogicDeleteEmbeddable;
/**
* 分发类型
*/
private String distributeType;
/**
* 操作时间
*/
private Date operationTime;
/**
* 工作说明
*/
private String workDesc;
/**
* 接收备注
*/
private String receiveRemark;
/**
* 完成接收任务时间
*/
private Date comReceiveTime;
/**
* 分发人
*/
private Long senderId;
/**
* 显示名称
*/
private String boTitle;
/**
* 是否处理
*/
private Boolean completed;
/**
* 截止时间
*/
private Date dueTime;
/**
* 分发单位
*/
private String distributDepart;
/**
* 分发时间
*/
private Date distributTime;
/**
* 操作人
*/
private Long handlerId;
/**
* 分发备注
*/
private String distributeRemark;
/**
* 分发是否需回复
*/
private String replyDistribute;
/**
* 要求回复日期
*/
private Date replyDate;
/**
* 接收单位
*/
private String receiver;
/**
* 接收任务类型
*/
private String receiveTaskType;
/**
* 接收时间
*/
private Date receiveTime;
/**
* 接收类型
*/
private String receiveType;
/**
* senderId类型
*/
private String senderIdType;
/**
* handlerId操作人类型
*/
private String handlerIdType;
/**
* 外单位(收)
*/
private String foreignUnitReceive;
/**
* 外单位(发)
*/
private String foreignUnitIssued;
/**
* 发送任务是否结束
*/
private Boolean sendFinish;
/**
* 分发编号
*/
private String disNumber;
@Type(type = "json")
@Column(columnDefinition = "json")
private Map<String, Object> dynamicAttrs;
}
......@@ -65,11 +65,6 @@
<artifactId>dex-basic-service-feign</artifactId>
<version>4.1-RELEASE</version>
</dependency>
<dependency>
<groupId>com.yonde.dcs</groupId>
<artifactId>dcs-doc-core</artifactId>
</dependency>
<dependency>
<groupId>com.yonde.dcs</groupId>
<artifactId>dcs-plan-feign</artifactId>
......
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