TestController.php 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <?php
  2. namespace App\Http\Controllers\Api;
  3. use App\Service\TestService;
  4. use Illuminate\Http\Request;
  5. class TestController extends BaseController
  6. {
  7. public function testpj(Request $request){
  8. list($bool, $data) = (new TestService())->testpj($request->all());
  9. if($bool){
  10. return $this->json_return(200,'',$data);
  11. }else{
  12. return $this->json_return(201,$data);
  13. }
  14. }
  15. public function testpjget(Request $request){
  16. list($bool, $data) = (new TestService())->testpjget($request->all());
  17. if($bool){
  18. return $this->json_return(200,'',$data);
  19. }else{
  20. return $this->json_return(201,$data);
  21. }
  22. }
  23. public function testpjput(Request $request){
  24. list($bool, $data) = (new TestService())->testpjput($request->all());
  25. if($bool){
  26. return $this->json_return(200,'',$data);
  27. }else{
  28. return $this->json_return(201,$data);
  29. }
  30. }
  31. public function testdwy(Request $request){
  32. list($bool, $data) = (new TestService())->testdwy($request->all());
  33. if($bool){
  34. return $this->json_return(200,'',$data);
  35. }else{
  36. return $this->json_return(201,$data);
  37. }
  38. }
  39. public function testdwyget(Request $request){
  40. list($bool, $data) = (new TestService())->testdwyget($request->all());
  41. if($bool){
  42. return $this->json_return(200,'',$data);
  43. }else{
  44. return $this->json_return(201,$data);
  45. }
  46. }
  47. public function testdwyput(Request $request){
  48. list($bool, $data) = (new TestService())->testdwyput($request->all());
  49. if($bool){
  50. return $this->json_return(200,'',$data);
  51. }else{
  52. return $this->json_return(201,$data);
  53. }
  54. }
  55. public function test(){
  56. dd(env("maycur_appcode"),env("maycur_appsercet"),getenv("maycur_appcode"),getenv("maycur_appsercet"));
  57. }
  58. public function salesOrderGet(Request $request){
  59. $common_array = $request->common_param;
  60. list($bool, $data) = (new TestService())->salesOrderGet($request->all(),$common_array);
  61. if($bool){
  62. return $this->json_return(200,'',$data);
  63. }else{
  64. return $this->json_return(201,$data);
  65. }
  66. }
  67. public function updateSalesOrder(Request $request){
  68. $common_array = $request->common_param;
  69. list($bool, $data) = (new TestService())->updateSalesOrder($request->all(),$common_array);
  70. if($bool){
  71. return $this->json_return(200,'',$data);
  72. }else{
  73. return $this->json_return(201,$data);
  74. }
  75. }
  76. public function purchaseOrderGet(Request $request){
  77. $common_array = $request->common_param;
  78. list($bool, $data) = (new TestService())->purchaseOrderGet($request->all(),$common_array);
  79. if($bool){
  80. return $this->json_return(200,'',$data);
  81. }else{
  82. return $this->json_return(201,$data);
  83. }
  84. }
  85. public function materialAddU8(Request $request){
  86. $common_array = $request->common_param;
  87. list($bool, $data) = (new TestService())->materialAddU8($request->all(), $common_array);
  88. if($bool){
  89. return $this->json_return(200,'',$data);
  90. }else{
  91. return $this->json_return(201,$data);
  92. }
  93. }
  94. public function productInAddU8(Request $request){
  95. $common_array = $request->common_param;
  96. list($bool, $data) = (new TestService())->ProductInAddU8($request->all(), $common_array);
  97. if($bool){
  98. return $this->json_return(200,'',$data);
  99. }else{
  100. return $this->json_return(201,$data);
  101. }
  102. }
  103. public function productInByZj(Request $request){
  104. $common_array = $request->common_param;
  105. list($bool, $data) = (new TestService())->productInByZj($request->all(), $common_array);
  106. if($bool){
  107. return $this->json_return(200,'',$data);
  108. }else{
  109. return $this->json_return(201,$data);
  110. }
  111. }
  112. public function purchaseInAddU8(Request $request){
  113. $common_array = $request->common_param;
  114. list($bool, $data) = (new TestService())->purchaseInByZj($request->all(), $common_array);
  115. if($bool){
  116. return $this->json_return(200,'',$data);
  117. }else{
  118. return $this->json_return(201,$data);
  119. }
  120. }
  121. public function otherInAddU8(Request $request){
  122. $common_array = $request->common_param;
  123. list($bool, $data) = (new TestService())->otherInByZj($request->all(), $common_array);
  124. if($bool){
  125. return $this->json_return(200,'',$data);
  126. }else{
  127. return $this->json_return(201,$data);
  128. }
  129. }
  130. public function dispatchAddU8(Request $request){
  131. $common_array = $request->common_param;
  132. list($bool, $data) = (new TestService())->DispatchAddU8($request->all(), $common_array);
  133. if($bool){
  134. return $this->json_return(200,'',$data);
  135. }else{
  136. return $this->json_return(201,$data);
  137. }
  138. }
  139. public function recordList(Request $request){
  140. list($bool, $data) = (new TestService())->recordList($request->all());
  141. if($bool){
  142. return $this->json_return(200,'',$data);
  143. }else{
  144. return $this->json_return(201,$data);
  145. }
  146. }
  147. public function getInventoryStock(Request $request){
  148. list($bool, $data) = (new TestService())->getInventoryStock($request->all());
  149. if($bool){
  150. return $this->json_return(200,'',$data);
  151. }else{
  152. return $this->json_return(201,$data);
  153. }
  154. }
  155. // 仓库档案 http://localhost:8060/api/WareHouse/Get ?CodeorName=0501 为空返回所有数据
  156. // 部门档案 http://localhost:8060/api/Department/Get ?CodeorName=0501 为空返回所有数据
  157. // 人员档案 http://localhost:8060/api/Person/Get ?CodeorName=00043&bPsnPerson=1(是否业务员) 为空返回所有数据
  158. // 客户分类 http://localhost:8060/api/Customer/GetCustomerClass ?cCCCode=01 为空返回所有数据
  159. // 客户档案 http://localhost:8060/api/Customer/GetCustomerClass ?cCCCode=01 为空返回所有数据
  160. // 存货分类 http://localhost:8060/api/Inventory/GetInventoryClass ?CodeorName=0101 为空返回所有
  161. // 存货档案 http://localhost:8060/api/System/SqlQuery
  162. //{
  163. // "customSQLFileName": "U8SQL",
  164. // "customSQLPath": "U8API/Inventory/Get",
  165. // "paramObj": {
  166. // "@pagesize": 25,
  167. // "@codeorname": "0301",
  168. // "@where": "AND cInvCode = 'BB01' AND cInvName like '%交换机%'",
  169. // "@version": "7098847"
  170. // }
  171. //}
  172. // 计量单位 http://localhost:8060/api/Inventory/GetComputationUnit ?CodeorName=0502 为空返回所有数据
  173. }