feat: wps回调保存成功, 调用节点填充方法
parent
ccf91b290c
commit
b3448f97fe
|
|
@ -10,6 +10,7 @@ import org.qinan.safetyeval.client.co.WpsDocOpenCO;
|
||||||
import org.qinan.safetyeval.client.co.WpsFileCO;
|
import org.qinan.safetyeval.client.co.WpsFileCO;
|
||||||
import org.qinan.safetyeval.client.co.WpsPermissionCO;
|
import org.qinan.safetyeval.client.co.WpsPermissionCO;
|
||||||
import org.qinan.safetyeval.client.co.WpsUserCO;
|
import org.qinan.safetyeval.client.co.WpsUserCO;
|
||||||
|
import org.qinan.safetyeval.domain.constant.ProjectStageEnum;
|
||||||
import org.qinan.safetyeval.domain.entity.AccountEntity;
|
import org.qinan.safetyeval.domain.entity.AccountEntity;
|
||||||
import org.qinan.safetyeval.domain.entity.FileStorage;
|
import org.qinan.safetyeval.domain.entity.FileStorage;
|
||||||
import org.qinan.safetyeval.domain.entity.WpsDocEntity;
|
import org.qinan.safetyeval.domain.entity.WpsDocEntity;
|
||||||
|
|
@ -18,9 +19,11 @@ import org.qinan.safetyeval.domain.exception.BizException;
|
||||||
import org.qinan.safetyeval.domain.exception.ErrorCode;
|
import org.qinan.safetyeval.domain.exception.ErrorCode;
|
||||||
import org.qinan.safetyeval.domain.gateway.AccountGateway;
|
import org.qinan.safetyeval.domain.gateway.AccountGateway;
|
||||||
import org.qinan.safetyeval.domain.service.FileStorageDomainService;
|
import org.qinan.safetyeval.domain.service.FileStorageDomainService;
|
||||||
|
import org.qinan.safetyeval.domain.service.ProjectStageSyncService;
|
||||||
import org.qinan.safetyeval.domain.service.WpsDocDomainService;
|
import org.qinan.safetyeval.domain.service.WpsDocDomainService;
|
||||||
import org.qinan.safetyeval.infrastructure.adapter.ThreadLocalUserInfoAdapter;
|
import org.qinan.safetyeval.infrastructure.adapter.ThreadLocalUserInfoAdapter;
|
||||||
import org.qinan.safetyeval.infrastructure.adapter.auth.AuthUserContextAdapter;
|
import org.qinan.safetyeval.infrastructure.adapter.auth.AuthUserContextAdapter;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
@ -59,6 +62,8 @@ public class WpsExecutor implements WpsApi {
|
||||||
|
|
||||||
@Value("${wps.def-docx-url:}")
|
@Value("${wps.def-docx-url:}")
|
||||||
private String defDocxUrl;
|
private String defDocxUrl;
|
||||||
|
@Autowired
|
||||||
|
private ProjectStageSyncService projectStageSyncService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> getFileInfo(String fileId) {
|
public Map<String, Object> getFileInfo(String fileId) {
|
||||||
|
|
@ -245,6 +250,8 @@ public class WpsExecutor implements WpsApi {
|
||||||
|
|
||||||
WpsDocEntity updated = wpsDocDomainService.completeSave(doc, versionEntity);
|
WpsDocEntity updated = wpsDocDomainService.completeSave(doc, versionEntity);
|
||||||
log.info("wps upload complete, body={}", JSON.toJSONString(body));
|
log.info("wps upload complete, body={}", JSON.toJSONString(body));
|
||||||
|
// 修改节点状态
|
||||||
|
projectStageSyncService.onNodeCompleted(doc.getProjectId(), ProjectStageEnum.REPORT_PREPARATION.getNode());
|
||||||
return ok(wpsCmdConvertor.toFileCO(updated));
|
return ok(wpsCmdConvertor.toFileCO(updated));
|
||||||
} catch (BizException e) {
|
} catch (BizException e) {
|
||||||
return fail(e);
|
return fail(e);
|
||||||
|
|
|
||||||
|
|
@ -44,4 +44,9 @@ public class WpsDocDO {
|
||||||
private Integer pendingResourceId;
|
private Integer pendingResourceId;
|
||||||
private String pendingDownloadUrl;
|
private String pendingDownloadUrl;
|
||||||
private Long pendingSize;
|
private Long pendingSize;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,4 +33,8 @@ public class WpsDocVersionDO {
|
||||||
private Long tenantId;
|
private Long tenantId;
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
private LocalDateTime updateTime;
|
private LocalDateTime updateTime;
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue