| | |
| | | } |
| | | |
| | | /// <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> |
| | | /// 分页查询 |
| | | /// </summary> |
| | | /// <param name="query">查询对象</param> |
| | |
| | | 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}, |
| | | new SqlParameter("@WorkStates",DBNull.Value){SqlDbType=SqlDbType.VarChar,Size=500}, |
| | | new SqlParameter("@DeleverStates",DBNull.Value){SqlDbType=SqlDbType.VarChar,Size=500}, |
| | | |
| | | }; |
| | | |
| | | /* |
| | |
| | | } |
| | | } |
| | | /*获取页数与返回数据条数*/ |
| | | int? resultValue = CY.Infrastructure.Common.MyConvert.ConvertToInt32(sqlParms[31].Value); |
| | | int? resultValue = CY.Infrastructure.Common.MyConvert.ConvertToInt32(sqlParms[34].Value); |
| | | pagination.PageCount = resultValue.HasValue ? resultValue.Value : 0; |
| | | resultValue = CY.Infrastructure.Common.MyConvert.ConvertToInt32(sqlParms[32].Value); |
| | | resultValue = CY.Infrastructure.Common.MyConvert.ConvertToInt32(sqlParms[35].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; |
| | |
| | | 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;//返回结果 |
| | | } |
| | |
| | | /// <param name="WorkStates"></param> |
| | | /// <param name="OutOrderId"></param> |
| | | /// <param name="RelationType"></param> |
| | | /// <param name="PayState"></param> |
| | | /// <returns></returns> |
| | | public IEnumerable<EC_OrderBasic> SelectAferOfOutOrder(Infrastructure.Query.Pagination pagination, Guid MemberId, DateTime? StartCreatTime, DateTime? EndCreatTime, DateTime? StartReturnTime, DateTime? EndReturnTime, string Creater, string OutFirm, string WorkStates, string OutOrderId, int? RelationType) |
| | | public IEnumerable<EC_OrderBasic> SelectAferOfOutOrder(Infrastructure.Query.Pagination pagination, Guid MemberId, DateTime? StartCreatTime, DateTime? EndCreatTime, DateTime? StartReturnTime, DateTime? EndReturnTime, string Creater, string OutFirm, string WorkStates, string OutOrderId, int? RelationType, string PayState = null) |
| | | { |
| | | try |
| | | { |
| | |
| | | |
| | | if (RelationType > 0) |
| | | condition += " and b.RelationTypeId = '" + RelationType + "' "; |
| | | if (!string.IsNullOrEmpty(PayState)) |
| | | condition += " and a.PayState = " + PayState + " "; |
| | | |
| | | |
| | | if (StartCreatTime != null) |
| | | condition += " and a.CreateTime >= '" + StartCreatTime.Value + "' "; |
| | |
| | | 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;//返回结果 |
| | | } |