wufeng 2 gadi atpakaļ
vecāks
revīzija
b940a6c4d8
1 mainītis faili ar 11 papildinājumiem un 10 dzēšanām
  1. 11 10
      app/admin/controller/Sale.php

+ 11 - 10
app/admin/controller/Sale.php

@@ -1307,16 +1307,17 @@ class Sale extends Base
 
                 } else {
                     //项目类竞价单
-                    if ($key == 0) Db::name('standing_book')->where('projectNo', $plan['projectNo'])->where('infoNo', $standing_book_data['infoNo'])->update($standing_book_data);
-                    else {
-                        $temp = Db::name('standing_book')->where('projectNo', $plan['projectNo'])->where('infoNo', $standing_book_data['infoNo'])->find();
-                        if (!empty($temp)) {
-                            unset($temp['id']);
-                            $temp = array_merge($temp, $standing_book_data);
-                            $temp['standBookNo'] = makeNo('IO');
-                            Db::name('standing_book')->insert($temp);
-                        }
-                    }
+                    Db::name('standing_book')->where(['projectNo' => $plan['projectNo'], 'infoNo' => $standing_book_data['infoNo']])->update($standing_book_data);
+//                    if ($key == 0) Db::name('standing_book')->where('projectNo', $plan['projectNo'])->where('infoNo', $standing_book_data['infoNo'])->update($standing_book_data);
+//                    else {
+//                        $temp = Db::name('standing_book')->where('projectNo', $plan['projectNo'])->where('infoNo', $standing_book_data['infoNo'])->find();
+//                        if (!empty($temp)) {
+//                            unset($temp['id']);
+//                            $temp = array_merge($temp, $standing_book_data);
+//                            $temp['standBookNo'] = makeNo('IO');
+//                            Db::name('standing_book')->insert($temp);
+//                        }
+//                    }
                 }
 
             }