Commit ffd32a44 authored by wei's avatar wei 🎱

退档,归档状态接口

parent 9515b79b
......@@ -44,7 +44,7 @@ public class ExtTransferDocumentEvent {
DxUserInfoVO dxRecipientUserInfo = extTransferDocumentService.getSignInfo(activities, SignConstants.SIGN_KEY_DAZSH);
if (ObjectUtils.isNotEmpty(dxRecipientUserInfo)) {
extTransferDocumentVO.setDxRecipientUserInfo(dxRecipientUserInfo);
extTransferDocumentVO.setDxRecipientUserInfoId(dxRecipientUserInfo.getId());
extTransferDocumentVO.setDxRecipientUserInfoId(dxRecipientUserInfo.getUserId());
extTransferDocumentVO.setDxRecipientUserInfoIdType("DxUser");
}
LocalDateTime handoverTime = extTransferDocumentService.getEndDate(activities, SignConstants.SIGN_KEY_DAZSH);
......
......@@ -39,5 +39,5 @@ public interface ExtDxDocumentService<V extends DxDocumentVO> extends ExtDxDocum
*/
DxDocumentVO startWorkflow(Long id);
void updateArchivingStatus(Long id, String archivingStatus, String sourceType);
void updateArchivingStatus(Long id, String archivingStatus);
}
......@@ -26,6 +26,8 @@ import com.yonde.dex.basedata.exception.DxBusinessException;
import com.yonde.dex.basedata.users.UserHelper;
import com.yonde.dex.dfs.feign.FileManagerFeignService;
import com.yonde.dex.dfs.vo.RepoFileVO;
import com.yonde.dex.user.common.vo.DxUserInfoVO;
import com.yonde.dex.user.feign.DxUserInfoFeign;
import com.yonde.dex.wfc.feign.api.WfcProcessFeign;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
......@@ -37,6 +39,7 @@ import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.io.FileInputStream;
import java.time.LocalDateTime;
import java.util.*;
/**
......@@ -76,6 +79,9 @@ public class ExtDxDocumentServiceImpl<V extends DxDocumentVO> extends DocumentSe
@Autowired
private UserHelper userHelper;
@Autowired
private DxUserInfoFeign userService;
@Override
public void beforeSave(Collection<V> target) {
for (V v : target) {
......@@ -118,23 +124,29 @@ public class ExtDxDocumentServiceImpl<V extends DxDocumentVO> extends DocumentSe
}
@Override
public void updateArchivingStatus(Long id, String archivingStatus, String sourceType) {
public void updateArchivingStatus(Long id, String archivingStatus) {
DxDocumentVO dxDocumentVO = this.get(id);
DxUserVO currentUser = userHelper.getCurrentUser();
// 移交单流程档案组审批节点 退档
if (ARCHIVE_NOT_RECEIVED.equals(archivingStatus)) {
}
// 无前置状态,直接已归档。置空退档人,和退档时间
Long userId = currentUser.getUserId();
DxUserInfoVO dxUserInfoVO = (DxUserInfoVO) userService.get(userId);
// 无前置状态,直接已归档。置空退档人,和退档时间,移交单号
if (ARCHIVED.equals(archivingStatus)) {
dxDocumentVO.setTransferDocumentId(null);
dxDocumentVO.setDxRefundPersonUser(null);
dxDocumentVO.setDxRefundPersonUserId(null);
dxDocumentVO.setDxRefundPersonUserIdType(null);
dxDocumentVO.setWithdrawalTime(null);
}
// 列表上退档
if (ARCHIVE_INVALIDATED.equals(archivingStatus)) {
if (!dxDocumentVO.getArchivingStatus().equals(ARCHIVED)) {
// 列表上退档-归档已作废 // 移交单流程档案组审批节点退档-档案未接收
if (ARCHIVE_INVALIDATED.equals(archivingStatus) || ARCHIVE_NOT_RECEIVED.equals(archivingStatus)) {
// 修改归档已作废-是否再已归档状态下
if (ARCHIVE_INVALIDATED.equals(archivingStatus) && !dxDocumentVO.getArchivingStatus().equals(ARCHIVED)) {
throw new DxBusinessException("500", "不是已归档状态");
}
dxDocumentVO.setDxRefundPersonUser(dxUserInfoVO);
dxDocumentVO.setDxRefundPersonUserId(dxUserInfoVO.getUserId());
dxDocumentVO.setDxRefundPersonUserIdType("DxUser");
dxDocumentVO.setWithdrawalTime(LocalDateTime.now());
}
// 更新文档状态
......
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