|
@@ -121,6 +121,7 @@ class U8ServerService extends Service
|
|
|
|
|
|
//采购订单保存
|
|
|
public function U8PO_PomainSave($data){
|
|
|
+ if(! is_array($data)) $data = [$data];
|
|
|
$id = $data;
|
|
|
|
|
|
//映射ip是否通畅
|
|
@@ -250,6 +251,7 @@ class U8ServerService extends Service
|
|
|
|
|
|
//销售订单(合同)保存
|
|
|
public function U8SaleOrderSave($data){
|
|
|
+ if(! is_array($data)) $data = [$data];
|
|
|
$id = $data;
|
|
|
|
|
|
//映射ip是否通畅
|
|
@@ -399,7 +401,7 @@ class U8ServerService extends Service
|
|
|
$insert = [];
|
|
|
|
|
|
U8Job::where('del_time',0)
|
|
|
- ->where('data_type',U8Job::one)
|
|
|
+ ->where('data_type',$data_type)
|
|
|
->whereIn('data',$data)
|
|
|
->update(['del_time' => $time]);
|
|
|
foreach ($data as $value){
|
|
@@ -504,8 +506,8 @@ class U8ServerService extends Service
|
|
|
$product = Product::whereIn('id',array_unique(array_column($sub,'product_id')))
|
|
|
->get()->toArray();
|
|
|
$product_map = array_column($product,null,'id');
|
|
|
-
|
|
|
- $code_map = BasicType::whereIn('id',array_unique(array_merge_recursive(array_column($main,'sale_type'),array_column($main,'plat_type'))))
|
|
|
+ $code_id = array_filter(array_unique(array_merge_recursive(array_column($main,'sale_type'),array_column($main,'plat_type'))));
|
|
|
+ $code_map = BasicType::whereIn('id',$code_id)
|
|
|
->pluck('title','id')
|
|
|
->toArray();
|
|
|
$customer_map = Customer::whereIn('id',array_unique(array_column($main,'customer_id')))
|