ReportFormsController.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?php
  2. namespace App\Http\Controllers\Api;
  3. use App\Service\ReportFormsService;
  4. use Illuminate\Http\Request;
  5. class ReportFormsController extends BaseController
  6. {
  7. //生产进度
  8. public function productionReport(Request $request){
  9. $service = new ReportFormsService();
  10. list($status,$data) = $service->productionReport($request->all());
  11. if($status){
  12. return $this->json_return(200,'',$data);
  13. }else{
  14. return $this->json_return(201,$data);
  15. }
  16. }
  17. //班组
  18. public function teamReport(Request $request){
  19. $service = new ReportFormsService();
  20. list($status,$data) = $service->teamReport($request->all());
  21. if($status){
  22. return $this->json_return(200,'',$data);
  23. }else{
  24. return $this->json_return(201,$data);
  25. }
  26. }
  27. //班组 详情
  28. public function teamReportDetail(Request $request){
  29. $service = new ReportFormsService();
  30. list($status,$data) = $service->teamReportDetail($request->all());
  31. if($status){
  32. return $this->json_return(200,'',$data);
  33. }else{
  34. return $this->json_return(201,$data);
  35. }
  36. }
  37. //不良品
  38. public function badGoodsReport(Request $request){
  39. $service = new ReportFormsService();
  40. list($status,$data) = $service->badGoodsReport($request->all());
  41. if($status){
  42. return $this->json_return(200,'',$data);
  43. }else{
  44. return $this->json_return(201,$data);
  45. }
  46. }
  47. //不良品 详情
  48. public function badGoodsReportDetail(Request $request){
  49. $service = new ReportFormsService();
  50. list($status,$data) = $service->badGoodsReportDetail($request->all());
  51. if($status){
  52. return $this->json_return(200,'',$data);
  53. }else{
  54. return $this->json_return(201,$data);
  55. }
  56. }
  57. //不良品原因
  58. public function badGoodsReasonReport(Request $request){
  59. $service = new ReportFormsService();
  60. list($status,$data) = $service->badGoodsReasonReport($request->all());
  61. if($status){
  62. return $this->json_return(200,'',$data);
  63. }else{
  64. return $this->json_return(201,$data);
  65. }
  66. }
  67. //不良品原因详情
  68. public function badGoodsReasonReportDetail(Request $request){
  69. $service = new ReportFormsService();
  70. list($status,$data) = $service->badGoodsReasonReportDetail($request->all());
  71. if($status){
  72. return $this->json_return(200,'',$data);
  73. }else{
  74. return $this->json_return(201,$data);
  75. }
  76. }
  77. }