From 76246667c19baf28e6361a7b0e19d5402a36d809 Mon Sep 17 00:00:00 2001 From: hanxuntao <641739520@qq.com> Date: Thu, 9 Mar 2023 10:24:44 +0800 Subject: [PATCH] 1 --- D7MqClient/D7MqClient/App.config | 1 + D7MqClient/D7MqClient/JFtoDjyBackNo.cs | 53 +++++++++++++++---- D7MqClient/D7MqClient/Service1.cs | 8 +-- .../Areas/OA/Viewsjs/Baoxiao/BaoxiaoIndex.js | 2 +- .../Areas/OA/Viewsjs/Baoxiao2/BaoxiaoIndex.js | 2 +- .../OA/Viewsjs/Baoxiao2/BaoxiaoNewIndex.js | 2 +- .../DAL/MsOpTruckBulk/MsOpTruckBulkDAL.cs | 5 +- 7 files changed, 54 insertions(+), 19 deletions(-) diff --git a/D7MqClient/D7MqClient/App.config b/D7MqClient/D7MqClient/App.config index fecb22e2..7ce9ab0f 100644 --- a/D7MqClient/D7MqClient/App.config +++ b/D7MqClient/D7MqClient/App.config @@ -9,6 +9,7 @@ + diff --git a/D7MqClient/D7MqClient/JFtoDjyBackNo.cs b/D7MqClient/D7MqClient/JFtoDjyBackNo.cs index 143f433e..79ad10ff 100644 --- a/D7MqClient/D7MqClient/JFtoDjyBackNo.cs +++ b/D7MqClient/D7MqClient/JFtoDjyBackNo.cs @@ -27,8 +27,9 @@ namespace D7MqClient private static string COMPANYID = ConfigurationManager.AppSettings["COMPANYID"]; private static string MQURL = ConfigurationManager.AppSettings["DJYMQURL"]; private static string connStr = ConfigurationManager.AppSettings["ConnectionString"]; + private static string DSVER = ConfigurationManager.AppSettings["DONGSHENGVER"]; + - private const string ExchangeName = "booking"; private const string QueueName = "djy.booking.feedback."; private static IConnection mqConn; @@ -56,29 +57,61 @@ namespace D7MqClient try { //回写数据 - var feeback = JsonConvert.DeserializeAnonymousType(strBody, new { FeedbackType = string.Empty, FeedbackData = new { MBLNO = string.Empty, BSNO = string.Empty, IRCode = string.Empty } }); + var feeback = JsonConvert.DeserializeAnonymousType(strBody, new { FeedbackType = string.Empty, FeedbackData = new { MBLNO = string.Empty, BSNO = string.Empty, IRCode = string.Empty, CSRCode = string.Empty, FF = string.Empty } }); using (SqlConnection dbcon = new SqlConnection(connStr)) { dbcon.Open(); - if (feeback.FeedbackType == "IRCode") { + if (feeback.FeedbackType == "IRCode"|| feeback.FeedbackType == "CSRCode") { + + var IRCODE = ""; + if (!string.IsNullOrEmpty(feeback.FeedbackData.IRCode)) IRCODE = feeback.FeedbackData.IRCode; + if (!string.IsNullOrEmpty(feeback.FeedbackData.CSRCode)) IRCODE = feeback.FeedbackData.CSRCode; - if (!string.IsNullOrEmpty(feeback.FeedbackData.BSNO) && !string.IsNullOrEmpty(feeback.FeedbackData.IRCode)) { + if (DSVER == "7") + { + var CUSTNO = ""; + if (!string.IsNullOrEmpty(feeback.FeedbackData.BSNO)) CUSTNO = feeback.FeedbackData.BSNO; + if (!string.IsNullOrEmpty(feeback.FeedbackData.FF)) CUSTNO = feeback.FeedbackData.FF; var strSql = new StringBuilder(); - strSql.Append("update t_op_seae set IRCODE='"+ feeback.FeedbackData.IRCode + "' where 业务编号='" + feeback.FeedbackData.BSNO + "'"); + strSql.Append("update op_seae set IRCODE='" + IRCODE + "' where CUSTNO='" + CUSTNO + "' AND ISNULL(IRCODE,'')=''"); SqlCommand cmd = new SqlCommand(strSql.ToString(), dbcon); cmd.ExecuteNonQuery(); - } + } + else + { + if (!string.IsNullOrEmpty(feeback.FeedbackData.BSNO)) + { + + var strSql = new StringBuilder(); + strSql.Append("update t_op_seae set IRCODE='" + IRCODE + "' where 业务编号='" + feeback.FeedbackData.BSNO + "'"); + SqlCommand cmd = new SqlCommand(strSql.ToString(), dbcon); + cmd.ExecuteNonQuery(); + } + } } else if (feeback.FeedbackType == "MBLNO") { if (!string.IsNullOrEmpty(feeback.FeedbackData.BSNO) && !string.IsNullOrEmpty(feeback.FeedbackData.MBLNO)) { - var strSql = new StringBuilder(); - strSql.Append("update t_op_seae set 主提单号='" + feeback.FeedbackData.MBLNO + "' where 业务编号='" + feeback.FeedbackData.BSNO + "' AND ISNULL(主提单号,'')='' "); - SqlCommand cmd = new SqlCommand(strSql.ToString(), dbcon); - cmd.ExecuteNonQuery(); + if (DSVER == "7") + { + var CUSTNO = ""; + if (!string.IsNullOrEmpty(feeback.FeedbackData.BSNO)) CUSTNO = feeback.FeedbackData.BSNO; + if (!string.IsNullOrEmpty(feeback.FeedbackData.FF)) CUSTNO = feeback.FeedbackData.FF; + var strSql = new StringBuilder(); + strSql.Append("update op_seae set MBLNO='" + feeback.FeedbackData.MBLNO + "' where CUSTNO='" + CUSTNO + "' AND ISNULL(MBLNO,'')='' "); + SqlCommand cmd = new SqlCommand(strSql.ToString(), dbcon); + cmd.ExecuteNonQuery(); + } + else + { + var strSql = new StringBuilder(); + strSql.Append("update t_op_seae set 主提单号='" + feeback.FeedbackData.MBLNO + "' where 业务编号='" + feeback.FeedbackData.BSNO + "' AND ISNULL(主提单号,'')='' "); + SqlCommand cmd = new SqlCommand(strSql.ToString(), dbcon); + cmd.ExecuteNonQuery(); + } } } diff --git a/D7MqClient/D7MqClient/Service1.cs b/D7MqClient/D7MqClient/Service1.cs index 587269c9..20a944ae 100644 --- a/D7MqClient/D7MqClient/Service1.cs +++ b/D7MqClient/D7MqClient/Service1.cs @@ -22,8 +22,8 @@ namespace D7MqClient { logger.Debug("开始运行"); - JFtoSaveFile.DoProcess(); - JFtoDcStatus.DoProcess(); + //JFtoSaveFile.DoProcess(); + //JFtoDcStatus.DoProcess(); JFtoDjyBackNo.DoProcess(); //var invtoD7 = new InvToD7(); //var djytoD7_OPSTATUS = new DJYtoD7_OPSTATUS(); @@ -32,8 +32,8 @@ namespace D7MqClient protected override void OnStop() { logger.Debug("停止运行"); - JFtoSaveFile.StopProcess(); - JFtoDcStatus.StopProcess(); + //JFtoSaveFile.StopProcess(); + //JFtoDcStatus.StopProcess(); JFtoDjyBackNo.StopProcess(); //InvToD7.StopProcess(); //DJYtoD7_OPSTATUS.StopProcess(); diff --git a/DSWeb/Areas/OA/Viewsjs/Baoxiao/BaoxiaoIndex.js b/DSWeb/Areas/OA/Viewsjs/Baoxiao/BaoxiaoIndex.js index 9b435d8b..6d28d0ce 100644 --- a/DSWeb/Areas/OA/Viewsjs/Baoxiao/BaoxiaoIndex.js +++ b/DSWeb/Areas/OA/Viewsjs/Baoxiao/BaoxiaoIndex.js @@ -255,7 +255,7 @@ Ext.extend(DsTruck.Chfee_managementIndex, Ext.Panel, { fieldLabel: '部门', store: this.storeDEPT, name: 'DEPTID', id: "DEPTID", - valueField: 'GID', + valueField: 'DeptName', displayField: 'DeptName' }); diff --git a/DSWeb/Areas/OA/Viewsjs/Baoxiao2/BaoxiaoIndex.js b/DSWeb/Areas/OA/Viewsjs/Baoxiao2/BaoxiaoIndex.js index 21f5f44b..c245effc 100644 --- a/DSWeb/Areas/OA/Viewsjs/Baoxiao2/BaoxiaoIndex.js +++ b/DSWeb/Areas/OA/Viewsjs/Baoxiao2/BaoxiaoIndex.js @@ -329,7 +329,7 @@ Ext.extend(DsTruck.Chfee_managementIndex, Ext.Panel, { fieldLabel: '部门', store: this.storeDEPT, name: 'DEPTID', id: "DEPTID", - valueField: 'GID', + valueField: 'DeptName', displayField: 'DeptName' }); diff --git a/DSWeb/Areas/OA/Viewsjs/Baoxiao2/BaoxiaoNewIndex.js b/DSWeb/Areas/OA/Viewsjs/Baoxiao2/BaoxiaoNewIndex.js index bbd92021..34601bca 100644 --- a/DSWeb/Areas/OA/Viewsjs/Baoxiao2/BaoxiaoNewIndex.js +++ b/DSWeb/Areas/OA/Viewsjs/Baoxiao2/BaoxiaoNewIndex.js @@ -336,7 +336,7 @@ Ext.extend(DsTruck.Chfee_managementIndex, Ext.Panel, { fieldLabel: '部门', store: this.storeDEPT, name: 'DEPTID', id: "DEPTID", - valueField: 'GID', + valueField: 'DeptName', displayField: 'DeptName' }); diff --git a/DSWeb/Areas/TruckMng/DAL/MsOpTruckBulk/MsOpTruckBulkDAL.cs b/DSWeb/Areas/TruckMng/DAL/MsOpTruckBulk/MsOpTruckBulkDAL.cs index 577b44c1..a72769f7 100644 --- a/DSWeb/Areas/TruckMng/DAL/MsOpTruckBulk/MsOpTruckBulkDAL.cs +++ b/DSWeb/Areas/TruckMng/DAL/MsOpTruckBulk/MsOpTruckBulkDAL.cs @@ -18,6 +18,7 @@ using DSWeb.MvcShipping.DAL.MsSysBillNoSet; using DSWeb.TruckMng.DAL.MsCustTruckFeeTemplate; using DSWeb.MvcShipping.DAL.MsCodeOpMustField; using DSWeb.MvcShipping.Models.MsInfoClient; +using DSWeb.Areas.SysMng.DAL.SysUser; namespace DSWeb.TruckMng.DAL.MsOpTruckBulkDAL { @@ -691,7 +692,7 @@ namespace DSWeb.TruckMng.DAL.MsOpTruckBulkDAL public static DBResult CreateCtnFeeBl(MsOpTruckBulk headData, List bodyList, string userid) { var result = new DBResult(); - + var OP= SysUserDAL.GetData(" SHOWNAME='" + headData.OP + "'"); Database db = DatabaseFactory.CreateDatabase(); using (var conn = db.CreateConnection()) { @@ -788,7 +789,7 @@ namespace DSWeb.TruckMng.DAL.MsOpTruckBulkDAL db.AddInParameter(cmdInsertFee, "@REASON", DbType.String, ""); db.AddInParameter(cmdInsertFee, "@REMARK", DbType.String, ""); db.AddInParameter(cmdInsertFee, "@COMMISSIONRATE", DbType.Decimal, 0); - db.AddInParameter(cmdInsertFee, "@ENTEROPERATOR", DbType.String, userid); + db.AddInParameter(cmdInsertFee, "@ENTEROPERATOR", DbType.String, OP.GID); db.AddInParameter(cmdInsertFee, "@ENTERDATE", DbType.String, DateTime.Now.ToString()); db.AddInParameter(cmdInsertFee, "@ISOPEN", DbType.Boolean, false); db.AddInParameter(cmdInsertFee, "@ISADVANCEDPAY", DbType.Boolean, false);