StockinOrderPush.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 StockinOrderPush
  8. {
  9. class StockinOrderPush
  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_order_push.php";
  18. var stockin_info = new
  19. {
  20. outer_no = "34567898765432",
  21. warehouse_no = "api_test",
  22. post_fee = "30",
  23. other_fee = "40",
  24. discount = "10",
  25. goods_list = new[]
  26. {
  27. new{
  28. spec_no = "6521478635",
  29. stockin_num = "1",
  30. stockin_price = "11.11",
  31. },
  32. new{
  33. spec_no = "test-ptsd-00001",
  34. stockin_num = "1",
  35. stockin_price = "11.11",
  36. }
  37. }
  38. };
  39. string json = stockin_info.ToJsonString();
  40. client.putParams("stockin_info", json);
  41. string result = client.wdtOpenapi();
  42. Console.WriteLine(result);
  43. Console.ReadKey();
  44. }
  45. }
  46. }