本文整理汇总了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;
}
示例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;
}