username@email.com
2024-12-24 a0d38325a97957b37dd755bf732b63f6f7e2a5ff
CY_ECommercePlatform/CY.SQLDAL/EC/EC_OrderBasicDAL.cs
@@ -688,7 +688,8 @@
                     new SqlParameter("@KaipiaoshenqingId",DBNull.Value){SqlDbType=SqlDbType.UniqueIdentifier},
                     new SqlParameter("@buyerId",DBNull.Value){SqlDbType=SqlDbType.UniqueIdentifier},
                     new SqlParameter("@DocumentName",DBNull.Value){SqlDbType=SqlDbType.VarChar,Size=50},
                     new SqlParameter("@Orderids",DBNull.Value){SqlDbType=SqlDbType.VarChar,Size=500},
            };
            /*
@@ -772,9 +773,9 @@
                }
            }
            /*获取页数与返回数据条数*/
            int? resultValue = CY.Infrastructure.Common.MyConvert.ConvertToInt32(sqlParms[31].Value);
            int? resultValue = CY.Infrastructure.Common.MyConvert.ConvertToInt32(sqlParms[32].Value);
            pagination.PageCount = resultValue.HasValue ? resultValue.Value : 0;
            resultValue = CY.Infrastructure.Common.MyConvert.ConvertToInt32(sqlParms[32].Value);
            resultValue = CY.Infrastructure.Common.MyConvert.ConvertToInt32(sqlParms[33].Value);
            pagination.RecordCount = resultValue.HasValue ? resultValue.Value : 0;
            return result;
@@ -1027,7 +1028,9 @@
                new SqlParameter("@businessManager",DBNull.Value){SqlDbType=SqlDbType.Int},
                new SqlParameter("@payType",DBNull.Value){SqlDbType=SqlDbType.VarChar,Size=20},
                new SqlParameter("@returnvisit",DBNull.Value){SqlDbType=SqlDbType.VarChar,Size=20},
                 new SqlParameter("@appraise",DBNull.Value){SqlDbType=SqlDbType.VarChar,Size=20}
                 new SqlParameter("@appraise",DBNull.Value){SqlDbType=SqlDbType.VarChar,Size=20},
                  new SqlParameter("@Orderids",DBNull.Value){SqlDbType=SqlDbType.VarChar,Size=500}
            };
            /*
@@ -1094,9 +1097,9 @@
                }
            }
            /*获取页数与返回数据条数*/
            int? resultValue = CY.Infrastructure.Common.MyConvert.ConvertToInt32(sqlParms[19].Value);
            int? resultValue = CY.Infrastructure.Common.MyConvert.ConvertToInt32(sqlParms[20].Value);
            pagination.PageCount = resultValue.HasValue ? resultValue.Value : 0;
            resultValue = CY.Infrastructure.Common.MyConvert.ConvertToInt32(sqlParms[20].Value);
            resultValue = CY.Infrastructure.Common.MyConvert.ConvertToInt32(sqlParms[21].Value);
            pagination.RecordCount = resultValue.HasValue ? resultValue.Value : 0;
            return result;
@@ -1892,6 +1895,59 @@
                        else
                            ;
                    }
                    //更新订单支付金额
                    isWin = this.UpdateOrderPayedMoney(orderId, -1, firmAccountRecord.Money.Value);
                    if (!isWin)
                    {
                        return isWin;
                    }
                    else
                        ;
                    //更新订单状态
                    isWin = this.UpdateOrderPayState(orderId);
                    if (!isWin)
                    {
                        return isWin;
                    }
                    else
                        ;
                    tran.Complete();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return isWin;
        }
        /// <summary>
        /// 收款(线下转账、现金)
        /// </summary>
        /// <param name="orderId">订单编号</param>
        /// <param name="firmAccountRecord">操作记录</param>
        /// <returns></returns>
        public bool ReceiveMoneyToQueren(int orderId, OA_FirmAccountRecord firmAccountRecord)
        {
            bool isWin = false;
            if (0 >= orderId  || !firmAccountRecord.Money.HasValue)
                return false;
            else
                ;
            if ( 0 > firmAccountRecord.Money.Value)
                return false;
            else
                ;
            try
            {
                OA_FirmAccountRecordDAL oA_FirmAccountRecordDAL = new OA_FirmAccountRecordDAL(_dataBase);
                using (TransactionScope tran = new TransactionScope())
                {
                    //更新订单支付金额
                    isWin = this.UpdateOrderPayedMoney(orderId, -1, firmAccountRecord.Money.Value);
@@ -2750,12 +2806,12 @@
        /// 修改打印状态
        /// </summary>
        /// <param name="orderId"></param>
        public bool Updatejinedanjia(int orderId, decimal SumPrice, decimal UnitPrice)
        public bool Updatejinedanjia(int orderId, decimal SumPrice, decimal UnitPrice,int num)
        {
            try
            {
                string sqlStr = string.Empty;
                sqlStr = "UPDATE EC_OrderBasic SET SumPrice="+ SumPrice + " ,UnitPrice="+ UnitPrice + " WHERE Keyid=@orderId";
                sqlStr = "UPDATE EC_OrderBasic SET SumPrice="+ SumPrice + " ,UnitPrice="+ UnitPrice + " WHERE Keyid=@orderId;UPDATE [EC_OrderExtend] SET [PrintNum]=" + num + "  WHERE Keyid="+ orderId ;
                SqlParameter par = new SqlParameter("@orderId", orderId);
                _dataBase.ExecuteSql(sqlStr, par);
            }