160 lines
4.7 KiB
C#
160 lines
4.7 KiB
C#
using KJD_Web.BLL;
|
|
using KJD_Web.BLL.WXXD;
|
|
using KJD_Web.Utils;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Web;
|
|
using System.Web.Services;
|
|
|
|
namespace KJD_Web
|
|
{
|
|
/// <summary>
|
|
/// OrderService 的摘要说明
|
|
/// </summary>
|
|
[WebService(Namespace = "http://tempuri.org/")]
|
|
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
|
|
[System.ComponentModel.ToolboxItem(false)]
|
|
// 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消注释以下行。
|
|
// [System.Web.Script.Services.ScriptService]
|
|
public class WXOrderService : System.Web.Services.WebService
|
|
{
|
|
private string GetRequestJsonString()
|
|
{
|
|
Context.Response.ContentType = "text/html;charset=utf-8";
|
|
Context.Response.ContentEncoding = System.Text.Encoding.GetEncoding("utf-8");
|
|
|
|
using (Stream s = HttpContext.Current.Request.InputStream) // 获得json 字符流
|
|
{
|
|
// 还原数据流
|
|
byte[] b = new byte[s.Length];
|
|
s.Read(b, 0, (int)s.Length);
|
|
string jsonText = Encoding.UTF8.GetString(b); // JSON字符串
|
|
if (string.IsNullOrEmpty(jsonText))
|
|
{
|
|
var qs = HttpContext.Current.Request.QueryString;
|
|
if (qs != null && qs.Keys.Count > 0)
|
|
{
|
|
jsonText = "{";
|
|
foreach (var key in qs.Keys)
|
|
{
|
|
jsonText += "\"" + key + "\":" + "\"" + qs[key.ToString()] + "\";";
|
|
}
|
|
jsonText = jsonText.TrimEnd(';') + "}";
|
|
}
|
|
}
|
|
return jsonText;
|
|
}
|
|
}
|
|
|
|
[WebMethod]
|
|
public void get_order_list()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXOrderManage().WXGetErpOrderList(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
|
|
|
|
[WebMethod]
|
|
public void get_order_item_list()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXOrderManage().WXGetErpOrderItemList(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
[WebMethod]
|
|
public void get_refund_list()
|
|
{
|
|
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXOrderManage().WXGetErpRefundList(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
|
|
[WebMethod]
|
|
public void wx_add_mdy_buy_prod_map()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXOrderManage().WXAddMdyBuyProdMap(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
[WebMethod]
|
|
public void wx_get_buy_prod_map()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXOrderManage().WXGetBuyPordMap(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取中转仓订单信息
|
|
/// </summary>
|
|
[WebMethod]
|
|
public void wx_get_transit_order()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXOrderManage().WXGetTransitOrder(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 修改中转仓物流信息
|
|
/// </summary>
|
|
[WebMethod]
|
|
public void wx_update_erp_order_express()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXOrderManage().WXUpdateErpOrderExpress(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
/// <summary>
|
|
/// 修改中转仓取号状态
|
|
/// </summary>
|
|
[WebMethod]
|
|
public void wx_update_erp_allocated_order_no()
|
|
{
|
|
string jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = new WXOrderManage().WXUpdateErpAllocatedOrderNo(jsontext);
|
|
|
|
Context.Response.Write(result);
|
|
Context.Response.End();
|
|
}
|
|
}
|
|
}
|