From 7c876645c7e8d3c11fc2cc408f044d0262108029 Mon Sep 17 00:00:00 2001 From: dengyu Date: Wed, 15 Nov 2023 11:48:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=BE=E5=8D=95=E9=80=9A=E7=9F=A5=E7=9A=84?= =?UTF-8?q?=E6=9C=AC=E7=A5=A8=E4=B8=9A=E5=8A=A1=E6=AC=A0=E8=B4=B9=E5=88=A4?= =?UTF-8?q?=E6=96=AD=20=E5=A2=9E=E5=8A=A0=E5=88=A4=E6=96=AD=E6=9C=AC?= =?UTF-8?q?=E7=A5=A8=E6=9B=B4=E6=94=B9=E5=8D=95=E6=98=AF=E5=90=A6=E6=AC=A0?= =?UTF-8?q?=E8=B4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DSWeb.Common/DB/Comm.cs | 22 +++++++++++ DSWeb.Common/DB/CommonDataContext.cs | 2 + .../DAL/MsOp_BLISSUE/MsOp_BLISSUEDAL.cs | 39 ++++++++++++++++++- DSWeb/Web.config | 17 ++++---- 4 files changed, 69 insertions(+), 11 deletions(-) diff --git a/DSWeb.Common/DB/Comm.cs b/DSWeb.Common/DB/Comm.cs index ea9f3b59..6e5493cc 100644 --- a/DSWeb.Common/DB/Comm.cs +++ b/DSWeb.Common/DB/Comm.cs @@ -875,6 +875,28 @@ namespace DSWeb.Common.DB public string INVLINKGID { get; set; } = ""; } + [Table("op_amend")] + public partial class op_amend_md + { + + [Key] + public string GID { get; set; } + public string BSNO { get; set; } + public string PARENTID { get; set; } + public bool? FEESTATUS { get; set; } + public string ACCDATE { get; set; } + public string CREATEUSER { get; set; } + public DateTime? CREATETIME { get; set; } + public string REASON { get; set; } + public string REMARKS { get; set; } + public string AMENDNO { get; set; } + public bool? ISVOU { get; set; } + public string VOUNO { get; set; } + public int? BillFeeStatus { get; set; } + public DateTime? BILLFEESTATUSTIME { get; set; } + public string SALE { get; set; } + } + public partial class ch_fee_md { diff --git a/DSWeb.Common/DB/CommonDataContext.cs b/DSWeb.Common/DB/CommonDataContext.cs index aa9c04de..9672b1e3 100644 --- a/DSWeb.Common/DB/CommonDataContext.cs +++ b/DSWeb.Common/DB/CommonDataContext.cs @@ -41,6 +41,8 @@ namespace DSWeb.Common.DB public DbSet op_other { get; set; } public DbSet ch_fee { get; set; } + public DbSet op_amend { get; set; } + public DbSet ch_fee_invoice { get; set; } public DbSet ch_fee_invoicedetail { get; set; } public DbSet ch_fee_invoiceapplication { get; set; } diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOp_BLISSUE/MsOp_BLISSUEDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOp_BLISSUE/MsOp_BLISSUEDAL.cs index 3c7cfbdd..888d8baa 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOp_BLISSUE/MsOp_BLISSUEDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOp_BLISSUE/MsOp_BLISSUEDAL.cs @@ -35,6 +35,7 @@ using System.Linq; using DSWeb.SoftMng.DAL; using DSWeb.WorkFlow; using DSWeb.Areas.MvcShipping.Models.Message.VGM; +using NPOI.SS.Formula.Functions; namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE { @@ -4261,6 +4262,42 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE return result; } + public static List 获取业务欠费含更改单(string BSNO) { + var cdc = new CommonDataContext(); + //var bsnoList = headList.Select(s => s.BSNO).ToList(); + var 欠费FeeList = new List(); + 欠费FeeList = cdc.ch_fee.Where(x => BSNO == x.BSNO && x.SETTLEMENT != null && x.SETTLEMENT < x.AMOUNT && x.FEETYPE == 1).ToList(); + + var 更改单List = cdc.op_amend.Where(x => x.PARENTID == BSNO).ToList(); + + if (更改单List != null && 更改单List.Count > 0) + { + var 更改单BSNO = 更改单List.Select(s => s.BSNO).ToList(); + var 更改单欠费List = cdc.ch_fee.Where(x => BSNO == x.BSNO && x.SETTLEMENT != null && x.SETTLEMENT < x.AMOUNT && x.FEETYPE == 1).ToList(); + + if (更改单欠费List != null && 更改单欠费List.Count > 0) + { + 欠费FeeList.AddRange(更改单欠费List); + } + } + return 欠费FeeList; + } + + public static List 获取业务欠费含更改单(List BSNOList) + { + var result = new List(); + + if (BSNOList != null && BSNOList.Count > 0) { + foreach (var bsno in BSNOList) { + var _r = 获取业务欠费含更改单(bsno); + if (_r != null && _r.Count > 0) { + result.AddRange(_r); + } + } + } + return result; + } + /// /// 存在欠费 则success=true,data返回true; /// 不存在欠费 则success=true,data返回false @@ -4277,7 +4314,7 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE var cdc = new CommonDataContext(); //var bsnoList = headList.Select(s => s.BSNO).ToList(); - var 欠费FeeList = cdc.ch_fee.Where(x => head.BSNO== x.BSNO && x.SETTLEMENT != null && x.SETTLEMENT < x.AMOUNT && x.FEETYPE == 1).ToList(); + var 欠费FeeList = 获取业务欠费含更改单(head.BSNO); if (欠费FeeList != null && 欠费FeeList.Count > 0) { diff --git a/DSWeb/Web.config b/DSWeb/Web.config index 6e1b3b7e..3b9d5d32 100644 --- a/DSWeb/Web.config +++ b/DSWeb/Web.config @@ -90,19 +90,16 @@ --> - + + + + - - - + +