cqp hace 3 meses
padre
commit
2deda2a7dc
Se han modificado 1 ficheros con 4 adiciones y 7 borrados
  1. 4 7
      app/Service/PersonWorkService.php

+ 4 - 7
app/Service/PersonWorkService.php

@@ -2,10 +2,7 @@
 
 namespace App\Service;
 
-use App\Model\Device;
 use App\Model\Employee;
-use App\Model\Item;
-use App\Model\ItemDetails;
 use App\Model\MonthlyPwOrder;
 use App\Model\MonthlyPwOrderDetails;
 use Illuminate\Support\Facades\DB;
@@ -19,9 +16,9 @@ class PersonWorkService extends Service
         try {
             DB::beginTransaction();
 
-            $model = Item::where('id',$data['id'])->first();
-            $model->month = $data['month'] ?? 0;
-            $model->save();
+            $model = MonthlyPwOrder::where('id',$data['id'])->first();
+//            $model->month = $data['month'] ?? 0;
+//            $model->save();
 
             $time = time();
             MonthlyPwOrderDetails::where('del_time',0)
@@ -222,7 +219,7 @@ class PersonWorkService extends Service
                 ->exists();
         }else{
             if(empty($data['id'])) return [false,'ID不能为空'];
-            $bool = Item::where('code',$data['code'])
+            $bool = MonthlyPwOrder::where('code',$data['code'])
                 ->where('top_depart_id', $data['top_depart_id'])
                 ->where('id','<>',$data['id'])
                 ->where('del_time',0)