using System; using System.Collections.Generic; using System.Linq; using System.Security.Cryptography; using System.Text; using System.Threading.Tasks; 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_RefundOrderAdd_IMP : Interfaces.IDataImportSvr { private WX_SZZYORDER_BL wx_SzzyOrder_BL = new WX_SZZYORDER_BL(); private WX_SZZYORDERDEPOSIT_BL _orderDepoist = new WX_SZZYORDERDEPOSIT_BL(); private WX_SZZYORDERREFUND_BL _orderRefund = new WX_SZZYORDERREFUND_BL(); public bool GenerateBusinessOne(Client_RefundOrderAdd t) { try { LogHelper.Info("中心点推送坐席退款信息Start=>" + t.ToJson()); var deptcode = string.Empty; var order = wx_SzzyOrder_BL.Get(p => p.ORDERID == t.ORDERID); if (order != null) { deptcode = order.DEPTCODE; } else { var depo = _orderDepoist.Get(p => p.ID == t.ORDERID); if (depo != null) { deptcode = depo.DEPTCODE; } } var orderRefund = new WX_SZZYORDERREFUND() { ID = new SEQUENCES_BL().Seq_base_get(), SID = t.ID, ORDERID = t.ORDERID, REFUNDPRICE = t.REFUNDPRICE, ACCOUNT = t.ACCOUNT, USERNAME = t.USERNAME, REFUNDTYPE = t.REFUNDTYPE, REFUNDTYPENAME = t.REFUNDTYPENAME, REFUNDDATE = t.REFUNDDATE, REMARK = t.REMARK, ATT = t.ATT, CTIME = t.CTIME, ISDELETE = t.ISDELETE, CREATOR = t.CREATOR, CREATORNAME = t.CREATORNAME, ISACTURALREFUND = t.ISACTURALREFUND, DEPTCODE = deptcode, DEPTID = t.DEPTID, DEPTNAME = t.DEPTNAME, GROUPID = t.GROUPID }; _orderRefund.Add(orderRefund); LogHelper.Info("中心点推送坐席退款信息End=>" + t.ToJson()); return true; } catch (Exception ex) { LogHelper.Error("中心点推送坐席退款信息Err=>" + ex.ToString()); return false; } } } }