From 1840483600b0b63fc50b74275a2a891d0e7842d9 Mon Sep 17 00:00:00 2001 From: hanxuntao Date: Fri, 11 Oct 2024 17:06:36 +0800 Subject: [PATCH] 1 --- .../DAL/Chfee_bankdata/Chfee_bankdataDAL.cs | 87 ++++++++++++++++--- .../Chfee_invoice_HangXin/Chfee_Invoice.cs | 2 +- .../Chfee_Invoiceapplication.cs | 2 +- .../Viewsjs/Chfee_bankdata/ChBankdataIndex.js | 11 ++- .../Chfee_bankdata/ChBankdataInvIndex.js | 21 ++++- .../Chfee_bankdata/ChBankdataPayIndex.js | 16 +++- .../Areas/SoftMng/Filter/SqlKeyWordsFilter.cs | 2 +- 7 files changed, 118 insertions(+), 23 deletions(-) diff --git a/DSWeb/Areas/Account/DAL/Chfee_bankdata/Chfee_bankdataDAL.cs b/DSWeb/Areas/Account/DAL/Chfee_bankdata/Chfee_bankdataDAL.cs index bba1483..8f65e97 100644 --- a/DSWeb/Areas/Account/DAL/Chfee_bankdata/Chfee_bankdataDAL.cs +++ b/DSWeb/Areas/Account/DAL/Chfee_bankdata/Chfee_bankdataDAL.cs @@ -888,7 +888,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_bankdata public static DBResult DelBankDataDetail(List body) { var result = new DBResult(); - + result.Success = true; Database db = DatabaseFactory.CreateDatabase(); using (var conn = db.CreateConnection()) @@ -904,18 +904,83 @@ namespace DSWeb.Areas.Account.DAL.Chfee_bankdata foreach (var bill in body) { - cmdDelete.Parameters.Clear(); - db.AddInParameter(cmdDelete, "@GID", DbType.String, bill.GID); - db.ExecuteNonQuery(cmdDelete, tran); + if (bill.TRANSTYPE == "往账") + { + if (!string.IsNullOrEmpty(bill.STLBILLNO)) { + var dataList = ChsettlementDAL.GetDataListAll("cm.BILLNO='"+bill.STLBILLNO+"'"); + if (dataList != null && dataList != null) { + foreach (var stl in dataList) { + if (!string.IsNullOrEmpty(stl.VOUCHERNO)) + { + result.Success = false; + result.Message = "已生成凭证无法取消"; + + } + else { + var PaydataList = ChsettlementDAL.GetPayDetailList(stl.BILLNO); + result = ChsettlementDAL.DelAppStl(PaydataList, stl.BILLNO); + if (result.Success) + { + var modb = new ModelObjectDB(); + result = modb.Delete(stl); + } + + } + + } + + + } - cmdupdate.Parameters.Clear(); - db.AddInParameter(cmdupdate, "@GID", DbType.String, bill.GID); - db.ExecuteNonQuery(cmdupdate, tran); + } + } + else { + + if (!string.IsNullOrEmpty(bill.STLBILLNO)) + { + var dataList = ChsettlementDAL.GetDataListAll("cm.BILLNO='" + bill.STLBILLNO + "'"); + if (dataList != null && dataList != null) + { + foreach (var stl in dataList) + { + if (!string.IsNullOrEmpty(stl.VOUCHERNO)) + { + result.Success = false; + result.Message = "已生成凭证无法取消"; + + } + else + { + var PaydataList = ChsettlementDAL.GetRecvInvDetailList(stl.BILLNO); + result = ChsettlementDAL.DelRecvInvAppStl(PaydataList, stl.BILLNO); + if (result.Success) + { + var modb = new ModelObjectDB(); + result = modb.Delete(stl); + } + + } + + } + + + } + + } + } + if (result.Success) + { + cmdDelete.Parameters.Clear(); + db.AddInParameter(cmdDelete, "@GID", DbType.String, bill.GID); + db.ExecuteNonQuery(cmdDelete, tran); + + cmdupdate.Parameters.Clear(); + db.AddInParameter(cmdupdate, "@GID", DbType.String, bill.GID); + db.ExecuteNonQuery(cmdupdate, tran); + } } - result = new DBResult(); - result.Success = true; - result.Message = "撤销匹配成功"; + tran.Commit(); } @@ -930,8 +995,6 @@ namespace DSWeb.Areas.Account.DAL.Chfee_bankdata } } - result.Success = true; - result.Message = "撤销匹配成功"; return result; } 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 b7c9532..c9f7d18 100644 --- a/DSWeb/Areas/Account/Models/Chfee_invoice_HangXin/Chfee_Invoice.cs +++ b/DSWeb/Areas/Account/Models/Chfee_invoice_HangXin/Chfee_Invoice.cs @@ -47,7 +47,7 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin private string _REDCODE = string.Empty;//冲红时填写的对应蓝票票代码(红票必填,不满12位请左补0) private string _REDNUM = string.Empty;//冲红时填写的对应蓝票票号码(红票必填,不满8位请左补0) - private string _PUSHMODE = "-1";//推送方式:-1,不推送;0,邮箱;1,手机(默认);2,邮箱、手机 80002 + private string _PUSHMODE = "0";//推送方式:-1,不推送;0,邮箱;1,手机(默认);2,邮箱、手机 80002 private string _PUSHMOBILE = string.Empty;//购方手机(开票成功会短信提醒购方,不受推送方式影响) private string _PUSHEMAIL = string.Empty;//推送邮箱(pushMode为0或2时,此项为必填) private string _INVOICELINE = "p"; diff --git a/DSWeb/Areas/Account/Models/Chfee_invoiceapplication/Chfee_Invoiceapplication.cs b/DSWeb/Areas/Account/Models/Chfee_invoiceapplication/Chfee_Invoiceapplication.cs index b868ceb..85bb8e1 100644 --- a/DSWeb/Areas/Account/Models/Chfee_invoiceapplication/Chfee_Invoiceapplication.cs +++ b/DSWeb/Areas/Account/Models/Chfee_invoiceapplication/Chfee_Invoiceapplication.cs @@ -359,7 +359,7 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoiceapplication #region 2019 新增字段 应对航信开票平台接口的 推送信息 - private string _PUSHMODE = "-1";//推送方式:-1,不推送;0,邮箱;1,手机(默认);2,邮箱、手机 80002 + private string _PUSHMODE = "0";//推送方式:-1,不推送;0,邮箱;1,手机(默认);2,邮箱、手机 80002 private string _PUSHMOBILE = string.Empty;//购方手机(开票成功会短信提醒购方,不受推送方式影响) private string _PUSHEMAIL = string.Empty;//推送邮箱(pushMode为0或2时,此项为必填) private string _PUSHMODEREF = string.Empty; diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_bankdata/ChBankdataIndex.js b/DSWeb/Areas/Account/Viewsjs/Chfee_bankdata/ChBankdataIndex.js index 910c52c..662dc67 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_bankdata/ChBankdataIndex.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_bankdata/ChBankdataIndex.js @@ -267,8 +267,15 @@ Ext.extend(Shipping.MsChBankdataIndex, Ext.Panel, { }); this.gridList.addListener('itemdblclick', function (dataview, record, item, index, e, b) { - //this.SelectedRecord = record; - //this.OprationStatus = 'edit'; + this.SelectedRecord = record; + this.OprationStatus = 'edit'; + if (record.data.TRANSTYPE == '往账') { + DsOpenEditWin('/Account/Chfee_bankdata/PayIndex?handle=check&GID=' + record.data.GID); + } else { + + DsOpenEditWin('/Account/Chfee_bankdata/InvIndex?handle=check&GID=' + record.data.GID); + } + //var openSet = "height=400, width=1024, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 750) / 2 + ",Left= " + (screen.width - 1100) / 2 //var openType = "_blank"; //var openUrl = "/Account/Chfee_jinzhang/Edit"; diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_bankdata/ChBankdataInvIndex.js b/DSWeb/Areas/Account/Viewsjs/Chfee_bankdata/ChBankdataInvIndex.js index 795fd7b..ef37cf1 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_bankdata/ChBankdataInvIndex.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_bankdata/ChBankdataInvIndex.js @@ -11,12 +11,15 @@ Ext.extend(Shipping.MsChBankdataInvIndex, Ext.Panel, { OprationStatus: null, //仅当弹出界面时使用 SelectedRecord: null, - + sqlcontext: '', initUIComponents: function () { this.invsqlcontext = ''; this.formname = "MsChBankdataInvIndex"; //页面名称 + this.GID = getUrlParam('GID'); + + //定义数据集 this.storeList = Ext.create('Ext.data.Store', { pageSize: this.PageSize, @@ -1427,15 +1430,25 @@ Ext.extend(Shipping.MsChBankdataInvIndex, Ext.Panel, { }); this.storeList.on('beforeload', function (store) { - var sql = this.getCondition(); + var sql = this.invsqlcontext; Ext.apply(store.proxy.extraParams, { condition: sql }); }, this); - this.onRefreshClick(); + _thisBankdataInv = this; + + if (_thisBankdataInv.GID == undefined) { + this.onRefreshClick(); + } else { + _thisBankdataInv.invsqlcontext = " GID='" + _thisBankdataInv.GID + "'"; + this.storeList.load({ + params: { start: 0, limit: this.PageSize, sort: '', condition: _thisBankdataInv.invsqlcontext }, + waitMsg: "正在查询数据...", + scope: this + }); + } - _thisBankdataInv = this; this.formFit = Ext.widget('form', { region: 'north', diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_bankdata/ChBankdataPayIndex.js b/DSWeb/Areas/Account/Viewsjs/Chfee_bankdata/ChBankdataPayIndex.js index efe0c1c..acce3cc 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_bankdata/ChBankdataPayIndex.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_bankdata/ChBankdataPayIndex.js @@ -17,6 +17,7 @@ Ext.extend(Shipping.MsChBankdataPayIndex, Ext.Panel, { this.invsqlcontext = ''; this.formname = "MsChBankdataPayIndex"; //页面名称 + this.GID = getUrlParam('GID'); //定义数据集 this.storeList = Ext.create('Ext.data.Store', { pageSize: this.PageSize, @@ -1509,11 +1510,22 @@ Ext.extend(Shipping.MsChBankdataPayIndex, Ext.Panel, { Ext.apply(store.proxy.extraParams, { condition: sql }); }, this); - this.onRefreshClick(); + _thisBankdataPay = this; + + if (_thisBankdataPay.GID == undefined) { + this.onRefreshClick(); + } else { + _thisBankdataPay.invsqlcontext = " GID='" + _thisBankdataPay.GID + "'"; + this.storeList.load({ + params: { start: 0, limit: this.PageSize, sort: '', condition: _thisBankdataPay.invsqlcontext }, + waitMsg: "正在查询数据...", + scope: this + }); + } + - _thisBankdataPay = this; this.formFit = Ext.widget('form', { region: 'north', diff --git a/DSWeb/Areas/SoftMng/Filter/SqlKeyWordsFilter.cs b/DSWeb/Areas/SoftMng/Filter/SqlKeyWordsFilter.cs index 7ef49e7..abf16fa 100644 --- a/DSWeb/Areas/SoftMng/Filter/SqlKeyWordsFilter.cs +++ b/DSWeb/Areas/SoftMng/Filter/SqlKeyWordsFilter.cs @@ -15,7 +15,7 @@ namespace DSWeb.SoftMng.Filter { //sql注入过滤 foreach (var item in filterContext.ActionParameters) - if (Common.Common.SqlFilterExist(item.Value.ToString())) + if (item.Value != null && Common.Common.SqlFilterExist(item.Value.ToString())) filterContext.Result = new ContentResult() {Content = "包含sql关键字,阻止访问!"}; } ///