|
|
@@ -4,6 +4,7 @@ namespace App\Services;
|
|
|
|
|
|
use App\Jobs\OrderCreateInstantBill;
|
|
|
use App\Jobs\OrderFreeze;
|
|
|
+use App\Log;
|
|
|
use App\Logistic;
|
|
|
use App\OracleActAllocationDetails;
|
|
|
use App\OracleDOCASNHeader;
|
|
|
@@ -1194,4 +1195,21 @@ class OrderService
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ public function freezeRemoveWave($orders, $isSql = false)
|
|
|
+ {
|
|
|
+ if (!$isSql && !is_array($orders))$orders = [$orders];
|
|
|
+ if (!$isSql){
|
|
|
+ $where = "''";
|
|
|
+ foreach ($orders as $f)$where .= ",'{$f}'";
|
|
|
+ $orders = $where;
|
|
|
+ }
|
|
|
+ $sql = <<<sql
|
|
|
+ DELETE FROM DOC_WAVE_DETAILS WHERE (WAVENO,ORDERNO) IN (SELECT DOC_ORDER_HEADER.WAVENO,DOC_ORDER_HEADER.ORDERNO FROM DOC_ORDER_HEADER LEFT JOIN DOC_WAVE_DETAILS ON DOC_ORDER_HEADER.WAVENO = DOC_WAVE_DETAILS.WAVENO
|
|
|
+ AND DOC_ORDER_HEADER.ORDERNO = DOC_WAVE_DETAILS.ORDERNO WHERE DOC_ORDER_HEADER.orderno IN ({$orders}) AND DOC_ORDER_HEADER.WAVENO != '*' AND DOC_ORDER_HEADER.WAVENO IS NOT NULL)
|
|
|
+sql;
|
|
|
+ $result = DB::connection("oracle")->delete(DB::raw("$sql"));
|
|
|
+ LogService::log(__METHOD__,"删除波次详情",$sql);
|
|
|
+ return $result;
|
|
|
+ }
|
|
|
+
|
|
|
}
|