|
123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
-
- //Author:fuhc
- //Date:20160908
- //供应商
-
- require_once __DIR__.'/../HotelLib.php';
-
- class SupplierAction extends HotelLib{
-
- //得到酒店的供应商列表
- function getHotelSupplierList(){
- $sql="select DISTINCT b.supplier_id,a.supplier_name from base_supplier a,base_supplier_purchase b where a.id=b.supplier_id and b.product_type = 25 and a.cancel_flag=0 and b.cancel_flag=0
- order BY FN_GET_PY_FIRST_LETTER(SUBSTR(a.supplier_name,1,4))";
- $data=array();
- $rowset=$this->DBTool->queryBySql($sql);
- $data['code']=$rowset['code'];
- $data['info']=$rowset['info'];
- $data['supplier_list']=$rowset['rowset'];
- return $data;
- }
- //根据供应商的到采购人
- function getPurchaseNameBySupplier($supplier_id){
- $data=ifNullParam(array($supplier_id));
- $data['purchase_people_list']=array();
- if($data['code']!="0"){
- return $data;
- }
- $sql="select id as purchaser_id,purchaser_name from base_supplier_purchase
- where supplier_id={$supplier_id} and product_type=25 and cancel_flag=0";
- $data=array();
- $rowset=$this->DBTool->queryBySql($sql);
- $data['code']=$rowset['code'];
- $data['info']=$rowset['info'];
- $data['purchase_people_list']=$rowset['rowset'];
- return $data;
- }
-
- }
|