TestController.php 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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 updateSalesOrder(Request $request){
  46. $common_array = $request->common_param;
  47. list($bool, $data) = (new TestService())->updateSalesOrder($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 purchaseOrderGet(Request $request){
  55. $common_array = $request->common_param;
  56. list($bool, $data) = (new TestService())->purchaseOrderGet($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 materialAddU8(Request $request){
  64. $common_array = $request->common_param;
  65. list($bool, $data) = (new TestService())->materialAddU8($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 productInAddU8(Request $request){
  73. $common_array = $request->common_param;
  74. list($bool, $data) = (new TestService())->ProductInAddU8($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 purchaseInAddU8(Request $request){
  82. $common_array = $request->common_param;
  83. list($bool, $data) = (new TestService())->purchaseInByZj($request->all(), $common_array);
  84. if($bool){
  85. return $this->json_return(200,'',$data);
  86. }else{
  87. return $this->json_return(201,$data);
  88. }
  89. }
  90. public function otherInAddU8(Request $request){
  91. $common_array = $request->common_param;
  92. list($bool, $data) = (new TestService())->otherInByZj($request->all(), $common_array);
  93. if($bool){
  94. return $this->json_return(200,'',$data);
  95. }else{
  96. return $this->json_return(201,$data);
  97. }
  98. }
  99. public function dispatchAddU8(Request $request){
  100. $common_array = $request->common_param;
  101. list($bool, $data) = (new TestService())->DispatchAddU8($request->all(), $common_array);
  102. if($bool){
  103. return $this->json_return(200,'',$data);
  104. }else{
  105. return $this->json_return(201,$data);
  106. }
  107. }
  108. public function recordList(Request $request){
  109. list($bool, $data) = (new TestService())->recordList($request->all());
  110. if($bool){
  111. return $this->json_return(200,'',$data);
  112. }else{
  113. return $this->json_return(201,$data);
  114. }
  115. }
  116. public function getInventoryStock(Request $request){
  117. list($bool, $data) = (new TestService())->getInventoryStock($request->all());
  118. if($bool){
  119. return $this->json_return(200,'',$data);
  120. }else{
  121. return $this->json_return(201,$data);
  122. }
  123. }
  124. // 仓库档案 http://localhost:8060/api/WareHouse/Get ?CodeorName=0501 为空返回所有数据
  125. // 部门档案 http://localhost:8060/api/Department/Get ?CodeorName=0501 为空返回所有数据
  126. // 人员档案 http://localhost:8060/api/Person/Get ?CodeorName=00043&bPsnPerson=1(是否业务员) 为空返回所有数据
  127. // 客户分类 http://localhost:8060/api/Customer/GetCustomerClass ?cCCCode=01 为空返回所有数据
  128. // 客户档案 http://localhost:8060/api/Customer/GetCustomerClass ?cCCCode=01 为空返回所有数据
  129. // 存货分类 http://localhost:8060/api/Inventory/GetInventoryClass ?CodeorName=0101 为空返回所有
  130. // 存货档案 http://localhost:8060/api/System/SqlQuery
  131. //{
  132. // "customSQLFileName": "U8SQL",
  133. // "customSQLPath": "U8API/Inventory/Get",
  134. // "paramObj": {
  135. // "@pagesize": 25,
  136. // "@codeorname": "0301",
  137. // "@where": "AND cInvCode = 'BB01' AND cInvName like '%交换机%'",
  138. // "@version": "7098847"
  139. // }
  140. //}
  141. // 计量单位 http://localhost:8060/api/Inventory/GetComputationUnit ?CodeorName=0502 为空返回所有数据
  142. }