cqpCow пре 10 месеци
родитељ
комит
802a6a61d3
1 измењених фајлова са 7 додато и 6 уклоњено
  1. 7 6
      app/Service/DeleteService.php

+ 7 - 6
app/Service/DeleteService.php

@@ -213,13 +213,14 @@ class DeleteService extends Service
 
     public function fpConstructionMan($data,$user){
         $time = time();
-        if(! empty($data['man'])){
-            //负责人清除
-            ConstructionInfo::where('del_time',0)
-                ->where('construction_id',$data['id'])
-                ->where('type', CustomerInfo::type_three)
-                ->update(['del_time' => $time]);
 
+        //负责人清除
+        ConstructionInfo::where('del_time',0)
+            ->where('construction_id',$data['id'])
+            ->where('type', ConstructionInfo::type_three)
+            ->update(['del_time' => $time]);
+
+        if(! empty($data['man'])){
             $insert = [];
             foreach ($data['man'] as $value){
                 $insert[] = [