|
@@ -590,9 +590,9 @@ class Allot extends BaseController
|
|
|
ActionLog::logAdd($this->post['token'],$order,"DBD",4,$this->post);
|
|
|
$good_data=[];
|
|
|
foreach ($dain as $value) {
|
|
|
- $st = Db::name("good")->alias("b")
|
|
|
- ->join("good_stock c", "c.spuCode = b.spuCode", "left")->where(['wsm_code' => $al['wsm_out'], 'b.spuCode' => $value['good_code'], 'b.is_del' => 0, 'a.is_del' => 0])->where("c.is_del=0 or c.is_del is null")
|
|
|
- ->field("b.spuCode,b.good_name,c.wsm_code,c.usable_stock")->find();
|
|
|
+ $st = Db::name("good_stock")->alias("a")->leftJoin("good b" ,"a.spuCode=b.spuCode")
|
|
|
+ ->where(['wsm_code' => $al['wsm_out'], 'a.spuCode' => $value['spuCode'], 'a.is_del' => 0])
|
|
|
+ ->field("a.spuCode,wsm_code,usable_stock,wait_out_stock,wait_in_stock,b.good_name")->find();
|
|
|
if (empty($st)) {
|
|
|
Db::rollback();
|
|
|
return error_show(1003, "未找到商品");
|