:feat: HCS定时推送后按原单回写合同/项目变更单同步状态
This commit is contained in:
+10
@@ -42,6 +42,8 @@ import org.springblade.transport.pojo.entity.InvoiceApplication;
|
||||
import org.springblade.transport.pojo.entity.InvoiceReceipt;
|
||||
import org.springblade.transport.pojo.entity.PaymentApplication;
|
||||
import org.springblade.transport.pojo.entity.ProjectApply;
|
||||
import org.springblade.transport.service.IContractChangeService;
|
||||
import org.springblade.transport.service.IProjectChangeService;
|
||||
import org.springblade.transport.support.hcs.HcsContractSpecSyncSupport;
|
||||
import org.springblade.transport.support.hcs.HcsContractSyncSupport;
|
||||
import org.springblade.transport.support.hcs.HcsInvoiceRegSyncSupport;
|
||||
@@ -108,6 +110,8 @@ public class HcsPushTask {
|
||||
private final HcsPaymentSyncSupport hcsPaymentSyncSupport;
|
||||
private final HcsInvoiceRegSyncSupport hcsInvoiceRegSyncSupport;
|
||||
private final HcsReceiptBillSyncSupport hcsReceiptBillSyncSupport;
|
||||
private final IContractChangeService contractChangeService;
|
||||
private final IProjectChangeService projectChangeService;
|
||||
private final BladeRedis bladeRedis;
|
||||
|
||||
/**
|
||||
@@ -211,10 +215,13 @@ public class HcsPushTask {
|
||||
for (ProjectApply projectApply : projectList) {
|
||||
try {
|
||||
hcsProjectSyncSupport.pushProject(projectApply);
|
||||
// 推送成功回写原项目最近一条待同步变更单,闭合变更单同步状态(C102-1 首推或 C102-2 更新均覆盖)
|
||||
projectChangeService.writeBackSyncStatus(projectApply.getId(), HcsSyncConstant.HCS_STATUS_SYNCED);
|
||||
successCount++;
|
||||
} catch (Exception exception) {
|
||||
String message = StringUtil.isBlank(exception.getMessage()) ? "推送异常" : exception.getMessage();
|
||||
hcsProjectSyncSupport.markFailed(projectApply, message);
|
||||
projectChangeService.writeBackSyncStatus(projectApply.getId(), HcsSyncConstant.HCS_STATUS_FAILED);
|
||||
failCount++;
|
||||
}
|
||||
}
|
||||
@@ -242,10 +249,13 @@ public class HcsPushTask {
|
||||
for (ContractManage contractManage : contractList) {
|
||||
try {
|
||||
hcsContractSyncSupport.pushContract(contractManage);
|
||||
// 推送成功回写原合同最近一条待同步变更单,闭合变更单同步状态(C103-1 首推或 C103-11 更新均覆盖)
|
||||
contractChangeService.writeBackSyncStatus(contractManage.getId(), HcsSyncConstant.HCS_STATUS_SYNCED);
|
||||
successCount++;
|
||||
} catch (Exception exception) {
|
||||
String message = StringUtil.isBlank(exception.getMessage()) ? "推送异常" : exception.getMessage();
|
||||
hcsContractSyncSupport.markFailed(contractManage, message);
|
||||
contractChangeService.writeBackSyncStatus(contractManage.getId(), HcsSyncConstant.HCS_STATUS_FAILED);
|
||||
failCount++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user