|
@@ -177,7 +177,7 @@ class FyySqlServerService extends Service
|
|
|
$model->whereBetween('a.dverifydate',[$start1, $end1]);
|
|
|
}
|
|
|
|
|
|
- $result = $model->get()->toArray();
|
|
|
+ $result = $model->get()->toArray();dump($result);die;
|
|
|
if(empty($result)) return [false,'暂无数据,更新结束!',''];
|
|
|
list($status,$msg) = $this->orderRule($result);
|
|
|
if(empty($msg)) return [false,'暂无数据,更新结束!',''];
|
|
@@ -421,10 +421,12 @@ class FyySqlServerService extends Service
|
|
|
$message = $this->db->table('DispatchList as a')
|
|
|
->leftJoin('DispatchLists as b','b.DLID','a.DLID')
|
|
|
->where('a.cSOcode',$data['order_number'])
|
|
|
- ->select('a.cDefine10 as customer_name','a.cSOCode as out_order','b.iDLsID as idlsid','b.cInvCode as cinvcode','b.cPosition as cposition','b.cBatch as cbatch','b.iQuantity as iquantity','b.iNum as inum','b.iInvExchRate as iinvexchrate')
|
|
|
+ ->whereColumn('b.iQuantity', '>', 'b.fOutQuantity')
|
|
|
+ ->select('a.cDefine10 as customer_name','a.cSOCode as out_order','b.iDLsID as idlsid','b.cInvCode as cinvcode','b.cPosition as cposition','b.cBatch as cbatch','b.iQuantity as iquantity','b.iNum as inum','b.iInvExchRate as iinvexchrate','b. fOutQuantity as out_quantity')
|
|
|
->get()->toArray();
|
|
|
if(! empty($message)){
|
|
|
foreach ($message as $key => $value){
|
|
|
+ $message[$key]->iquantity = $value->iquantity - $value->out_quantity;
|
|
|
$message[$key] = (array)$value;
|
|
|
}
|
|
|
}
|