TestController.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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 testdwy(Request $request){
  8. list($bool, $data) = (new TestService())->testdwy($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 testdwyget(Request $request){
  16. list($bool, $data) = (new TestService())->testdwyget($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 testdwyput(Request $request){
  24. list($bool, $data) = (new TestService())->testdwyput($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 updateTopStock(Request $request){
  32. list($bool, $data) = (new TestService())->updateTopStock($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 getSnList(Request $request){
  40. list($bool, $data) = (new TestService())->getSnList($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 getSnforMap(Request $request){
  48. list($bool, $data) = (new TestService())->getSnforMap($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 getSnForWarranty(Request $request){
  56. list($bool, $data) = (new TestService())->getSnForWarranty($request->all());
  57. if($bool){
  58. return $this->json_return(200,'',$data);
  59. }else{
  60. return $this->json_return(201,$data);
  61. }
  62. }
  63. public function saveSnUseData(Request $request){
  64. list($bool, $data) = (new TestService())->saveSnUseData($request->all());
  65. if($bool){
  66. return $this->json_return(200,'',$data);
  67. }else{
  68. return $this->json_return(201,$data);
  69. }
  70. }
  71. public function test(){
  72. dd(env("maycur_appcode"),env("maycur_appsercet"),getenv("maycur_appcode"),getenv("maycur_appsercet"));
  73. }
  74. public function salesOrderGet(Request $request){
  75. $common_array = $request->common_param;
  76. list($bool, $data) = (new TestService())->salesOrderGet($request->all(),$common_array);
  77. if($bool){
  78. return $this->json_return(200,'',$data);
  79. }else{
  80. return $this->json_return(201,$data);
  81. }
  82. }
  83. public function materialAddU8(Request $request){
  84. $common_array = $request->common_param;
  85. list($bool, $data) = (new TestService())->materialAddU8($request->all(), $common_array);
  86. if($bool){
  87. return $this->json_return(200,'',$data);
  88. }else{
  89. return $this->json_return(201,$data);
  90. }
  91. }
  92. public function productInAddU8(Request $request){
  93. $common_array = $request->common_param;
  94. list($bool, $data) = (new TestService())->ProductInAddU8($request->all(), $common_array);
  95. if($bool){
  96. return $this->json_return(200,'',$data);
  97. }else{
  98. return $this->json_return(201,$data);
  99. }
  100. }
  101. public function dispatchAddU8(Request $request){
  102. $common_array = $request->common_param;
  103. list($bool, $data) = (new TestService())->DispatchAddU8($request->all(), $common_array);
  104. if($bool){
  105. return $this->json_return(200,'',$data);
  106. }else{
  107. return $this->json_return(201,$data);
  108. }
  109. }
  110. public function recordList(Request $request){
  111. list($bool, $data) = (new TestService())->recordList($request->all());
  112. if($bool){
  113. return $this->json_return(200,'',$data);
  114. }else{
  115. return $this->json_return(201,$data);
  116. }
  117. }
  118. }