StockinTransferPush.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 StockinTransferPush
  8. {
  9. class StockinTransferPush
  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/stockin_transfer_push.php";
  18. var stockin_info = new
  19. {
  20. outer_no = "7898765432432",
  21. src_order_type = "2",
  22. src_order_no = "TF201901170004",
  23. warehouse_no = "wh002",
  24. goods_list = new[]
  25. {
  26. new{
  27. spec_no = "test-ptsd-00002",
  28. num = "1"
  29. },
  30. new{
  31. spec_no = "test-ptsd-00001",
  32. num = "1"
  33. }
  34. }
  35. };
  36. string json = stockin_info.ToJsonString();
  37. client.putParams("stockin_info", json);
  38. string result = client.wdtOpenapi();
  39. Console.WriteLine(result);
  40. Console.ReadKey();
  41. }
  42. }
  43. }