Commit ffd32a44 authored by wei's avatar wei 🎱

退档,归档状态接口

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