From d99c992d953af2e5aeee0316ebc176dbb081cbd6 Mon Sep 17 00:00:00 2001 From: ddlucky Date: Tue, 7 Feb 2023 18:00:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=A3=E9=87=91=E5=AF=BC=E5=85=A5=EF=BC=8C?= =?UTF-8?q?=E6=94=B9=E5=9B=9E=E6=88=90=E8=B4=B9=E7=94=A8=E9=94=81=E5=AE=9A?= =?UTF-8?q?=E5=90=8E=E6=97=A0=E6=B3=95=E5=AF=BC=E5=85=A5=E7=9A=84=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/MsChFeeController.cs | 96 ++++++++++--------- 1 file changed, 51 insertions(+), 45 deletions(-) diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsChFeeController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsChFeeController.cs index 6d56deb0..0004b434 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsChFeeController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsChFeeController.cs @@ -1858,7 +1858,10 @@ namespace DSWeb.MvcShipping.Controllers var USERID = Convert.ToString(Session["USERID"]).ToString(); - 新增更改单Helper 新增更改单Helper = new 新增更改单Helper(USERID, Convert.ToString(Session["SHOWNAME"]).ToString(), Convert.ToString(Session["COMPANYID"]).ToString()); + //新增更改单Helper 新增更改单Helper = new 新增更改单Helper(USERID, Convert.ToString(Session["SHOWNAME"]).ToString(), Convert.ToString(Session["COMPANYID"]).ToString()); + + + foreach (DataRow row in table.Rows) { @@ -1876,51 +1879,54 @@ namespace DSWeb.MvcShipping.Controllers if (head.FEESTATUS == 1) { - //建立一个费用更改单 - - 新增更改单Helper.AddHead(head, USERID, filename + "佣金导入"); + message = message + " 提单号:" + MBLNO + " 无法导入,请确认提单号正确并未费用封账!"; + break; + //建立一个费用更改单 - var mblno=Convert.ToString(row["主提单号"]); - var DRCRStr = Convert.ToString(row["收/付"]); - //var DRCR = DRCRStr == "收" ? 1 : 2; - var FEENAME = Convert.ToString(row["费用名称"]).Trim(); - - var CUSTNAME = Convert.ToString(row["结算对象"]).Trim(); - var BLCOUNT = T_ALL_DA.GetStrSQL("BLCOUNT", "select COUNT(*) BLCOUNT from info_client where SHORTNAME='" + CUSTNAME + "'"); - if (BLCOUNT == "0") - { - isSucess = false; - message = message + " 提单号:" + MBLNO + " 无法导入,请确认客户名称:" + CUSTNAME + ",是否正确!"; - //jsonRespose.Success = false; - //jsonRespose.Message = message; - //return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; - } - BLCOUNT = T_ALL_DA.GetStrSQL("BLCOUNT", "select COUNT(*) BLCOUNT from code_fee where [NAME]='" + FEENAME + "'"); - if (BLCOUNT == "0") - { - isSucess = false; - //if (i != 0) message = "已导入" + i.ToString() + "条费用。"; - message = message + " 提单号:" + MBLNO + " 无法导入,请确认费用名称:" + FEENAME + ",是否正确!"; - break; - - } - - var AMOUNTSTR = Convert.ToString(row["金额"]); - var EXRATESTR = Convert.ToString(row["汇率"]); - var CURR = Convert.ToString(row["币种"]); - var ISOPEN = Convert.ToString(row["是否机密"]); - decimal amount = 0M; - decimal exrate = 0M; - try { - amount = Convert.ToDecimal(AMOUNTSTR); - exrate = Convert.ToDecimal(EXRATESTR); - } - catch (Exception e) { - - } - - 新增更改单Helper.AddFee(mblno, DRCRStr, FEENAME, CUSTNAME, amount,exrate,CURR, ISOPEN); + //新增更改单Helper.AddHead(head, USERID, filename + "佣金导入"); + + + //var mblno=Convert.ToString(row["主提单号"]); + //var DRCRStr = Convert.ToString(row["收/付"]); + ////var DRCR = DRCRStr == "收" ? 1 : 2; + //var FEENAME = Convert.ToString(row["费用名称"]).Trim(); + + //var CUSTNAME = Convert.ToString(row["结算对象"]).Trim(); + //var BLCOUNT = T_ALL_DA.GetStrSQL("BLCOUNT", "select COUNT(*) BLCOUNT from info_client where SHORTNAME='" + CUSTNAME + "'"); + //if (BLCOUNT == "0") + //{ + // isSucess = false; + // message = message + " 提单号:" + MBLNO + " 无法导入,请确认客户名称:" + CUSTNAME + ",是否正确!"; + // //jsonRespose.Success = false; + // //jsonRespose.Message = message; + // //return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; + //} + //BLCOUNT = T_ALL_DA.GetStrSQL("BLCOUNT", "select COUNT(*) BLCOUNT from code_fee where [NAME]='" + FEENAME + "'"); + //if (BLCOUNT == "0") + //{ + // isSucess = false; + // //if (i != 0) message = "已导入" + i.ToString() + "条费用。"; + // message = message + " 提单号:" + MBLNO + " 无法导入,请确认费用名称:" + FEENAME + ",是否正确!"; + // break; + + //} + + //var AMOUNTSTR = Convert.ToString(row["金额"]); + //var EXRATESTR = Convert.ToString(row["汇率"]); + //var CURR = Convert.ToString(row["币种"]); + //var ISOPEN = Convert.ToString(row["是否机密"]); + //decimal amount = 0M; + //decimal exrate = 0M; + //try { + // amount = Convert.ToDecimal(AMOUNTSTR); + // exrate = Convert.ToDecimal(EXRATESTR); + //} + //catch (Exception e) { + + //} + + //新增更改单Helper.AddFee(mblno, DRCRStr, FEENAME, CUSTNAME, amount,exrate,CURR, ISOPEN); } } } @@ -1931,7 +1937,7 @@ namespace DSWeb.MvcShipping.Controllers return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; } else { - 新增更改单Helper.DoSave(); + //新增更改单Helper.DoSave(); } var i = 0;