From 1a9c83cd59e8b545eee73bfa1513c3b8cf0a958f Mon Sep 17 00:00:00 2001 From: ddlucky Date: Mon, 6 May 2024 18:23:29 +0800 Subject: [PATCH] 20240506_2 --- .../Controllers/Chfee_invoice_HangXinController.cs | 8 ++++++++ .../Account/Models/Chfee_invoice_HangXin/Chfee_Invoice.cs | 6 +++--- HcDBUtility/Comm/DBResult.cs | 7 +++++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/DSWeb/Areas/Account/Controllers/Chfee_invoice_HangXinController.cs b/DSWeb/Areas/Account/Controllers/Chfee_invoice_HangXinController.cs index 5362b101..0379a00f 100644 --- a/DSWeb/Areas/Account/Controllers/Chfee_invoice_HangXinController.cs +++ b/DSWeb/Areas/Account/Controllers/Chfee_invoice_HangXinController.cs @@ -1914,6 +1914,14 @@ namespace DSWeb.Areas.Account.Controllers return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; } + if (string.IsNullOrEmpty(redReason)) + { + jsonRespose.Success = false; + jsonRespose.Message = "必须选择冲红理由。"; + + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; + } + //增加判断 如果原票createtime晚于当前时间24小时之前,则报错不允许开出 //20231120 取消此限制 //if (BlueInvoice.INVOICEMAKETIME == null || BlueInvoice.INVOICEMAKETIME == "" || Convert.ToDateTime(BlueInvoice.INVOICEMAKETIME) > DateTime.Now.AddDays(-1)) 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 d0e0c15e..0d074830 100644 --- a/DSWeb/Areas/Account/Models/Chfee_invoice_HangXin/Chfee_Invoice.cs +++ b/DSWeb/Areas/Account/Models/Chfee_invoice_HangXin/Chfee_Invoice.cs @@ -941,7 +941,7 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin { ChInvoice_HangXin = _ChInvoice; - ChInvoice_HangXin.billUuid= _ChInvoice.billUuid; + //ChInvoice_HangXin.billUuid= _ChInvoice.billUuid; } @@ -2687,7 +2687,7 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin if (_return.code == "E0000") { //红字申请单提交成功 - + head.GID = bluehead.GID.Replace("-", ""); //读取红字确认单 var _r = ReadRedConfirm(ref head, detailList); @@ -3066,7 +3066,7 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin public string errormsg() { - if (list == null || list.Count == 0) return null; + if (list == null || list.Count == 0) return ""; return list[0].billMessage; } } diff --git a/HcDBUtility/Comm/DBResult.cs b/HcDBUtility/Comm/DBResult.cs index 759344af..a8c22ef1 100644 --- a/HcDBUtility/Comm/DBResult.cs +++ b/HcDBUtility/Comm/DBResult.cs @@ -93,9 +93,16 @@ namespace HcUtility.Comm public DBResult SetErrorInfo(string message, bool success = false, object data = null) { + if ( string.IsNullOrEmpty(Message)) Message = ""; + if (Success != success) Message = ""; Success = success; + if (string.IsNullOrWhiteSpace(message)) { + + return this; + } + if (Message.IndexOf(message) >= 0) {