From 033b25b76c8a794038160cb680443918596f62bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ZR20090193-=E9=99=88=E6=95=AC=E5=8B=87?= Date: Tue, 1 Aug 2023 14:15:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E5=AD=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IServices/WMS/IOP_WMS_COMMONService.cs | 10 ++++ .../Services/WMS/OP_WMS_COMMONService.cs | 56 +++++++++++++++++++ Vue.Net/VOL.WebApi/appsettings.json | 4 +- 3 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 Vue.Net/VOL.WMS/IServices/WMS/IOP_WMS_COMMONService.cs create mode 100644 Vue.Net/VOL.WMS/Services/WMS/OP_WMS_COMMONService.cs diff --git a/Vue.Net/VOL.WMS/IServices/WMS/IOP_WMS_COMMONService.cs b/Vue.Net/VOL.WMS/IServices/WMS/IOP_WMS_COMMONService.cs new file mode 100644 index 00000000..20d00042 --- /dev/null +++ b/Vue.Net/VOL.WMS/IServices/WMS/IOP_WMS_COMMONService.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace VOL.WMS.IServices.WMS +{ + public interface IOP_WMS_COMMONService + { + } +} diff --git a/Vue.Net/VOL.WMS/Services/WMS/OP_WMS_COMMONService.cs b/Vue.Net/VOL.WMS/Services/WMS/OP_WMS_COMMONService.cs new file mode 100644 index 00000000..042c01da --- /dev/null +++ b/Vue.Net/VOL.WMS/Services/WMS/OP_WMS_COMMONService.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using VOL.Core.Utilities; +using VOL.Entity.DomainModels; +using VOL.WMS.IServices.WMS; +using VOL.WMS.Repositories; + +namespace VOL.WMS.Services.WMS +{ + public class OP_WMS_COMMONService : IOP_WMS_COMMONService + { + /// + /// 取消业务相关逻辑检测 + /// + /// 业务Id + /// 变动类型 + /// + public WebResponseContent MoveCancelCheck(string WMSDOID, string CHANGETYPE) + { + var result = new WebResponseContent(); + //库存变动明细 + var wmsChanges = Op_Wms_ChangeRepository.Instance + .FindAsIQueryable(x => x.DOBSNO == WMSDOID && x.CHANGETYPE == CHANGETYPE).ToList(); + //新库存 + var wmsList = OP_WMSRepository.Instance + .FindAsIQueryable(x => wmsChanges.Select(s => s.WMSID).Contains(x.WMSID)).ToList(); + //库存id列表 + var wmsIdList = wmsList.Select(s => s.WMSID).ToList(); + + if (Op_Wms_ChangeRepository.Instance + .FindAsIQueryable(x => wmsIdList.Contains(x.WMSID) && x.CHANGETYPE != CHANGETYPE).Any()) + { + return result.Error(CHANGETYPE + "之后进行过其他操作不能直接取消!"); + } + + if (OP_WMS_OUT_PLAN_DETAILRepository.Instance + .FindAsIQueryable(x => wmsIdList.Contains((Guid)x.WMSID)).Any()) + { + return result.Error(CHANGETYPE + "之后的货物已被出库计划引用,不能直接取消!"); + } + + if (CHANGETYPE == WMSCHANGTYPE.移库_移入) + { + if (OP_WMS_TRANSFERGOODS_DETAILRepository.Instance + .FindAsIQueryable(x => wmsIdList.Contains((Guid)x.WMSID)).Any()) + { + return result.Error(CHANGETYPE + "之后的货物已被货权转移业务引用,不能直接取消!"); + } + } + + return result.OK(); + } + } +} \ No newline at end of file diff --git a/Vue.Net/VOL.WebApi/appsettings.json b/Vue.Net/VOL.WebApi/appsettings.json index 04637e5a..f5a13b21 100644 --- a/Vue.Net/VOL.WebApi/appsettings.json +++ b/Vue.Net/VOL.WebApi/appsettings.json @@ -61,10 +61,10 @@ //"DbConnectionString": "Data Source=47.104.158.21,1433;Initial Catalog=ShippingWeb_QDTZ;Persist Security Info=True;User ID=sa;Password=Ds20040201;Connect Timeout=500;", //嘉里物流 - //"DbConnectionString": "Data Source=36.112.133.3,53076;Initial Catalog=ShippingWeb_JLWL;Persist Security Info=True;User ID=JLWLsa;Password=Ds20040201;Connect Timeout=500;", + "DbConnectionString": "Data Source=36.112.133.3,53076;Initial Catalog=ShippingWeb_JLWL;Persist Security Info=True;User ID=JLWLsa;Password=Ds20040201;Connect Timeout=500;", //金港 - "DbConnectionString": "Data Source=47.104.253.169,62356;Initial Catalog=ShippingWeb_JGZHWL;Persist Security Info=True;User ID=sa;Password=Ds20040201;Connect Timeout=500;", + //"DbConnectionString": "Data Source=47.104.253.169,62356;Initial Catalog=ShippingWeb_JGZHWL;Persist Security Info=True;User ID=sa;Password=Ds20040201;Connect Timeout=500;", //"DbConnectionString": "Data Source=47.104.253.169,62356;Initial Catalog=ShippingWeb_QDHGTY;Persist Security Info=True;User ID=sa;Password=Ds20040201;Connect Timeout=500;", //"DbConnectionString": "Data Source=47.104.253.169,62356;Initial Catalog=ShippingWeb_CS;Persist Security Info=True;User ID=sa;Password=Ds20040201;Connect Timeout=500;",