using System; using WX.CRM.BLL.Base; using WX.CRM.BLL.Wx; using WX.CRM.Common; using WX.CRM.DataSynFactory.Templates; using WX.CRM.Model.Entity; namespace WX.CRM.DataSynFactory.Cmd { public class Client_SyncPayInfo_IMP : Interfaces.IDataImportSvr { private WX_SZZYORDER_BL _order = new WX_SZZYORDER_BL(); private WX_SZZYORDERPAY_BL orderPayBL = new WX_SZZYORDERPAY_BL(); public bool GenerateBusinessOne(Client_SyncPayInfo t) { try { //支付记录 WX_SZZYORDERPAY orderPay = new WX_SZZYORDERPAY(); orderPay.ID = new SEQUENCES_BL().Seq_base_get(); orderPay.ORDERID = t.OrderId; orderPay.NEEDPAY = t.NeedPay; orderPay.PAYDATE = t.ArrivalTime; orderPay.PAYNAME = t.PayName; orderPay.PAYNO = t.PayNo; orderPay.PAYPRICE = t.PayPrice; orderPay.PAYTYPE = t.PayType; orderPay.PAYTYPENAME = t.PayTypeName; orderPay.REMARK = t.Remark; orderPay.CTIME = t.Ctime; orderPay.AUDITSTATUS = 1; orderPay.AUDITTIME = t.Ctime; int result = orderPayBL.Add(orderPay); //订单状态修改 var order = _order.Get(p => p.ORDERID == t.OrderId); if (order.ORDERSTATUS == "180") { order.ORDERSTATUS = t.OrderStatus; order.ORDERSTATUSNAME = t.OrderStatusName; } order.FINALPAY = t.PayPrice; order.ARRIVALPAY = t.PayPrice; order.ARRIVALTIME = t.ArrivalTime; return _order.Update(order); } catch (Exception ex) { LogHelper.Error(ex.ToString()); return false; } } } }