| | |
| | | using CY.Model; |
| | | using CY.Infrastructure.Query; |
| | | using System.Transactions; |
| | | using CY.Model.Inquiry; |
| | | using CY.Infrastructure.Common; |
| | | |
| | | namespace CY.SQLDAL |
| | | { |
| | |
| | | { |
| | | unitPricePar = new SqlParameter("@UnitPrice", DBNull.Value); |
| | | } |
| | | SqlParameter DeliveryTime = null; |
| | | if (trueModel.DeliveryTime.HasValue) |
| | | { |
| | | DeliveryTime = new SqlParameter("@DeliveryTime", trueModel.DeliveryTime); |
| | | } |
| | | else |
| | | { |
| | | DeliveryTime = new SqlParameter("@DeliveryTime", DBNull.Value); |
| | | } |
| | | IList<SqlParameter> sqlParms = new List<SqlParameter>() |
| | | { |
| | | new SqlParameter(){ ParameterName ="@Keyid", SqlDbType=System.Data.SqlDbType.Int, DbType=System.Data.DbType.Int32, Direction=ParameterDirection.Output}, |
| | |
| | | new SqlParameter("@OrderTypeId",trueModel.OrderTypeId), |
| | | new SqlParameter("@PrintTypeId",trueModel.PrintTypeId), |
| | | new SqlParameter("@DocumentName",trueModel.DocumentName), |
| | | new SqlParameter("@DeliveryTime",trueModel.DeliveryTime), |
| | | DeliveryTime,//new SqlParameter("@DeliveryTime",trueModel.DeliveryTime), |
| | | new SqlParameter("@SellerId",trueModel.SellerId), |
| | | new SqlParameter("@BuyerId",trueModel.BuyerId), |
| | | new SqlParameter("@SellerName",trueModel.SellerName){SqlDbType=SqlDbType.VarChar,Size=200}, |
| | |
| | | { |
| | | unitPricePar = new SqlParameter("@UnitPrice", DBNull.Value); |
| | | } |
| | | SqlParameter DeliveryTime = null; |
| | | if (trueModel.DeliveryTime.HasValue) |
| | | { |
| | | DeliveryTime = new SqlParameter("@DeliveryTime", trueModel.DeliveryTime); |
| | | } |
| | | else |
| | | { |
| | | DeliveryTime = new SqlParameter("@DeliveryTime", DBNull.Value); |
| | | } |
| | | |
| | | |
| | | IList<SqlParameter> sqlParms = new List<SqlParameter>() |
| | | { |
| | |
| | | new SqlParameter("@SellerId",trueModel.SellerId), |
| | | new SqlParameter("@SellerName",trueModel.SellerName), |
| | | new SqlParameter("@DocumentName",trueModel.DocumentName), |
| | | new SqlParameter("@DeliveryTime",trueModel.DeliveryTime), |
| | | unitPricePar, |
| | | DeliveryTime,//new SqlParameter("@DeliveryTime",trueModel.DeliveryTime), |
| | | unitPricePar, |
| | | new SqlParameter("@SumPrice",trueModel.SumPrice), |
| | | new SqlParameter("@PayState",trueModel.PayState), |
| | | new SqlParameter("@Operator",trueModel.Operator), |
| | |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 删除外协订单 |
| | | /// </summary> |
| | | /// <param name="OrderId"></param> |
| | | /// <returns></returns> |
| | | public bool UpdateOldOrderSurplusPrintNum(int OrderId) |
| | | { |
| | | IList<SqlParameter> sqlParms = new List<SqlParameter>() |
| | | { |
| | | new SqlParameter("@Keyid",OrderId) |
| | | }; |
| | | string sql = " Update [EC_OrderExtend] Set [SurplusPrintNum]=[PrintNum] where [Keyid] = (select [OrderId] from [OA_OrderWorkListRelation] where [RelationTargetId] = @Keyid and [RelationTypeId]=4 ) ;Update [EC_OrderBasic] Set [OrderState]=2 where [Keyid] = (select [OrderId] from [OA_OrderWorkListRelation] where [RelationTargetId] = @Keyid and [RelationTypeId]=4 ) "; |
| | | |
| | | try |
| | | { |
| | | _dataBase.ExecuteSql(sql, sqlParms.ToArray<SqlParameter>()); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 分页查询 |
| | |
| | | //执行分页存储 |
| | | using (IDataReader reader = _dataBase.QueryDataReader("sp_EC_OrderBasic_Financial_Search", CommandType.StoredProcedure, sqlParms.ToArray())) |
| | | { |
| | | |
| | | result = _dataBase.ReadDataToModel<EC_OrderBasic>(reader); |
| | | } |
| | | if (result != null && result.Count > 0) |
| | |
| | | else |
| | | { |
| | | } |
| | | StringBuilder ssss = new StringBuilder(); |
| | | if (int.Parse(searchParam[18].ToString()) > 0) |
| | | { |
| | | var oA_Staffs = _dataBase.SelectModel<OA_Staff>(" * ", " [OA_Staff] ", "[Keyid]='" + searchParam[20] + "'").FirstOrDefault(); |
| | | |
| | | |
| | | if (!string.IsNullOrEmpty(oA_Staffs.ManageCountry)) |
| | | { |
| | | var sys_CitySites = _dataBase.SelectModel<Sys_CitySite>(" * ", " [Sys_CitySite] ").ToList(); |
| | | |
| | | |
| | | |
| | | var ManageCity = oA_Staffs.ManageCity.Split(',').Where(x => x != "").ToArray(); |
| | | |
| | | |
| | | var ManageCountry = (oA_Staffs.ManageCountry + "," + oA_Staffs.ManageCountry1).Split(',').Where(x => x != "").ToArray(); |
| | | |
| | | int[] intManageCity = new int[ManageCity.Length]; |
| | | for (int i = 0; i < ManageCity.Length; i++) |
| | | { |
| | | intManageCity[i] = int.Parse(ManageCity[i]); |
| | | } |
| | | |
| | | int[] intManageCountry = new int[ManageCountry.Length]; |
| | | for (int i = 0; i < ManageCountry.Length; i++) |
| | | { |
| | | intManageCountry[i] = int.Parse(ManageCountry[i]); |
| | | } |
| | | var city = sys_CitySites.Where(x => intManageCity.Contains(x.Keyid)).ToList(); |
| | | var country = sys_CitySites.Where(x => intManageCountry.Contains(x.Keyid)).ToList(); |
| | | |
| | | StringBuilder citystring = new StringBuilder(); |
| | | for (int i = 0; i < city.Count; i++) |
| | | { |
| | | if (i == city.Count - 1) |
| | | { |
| | | citystring.Append("'" + city[i].Name.ToString() + "'"); |
| | | } |
| | | else |
| | | { |
| | | citystring.Append("'" + city[i].Name.ToString() + "',"); |
| | | } |
| | | |
| | | } |
| | | |
| | | StringBuilder countrystring = new StringBuilder(); |
| | | for (int i = 0; i < country.Count; i++) |
| | | { |
| | | if (i == country.Count - 1) |
| | | { |
| | | countrystring.Append("'" + country[i].Name.ToString() + "'"); |
| | | } |
| | | else |
| | | { |
| | | countrystring.Append("'" + country[i].Name.ToString() + "',"); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | var resultsss = _dataBase.SelectModel<OA_CorporateClients>(" axz.* ", " [OA_CorporateClients] axz join [OA_CustomerCommunications] bxz on axz.Keyid=bxz.Keyid ", " axz.FirmId ='" + searchParam[1] + "'and ( ( bxz.City in ( " + citystring.ToString() + ") and bxz.County in ( " + countrystring.ToString() + " ) )or axz.AccountManagerId='" + searchParam[20] + "' or axz.BusinessManagerId='" + searchParam[20] + "')").Select(x => x.Keyid).ToList(); |
| | | //return null == result || result.Count < 1 ? null : result[0]; |
| | | |
| | | |
| | | |
| | | for (int i = 0; i < resultsss.Count; i++) |
| | | { |
| | | if (i == resultsss.Count - 1) |
| | | { |
| | | ssss.Append("'" + resultsss[i].ToString() + "'"); |
| | | } |
| | | else |
| | | { |
| | | ssss.Append("'" + resultsss[i].ToString() + "',"); |
| | | } |
| | | |
| | | } |
| | | } |
| | | else |
| | | { |
| | | var resultsss = _dataBase.SelectModel<OA_CorporateClients>(" axz.* ", " [OA_CorporateClients] axz join [OA_CustomerCommunications] bxz on axz.Keyid=bxz.Keyid ", " axz.FirmId ='" + searchParam[1] + "'and ( axz.AccountManagerId='" + searchParam[20] + "' or axz.BusinessManagerId='" + searchParam[20] + "')").Select(x => x.Keyid).ToList(); |
| | | //return null == result || result.Count < 1 ? null : result[0]; |
| | | |
| | | |
| | | |
| | | for (int i = 0; i < resultsss.Count; i++) |
| | | { |
| | | if (i == resultsss.Count - 1) |
| | | { |
| | | ssss.Append("'" + resultsss[i].ToString() + "'"); |
| | | } |
| | | else |
| | | { |
| | | ssss.Append("'" + resultsss[i].ToString() + "',"); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(ssss.ToString())) |
| | | { |
| | | ssss.Append("'4354654657568345429890'"); |
| | | } |
| | | |
| | | |
| | | } |
| | | else |
| | | { |
| | | var resultsss = _dataBase.SelectModel<OA_CorporateClients>(" axz.* ", " [OA_CorporateClients] axz ", " axz.FirmId ='" + searchParam[1] + "' ").Select(x => x.Keyid).ToList(); |
| | | //return null == result || result.Count < 1 ? null : result[0]; |
| | | |
| | | |
| | | |
| | | for (int i = 0; i < resultsss.Count; i++) |
| | | { |
| | | if (i == resultsss.Count - 1) |
| | | { |
| | | ssss.Append("'" + resultsss[i].ToString() + "'"); |
| | | } |
| | | else |
| | | { |
| | | ssss.Append("'" + resultsss[i].ToString() + "',"); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | IList<SqlParameter> sqlParms = new List<SqlParameter>() |
| | | { |
| | |
| | | new SqlParameter("@Kehuqianshou",DBNull.Value){SqlDbType=SqlDbType.Int}, |
| | | 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}, |
| | | |
| | | }; |
| | | |
| | | /* |
| | |
| | | Direction = ParameterDirection.Output |
| | | }); |
| | | |
| | | sqlParms.Add(new SqlParameter() |
| | | { |
| | | ParameterName = "@CorporateClientsId", |
| | | SqlDbType = SqlDbType.VarChar, |
| | | Size=int.MaxValue, |
| | | Value = ssss.ToString() |
| | | }); |
| | | |
| | | IList<EC_OrderBasic> result = null; |
| | | //执行分页存储 |
| | | using (IDataReader reader = _dataBase.QueryDataReader("sp_EC_OrderBasic_Search_Seller", CommandType.StoredProcedure, sqlParms.ToArray())) |
| | | using (IDataReader reader = _dataBase.QueryDataReader("sp_EC_OrderBasic_Search_Seller_Ceshi", CommandType.StoredProcedure, sqlParms.ToArray())) |
| | | { |
| | | result = _dataBase.ReadDataToModel<EC_OrderBasic>(reader); |
| | | } |
| | | if (result != null && result.Count > 0) |
| | | { |
| | | _eC_OrderPrintParameterDAL = new EC_OrderPrintParameterDAL(_dataBase); |
| | | foreach (EC_OrderBasic ob in result) |
| | | { |
| | | if (IsComplainant(ob.Keyid.Value)) |
| | | { |
| | | ob.IsComplainant = true; |
| | | } |
| | | |
| | | EC_OrderPrintParameter _eC_OrderPrintParameter = _eC_OrderPrintParameterDAL.GetModel(ob.Keyid.Value); |
| | | InquiryCommonModel _inquiryCommonModel = null; |
| | | if (null == _eC_OrderPrintParameter) |
| | | { |
| | | _inquiryCommonModel = new InquiryCommonModel(); |
| | | } |
| | | else |
| | | { |
| | | _inquiryCommonModel = SerializationHelper.DeSerialize(typeof(InquiryCommonModel), _eC_OrderPrintParameter.PrintParameter) as InquiryCommonModel; |
| | | } |
| | | |
| | | ob.PrintSizeName = _inquiryCommonModel.PrintSizeName; |
| | | } |
| | | } |
| | | /*获取页数与返回数据条数*/ |
| | | int? resultValue = CY.Infrastructure.Common.MyConvert.ConvertToInt32(sqlParms[30].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[31].Value); |
| | | resultValue = CY.Infrastructure.Common.MyConvert.ConvertToInt32(sqlParms[33].Value); |
| | | pagination.RecordCount = resultValue.HasValue ? resultValue.Value : 0; |
| | | |
| | | return result; |
| | |
| | | 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} |
| | | |
| | | }; |
| | | |
| | | /* |
| | |
| | | } |
| | | } |
| | | /*获取页数与返回数据条数*/ |
| | | 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; |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 作业本送货分页查询 |
| | | /// </summary> |
| | | /// <param name="pagination"></param> |
| | | /// <returns></returns> |
| | | public IEnumerable<EC_OrderBasic> SelectModelPageWorkBook(Infrastructure.Query.Pagination pagination, Guid _MemberID, string txtBeginDate, string txtEndDate, string txtOrderId, string txtSearchyjname, string selCustormerManager, string selBusinessManager, string selOrderStates) |
| | | { |
| | | try |
| | | { |
| | | string condition = " ob.PrintTypeId = 37 "; |
| | | |
| | | if (_MemberID != Guid.Empty) |
| | | condition += " and ob.SellerId = '" + _MemberID + "'"; |
| | | |
| | | if (!string.IsNullOrEmpty(txtBeginDate)) |
| | | condition += string.Format(" and CAST(ob.CreateTime AS DATE) >='{0}'", txtBeginDate); |
| | | |
| | | if (!string.IsNullOrEmpty(txtEndDate)) |
| | | { |
| | | var EndDate = txtEndDate.ToDateTime2().Value.AddDays(1).ToShortDateString(); |
| | | condition += string.Format(" and CAST(ob.CreateTime AS DATE) <='{0}'", EndDate); |
| | | } |
| | | |
| | | |
| | | if (!string.IsNullOrEmpty(txtOrderId)) |
| | | condition += " and ob.SellerOrderId like '%" + txtOrderId + "%'"; |
| | | |
| | | if (!string.IsNullOrEmpty(txtSearchyjname)) |
| | | condition += " and ob.DocumentName like '%" + txtSearchyjname + "%'"; |
| | | |
| | | if (!string.IsNullOrEmpty(selCustormerManager)) |
| | | condition += " and oe.CustomerManagerId = '" + selCustormerManager + "'"; |
| | | |
| | | if (!string.IsNullOrEmpty(selBusinessManager)) |
| | | condition += " and oe.BusinessManagerId = '" + selBusinessManager + "'"; |
| | | |
| | | if (!string.IsNullOrEmpty(selOrderStates)) |
| | | condition += " and ob.OrderState = '" + selOrderStates + "'"; |
| | | |
| | | |
| | | |
| | | return _dataBase.SelectModelPage<EC_OrderBasic>(pagination, " ob.*,oe.shifouDelivery,oe.DeliveryOrderId,oe.KaipiaoshenqingCreater,oe.KaipiaoshenqingTime,oe.KaipiaoquerenCreater,oe.KaipiaoquerenTime,oe.Kehuqianshou,oe.KehuqianshouCreater,oe.KehuqianshouTime ,oe.Quchudingdan,oe.QuchudingdanCreater,oe.QuchudingdanTime,oe.PrintPackDeliveryRequir,oe.PrintNum,oe.ExigencyCaseId,opy.Name as yssldw ", " EC_OrderBasic as ob Inner Join EC_OrderExtend as oe On(ob.Keyid=oe.Keyid) Left Join Sys_Dictionary as opy On (opy.DicType='印刷单位' And opy.MeanValue = oe.printunit ) ", " ob.Keyid DESC ", " Keyid DESC ", condition); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 单个查询 |
| | | /// </summary> |
| | |
| | | return null == result || result.Count < 1 ? null : result[0]; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 根据客户ID和订单支付状态获取订单列表 |
| | | /// </summary> |
| | | /// <param name="BuyerId">卖家ID</param> |
| | | /// <returns></returns> |
| | | public IList<EC_OrderBasic> GetOrderById(Guid BuyerId, int PayState) |
| | | { |
| | | IList<EC_OrderBasic> result = new List<EC_OrderBasic>(); |
| | | |
| | | result = _dataBase.SelectModel<EC_OrderBasic>(" * ", "EC_OrderBasic ", string.Format(" BuyerId = '{0}' and PayState!={1}", BuyerId,PayState)); |
| | | return result; |
| | | } |
| | | /// <summary> |
| | | /// 受理订单 |
| | | /// </summary> |
| | |
| | | throw ex; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 锁单订单 |
| | | /// </summary> |
| | | /// <param name="orderId">订单编号</param> |
| | | /// <param name="operater">操作人</param> |
| | | /// <returns></returns> |
| | | public bool SuodingOrder(int orderId, string operater) |
| | | { |
| | | if (0 >= orderId || 0 >= orderId) |
| | | { |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | } |
| | | |
| | | IList<SqlParameter> sqlParms = new List<SqlParameter>() |
| | | { |
| | | |
| | | new SqlParameter("@SuodanState",true), |
| | | new SqlParameter("@SuodanTime",DateTime.Now), |
| | | new SqlParameter("@SuodanOperator",operater), |
| | | new SqlParameter("@Keyid",orderId), |
| | | }; |
| | | IList<SqlParameter> sqlParms1 = new List<SqlParameter>() |
| | | { |
| | | new SqlParameter("@Keyid",orderId), |
| | | }; |
| | | try |
| | | { |
| | | string sql = "Update EC_OrderBasic Set [SuodanState]=@SuodanState,[SuodanTime]=@SuodanTime,[SuodanOperator]=@SuodanOperator where [Keyid] =@Keyid "; |
| | | _dataBase.ExecuteSql(sql, sqlParms.ToArray<SqlParameter>()); |
| | | |
| | | string sql1 = "Update CoreCmsPlanOrder Set [status]=2 where [orderkeyid] =@Keyid "; |
| | | _dataBase.ExecuteSql(sql1, sqlParms1.ToArray<SqlParameter>()); |
| | | |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | } |
| | | |
| | | return null == result || result.Count == 0 ? null : result[0]; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 根据订单编号获取订单 |
| | | /// </summary> |
| | | /// <param name="orderIds">订单编号</param> |
| | | /// <returns></returns> |
| | | public IEnumerable<EC_OrderBasic> GetOrderByIds(string orderIds) |
| | | { |
| | | //return _eC_OrderBasicDAL.SelectModelById(orderId); |
| | | IList<EC_OrderBasic> result = _dataBase.SelectModel<EC_OrderBasic>(" ob.*,ts.OnlineMoney,ts.LineMoney,ts.UsedCredit,ts.PayedMoney ", "EC_OrderBasic as ob Inner Join Pay_TradingSingle as ts On ( ob.Keyid = ts.OrderId ) ", string.Format(" ob.Keyid in ({0})", orderIds)); |
| | | return null == result || result.Count < 1 ? null : result; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /// <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); |
| | | 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> |
| | |
| | | if (string.IsNullOrEmpty(Keyids)) |
| | | return null;//错误数据返会空 |
| | | |
| | | IList<EC_OrderBasic> result = _dataBase.SelectModel<EC_OrderBasic>("*", "EC_OrderBasic", string.Format(" Keyid in ({0}) and SellerId ='{1}' order by SellerOrderId DESC ", Keyids, FirmId)) as IList<EC_OrderBasic>;//执行查询 |
| | | IList<EC_OrderBasic> result = _dataBase.SelectModel<EC_OrderBasic>("*", "EC_OrderBasic", string.Format(" Keyid in ({0}) order by SellerOrderId DESC ", Keyids)) as IList<EC_OrderBasic>;//执行查询 and SellerId ='{1}' , FirmId |
| | | |
| | | return result;//返回结果 |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 修改打印状态 |
| | | /// </summary> |
| | | /// <param name="orderId"></param> |
| | | 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;UPDATE [EC_OrderExtend] SET [PrintNum]=" + num + " WHERE Keyid="+ orderId ; |
| | | SqlParameter par = new SqlParameter("@orderId", orderId); |
| | | _dataBase.ExecuteSql(sqlStr, par); |
| | | } |
| | | catch |
| | | { |
| | | |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 修改打印状态 |
| | | /// </summary> |
| | | /// <param name="orderId"></param> |
| | | public void UpdatePrintfengqianState(int orderId) |
| | | { |
| | | try |
| | | { |
| | | string sqlStr = string.Empty; |
| | | sqlStr = "UPDATE EC_OrderExtend SET IsPrintfengqian='true' WHERE Keyid=@orderId"; |
| | | SqlParameter par = new SqlParameter("@orderId", orderId); |
| | | _dataBase.ExecuteSql(sqlStr, par); |
| | | } |
| | | catch |
| | | { |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 修改打印状态 |
| | | /// </summary> |
| | |
| | | if (deliverorderId==null || deliverorderId.Equals(Guid.Empty)) |
| | | return null;//错误数据返会空 |
| | | |
| | | IList<EC_OrderBasic> result = _dataBase.SelectModel<EC_OrderBasic>(" ob.*,oe.shifouDelivery,oe.DeliveryOrderId,oe.Kaipiaoshenqing,oe.KaipiaoshenqingCreater,oe.KaipiaoshenqingTime,oe.KaipiaoquerenCreater,oe.KaipiaoquerenTime,oe.Kehuqianshou,oe.KehuqianshouCreater,oe.KehuqianshouTime ,oe.Quchudingdan,oe.QuchudingdanCreater,oe.QuchudingdanTime,oe.PrintPackDeliveryRequir,oe.PrintNum,oe.ExigencyCaseId,pt.PrintName as PrintTypeName ", "EC_OrderBasic ob Inner Join EC_OrderExtend as oe On ob.Keyid=oe.Keyid Left Join SysInquiry_PrintingType as pt On(ob.PrintTypeId=pt.Keyid) ", string.Format(" oe.DeliveryOrderId = '{0}' and ob.SellerId ='{1}' order by SellerOrderId DESC ", deliverorderId, FirmId)) as IList<EC_OrderBasic>;//执行查询 |
| | | IList<EC_OrderBasic> result = _dataBase.SelectModel<EC_OrderBasic>(" ob.*,oe.printunit,oe.shifouDelivery,oe.DeliveryOrderId,oe.Kaipiaoshenqing,oe.KaipiaoshenqingCreater,oe.KaipiaoshenqingTime,oe.KaipiaoquerenCreater,oe.KaipiaoquerenTime,oe.Kehuqianshou,oe.KehuqianshouCreater,oe.KehuqianshouTime ,oe.Quchudingdan,oe.QuchudingdanCreater,oe.QuchudingdanTime,oe.PrintPackDeliveryRequir,oe.PrintNum,oe.ExigencyCaseId,pt.PrintName as PrintTypeName ", "EC_OrderBasic ob Inner Join EC_OrderExtend as oe On ob.Keyid=oe.Keyid Left Join SysInquiry_PrintingType as pt On(ob.PrintTypeId=pt.Keyid) ", string.Format(" oe.DeliveryOrderId = '{0}' and ob.SellerId ='{1}' order by SellerOrderId DESC ", deliverorderId, FirmId)) as IList<EC_OrderBasic>;//执行查询 |
| | | |
| | | return result;//返回结果 |
| | | } |