StockoutTransferPush.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using WdtSdk;
  7. namespace StockoutTransferPush
  8. {
  9. class StockoutTransferPush
  10. {
  11. static void Main(string[] args)
  12. {
  13. WdtClient client = new WdtClient();
  14. client.sid = "";
  15. client.appkey = "";
  16. client.appsecret = "";
  17. client.gatewayUrl = "http://121.41.177.115/openapi2/stockout_transfer_push.php";
  18. var stockout_info = new
  19. {
  20. src_order_type = "2",
  21. src_order_no = "TF201901170004",
  22. warehouse_no = "api_test",
  23. goods_list = new[]
  24. {
  25. new{
  26. spec_no = "test-ptsd-00002",
  27. num = "1"
  28. },
  29. new{
  30. spec_no = "test-ptsd-00001",
  31. num = "1"
  32. }
  33. }
  34. };
  35. string json = stockout_info.ToJsonString();
  36. client.putParams("stockout_info", json);
  37. string result = client.wdtOpenapi();
  38. Console.WriteLine(result);
  39. Console.ReadKey();
  40. }
  41. }
  42. }