From ffc7d72b8685d6dea9bbcbb87d52ed22457a92c4 Mon Sep 17 00:00:00 2001 From: dengyu Date: Fri, 29 Nov 2024 14:22:28 +0800 Subject: [PATCH] 20241129 --- .../Chfee_invoice_HangXin/Chfee_Invoice.cs | 4 ++ JobAutoCreateFee/JobD6CoscoFee.cs | 2 +- JobAutoCreateFee/JobYt2D7Fee.cs | 40 +++++++++++++------ 3 files changed, 32 insertions(+), 14 deletions(-) diff --git a/DSWeb/Areas/Account/Models/Chfee_invoice_HangXin/Chfee_Invoice.cs b/DSWeb/Areas/Account/Models/Chfee_invoice_HangXin/Chfee_Invoice.cs index 4b8adb0c..056e586e 100644 --- a/DSWeb/Areas/Account/Models/Chfee_invoice_HangXin/Chfee_Invoice.cs +++ b/DSWeb/Areas/Account/Models/Chfee_invoice_HangXin/Chfee_Invoice.cs @@ -1076,6 +1076,10 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin public NuoNuoQuanDian_ReadRedConfirm(ChInvoice_HangXin _ChInvoice) { ChInvoice_HangXin = _ChInvoice; + if (string.IsNullOrWhiteSpace(ChInvoice_HangXin.billUuid)) + { + ChInvoice_HangXin.billUuid = ChInvoice_HangXin.GID; + } } diff --git a/JobAutoCreateFee/JobD6CoscoFee.cs b/JobAutoCreateFee/JobD6CoscoFee.cs index 481abe36..79fa8359 100644 --- a/JobAutoCreateFee/JobD6CoscoFee.cs +++ b/JobAutoCreateFee/JobD6CoscoFee.cs @@ -515,7 +515,7 @@ namespace JobCreateFee ctnalldata.FEEUNIT = "箱数"; ctnalldata.FEEQUANTITY = CTNNUM; ctnalldata.FEEQUANTITY = CTNNUM; -.ISCTN = false; + //ctnalldata.ISCTN = false; headList.Add(ctnalldata); } diff --git a/JobAutoCreateFee/JobYt2D7Fee.cs b/JobAutoCreateFee/JobYt2D7Fee.cs index afe2f6b2..747d4cb5 100644 --- a/JobAutoCreateFee/JobYt2D7Fee.cs +++ b/JobAutoCreateFee/JobYt2D7Fee.cs @@ -167,7 +167,7 @@ namespace JobCreateFee if (returndata.ydFee == "" || returndata.ydFee == null) returndata.ydFee = "0"; if (returndata.secondPrintFee == "" || returndata.secondPrintFee == null) returndata.secondPrintFee = "0"; - var D7BS = GETD7OPSEAEBS(returndata, YTD7Condition, dbcon); + var D7BS = GETD7OPSEAEBS(returndata, YTD7Condition, dbcon, YTD7NoUseCORPID); string sql = " INSERT INTO t_op_ytfee_log([bsno],[vessel],[voyage],[bookingno],[ctn_type],[ctn_no],[yard],[operatetime],[operatetype]"; sql = sql + ",[printType],[fee],[ydFee],[secondPrintFee],[applicant_code]) values ('" + D7BS.BSNO + "','" + returndata.vessel + "'"; @@ -179,7 +179,8 @@ namespace JobCreateFee D7BS.ENTEROPERATOR = ENTEROPERATOR; - hp.addYTFee(returndata, D7BS, YTD7NoUseCORPID); + hp.addYTFee(returndata, D7BS//, YTD7NoUseCORPID + ); } //hp.makefee(); @@ -321,7 +322,7 @@ namespace JobCreateFee SqlCommand cmd = new SqlCommand(sqlstr, dbcon); return cmd.ExecuteNonQuery(); } - static public D7BS GETD7OPSEAEBS(JsonYtFee YtFee,string YTD7Condition, SqlConnection dbcon) + static public D7BS GETD7OPSEAEBS(JsonYtFee YtFee,string YTD7Condition, SqlConnection dbcon,string YTD7NoUseCORPID) { var newbs = new D7BS(); newbs.BSNO = ""; @@ -331,6 +332,17 @@ namespace JobCreateFee { strSql.Append(" and " + YTD7Condition); } + + if (!string.IsNullOrWhiteSpace(YTD7NoUseCORPID)) + { + var corplist = YTD7NoUseCORPID.Split(','); + + var str="'"+string.Join("','", corplist)+ "'"; + + if (str.Length > 0) { + strSql.Append($" and CORPID not in ({str})"); + } + } SqlDataAdapter adapter = new SqlDataAdapter(strSql.ToString(), dbcon); DataTable table = new DataTable(); adapter.Fill(table); @@ -476,7 +488,9 @@ namespace JobCreateFee //private addmailList - public void addYTFee(JsonYtFee addrec, D7BS ds7info,string YTD7NoUseCORPID="") + public void addYTFee(JsonYtFee addrec, D7BS ds7info//,string YTD7NoUseCORPID="" + + ) { if (string.IsNullOrWhiteSpace(ds7info.BSNO) || ds7info.ISCANCEL || ds7info.FEESTATUS) { @@ -528,16 +542,16 @@ namespace JobCreateFee - if (!string.IsNullOrWhiteSpace(YTD7NoUseCORPID) && YTD7NoUseCORPID.IndexOf(ds7info.CORPID) >= 0) - { - //如果YTD7NoUseCORPID 不处理公司id不为空 且 YTD7NoUseCORPID当中包含ds7info.CORPID - //则不报警 也不记录费用 - log.Debug($"亿通账单 跳过业务:{JsonConvert.SerializeObject(addrec)}"); - } - else { - log.Debug($"亿通账单 添加费用:{JsonConvert.SerializeObject(addrec)}"); + //if (!string.IsNullOrWhiteSpace(YTD7NoUseCORPID) && YTD7NoUseCORPID.IndexOf(ds7info.CORPID) >= 0) + //{ + // //如果YTD7NoUseCORPID 不处理公司id不为空 且 YTD7NoUseCORPID当中包含ds7info.CORPID + // //则不报警 也不记录费用 + // log.Debug($"亿通账单 跳过业务:{JsonConvert.SerializeObject(addrec)}"); + //} + //else { + // log.Debug($"亿通账单 添加费用:{JsonConvert.SerializeObject(addrec)}"); addFee(addrec, ds7info); - } + //} } }