|
|
@@ -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)
|