| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689 |
- using BizCom;
- using Microsoft.SqlServer.Server;
- using Newtonsoft.Json;
- using NPOI.OpenXmlFormats.Shared;
- using NPOI.SS.Formula.Functions;
- using SiteCore.taoObj;
- using SQLData;
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Reflection;
- using System.Text;
- using System.Web;
- namespace SiteCore.Handler
- {
- public class noti : BaseHandler, IHttpHandler
- {
- public void ProcessRequest(HttpContext context)
- {
- if (UrlParmsCheck("t"))
- {
- String tname = GetString("t");
- MethodInfo method;
- Type type = this.GetType();
- method = type.GetMethod(tname);
- con = context;
- if (method == null)
- {
- conError("服务器返回错误");
- return;
- }
- successFlag = false;
- context.Response.ContentType = "application/json";
- context.Response.Headers.Set("Access-Control-Allow-Origin", "*");
- try
- {
- method.Invoke(this, null);
- }
- catch (Exception ex)
- {
- conError("服务器返回错误");
- }
- finally
- {
- //AfterInvoke(methodName);
- }
- //if (!successFlag) returnErrorMsg("服务器返回错误");
- }
- }
- public void sendNotify()
- {
- if (UrlPostParmsCheck("title,oid"))
- {
- string title = GetPostString("title");
- string openid = GetPostString("oid");
- WxPush.sendMonitorMsg(title, openid);
- conSuccess("已发送");
- return;
- }
- conError("没有发送成功!");
- }
- public void LT_ERP_delivery_push()
- {
- if (UrlPostParmsCheck("tbtid"))
- {
- string tbtid = GetPostString("tbtid");
- string outsid = GetPostString("outsid");
- string cpCode = GetPostString("cpcode");
- tbtid = tbtid.Trim();
- CeErpTrade mainEn = CeErpTrade.Get(tbtid);
- if (mainEn != null || tbtid.IndexOf("N") != -1 || tbtid.IndexOf("S") != -1)
- {
- //string res = taobaoHelper.LogisticsOnlineSend(sessionkey,entity.tid,comCode,outSid);
- //cpcode是 YTO-CAINIAO
- //string comCode = cpCode.Split('-')[0].ToString();
- string apires = "";
- if (tbtid.IndexOf("N") != -1 || tbtid.IndexOf("S") != -1)
- {
- apires = "发货成功";
- }
- else
- {
- string dcomcode = commonHelper.GetD3ComCode(cpCode, cpCode);
- apires = apiHelper.API_LogisticsOnlineSend(mainEn.tid, mainEn.posCode, dcomcode, outsid);
- }
- //string apires = apiHelper.API_LogisticsOnlineSend(entity.tid, mainEn.posCode, cpCode, codeObj.waybillCode);
- //打单后发货
- if (apires.IndexOf("发货成功") != -1)
- {
- try
- {
- //还要插入快递信息到 快递信息表
- CeErpExpressInfo exinfo = new CeErpExpressInfo();
- exinfo.tid = tbtid;
- exinfo.out_sid = outsid;
- exinfo.company_code = cpCode;
- exinfo.company_name = cpCode;
- //exinfo.supplierUserName = commonHelper.getSupplierNameById(entity.SupplierId);
- exinfo.deliveryType = "发货成功";
- exinfo.print_time = DateTime.Now;
- exinfo.printUser = "裕恒";
- exinfo.Create();
- if (mainEn != null)
- {
- commonHelper.UpdateRelationOrder(mainEn.tid);
- commonHelper.insertToBuchaForDelivery(mainEn.tid, mainEn.posCode, cpCode, outsid);
- }
- LogHelper.addLog(tbtid, 0, "裕恒接口-发货成功-" + cpCode + "-" + outsid);
- StringBuilder sql = new StringBuilder();
- sql.AppendFormat("insert into S_BuChaJia(ctid,orderState,dotype,addtime) values('{1}',{0},'updatestate_shipped',getdate());", (int)OrderState.已发货, tbtid);
- CeErpTradeCell.ExecuteNonQuery(sql.ToString());
- returnSuccessMsg("记录及同步成功");
- return;
- }
- catch (Exception ex)
- {
- XLog.SaveLog(0, "裕恒接口发货成功后更新数据失败," + ex.Message);
- }
- }
- else
- {
- string errmsg = commonHelper.KeepChinese(apires);
- //returnErrorMsg("同步淘宝发货失败!" + errmsg);
- XLog.SaveLog(0, "裕恒接口-打单后发货失败," + tbtid + "," + outsid + "," + apires);
- try
- {
- CeErpExpressInfo exinfo = new CeErpExpressInfo();
- exinfo.tid = tbtid;
- exinfo.out_sid = outsid;
- exinfo.company_code = cpCode;
- exinfo.company_name = cpCode;
- //exinfo.supplierUserName = commonHelper.getSupplierNameById(entity.SupplierId);
- exinfo.deliveryType = "发货成功";
- exinfo.print_time = DateTime.Now;
- exinfo.printUser = "裕恒";
- exinfo.Create();
- returnSuccessMsg("记录成功!");
- }
- catch (Exception ex)
- {
- XLog.SaveLog(0, "裕恒接口记录快递号,失败," + ex.Message);
- }
- return;
- }
- //else if (mainEn.status == "SHIPPED" || mainEn.status == "PART_SHIPPED") //已发货的不处理直接返回面单
- //{
- // entity.OutSid = (entity.OutSid + "," + curUseWayBillCode);
- // if (entity.OrderState == 6)
- // {
- // entity.OrderState = 7;
- // }
- // btnType = "已发货";
- // entity.Update();
- // commonHelper.UpdateRelationOrder(entity.ctid);
- // //不处理
- //}
- //else
- //{
- // entity.LastBillCpCode = cpCode;
- // entity.LastBillWaybillCode = curUseWayBillCode;
- // entity.Update();
- // string errmsg = commonHelper.KeepChinese(apires);
- // var res_objz = new
- // {
- // restype = 0,
- // data = "打单后发货失败"
- // };
- // string ro_jsonz = JsonConvert.SerializeObject(res_objz);
- // returnSuccess(ro_jsonz);
- // //returnErrorMsg("同步淘宝发货失败!"+ errmsg);
- // XLog.SaveLog(0, "打单后发货失败," + entity.tid + "," + curUseWayBillCode + "," + apires);
- // return;
- //}
- return;
- }
- returnErrorMsg("找不到对应订单记录,核对淘宝订单号");
- return;
- }
- returnErrorMsg("缺少必要的参数");
- }
- public void LT_ERP_order_err_report()
- {
- if (UrlPostParmsCheck("tbtid"))
- {
- string tbtid = GetPostString("tbtid");
- string errdis = GetPostString("errdis");
- tbtid = tbtid.Trim();
- CeErpTradeCell entity = null;
- if (tbtid != "") entity = CeErpTradeCell.GetByCtid(tbtid);
- if (entity != null)
- {
- entity.IsVerifyToSupplier = false;
- entity.IsReturn = 1;
- entity.ReturnTime = DateTime.Now;
- entity.ReturnReason = errdis;
- if (entity.OrderState == 6)
- {
- entity.OrderState = 5;
- }
- entity.Update();
- LogHelper.addLog(entity.ctid, 0, "裕恒接口-供应商退回下单", entity.OrderState);
- returnSuccessMsg("操作成功!");
- return;
- }
- else
- {
- StringBuilder sql = new StringBuilder();
- sql.AppendFormat("select * from CE_ErpTradeCell where tid='{0}' and orderstate=6 and SupplierId=8", tbtid);
- DataTable dt = DbHelper.DbConn.ExecuteDataset(sql.ToString()).Tables[0];
- if (dt.Rows.Count > 1)
- {
- returnErrorMsg("匹配不到对应的淘宝单号,请直接发给领淘");
- return;
- }
- else
- {
- StringBuilder sqlbac = new StringBuilder();
- sqlbac.AppendFormat("update CE_ErpTradeCell with(rowlock) set IsVerifyToSupplier=0,IsReturn=1,ReturnTime=getdate(),ReturnReason={1},OrderState=5 where ctid='{0}' and orderstate=6 and SupplierId=8;", dt.Rows[0]["ctid"].ToString(), errdis);
- DbHelper.DbConn.ExecuteNonQuery(sql.ToString());
- LogHelper.addLog(dt.Rows[0]["ctid"].ToString(), 0, "裕恒接口-供应商退回下单", 0);
- returnSuccessMsg("操作成功");
- return;
- }
- }
- }
- returnErrorMsg("缺少必要的参数");
- }
- //印艺发货
- public void LT_ERP_YY_DELIVERY_PUSH()
- {
- if (UrlPostParmsCheck("tbtid"))
- {
- string tbtid = GetPostString("tbtid");
- string outsid = GetPostString("outsid");
- string cpCode = GetPostString("cpcode");
- tbtid = tbtid.Trim();
- CeErpTrade mainEn = CeErpTrade.Get(tbtid);
- if (mainEn != null || tbtid.IndexOf("N") != -1 || tbtid.IndexOf("S") != -1)
- {
- //string res = taobaoHelper.LogisticsOnlineSend(sessionkey,entity.tid,comCode,outSid);
- //cpcode是 YTO-CAINIAO
- //string comCode = cpCode.Split('-')[0].ToString();
- string apires = "";
- if (tbtid.IndexOf("N") != -1 || tbtid.IndexOf("S") != -1)
- {
- apires = "发货成功";
- }
- else
- {
- string dcomcode = commonHelper.GetD3ComCode(cpCode, cpCode);
- apires = apiHelper.API_LogisticsOnlineSend(mainEn.tid, mainEn.posCode, dcomcode, outsid);
- }
- //string apires = apiHelper.API_LogisticsOnlineSend(entity.tid, mainEn.posCode, cpCode, codeObj.waybillCode);
- //打单后发货
- if (apires.IndexOf("发货成功") != -1)
- {
- try
- {
- //还要插入快递信息到 快递信息表
- CeErpExpressInfo exinfo = new CeErpExpressInfo();
- exinfo.tid = tbtid;
- exinfo.out_sid = outsid;
- exinfo.company_code = cpCode;
- exinfo.company_name = cpCode;
- //exinfo.supplierUserName = commonHelper.getSupplierNameById(entity.SupplierId);
- exinfo.deliveryType = "发货成功";
- exinfo.print_time = DateTime.Now;
- exinfo.printUser = "印艺";
- exinfo.Create();
- if (mainEn != null)
- {
- commonHelper.UpdateRelationOrder(mainEn.tid);
- commonHelper.insertToBuchaForDelivery(mainEn.tid, mainEn.posCode, cpCode, outsid);
- }
- LogHelper.addLog(tbtid, 0, "印艺接口-发货成功-" + cpCode + "-" + outsid);
- StringBuilder sql = new StringBuilder();
- sql.AppendFormat("insert into S_BuChaJia(ctid,orderState,dotype,addtime) values('{1}',{0},'updatestate_shipped',getdate());", (int)OrderState.已发货, tbtid);
- CeErpTradeCell.ExecuteNonQuery(sql.ToString());
- returnSuccessMsg("记录及同步成功");
- return;
- }
- catch (Exception ex)
- {
- XLog.SaveLog(0, "印艺接口发货成功后更新数据失败," + ex.Message);
- }
- }
- else
- {
- string errmsg = commonHelper.KeepChinese(apires);
- //returnErrorMsg("同步淘宝发货失败!" + errmsg);
- XLog.SaveLog(0, "印艺接口-打单后发货失败," + tbtid + "," + outsid + "," + apires);
- try
- {
- CeErpExpressInfo exinfo = new CeErpExpressInfo();
- exinfo.tid = tbtid;
- exinfo.out_sid = outsid;
- exinfo.company_code = cpCode;
- exinfo.company_name = cpCode;
- //exinfo.supplierUserName = commonHelper.getSupplierNameById(entity.SupplierId);
- exinfo.deliveryType = "发货成功";
- exinfo.print_time = DateTime.Now;
- exinfo.printUser = "印艺";
- exinfo.Create();
- returnSuccessMsg("记录成功!");
- }
- catch (Exception ex)
- {
- XLog.SaveLog(0, "印艺接口记录快递号,失败," + ex.Message);
- }
- return;
- }
- return;
- }
- returnErrorMsg("找不到对应订单记录,核对淘宝订单号");
- return;
- }
- returnErrorMsg("缺少必要的参数");
- }
- //智韬发货
- public void LT_ERP_ZT_DELIVERY_PUSH()
- {
- if (UrlPostParmsCheck("tbtid"))
- {
- string tbtid = GetPostString("tbtid");
- string outsid = GetPostString("outsid");
- string cpCode = GetPostString("cpcode");
- tbtid = tbtid.Trim();
- CeErpTrade mainEn = CeErpTrade.Get(tbtid);
- if (mainEn != null || tbtid.IndexOf("N") != -1 || tbtid.IndexOf("S") != -1)
- {
- //string res = taobaoHelper.LogisticsOnlineSend(sessionkey,entity.tid,comCode,outSid);
- //cpcode是 YTO-CAINIAO
- //string comCode = cpCode.Split('-')[0].ToString();
- string apires = "";
- if (tbtid.IndexOf("N") != -1 || tbtid.IndexOf("S") != -1)
- {
- apires = "发货成功";
- }
- else
- {
- string dcomcode = commonHelper.GetD3ComCode(cpCode, cpCode);
- apires = apiHelper.API_LogisticsOnlineSend(mainEn.tid, mainEn.posCode, dcomcode, outsid);
- }
- //string apires = apiHelper.API_LogisticsOnlineSend(entity.tid, mainEn.posCode, cpCode, codeObj.waybillCode);
- //打单后发货
- if (apires.IndexOf("发货成功") != -1)
- {
- try
- {
- //还要插入快递信息到 快递信息表
- CeErpExpressInfo exinfo = new CeErpExpressInfo();
- exinfo.tid = tbtid;
- exinfo.out_sid = outsid;
- exinfo.company_code = cpCode;
- exinfo.company_name = cpCode;
- //exinfo.supplierUserName = commonHelper.getSupplierNameById(entity.SupplierId);
- exinfo.deliveryType = "发货成功";
- exinfo.print_time = DateTime.Now;
- exinfo.printUser = "智韬";
- exinfo.Create();
- if (mainEn != null)
- {
- commonHelper.UpdateRelationOrder(mainEn.tid);
- commonHelper.insertToBuchaForDelivery(mainEn.tid, mainEn.posCode, cpCode, outsid);
- }
- LogHelper.addLog(tbtid, 0, "智韬接口-发货成功-" + cpCode + "-" + outsid);
- StringBuilder sql = new StringBuilder();
- sql.AppendFormat("insert into S_BuChaJia(ctid,orderState,dotype,addtime) values('{1}',{0},'updatestate_shipped',getdate());", (int)OrderState.已发货, tbtid);
- CeErpTradeCell.ExecuteNonQuery(sql.ToString());
- returnSuccessMsg("记录及同步成功");
- return;
- }
- catch (Exception ex)
- {
- XLog.SaveLog(0, "智韬接口发货成功后更新数据失败," + ex.Message);
- }
- }
- else
- {
- string errmsg = commonHelper.KeepChinese(apires);
- //returnErrorMsg("同步淘宝发货失败!" + errmsg);
- XLog.SaveLog(0, "智韬接口-打单后发货失败," + tbtid + "," + outsid + "," + apires);
- try
- {
- CeErpExpressInfo exinfo = new CeErpExpressInfo();
- exinfo.tid = tbtid;
- exinfo.out_sid = outsid;
- exinfo.company_code = cpCode;
- exinfo.company_name = cpCode;
- //exinfo.supplierUserName = commonHelper.getSupplierNameById(entity.SupplierId);
- exinfo.deliveryType = "发货成功";
- exinfo.print_time = DateTime.Now;
- exinfo.printUser = "智韬";
- exinfo.Create();
- returnSuccessMsg("记录成功!");
- }
- catch (Exception ex)
- {
- XLog.SaveLog(0, "智韬接口记录快递号,失败," + ex.Message);
- }
- return;
- }
- return;
- }
- returnErrorMsg("找不到对应订单记录,核对淘宝订单号");
- return;
- }
- returnErrorMsg("缺少必要的参数");
- }
- //chy补差价单发货接口
- public void LT_ERP_CHY_DELIVERY_PUSH()
- {
- if (UrlPostParmsCheck("tbtid"))
- {
- string tbtid = GetPostString("tbtid").Trim();
- string outsid = GetPostString("outsid").Trim();
- string cpCode = GetPostString("cpcode").Trim();
- CeErpTradeCell entity = CeErpTradeCell.GetByCtid(tbtid);
- if (entity != null && entity.isAfterSaleOrder == 1)
- {
- entity.OrderState = 7;
- entity.Update();
- LogHelper.addLog(tbtid, 0, "chy发货售后单-" + cpCode + "-" + outsid);
- return;
- }
- string sql = "select top 1 * from view_erptradecell where ptid='" + tbtid + "';";
- DataTable dt = DbHelper.DbConn.ExecuteDataset(sql.ToString()).Tables[0];
- if (dt.Rows.Count <= 0) return;
- string tid = dt.Rows[0]["tid"].ToString();
- string posCode = dt.Rows[0]["posCode"].ToString();
- string status = dt.Rows[0]["status"].ToString();
- string comCode = cpCode;
- string sqlstr = "select * from CE_ErpMailInfo";
- DataTable dtstr = DbHelper.DbConn.ExecuteDataset(sqlstr.ToString()).Tables[0];
- foreach (DataRow dr in dtstr.Rows)
- {
- if (dr["cpCode"].ToString().IndexOf(cpCode) != -1)
- {
- comCode = dr["cpCode"].ToString();
- }
- }
- if (status == "SHIPPED" || status == "PART_SHIPPED" || status == "COMPLETE" || status == "CLOSE") //已发货的不处理直接返回面单
- {
- return;
- //不处理
- }
- string apires = apiHelper.API_LogisticsDummySend(tid, posCode);
- if (apires.IndexOf("发货成功") == -1)
- {
- //XLog.SaveLog(0, "补差价单虚拟发货失败," + tid + "," + posCode + "," + apires);
- string wures = apiHelper.API_LogisticsOnlineSend(tid, posCode, comCode, outsid);
- if (wures.IndexOf("发货成功") == -1)
- {
- XLog.SaveLog(0, "chy补差价单实物发货失败," + tid + "," + posCode + "," + wures);
- return;
- }
- else
- {
- LogHelper.addLog(tid, 0, "chy补差价发货-" + comCode + "-" + outsid);
- }
- return;
- }
- else
- {
- LogHelper.addLog(tbtid, 0, "chy补差价发货-" + comCode + "-" + outsid);
- }
- }
- }
- //印艺快递停发
- public void LT_ERP_YY_STOP_DELIVERY()
- {
- if (UrlPostParmsCheck("tbtid"))
- {
- string tbtid = GetPostString("tbtid");
- tbtid = tbtid.Trim();
- CeErpTradeCell entity = CeErpTradeCell.GetByCtid(tbtid);
- if (entity != null)
- {
- if (entity.IsRefund <= 0 && entity.OrderState == 6)
- {
- entity.IsVerifyToSupplier = false;
- entity.UnusualTag = 5;
- entity.UnusualCon = "快递停发";
- entity.Update();
- LogHelper.addLog(entity.ctid, 0, "印艺接口-快递停发", entity.OrderState);
- returnSuccessMsg("操作成功!");
- return;
- }
- else
- {
- returnSuccessMsg("订单非下单完成状态或已退款!");
- return;
- }
- }
- else
- {
- returnErrorMsg("匹配不到对应的淘宝单号,请直接发给领淘");
- return;
- }
- }
- returnErrorMsg("缺少必要的参数");
- }
- public void get_product_form_data()
- {
- string tid = GetPostString("tid");
- if (tid != null && tid != "0")
- {
- tid = tid.Trim();
- CeErpTradeCell tradeCell = CeErpTradeCell.GetByCtid(tid);
- CeErpProduct entity = null;
- if (tradeCell != null)
- {
- entity = CeErpProduct.Get(tradeCell.ProductId);
- }
- CeErpOrderFormData formData = CeErpOrderFormData.GetByTid(tid);
- StringBuilder str = new StringBuilder();
- str.Append("{");
- str.Append("\"success\":true,");
- str.AppendFormat("\"tradeCell\":{0},", JsonConvert.SerializeObject(tradeCell));
- str.AppendFormat("\"product\":{0},", JsonConvert.SerializeObject(entity));
- str.AppendFormat("\"CeErpOrderFormData\":{0},", JsonConvert.SerializeObject(formData));
- str.AppendFormat("\"code\":200,");
- str.AppendFormat("\"msg\":\"成功\"");
- str.Append("}");
- con.Response.Write(str.ToString());
- }
- }
- public void save_product_form_data()
- {
- string tid = GetPostString("tid");
- if (tid != null && tid != "0")
- {
- tid = tid.Trim();
- CeErpTradeCell tradeCell = CeErpTradeCell.GetByCtid(tid);
- if (tradeCell == null)
- {
- returnErrorMsg("单号查无订单");
- return;
- }
- string info_sql = string.Format("SELECT ctid FROM [dbo].[CE_ErpTradeCell] WHERE tid ='{0}'", tradeCell.tid);
- DataTable data = DbHelper.DbConn.ExecuteDataset(info_sql).Tables[0];
- string content = GetPostString("content");
- int eid = GetPostInt("id");
- CeErpOrderFormData formData = null;
- if (data.Rows.Count > 0)
- {
- List<CeErpTradeCell> cell_list = new List<CeErpTradeCell>();
- foreach (DataRow row in data.Rows)
- {
- string ctid = row["ctid"].ToString();
- CeErpTradeCell cell = CeErpTradeCell.GetByCtid(ctid);
- cell_list.Add(cell);
- formData = CeErpOrderFormData.GetByTid(ctid);
- if (formData == null)
- {
- formData = new CeErpOrderFormData();
- }
- formData.tid = ctid;
- formData.content = content;
- if (formData.ID > 0)
- {
- formData.Update();
- }
- else
- {
- formData.userId = GetPostInt("userId");
- formData.Create();
- }
- }
- if (tradeCell.OrderState >= 5)
- {
- LogHelper.addLog(tradeCell.ctid, formData.userId > 0 ? formData.userId : 3542, "外链派单:订单状态不正确!", tradeCell.OrderState);
- returnSuccessMsg("保存成功!");
- return;
- }
- //能进来并且没有设计师
- foreach (CeErpTradeCell entity in cell_list)
- {
- try
- {
- if (entity != null && entity.seller_memo.Length > 0)
- {
- if (entity.OrderState >= 5)
- {
- LogHelper.addLog(entity.ctid, formData.userId > 0 ? formData.userId : 3542, "外链派单:订单状态不正确!", entity.OrderState);
- continue;
- }
- //判断能不能推送
- designApiResponseVo result = commonHelper.checkOrderListDesignInfo(entity.tid);
- if (result != null && result.code == 200)
- {
- designApiResponseVo response = designHelper.API_GetPrintData_CreateOrder(entity, "SysAdmin");
- if (response.code == 200)
- {
- if (response.msg == "设计共创:成功")
- {
- entity.OrderState = Convert.ToInt32(OrderState.待设计);
- entity.DesignUserId = 3542;
- entity.WaitDesignTime = DateTime.Now;
- entity.DispatchSort = 2;
- entity.Update();
- }
- }
- LogHelper.addLog(entity.ctid, formData.userId > 0 ? formData.userId : 3542, "外链派单:" + response.msg, Convert.ToInt32(OrderState.待设计));
- }
- else
- {
- LogHelper.addLog(entity.ctid, formData.userId > 0 ? formData.userId : 3542, "外链派单:" + result.msg, Convert.ToInt32(OrderState.待设计));
- }
- }
- }
- catch (Exception ex)
- {
- XLog.SaveLog(0, "外链派单:" + ex.Message);
- }
- }
- }
- returnSuccessMsg("保存成功!");
- }
- }
- //http://47.114.150.226:88/Handler/noti.ashx?t=LT_ERP_CHY_DELIVERY_PUSH post请求参数(参数放body中): tbtid(淘宝订单号) outsid(快递单号) cpcode(快递公司编码,如:圆通的是 YTO)
- }
- }
|