diff --git a/server/src/main/java/com/ecep/contract/cloud/u8/ctx/PurchaseSettlementVoucherCtx.java b/server/src/main/java/com/ecep/contract/cloud/u8/ctx/PurchaseSettlementVoucherCtx.java index 84b8582..6400b42 100644 --- a/server/src/main/java/com/ecep/contract/cloud/u8/ctx/PurchaseSettlementVoucherCtx.java +++ b/server/src/main/java/com/ecep/contract/cloud/u8/ctx/PurchaseSettlementVoucherCtx.java @@ -15,8 +15,7 @@ public class PurchaseSettlementVoucherCtx extends AbstractYongYouU8Ctx { InventoryCtx getInventoryCtx() { if (inventoryCtx == null) { - inventoryCtx = new InventoryCtx(); - inventoryCtx.from(this); + inventoryCtx = new InventoryCtx(this); } return inventoryCtx; } diff --git a/server/src/main/java/com/ecep/contract/ds/contract/tasker/ContractRepairByCompanyTask.java b/server/src/main/java/com/ecep/contract/ds/contract/tasker/ContractRepairByCompanyTask.java index 1c663f1..27e1eee 100644 --- a/server/src/main/java/com/ecep/contract/ds/contract/tasker/ContractRepairByCompanyTask.java +++ b/server/src/main/java/com/ecep/contract/ds/contract/tasker/ContractRepairByCompanyTask.java @@ -44,15 +44,13 @@ public class ContractRepairByCompanyTask extends AbstContractRepairTasker { } try { - VendorCtx vendorCtx = new VendorCtx(); - vendorCtx.from(contractCtx); + VendorCtx vendorCtx = new VendorCtx(this); if (vendorCtx.syncVendor(company, holder)) { cloudYu.setVendorUpdateDate(LocalDate.now()); repaired = true; } - CustomerCtx customerCtx = new CustomerCtx(); - customerCtx.from(contractCtx); + CustomerCtx customerCtx = new CustomerCtx(this); if (customerCtx.syncCustomer(company, holder)) { cloudYu.setCustomerUpdateDate(LocalDate.now()); repaired = true;