Ejemplo n.º 1
0
 public function doWebScreen()
 {
     global $_W;
     $last = memcached_get('callnum');
     $calls = explode(',', $last);
     $callnum = sprintf('%03d', $calls[0]);
     $list = biz_getCalledGroup($_W['project']['id']);
     $groupnum = array_keys($list);
     $groupnum = array_reverse($groupnum);
     $json = json_encode($groupnum);
     include $this->template('screen');
 }
Ejemplo n.º 2
0
<?php

$project = $_W['project'];
$groups = biz_getWillCallGroup($project['id']);
$signset = biz_unserializer($project, 'signset');
if (empty($signset)) {
    message('未配置叫号相关选项!');
}
$maxselect = $signset['max'];
if (checksubmit()) {
    if (isset($_GPC['callnum'])) {
        $callnum = explode(',', $_GPC['callnum']);
    }
    $keys = array_keys($groups);
    if (empty($callnum)) {
        $callnum[] = $keys[0];
    }
    foreach ($callnum as $num) {
        biz_callSignGroup($num, $_W['pid']);
    }
    memcached_set('callnum', implode(',', $callnum));
    $groups = biz_getWillCallGroup($_W['pid']);
}
$last = memcached_get('callnum');
$called = biz_getCalledGroup($_W['pid']);
include $this->template('queuing_list');
Ejemplo n.º 3
0
 if (empty($keyword)) {
     message('请输入有效的认筹单号!', $this->createWebUrl($do), 'warning');
 }
 $chips = biz_getChipsByQrcode($keyword);
 if (empty($chips)) {
     message('无效的认筹单!', $this->createWebUrl($do), 'error');
 }
 $url = $this->createWebUrl($do, array('op' => 'disp', 'qrcode' => $keyword));
 $ok = empty($chips['lucky']);
 if ($ok) {
     //未中签处理,1、未签处理,2已签到,未叫号、已叫号
     if (empty($chips['signed'])) {
         $message = '此单未签到、未中签,是否确认中签?';
         $ok = false;
     } else {
         $callGroup = biz_getCalledGroup($_W['project']['id']);
         if (in_array($chips['signed'], array_keys($callGroup))) {
             $message = "此单号签到组号{$chips['signed']}组,中签登记成功";
         } else {
             $message = "此单号签到组号{$chips['signed']}组、未中签<br/>是否确认中签?";
             $ok = false;
         }
     }
 } else {
     $message = '此单已中签,不能重复登记!';
 }
 if ($_W['isajax']) {
     include $this->template('lucky_info');
     exit;
 }
 if ($_W['token'] == $_GPC['token']) {
Ejemplo n.º 4
0
function biz_getCalledGroupNum($project)
{
    $key = 'call_' . $project['projguid'];
    $callback = function () use($project) {
        $groups = biz_getCalledGroup($project['id']);
        return array_keys($groups);
    };
    return cache_GetData($key, $callback, 5);
}