mirror of
https://gitee.com/ShopeX/OMS
synced 2026-04-28 11:45:31 +08:00
54 lines
1.9 KiB
PHP
54 lines
1.9 KiB
PHP
<?php
|
|
/**
|
|
* Copyright 2012-2026 ShopeX (https://www.shopex.cn)
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
/**
|
|
* 销售单导出扩展收货人固定电话字段
|
|
* @author xiayuanjun@shopex.cn
|
|
* @version 1.0
|
|
*/
|
|
class sales_exportextracolumn_sales_shiptel extends sales_exportextracolumn_abstract implements sales_exportextracolumn_interface{
|
|
|
|
protected $__pkey = 'order_id';
|
|
|
|
protected $__extra_column = 'column_ship_tel';
|
|
|
|
/**
|
|
*
|
|
* 获取订单相关的优惠方案
|
|
* @param $ids
|
|
* @return array $tmp_array关联数据数组
|
|
*/
|
|
public function associatedData($ids){
|
|
//根据订单ids获取相应的优惠方案
|
|
$orderObj = app::get('ome')->model('orders');
|
|
$shiptel_lists = $orderObj->db->select('select ship_tel,'.$this->__pkey.' from sdb_ome_orders where order_id in ('.implode(',',$ids).')');
|
|
|
|
$tmp_array= array();
|
|
foreach($shiptel_lists as $k=>$row){
|
|
$tmp_array[$row[$this->__pkey]] = $row['ship_tel'];
|
|
}
|
|
unset($shiptel_lists);
|
|
$archive_ordObj = kernel::single('archive_interface_orders');
|
|
$archiveshiptel_lists = $archive_ordObj->getOrder_list(array('order_id'=>$ids),'order_id,ship_tel');
|
|
foreach($archiveshiptel_lists as $k=>$row){
|
|
$tmp_array[$row[$this->__pkey]] = $row['ship_tel'];
|
|
}
|
|
unset($archiveshiptel_lists);
|
|
return $tmp_array;
|
|
}
|
|
|
|
} |