当前位置: 首页>>代码示例>>PHP>>正文


PHP CService::loadIds方法代码示例

本文整理汇总了PHP中CService::loadIds方法的典型用法代码示例。如果您正苦于以下问题:PHP CService::loadIds方法的具体用法?PHP CService::loadIds怎么用?PHP CService::loadIds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CService的用法示例。


在下文中一共展示了CService::loadIds方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 // Input //////////////////
 $where = array("product.product_id" => "= '{$product->_id}'", "product_order_item_reception.date" => "BETWEEN '{$date}' AND '{$to}'");
 $ljoin = array("product_order_item" => "product_order_item.order_item_id = product_order_item_reception.order_item_id", "product_reference" => "product_reference.reference_id = product_order_item.reference_id", "product" => "product.product_id = product_reference.product_id");
 $lot = new CProductOrderItemReception();
 /** @var CProductOrderItemReception[] $lots */
 $lots = $lot->loadList($where, null, null, null, $ljoin);
 $total = 0;
 foreach ($lots as $_lot) {
     $total += $_lot->quantity;
 }
 $max = max($max, $total);
 $series[0]["data"][] = array(count($series[0]["data"]) * 2 - 0.6, $total);
 // Hack pour les etablissements qui ont un service "Périmés"
 $where_services = array("nom" => "= 'Périmés'");
 $services_expired = new CService();
 $services_expired_ids = $services_expired->loadIds($where_services);
 // Output //////////////////
 $where = array("product_delivery.stock_class" => "= 'CProductStockGroup'", "product_delivery.stock_id" => "= '{$product->_ref_stock_group->_id}'", "product_delivery_trace.date_delivery" => "BETWEEN '{$date}' AND '{$to}'");
 if (count($services_expired_ids)) {
     $where[100] = "(product_delivery.type != 'expired' OR product_delivery.type IS NULL)\r\n                   AND product_delivery.service_id NOT IN (" . implode(',', $services_expired_ids) . ")";
 } else {
     $where[100] = "product_delivery.type != 'expired' OR product_delivery.type IS NULL";
 }
 $ljoin = array("product_delivery" => "product_delivery.delivery_id = product_delivery_trace.delivery_id");
 $trace = new CProductDeliveryTrace();
 /** @var CProductDeliveryTrace $traces */
 $traces = $trace->loadList($where, null, null, null, $ljoin);
 $total = 0;
 foreach ($traces as $_trace) {
     $total += $_trace->quantity;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:httpreq_vw_product_consumption_graph.php

示例2: getOtherRequestSejour

 /**
  * Get others PV1 QPD element
  *
  * @param DOMNode $node QPD element
  *
  * @return array
  */
 function getOtherRequestSejour(DOMNode $node)
 {
     // Recherche du service
     $service = new CService();
     $ds = $service->getDS();
     $where_returns = array();
     if ($service_name = $this->getDemographicsFields($node, "CSejour", "3.1")) {
         $service_name = preg_replace("/\\*+/", "%", $service_name);
         $where["code"] = $ds->prepare("LIKE %", $service_name);
         $ids = array_unique($service->loadIds($where, null, 100));
         // FIXME prendre les affectations en compte
         $where_returns["sejour.service_id"] = $ds->prepareIn($ids);
     }
     // Praticien
     if (($attending_doctor_name = $this->getDemographicsFields($node, "CSejour", "7.2.1")) || ($attending_doctor_name = $this->getDemographicsFields($node, "CSejour", "17.2.1"))) {
         $user = new CUser();
         $attending_doctor_name = preg_replace("/\\*+/", "%", $attending_doctor_name);
         $where["user_last_name"] = $ds->prepare("LIKE %", $attending_doctor_name);
         $ids = array_unique($user->loadIds($where, null, 100));
         $where_returns["sejour.praticien_id"] = $ds->prepareIn($ids);
     }
     // Médecin adressant
     if ($referring_doctor_name = $this->getDemographicsFields($node, "CSejour", "8.2.1")) {
         $medecin = new CMedecin();
         $referring_doctor_name = preg_replace("/\\*+/", "%", $referring_doctor_name);
         $where["nom"] = $ds->prepare("LIKE %", $referring_doctor_name);
         $ids = array_unique($medecin->loadIds($where, null, 100));
         $where_returns["sejour.adresse_par_prat_id"] = $ds->prepareIn($ids);
     }
     return $where_returns;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:38,代码来源:CHL7v2GeneratePatientDemographicsResponse.class.php


注:本文中的CService::loadIds方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。