| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246 |
- using Castle.ActiveRecord;
- using NHibernate.Criterion;
- using System;
- using System.Text;
- namespace BizCom
- {
- [ActiveRecord("CE_ErpTradeCell")]
- public class CeErpTradeCell : ComBase<CeErpTradeCell>, ICloneable
- {
- /// <summary>
- ///
- /// </summary>
- [Property(Insert = false, Update = false, Unique = true)]
- public int ID { get; set; }
- [PrimaryKey(PrimaryKeyType.Assigned)]
- public string ctid
- {
- get; set;
- }
- //private string _ctid="";
- ///// <summary>
- /////子表tid
- ///// </summary>
- //[Property]
- //public string ctid
- //{
- // get{ return _ctid; }
- // set{ _ctid=value; }
- //}
- public CeErpTrade _trade = null;
- [BelongsTo("tid", Insert = false, NotFoundBehaviour = NotFoundBehaviour.Ignore, Cascade = CascadeEnum.None, Update = false)]
- public CeErpTrade Trade
- {
- get { return _trade; }
- set { _trade = value; }
- }
- private string _tid = "";
- /// <summary>
- ///
- /// </summary>
- [Property]
- public string tid
- {
- get { return _tid; }
- set { _tid = value; }
- }
- private string _seller_memo = "";
- /// <summary>
- ///子表拆分后自己的备注
- /// </summary>
- [Property]
- public string seller_memo
- {
- get { return _seller_memo; }
- set { _seller_memo = value; }
- }
- private int _designUserId = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public int DesignUserId
- {
- get { return _designUserId; }
- set { _designUserId = value; }
- }
- private int _orderState = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public int OrderState
- {
- get { return _orderState; }
- set { _orderState = value; }
- }
- private int _customerUserId = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public int CustomerUserId
- {
- get { return _customerUserId; }
- set { _customerUserId = value; }
- }
- private bool _isUrgency = false;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public bool IsUrgency
- {
- get { return _isUrgency; }
- set { _isUrgency = value; }
- }
- private int _isRefund = 0;
- /// <summary>
- ///是否退款1申请中2已退款 if (st == "REFUNDING")
- //{
- // state = 1;
- //}
- //else if (st == "REFUNDED")
- //{
- // state = 2;
- //}
- //else if (st == "PART_REFUNDED")
- //{
- // state = 3;
- //}
- //else if (st == "WAIT_BUYER_RETURN_GOODS")
- //{
- // state = 4;
- //}
- //else if (st == "REJECT_REFUNDED")
- //{
- // state = 5;
- //}
- /// </summary>
- [Property]
- public int IsRefund
- {
- get { return _isRefund; }
- set { _isRefund = value; }
- }
- private int _isReturn = 0;
- /// <summary>
- ///打回类型1供应商打回2下单打回
- /// </summary>
- [Property]
- public int IsReturn
- {
- get { return _isReturn; }
- set { _isReturn = value; }
- }
- private int _isNeedBill = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public int IsNeedBill
- {
- get { return _isNeedBill; }
- set { _isNeedBill = value; }
- }
- private int _supplierId = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public int SupplierId
- {
- get { return _supplierId; }
- set { _supplierId = value; }
- }
- private string _deliveryAddress = "";
- /// <summary>
- ///
- /// </summary>
- [Property]
- public string DeliveryAddress
- {
- get { return _deliveryAddress; }
- set { _deliveryAddress = value; }
- }
- private int _callTimes = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public int CallTimes
- {
- get { return _callTimes; }
- set { _callTimes = value; }
- }
- private int _noteTimes = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public int NoteTimes
- {
- get { return _noteTimes; }
- set { _noteTimes = value; }
- }
- private double _overtimeUserId = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public double OvertimeUserId
- {
- get { return _overtimeUserId; }
- set { _overtimeUserId = value; }
- }
- private int _unusualTag = 0;
- /// <summary>
- ///超时异常阶段标记0正常 1客服阶段 2待设计 3设计中超市 4下单超时 5发货超时
- /// </summary>
- [Property]
- public int UnusualTag
- {
- get { return _unusualTag; }
- set { _unusualTag = value; }
- }
- private string _unusualCon = "";
- /// <summary>
- ///
- /// </summary>
- [Property]
- public string UnusualCon
- {
- get { return _unusualCon; }
- set { _unusualCon = value; }
- }
- private string _returnReason = "";
- /// <summary>
- ///
- /// </summary>
- [Property]
- public string ReturnReason
- {
- get { return _returnReason; }
- set { _returnReason = value; }
- }
- private int _memoOpt = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public int MemoOpt
- {
- get { return _memoOpt; }
- set { _memoOpt = value; }
- }
- /// <summary>
- ///
- /// </summary>
- [Property]
- public DateTime? AfterSaleTime { get; set; }
- private int _afterSaleUserId = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public int AfterSaleUserId
- {
- get { return _afterSaleUserId; }
- set { _afterSaleUserId = value; }
- }
- private string _afterSaleReason = "";
- /// <summary>
- ///
- /// </summary>
- [Property]
- public string AfterSaleReason
- {
- get { return _afterSaleReason; }
- set { _afterSaleReason = value; }
- }
- private int _placeUserId = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public int PlaceUserId
- {
- get { return _placeUserId; }
- set { _placeUserId = value; }
- }
- //1待售后2售后主管审核3主管审核4完成售后5责任主管打回售后
- private int _afterSaleState = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public int AfterSaleState
- {
- get { return _afterSaleState; }
- set { _afterSaleState = value; }
- }
- private string _afterSaleMethod = "";
- /// <summary>
- ///
- /// </summary>
- [Property]
- public string AfterSaleMethod
- {
- get { return _afterSaleMethod; }
- set { _afterSaleMethod = value; }
- }
- private string _afterSaleMemo = "";
- /// <summary>
- ///
- /// </summary>
- [Property]
- public string AfterSaleMemo
- {
- get { return _afterSaleMemo; }
- set { _afterSaleMemo = value; }
- }
- private string _afterSaleResponsible = "";
- /// <summary>
- ///
- /// </summary>
- [Property]
- public string AfterSaleResponsible
- {
- get { return _afterSaleResponsible; }
- set { _afterSaleResponsible = value; }
- }
- private double _deductFee = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public double DeductFee
- {
- get { return _deductFee; }
- set { _deductFee = value; }
- }
- private double _refundFee = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public double RefundFee
- {
- get { return _refundFee; }
- set { _refundFee = value; }
- }
- /// <summary>
- ///
- /// </summary>
- [Property]
- public DateTime? HandleTime { get; set; }
- private int _isHaveNewOrder = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public int IsHaveNewOrder
- {
- get { return _isHaveNewOrder; }
- set { _isHaveNewOrder = value; }
- }
- private string _responsibleUserId = "";
- /// <summary>
- ///
- /// </summary>
- [Property]
- public string ResponsibleUserId
- {
- get { return _responsibleUserId; }
- set { _responsibleUserId = value; }
- }
- private string _ptid = "";
- /// <summary>
- ///补差价单关联的父订单号
- /// </summary>
- [Property]
- public string ptid
- {
- get { return _ptid; }
- set { _ptid = value; }
- }
- private int _isPreDelivery = 0;
- /// <summary>
- ///是否预发货
- /// </summary>
- [Property]
- public int IsPreDelivery
- {
- get { return _isPreDelivery; }
- set { _isPreDelivery = value; }
- }
- private int _isSample = 0;
- /// <summary>
- ///是否为拿样订单
- /// </summary>
- [Property]
- public int IsSample
- {
- get { return _isSample; }
- set { _isSample = value; }
- }
- private int _productId = 0;
- /// <summary>
- ///产品对应id
- /// </summary>
- [Property]
- public int ProductId
- {
- get { return _productId; }
- set { _productId = value; }
- }
- /// <summary>
- ///到待设计的时间
- /// </summary>
- [Property]
- public DateTime? WaitDesignTime { get; set; }
- /// <summary>
- ///开始设计的时间
- /// </summary>
- [Property]
- public DateTime? StartDesignTime { get; set; }
- /// <summary>
- ///完成设计的时间
- /// </summary>
- [Property]
- public DateTime? FinishDesignTime { get; set; }
- /// <summary>
- ///下单完成时间
- /// </summary>
- [Property]
- public DateTime? FinishPlaceTime { get; set; }
- /// <summary>
- ///发货完成时间
- /// </summary>
- [Property]
- public DateTime? FinishDeliveryTime { get; set; }
- private string _designSelfMemo = "";
- /// <summary>
- ///设计师自己的备注
- /// </summary>
- [Property]
- public string DesignSelfMemo
- {
- get { return _designSelfMemo; }
- set { _designSelfMemo = value; }
- }
- private double _designPrice = 0;
- /// <summary>
- ///设计师预估设计费用
- /// </summary>
- [Property]
- public double DesignPrice
- {
- get { return _designPrice; }
- set { _designPrice = value; }
- }
- private string _material = "";
- /// <summary>
- ///产品材质
- /// </summary>
- [Property]
- public string Material
- {
- get { return _material; }
- set { _material = value; }
- }
- private string _craft = "";
- /// <summary>
- ///产品工艺
- /// </summary>
- [Property]
- public string Craft
- {
- get { return _craft; }
- set { _craft = value; }
- }
- private string _productSize = "";
- /// <summary>
- ///产品尺寸
- /// </summary>
- [Property]
- public string ProductSize
- {
- get { return _productSize; }
- set { _productSize = value; }
- }
- private string _productCount = "";
- /// <summary>
- ///产品数量
- /// </summary>
- [Property]
- public string ProductCount
- {
- get { return _productCount; }
- set { _productCount = value; }
- }
- /// <summary>
- ///超时时间
- /// </summary>
- [Property]
- public DateTime? UnusualTime { get; set; }
- private bool _IsAutoDispatch = false;
- /// <summary>
- ///是否自动派单
- /// </summary>
- [Property]
- public bool IsAutoDispatch
- {
- get { return _IsAutoDispatch; }
- set { _IsAutoDispatch = value; }
- }
- private bool _isVerifyToSupplier = false;
- /// <summary>
- ///设计完是否审核给供应商
- /// </summary>
- [Property]
- public bool IsVerifyToSupplier
- {
- get { return _isVerifyToSupplier; }
- set { _isVerifyToSupplier = value; }
- }
- private string _customerMemo = "";
- /// <summary>
- ///客服自己备注
- /// </summary>
- [Property]
- public string CustomerMemo
- {
- get { return _customerMemo; }
- set { _customerMemo = value; }
- }
- private double _payment = 0;
- /// <summary>
- ///实付款
- /// </summary>
- [Property]
- public double payment
- {
- get { return _payment; }
- set { _payment = value; }
- }
- private string _outSid = "";
- /// <summary>
- ///快递单号
- /// </summary>
- [Property]
- public string OutSid
- {
- get { return _outSid; }
- set { _outSid = value; }
- }
- /// <summary>
- ///完成售后时间
- /// </summary>
- [Property]
- public DateTime? FinishAfterSaleTime { get; set; }
- /// <summary>
- ///售后预完成时间点
- /// </summary>
- [Property]
- public DateTime? AfterSalePreTime { get; set; }
- private double _afterSalePayment = 0;
- /// <summary>
- ///售后处理的实付金额
- /// </summary>
- [Property]
- public double AfterSalePayment
- {
- get { return _afterSalePayment; }
- set { _afterSalePayment = value; }
- }
- private int _shopId = 0;
- /// <summary>
- ///店铺的id
- /// </summary>
- [Property]
- public int ShopId
- {
- get { return _shopId; }
- set { _shopId = value; }
- }
- private string _splitTag = "";
- /// <summary>
- ///拆分标识C1
- /// </summary>
- [Property]
- public string SplitTag
- {
- get { return _splitTag; }
- set { _splitTag = value; }
- }
- private int _isAfterSaleOrder = 0;
- /// <summary>
- ///是否是加S的售后单
- /// </summary>
- [Property]
- public int isAfterSaleOrder
- {
- get { return _isAfterSaleOrder; }
- set { _isAfterSaleOrder = value; }
- }
- private int _isDianziOrder = 0;
- /// <summary>
- ///是否是电子稿
- /// </summary>
- [Property]
- public int isDianziOrder
- {
- get { return _isDianziOrder; }
- set { _isDianziOrder = value; }
- }
- private string _lastBillCpCode = "";
- /// <summary>
- ///上次打单的cpcode
- /// </summary>
- [Property]
- public string LastBillCpCode
- {
- get { return _lastBillCpCode; }
- set { _lastBillCpCode = value; }
- }
- private string _lastBillWaybillCode = "";
- /// <summary>
- ///上次打单发货失败后存的面单号
- /// </summary>
- [Property]
- public string LastBillWaybillCode
- {
- get { return _lastBillWaybillCode; }
- set { _lastBillWaybillCode = value; }
- }
- /// <summary>
- ///付款时间
- /// </summary>
- [Property]
- public DateTime? pay_time { get; set; }
- private int _isSF = 0;
- /// <summary>
- ///是否标记顺丰单
- /// </summary>
- [Property]
- public int IsSF
- {
- get { return _isSF; }
- set { _isSF = value; }
- }
- private int _isXianHuo = 0;
- /// <summary>
- ///是否现货
- /// </summary>
- [Property]
- public int IsXianHuo
- {
- get { return _isXianHuo; }
- set { _isXianHuo = value; }
- }
- /// <summary>
- ///订单打回时间
- /// </summary>
- [Property]
- public DateTime? ReturnTime { get; set; }
- private string _otherMemo = "";
- /// <summary>
- ///除了7要素的额外备注
- /// </summary>
- [Property]
- public string OtherMemo
- {
- get { return _otherMemo; }
- set { _otherMemo = value; }
- }
- private string _afterSaleBackReason = "";
- /// <summary>
- ///售后打回的原因
- /// </summary>
- [Property]
- public string AfterSaleBackReason
- {
- get { return _afterSaleBackReason; }
- set { _afterSaleBackReason = value; }
- }
- private string _checkMemo = "";
- /// <summary>
- ///售后查货备注
- /// </summary>
- [Property]
- public string CheckMemo
- {
- get { return _checkMemo; }
- set { _checkMemo = value; }
- }
- private int _isOldCustomer = 0;
- /// <summary>
- ///是否老客户购买
- /// </summary>
- [Property]
- public int IsOldCustomer
- {
- get { return _isOldCustomer; }
- set { _isOldCustomer = value; }
- }
- private int _isSupplierRefund = 0;
- /// <summary>
- ///售后责任供应商 财务标记是否退款
- /// </summary>
- [Property]
- public int IsSupplierRefund
- {
- get { return _isSupplierRefund; }
- set { _isSupplierRefund = value; }
- }
- private int _isReadTag = 0;
- /// <summary>
- ///打回退款等客服是否读取处理
- /// </summary>
- [Property]
- public int IsReadTag
- {
- get { return _isReadTag; }
- set { _isReadTag = value; }
- }
- private string _afterSaleMemoType = "";
- /// <summary>
- ///售后备注类型
- /// </summary>
- [Property]
- public string AfterSaleMemoType
- {
- get { return _afterSaleMemoType; }
- set { _afterSaleMemoType = value; }
- }
- /// <summary>
- ///加急时间
- /// </summary>
- [Property]
- public DateTime? UrgencyTime { get; set; }
- private int _isOffLineOrder = 0;
- /// <summary>
- ///是否新增的线下单
- /// </summary>
- [Property]
- public int IsOffLineOrder
- {
- get { return _isOffLineOrder; }
- set { _isOffLineOrder = value; }
- }
- private string _payProofImg = "";
- /// <summary>
- ///线下单付款凭证图片
- /// </summary>
- [Property]
- public string PayProofImg
- {
- get { return _payProofImg; }
- set { _payProofImg = value; }
- }
- private int _wechatTag = 0;
- /// <summary>
- ///1微信单2推购单
- /// </summary>
- [Property]
- public int wechatTag
- {
- get { return _wechatTag; }
- set { _wechatTag = value; }
- }
- private string _makeSupplier = "";
- /// <summary>
- ///制作产品的车间
- /// </summary>
- [Property]
- public string MakeSupplier
- {
- get { return _makeSupplier; }
- set { _makeSupplier = value; }
- }
- private string _afterSaleSupplierImg = "";
- /// <summary>
- ///售后处理供应商责任的图片
- /// </summary>
- [Property]
- public string AfterSaleSupplierImg
- {
- get { return _afterSaleSupplierImg; }
- set { _afterSaleSupplierImg = value; }
- }
- private int _afterSaleResSupId = 0;
- /// <summary>
- ///售后责任人是供应商的ID
- /// </summary>
- [Property]
- public int AfterSaleResSupId
- {
- get { return _afterSaleResSupId; }
- set { _afterSaleResSupId = value; }
- }
- private int _afterSaleSupplierState = 0;
- /// <summary>
- ///供应商认不认可的状态
- /// </summary>
- [Property]
- public int AfterSaleSupplierState
- {
- get { return _afterSaleSupplierState; }
- set { _afterSaleSupplierState = value; }
- }
- private string _afterSaleSupplierMemo = "";
- /// <summary>
- ///供应商说明情况的
- /// </summary>
- [Property]
- public string AfterSaleSupplierMemo
- {
- get { return _afterSaleSupplierMemo; }
- set { _afterSaleSupplierMemo = value; }
- }
- private int _isOldCustomerMore = 0;
- /// <summary>
- ///老客户比上次买更多的
- /// </summary>
- [Property]
- public int IsOldCustomerMore
- {
- get { return _isOldCustomerMore; }
- set { _isOldCustomerMore = value; }
- }
- private int _isGift = 0;
- /// <summary>
- ///是否为礼物现货
- /// </summary>
- [Property]
- public int IsGift
- {
- get { return _isGift; }
- set { _isGift = value; }
- }
- /// <summary>
- ///客服标注老客户上次时间
- /// </summary>
- [Property]
- public DateTime? OldCustomerTime { get; set; }
- private int _isSendGift = 0;
- /// <summary>
- ///送小礼物标记
- /// </summary>
- [Property]
- public int IsSendGift
- {
- get { return _isSendGift; }
- set { _isSendGift = value; }
- }
- private int _parentProfessionId = 0;
- /// <summary>
- ///父行业ID
- /// </summary>
- [Property]
- public int ParentProfessionId
- {
- get { return _parentProfessionId; }
- set { _parentProfessionId = value; }
- }
- private int _professionId = 0;
- /// <summary>
- ///子行业ID
- /// </summary>
- [Property]
- public int ProfessionId
- {
- get { return _professionId; }
- set { _professionId = value; }
- }
- private int _isAddWechat = 0;
- /// <summary>
- ///是否有添加客户微信
- /// </summary>
- [Property]
- public int IsAddWechat
- {
- get { return _isAddWechat; }
- set { _isAddWechat = value; }
- }
- private string _supRefundType = "";
- /// <summary>
- ///供应商退款类型
- /// </summary>
- [Property]
- public string supRefundType
- {
- get { return _supRefundType; }
- set { _supRefundType = value; }
- }
- private int _isArbitrate = 0;
- /// <summary>
- ///是否申请过仲裁
- /// </summary>
- [Property]
- public int IsArbitrate
- {
- get { return _isArbitrate; }
- set { _isArbitrate = value; }
- }
- private string _fileMd5 = "";
- /// <summary>
- ///上传文件的Md5
- /// </summary>
- [Property]
- public string FileMd5
- {
- get { return _fileMd5; }
- set { _fileMd5 = value; }
- }
- /// <summary>
- ///查货时间
- /// </summary>
- [Property]
- public DateTime? CheckOrderTime { get; set; }
- private int _returnUserType = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public int ReturnUserType
- {
- get { return _returnUserType; }
- set { _returnUserType = value; }
- }
- private int _dispatchSort = 0;
- /// <summary>
- /// 0无 1排序 2是否指派共创成功
- /// </summary>
- [Property]
- public int DispatchSort
- {
- get { return _dispatchSort; }
- set { _dispatchSort = value; }
- }
- private string _orderSn = "";
- /// <summary>
- ///唯一识别号
- /// </summary>
- [Property]
- public string OrderSn
- {
- get { return _orderSn; }
- set { _orderSn = value; }
- }
- private string _ParentSplitNo = "";
- /// <summary>
- /// 父拆单号
- /// </summary>
- [Property]
- public string ParentSplitNo
- {
- get { return _ParentSplitNo; }
- set { _ParentSplitNo = value; }
- }
- /// <summary>
- /// 更新时间
- /// </summary>
- [Property]
- public DateTime? UpdateTime { get; set; }
- /// <summary>
- /// 查货完成时间
- /// </summary>
- [Property]
- public DateTime? CheckedOrderTime { get; set; }
- private int _vipCustomer;
- /// <summary>
- /// vip老客户
- /// </summary>
- [Property]
- public int VipCustomer
- {
- get { return _vipCustomer; }
- set { _vipCustomer = value; }
- }
- private string _supplierOrderSn;
- /// <summary>
- /// 车间订单号
- /// </summary>
- [Property]
- public string SupplierOrderSn
- {
- get { return _supplierOrderSn; }
- set { _supplierOrderSn = value; }
- }
- private int _newProduct = 0;
- [Property]
- public int NewProduct
- {
- set { _newProduct = value; }
- get { return _newProduct; }
- }
- public static CeErpTradeCell GetByTid(string tid)
- {
- return FindFirst(Expression.Sql(string.Format("this_.tid='{0}'", tid)));
- }
- public static CeErpTradeCell GetByCtid(string ctid)
- {
- return FindFirst(Expression.Sql(string.Format("ctid='{0}'", ctid)));
- }
- public static CeErpTradeCell GetByCtid_M(string ctid)
- {
- return FindFirst(Expression.Sql(string.Format("(ctid='{0}' or ctid='C1_{0}')", ctid)));
- }
- public static CeErpTradeCell GetByCode(string code)
- {
- return FindFirst(Expression.Sql(string.Format("OrderSn='{0}'", code)));
- }
- public static CeErpTradeCell Get(int id)
- {
- return FindFirst(Expression.Eq("id", id));
- }
- public static void Del(object id)
- {
- StringBuilder sql = new StringBuilder();
- sql.AppendFormat("delete from CE_ErpTradeCell where id=" + id);
- ExecuteNonQuery(sql.ToString());
- }
- public static void DelByCtid(object ctid)
- {
- StringBuilder sql = new StringBuilder();
- sql.AppendFormat("delete from CE_ErpTradeCell where ctid='" + ctid + "'");
- ExecuteNonQuery(sql.ToString());
- }
- public object Clone()
- {
- return this.MemberwiseClone();
- }
- //public static void UpdateRelationOrder(CeErpTradeCell father)
- //{
- // try
- // {
- // //父订单变化,更新补差价订单
- // List<string> lw = new List<string>();
- // lw.Add(string.Format("OrderState={0}", father.OrderState));
- // lw.Add(string.Format("CustomerUserId={0}", father.CustomerUserId));
- // lw.Add(string.Format("DesignUserId={0}", father.DesignUserId));
- // lw.Add(string.Format("AfterSaleState={0}", father.AfterSaleState));
- // lw.Add(string.Format("IsNeedBill={0}", father.IsNeedBill));
- // //lw.Add(string.Format("IsUrgency={0}", father.IsUrgency == true ? 1 : 0));
- // lw.Add(string.Format("IsRefund={0}", father.IsRefund));
- // //lw.Add(string.Format("IsReturn={0}", father.IsReturn));
- // lw.Add(string.Format("WaitDesignTime='{0}'", father.WaitDesignTime.ToString()));
- // lw.Add(string.Format("StartDesignTime='{0}'", father.StartDesignTime.ToString()));
- // lw.Add(string.Format("FinishDesignTime='{0}'", father.FinishDesignTime.ToString()));
- // lw.Add(string.Format("FinishPlaceTime='{0}'", father.FinishPlaceTime.ToString()));
- // lw.Add(string.Format("FinishDeliveryTime='{0}'", father.FinishDeliveryTime.ToString()));
- // string sqlstr = string.Join(",", lw.ToArray());
- // StringBuilder sql = new StringBuilder();
- // sql.AppendFormat("update ce_erptradecell set " + sqlstr + " where ptid='{0}'", father.tid);
- // //sql.AppendFormat("update view_erptrade set status={1} where ptid={0}", father.ctid, father.status);
- // DbHelper.DbConn.ExecuteNonQuery(sql.ToString());
- // }
- // catch (Exception ex )
- // {
- // XLog.SaveLog(0, "UpdateRelationOrder"+ex.Message);
- // }
- //}
- private static object uprOrder = new object();
- public static void UpdateRelationOrder(string ctid)
- {
- if (ctid.Length <= 0) return;
- try
- {
- if (ctid.IndexOf("S_") != -1) return;
- StringBuilder isHavesql = new StringBuilder();
- string needCtid = ctid;
- if (ctid.IndexOf("C1") != -1)
- {
- needCtid = ctid.Replace("C1_", "");
- }
- //isHavesql.AppendFormat("select * from ce_erptradecell where ptid='{0}'; ", needCtid);
- //DataTable dt_isHave = ExecuteDataset(isHavesql.ToString()).Tables[0];
- //if (dt_isHave.Rows.Count > 0)
- //{
- StringBuilder sql = new StringBuilder();
- //sql.AppendFormat("insert into S_BuChaJia(ctid,addtime) values('{0}',getdate()); ", ctid);values('{0}',getdate())
- //CeErpTradeCell ceErpTradeCell = FindFirst(Expression.Sql(string.Format("ptid='{0}'", needCtid)));
- //if (ceErpTradeCell != null)
- //{
- sql.AppendFormat("insert into S_BuChaJia(ctid,addtime) values('{0}',getdate()); ", ctid);
- ExecuteNonQuery(sql.ToString());
- //}
- //}
- }
- catch (Exception ex)
- {
- XLog.SaveLog(0, "CeErpTradeCell,UpdateRelationOrder,insert" + ex.Message);
- //}
- }
- /*
- return;
- //new Thread(new ThreadStart(delegate(){
- try
- {
- SqlParameter[] sqlParameter ={
- new SqlParameter("@mainctids", SqlDbType.VarChar,100),
- new SqlParameter("@res", SqlDbType.VarChar, 4000)
- };
- string str_ctids = ctid;
- sqlParameter[0].Value = str_ctids;
- sqlParameter[1].Direction = ParameterDirection.Output;
- ExecuteDataSetStore("sp_set_bucha", sqlParameter);
- }
- catch (Exception ex)
- {
- XLog.SaveLog(0, "CeErpTradeCell,UpdateRelationOrder" + ex.Message);
- //}
- }*/
- // })).Start();
- //StringBuilder sql = new StringBuilder();
- //sql.Append("update ce_erptradecell set OrderState=b.OrderState,CustomerUserId=b.CustomerUserId,DesignUserId=b.DesignUserId,WaitDesignTime=b.WaitDesignTime,StartDesignTime=b.StartDesignTime,FinishDesignTime=b.FinishDesignTime,FinishPlaceTime=b.FinishPlaceTime,");
- //sql.Append("AfterSaleState=b.AfterSaleState,IsNeedBill=b.IsNeedBill,IsRefund=b.IsRefund from ce_erptradecell,ce_erptradecell as b ");
- //sql.AppendFormat("where ce_erptradecell.ptid =b.tid and ce_erptradecell.ptid='{0}'",tid);//='1827905618077154637'
- //ExecuteNonQuery(sql.ToString());
- /*
- //父订单变化,更新补差价订单
- List<string> lw = new List<string>();
- lw.Add(string.Format("OrderState={0}", father.OrderState));
- lw.Add(string.Format("CustomerUserId={0}", father.CustomerUserId));
- lw.Add(string.Format("DesignUserId={0}", father.DesignUserId));
- lw.Add(string.Format("AfterSaleState={0}", father.AfterSaleState));
- lw.Add(string.Format("IsNeedBill={0}", father.IsNeedBill));
- //lw.Add(string.Format("IsUrgency={0}", father.IsUrgency == true ? 1 : 0));
- lw.Add(string.Format("IsRefund={0}", father.IsRefund));
- //lw.Add(string.Format("IsReturn={0}", father.IsReturn));
- string sqlstr = string.Join(" , ", lw.ToArray());
- StringBuilder sql = new StringBuilder();
- sql.AppendFormat("update view_erptradecell set " + sqlstr + " where ptid='{0}'", father.tid);
- //sql.AppendFormat("update view_erptrade set status={1} where ptid={0}", father.ctid, father.status);
- DbHelper.DbConn.ExecuteNonQuery(sql.ToString());*/
- }
- }
- }
|