diff --git a/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsToWCSmissionController.java b/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsToWCSmissionController.java index add308c5..de54e9d5 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsToWCSmissionController.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsToWCSmissionController.java @@ -6,6 +6,8 @@ import com.op.common.core.domain.R; import com.op.common.core.utils.StringUtils; import com.op.common.core.web.domain.AjaxResult; +import com.op.common.log.annotation.Log; +import com.op.common.log.enums.BusinessType; import com.op.wms.domain.*; import com.op.wms.service.IBaseWarehouseService; import com.op.wms.service.IOdsProcureOrderService; @@ -182,4 +184,9 @@ public WmsToWCSDTO packingMaterialsOutBoundCompleted(@RequestBody WmsToWCSDTO wc Integer result= odsProcureOrderService.ProductionMaterialRequisitionAdd(orderList); return success(result); } + @PostMapping("/sapPurchaseOrderSync") + public AjaxResult sapPurchaseOrderSync(@RequestBody OdsProcureOrder odsProcureOrder){ + AjaxResult result= odsProcureOrderService.sapPurchaseOrderSync(odsProcureOrder); + return result; + } } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/IOdsProcureOrderService.java b/op-modules/op-wms/src/main/java/com/op/wms/service/IOdsProcureOrderService.java index 7c79cc8f..5cb22132 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/IOdsProcureOrderService.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/IOdsProcureOrderService.java @@ -90,4 +90,6 @@ public interface IOdsProcureOrderService { WmsOdsMateStorageNewsSn ProductionMaterialRequisitionsn(WmsOdsMateStorageNewsSn wmsOdsMateStorageNewsSn); void OutboundPostingSAP(List odsProcureOutOrder); + + AjaxResult sapPurchaseOrderSync(OdsProcureOrder odsProcureOrder); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOrderServiceImpl.java b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOrderServiceImpl.java index 6b12e696..064a3a04 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOrderServiceImpl.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOrderServiceImpl.java @@ -17,6 +17,7 @@ import java.util.List; import com.op.common.core.domain.R; +import com.op.common.core.web.domain.AjaxResult; import com.op.common.security.utils.SecurityUtils; import com.op.system.api.RemoteSapService; import com.op.system.api.domain.sap.SapBackflushMPQuery; @@ -302,6 +303,8 @@ public class OdsProcureOrderServiceImpl implements IOdsProcureOrderService { odsProcureOutOrder.setUserDefined2(orderLine1.getOrderLineNo()); odsProcureOutOrder.setUserDefined3(orderLine1.getUserDefined3()); odsProcureOutOrder.setUserDefined10("1"); + odsProcureOutOrder.setCreateBy(SecurityUtils.getUsername()); + odsProcureOutOrder.setCreateDate(new Date()); //odsProcureOutOrder.set odsProcureOutOrderMapper.insertOdsProcureOutOrder(odsProcureOutOrder); } @@ -328,6 +331,8 @@ public class OdsProcureOrderServiceImpl implements IOdsProcureOrderService { odsProcureOutOrder.setUserDefined2(orderLine1.getOrderLineNo()); //odsProcureOutOrder.set odsProcureOutOrder.setUserDefined3(orderLine1.getUserDefined3()); + odsProcureOutOrder.setCreateBy(SecurityUtils.getUsername()); + odsProcureOutOrder.setCreateDate(new Date()); odsProcureOutOrderMapper.insertOdsProcureOutOrder(odsProcureOutOrder); } } @@ -590,6 +595,12 @@ public class OdsProcureOrderServiceImpl implements IOdsProcureOrderService { } + @Override + public AjaxResult sapPurchaseOrderSync(OdsProcureOrder odsProcureOrder) { + //remoteSapService.sapPurchaseOrderSync(); + return null; + } + public String DesignatedPalletOutboundWCS(WMSDesignatedPalle wmsDesignatedPalle){ // 定义请求的URL地址 String url = "http://192.168.202.37:9001/api/v1/ReceiveMesMsg/packingMaterialsOutBoundByPallet";