unknown 6 дней назад
Родитель
Сommit
490c0772a6
1 измененных файлов с 23 добавлено и 23 удалено
  1. 23 23
      application/api/controller/FinishedProductWarehousing.php

+ 23 - 23
application/api/controller/FinishedProductWarehousing.php

@@ -471,10 +471,10 @@ public function getList()
         }
 
         // 2. 中间表同步(与超节损独立;失败/未同步均写入日志 status_msg)
-        $syncMsg = $this->syncFinishStockOrLogSkip($data, $data['UniqId'], '新增');
-        if ($syncMsg !== null) {
-            $warnings[] = $syncMsg;
-        }
+        // $syncMsg = $this->syncFinishStockOrLogSkip($data, $data['UniqId'], '新增');
+        // if ($syncMsg !== null) {
+        //     $warnings[] = $syncMsg;
+        // }
 
         $result = ['UniqId' => $data['UniqId']];
         if (!empty($warnings)) {
@@ -616,12 +616,12 @@ public function getList()
         }
 
         // 2. 同步中间表:先「新增」负数量冲销原数据,再「新增」写入修改后数据(不用「修改」类型)
-        if ($needsMiddleSync) {
-            $syncMsgs = $this->syncFinishStockAfterEditOrLogSkip($old, $uniqId, $sysId);
-            if (!empty($syncMsgs)) {
-                $warnings = array_merge($warnings, $syncMsgs);
-            }
-        }
+        // if ($needsMiddleSync) {
+        //     $syncMsgs = $this->syncFinishStockAfterEditOrLogSkip($old, $uniqId, $sysId);
+        //     if (!empty($syncMsgs)) {
+        //         $warnings = array_merge($warnings, $syncMsgs);
+        //     }
+        // }
 
         if (!empty($warnings)) {
             $this->success('成品入仓已保存,但部分后续处理失败', [
@@ -659,13 +659,13 @@ public function getList()
         }
 
         // 满足同步条件才回冲;不满足或失败都写日志。同步失败不再阻断删除
-        $syncMsg = $this->syncFinishStockOrLogSkip(
-            $old,
-            $uniqId,
-            '新增',
-            -1 * (float)$old['jjcp_sl'],
-            $sysId
-        );
+        // $syncMsg = $this->syncFinishStockOrLogSkip(
+        //     $old,
+        //     $uniqId,
+        //     '新增',
+        //     -1 * (float)$old['jjcp_sl'],
+        //     $sysId
+        // );
 
         $mongodb = Db::connect(config('database.mongodb'));
         db()->startTrans();
@@ -685,12 +685,12 @@ public function getList()
             $this->error('失败');
         }
 
-        if ($syncMsg !== null) {
-            $this->success('删除成功,但同步处理异常', [
-                'UniqId'   => $uniqId,
-                'warnings' => [$syncMsg],
-            ]);
-        }
+        // if ($syncMsg !== null) {
+        //     $this->success('删除成功,但同步处理异常', [
+        //         'UniqId'   => $uniqId,
+        //         'warnings' => [$syncMsg],
+        //     ]);
+        // }
         $this->success('成功');
     }