| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 | 
							- <?php
 
- namespace App\Http\Controllers\Api;
 
- use App\Model\SystemL;
 
- use App\Service\EquipmentService;
 
- use App\Service\ReportFormsService;
 
- use Illuminate\Http\Request;
 
- class ReportFormsController extends BaseController
 
- {
 
-     //生产进度
 
-     public function productionReport(Request $request){
 
-         $service = new ReportFormsService();
 
-         list($status,$data) = $service->productionReport($request->all());
 
-         if($status){
 
-             return $this->json_return(200,'',$data);
 
-         }else{
 
-             return $this->json_return(201,$data);
 
-         }
 
-     }
 
-     //班组
 
-     public function teamReport(Request $request){
 
-         $service = new ReportFormsService();
 
-         list($status,$data) = $service->teamReport($request->all());
 
-         if($status){
 
-             return $this->json_return(200,'',$data);
 
-         }else{
 
-             return $this->json_return(201,$data);
 
-         }
 
-     }
 
-     //班组 详情
 
-     public function teamReportDetail(Request $request){
 
-         $service = new ReportFormsService();
 
-         list($status,$data) = $service->teamReportDetail($request->all());
 
-         if($status){
 
-             return $this->json_return(200,'',$data);
 
-         }else{
 
-             return $this->json_return(201,$data);
 
-         }
 
-     }
 
-     //不良品
 
-     public function badGoodsReport(Request $request){
 
-         $service = new ReportFormsService();
 
-         list($status,$data) = $service->badGoodsReport($request->all());
 
-         if($status){
 
-             return $this->json_return(200,'',$data);
 
-         }else{
 
-             return $this->json_return(201,$data);
 
-         }
 
-     }
 
-     //不良品 详情
 
-     public function badGoodsReportDetail(Request $request){
 
-         $service = new ReportFormsService();
 
-         list($status,$data) = $service->badGoodsReportDetail($request->all());
 
-         if($status){
 
-             return $this->json_return(200,'',$data);
 
-         }else{
 
-             return $this->json_return(201,$data);
 
-         }
 
-     }
 
-     //不良品原因
 
-     public function badGoodsReasonReport(Request $request){
 
-         $service = new ReportFormsService();
 
-         list($status,$data) = $service->badGoodsReasonReport($request->all());
 
-         if($status){
 
-             return $this->json_return(200,'',$data);
 
-         }else{
 
-             return $this->json_return(201,$data);
 
-         }
 
-     }
 
-     //不良品原因详情
 
-     public function badGoodsReasonReportDetail(Request $request){
 
-         $service = new ReportFormsService();
 
-         list($status,$data) = $service->badGoodsReasonReportDetail($request->all());
 
-         if($status){
 
-             return $this->json_return(200,'',$data);
 
-         }else{
 
-             return $this->json_return(201,$data);
 
-         }
 
-     }
 
-     public function deviceList(Request $request){
 
-         $device = (new EquipmentService())->getDeviceList();
 
-         $data = [];
 
-         foreach ($device as $k => $v){
 
-             $data[] = [
 
-                 'device_name' => $k,
 
-                 'device_no' => $v
 
-             ];
 
-         }
 
-         return $this->json_return(200,'',$data);
 
-     }
 
-     //设备统计报表
 
-     public function deviceStatisticsReport(Request $request){
 
-         $service = new ReportFormsService();
 
-         list($status,$data) = $service->deviceStatisticsReport($request->all());
 
-         if($status){
 
-             return $this->json_return(200,'',$data);
 
-         }else{
 
-             return $this->json_return(201,$data);
 
-         }
 
-     }
 
-     //设备统计报表详情
 
-     public function deviceStatisticsReportDetail(Request $request){
 
-         $service = new ReportFormsService();
 
-         list($status,$data) = $service->deviceStatisticsReportDetail($request->all());
 
-         if($status){
 
-             return $this->json_return(200,'',$data);
 
-         }else{
 
-             return $this->json_return(201,$data);
 
-         }
 
-     }
 
-     //设备统计报表
 
-     public function deviceStatisticsReportChart(Request $request){
 
-         $service = new ReportFormsService();
 
-         list($status,$data) = $service->deviceStatisticsReportChart($request->all());
 
-         if($status){
 
-             return $this->json_return(200,'',$data);
 
-         }else{
 
-             return $this->json_return(201,$data);
 
-         }
 
-     }
 
-     //设备统计OEE报表
 
-     public function deviceStatisticsReportOEEChart(Request $request){
 
-         $service = new ReportFormsService();
 
-         list($status,$data) = $service->deviceStatisticsReportOEEChart($request->all());
 
-         if($status){
 
-             return $this->json_return(200,'',$data);
 
-         }else{
 
-             return $this->json_return(201,$data);
 
-         }
 
-     }
 
-     //报工单报表
 
-     public function statisticsReportWorkingChart(Request $request){
 
-         $service = new ReportFormsService();
 
-         list($status,$data) = $service->statisticsReportWorkingChart($request->all());
 
-         if($status){
 
-             return $this->json_return(200,'',$data);
 
-         }else{
 
-             return $this->json_return(201,$data);
 
-         }
 
-     }
 
-     public function statisticsReportWorkingChartDetail(Request $request){
 
-         $service = new ReportFormsService();
 
-         list($status,$data) = $service->statisticsReportWorkingChartDetail($request->all());
 
-         if($status){
 
-             return $this->json_return(200,'',$data);
 
-         }else{
 
-             return $this->json_return(201,$data);
 
-         }
 
-     }
 
- }
 
 
  |