TestController.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <?php
  2. namespace App\Http\Controllers\Api;
  3. use App\Service\qyWechatService;
  4. use App\Service\TestService;
  5. use Illuminate\Http\Request;
  6. use Illuminate\Support\Str;
  7. class TestController extends BaseController
  8. {
  9. public function testdwy(Request $request){
  10. list($bool, $data) = (new TestService())->testdwy($request->all());
  11. if($bool){
  12. return $this->json_return(200,'',$data);
  13. }else{
  14. return $this->json_return(201,$data);
  15. }
  16. }
  17. public function testdwyget(Request $request){
  18. list($bool, $data) = (new TestService())->testdwyget($request->all());
  19. if($bool){
  20. return $this->json_return(200,'',$data);
  21. }else{
  22. return $this->json_return(201,$data);
  23. }
  24. }
  25. public function testdwyput(Request $request){
  26. list($bool, $data) = (new TestService())->testdwyput($request->all());
  27. if($bool){
  28. return $this->json_return(200,'',$data);
  29. }else{
  30. return $this->json_return(201,$data);
  31. }
  32. }
  33. public function test(){
  34. dd(env("maycur_appcode"),env("maycur_appsercet"),getenv("maycur_appcode"),getenv("maycur_appsercet"));
  35. }
  36. public function salesOrderGet(Request $request){
  37. $common_array = $request->common_param;
  38. list($bool, $data) = (new TestService())->salesOrderGet($request->all(),$common_array);
  39. if($bool){
  40. return $this->json_return(200,'',$data);
  41. }else{
  42. return $this->json_return(201,$data);
  43. }
  44. }
  45. public function purchaseOrderGet(Request $request){
  46. $common_array = $request->common_param;
  47. list($bool, $data) = (new TestService())->purchaseOrderGet($request->all(),$common_array);
  48. if($bool){
  49. return $this->json_return(200,'',$data);
  50. }else{
  51. return $this->json_return(201,$data);
  52. }
  53. }
  54. public function materialAddU8(Request $request){
  55. $common_array = $request->common_param;
  56. list($bool, $data) = (new TestService())->materialAddU8($request->all(), $common_array);
  57. if($bool){
  58. return $this->json_return(200,'',$data);
  59. }else{
  60. return $this->json_return(201,$data);
  61. }
  62. }
  63. public function productInAddU8(Request $request){
  64. $common_array = $request->common_param;
  65. list($bool, $data) = (new TestService())->ProductInAddU8($request->all(), $common_array);
  66. if($bool){
  67. return $this->json_return(200,'',$data);
  68. }else{
  69. return $this->json_return(201,$data);
  70. }
  71. }
  72. public function dispatchAddU8(Request $request){
  73. $common_array = $request->common_param;
  74. list($bool, $data) = (new TestService())->DispatchAddU8($request->all(), $common_array);
  75. if($bool){
  76. return $this->json_return(200,'',$data);
  77. }else{
  78. return $this->json_return(201,$data);
  79. }
  80. }
  81. public function recordList(Request $request){
  82. list($bool, $data) = (new TestService())->recordList($request->all());
  83. if($bool){
  84. return $this->json_return(200,'',$data);
  85. }else{
  86. return $this->json_return(201,$data);
  87. }
  88. }
  89. public function getInventoryStock(Request $request){
  90. list($bool, $data) = (new TestService())->getInventoryStock($request->all());
  91. if($bool){
  92. return $this->json_return(200,'',$data);
  93. }else{
  94. return $this->json_return(201,$data);
  95. }
  96. }
  97. // 仓库档案 http://localhost:8060/api/WareHouse/Get ?CodeorName=0501 为空返回所有数据
  98. // 部门档案 http://localhost:8060/api/Department/Get ?CodeorName=0501 为空返回所有数据
  99. // 人员档案 http://localhost:8060/api/Person/Get ?CodeorName=00043&bPsnPerson=1(是否业务员) 为空返回所有数据
  100. // 客户分类 http://localhost:8060/api/Customer/GetCustomerClass ?cCCCode=01 为空返回所有数据
  101. // 客户档案 http://localhost:8060/api/Customer/GetCustomerClass ?cCCCode=01 为空返回所有数据
  102. // 存货分类 http://localhost:8060/api/Inventory/GetInventoryClass ?CodeorName=0101 为空返回所有
  103. // 存货档案 http://localhost:8060/api/System/SqlQuery
  104. //{
  105. // "customSQLFileName": "U8SQL",
  106. // "customSQLPath": "U8API/Inventory/Get",
  107. // "paramObj": {
  108. // "@pagesize": 25,
  109. // "@codeorname": "0301",
  110. // "@where": "AND cInvCode = 'BB01' AND cInvName like '%交换机%'",
  111. // "@version": "7098847"
  112. // }
  113. //}
  114. // 计量单位 http://localhost:8060/api/Inventory/GetComputationUnit ?CodeorName=0502 为空返回所有数据
  115. }