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


PHP get_emp_no函数代码示例

本文整理汇总了PHP中get_emp_no函数的典型用法代码示例。如果您正苦于以下问题:PHP get_emp_no函数的具体用法?PHP get_emp_no怎么用?PHP get_emp_no使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: _before_update

 function _before_update(&$data, $options)
 {
     $old_data = M("Crm")->find($data['id']);
     $diff = array_diff_assoc($data, $old_data);
     $diff = array_keys($diff);
     $desc = array('name' => '姓名', 'mobile_tel' => '手机', 'district' => '小区', 'need' => '客户需求', 'source' => '客户来源', 'age' => '年龄', 'work' => '职业');
     if (!empty($diff)) {
         foreach ($diff as $val) {
             $model->need = implode(",", $model->need);
             if (is_array($data[$val])) {
                 $new = implode(",", $data[$val]);
             } else {
                 $new = $data[$val];
             }
             $comment .= $desc[$val] . ":" . $old_data[$val] . "->" . $new . " ;  ";
         }
         $model = D("CrmLog");
         $log['user_id'] = get_user_id();
         $log['user_name'] = get_user_name();
         $log['create_time'] = time();
         $log['crm_id'] = $data['id'];
         $log['emp_no'] = get_emp_no();
         $log['comment'] = $comment;
         $model->add($log);
     }
 }
开发者ID:zqstudio2015,项目名称:smeoa,代码行数:26,代码来源:CrmModel.class.php

示例2: folder

 function folder()
 {
     $widget['date'] = true;
     $this->assign("widget", $widget);
     $folder = $_REQUEST['fid'];
     $this->assign("folder", $folder);
     if (empty($folder)) {
         $this->error("系统错误");
     }
     $emp_no = get_emp_no();
     $user_id = get_user_id();
     $map = $this->_search();
     if (method_exists($this, '_search_filter')) {
         $this->_search_filter($map);
     }
     $model = D("ProductView");
     $this->assign("auth", $this->config['auth']);
     $where = array();
     $where['id'] = array('eq', $folder);
     $folder_name = M("SystemFolder")->where($where)->getField("name");
     $this->assign("folder_name", $folder_name);
     $this->_list($model, $map);
     $this->_assign_folder_list();
     $this->display();
 }
开发者ID:hongweipeng,项目名称:oa,代码行数:25,代码来源:ProductAction.class.php

示例3: index

 public function index()
 {
     header("Content-Type:text/html; charset=utf-8");
     $widget['jquery-ui'] = true;
     $this->assign("widget", $widget);
     $config = D("UserConfig")->get_config();
     $this->assign("home_sort", $config['home_sort']);
     $flow_type = M("flow_type");
     $data['tag'] = 88;
     $flowlist = $flow_type->where($data)->select();
     $this->assign("flowlist", $flowlist);
     $flow = M("flow");
     //追踪流程
     $this->show = $flow->where('user_id ="' . (int) get_user_id() . '" AND (type=69 or type=70 or type=71 or type=72 or type=73)')->limit(50)->select();
     //已审批
     $this->show1 = $flow->where('user_id ="' . (int) get_user_id() . '" AND (type=69 or type=70 or type=71 or type=72 or type=73) AND step=40')->limit(50)->select();
     //待审批的列表
     $user_id = get_user_id();
     $emp_no = get_emp_no();
     $FlowLog = M("FlowLog");
     $model = D('Flow');
     $where['emp_no'] = $emp_no;
     $where['result'] = 3;
     $log_list = $FlowLog->where($where)->getField('flow_id id,flow_id');
     //	dump($where);
     $map['id'] = array('in', $log_list);
     $map['type'] = array('in', '69,70,71,72,73');
     $todo_flow_list = $model->where($map)->limit(50)->order("create_time desc")->select();
     $this->assign("todo_flow_list", $todo_flow_list);
     $this->display();
 }
开发者ID:2ger,项目名称:trunk,代码行数:31,代码来源:GzshenpiAction.class.php

示例4: _search_filter

 function _search_filter(&$map)
 {
     if ($this->config['auth']['admin'] == false) {
         $map['emp_no'] = array('eq', get_emp_no());
     }
     if (!empty($_POST['keyword'])) {
         $map['B|C'] = array('like', "%" . $_POST['keyword'] . "%");
     }
 }
开发者ID:hongweipeng,项目名称:oa,代码行数:9,代码来源:UdfSalaryAction.class.php

示例5: _search_filter

 function _search_filter(&$map)
 {
     if ($this->config['auth']['admin'] == false) {
         $map['emp_no'] = array('eq', get_emp_no());
     }
     if (!empty($_POST['keyword'])) {
         //$map['B|C'] = array('like', "%" . $_POST['keyword'] . "%");
         $keyword = $_POST['keyword'];
         $where['B'] = array('like', "%" . $keyword . "%");
         $where['C'] = array('like', "%" . $keyword . "%");
         $where['_logic'] = 'or';
         $map['_complex'] = $where;
     }
 }
开发者ID:TipTimesPHP,项目名称:tyj_oa,代码行数:14,代码来源:UdfExpenseAction.class.php

示例6: index

 public function index()
 {
     $widget['jquery-ui'] = true;
     $this->assign("widget", $widget);
     $uid = get_user_id();
     $deptid = get_dept_id();
     $username = get_user_name();
     // 通用流程
     $this->flow = M('flow')->where('type = 96 and (user_id=' . $uid . ' or confirm like "%' . $deptid . '%" or confirm like "%' . $uid . '%")')->select();
     //通用任务
     $this->task = M('task')->where('type = "chengguo" and (user_id=' . $uid . ' or executor like "%' . $username . '%")')->select();
     //申报加分
     $this->shenbao = M('flow')->where('type = 44 and user_id=' . $uid)->select();
     $config = D("UserConfig")->get_config();
     $this->assign("home_sort", $config['home_sort']);
     $flow = M('flow')->select();
     $emp_no = get_emp_no();
     $uid = get_user_id();
     //订教材  流程图
     $flow = M('task')->where('name = "科研成果"')->select();
     if (!empty($flow)) {
         //dump($flow);
         $this->isfa = 1;
         //第一步
         $this->taskId = $flow[0]['id'];
         $taskFrom = $flow[0]['user_id'];
         //发起人id
         $taskId = $flow[0]['id'];
         //dump($taskId);
         $taskStatus = M('task_log')->where('task_id = "' . $taskId . '" and executor =' . $uid)->find();
         dump($uid);
         if ($taskStatus['status'] == 4 or $taskFrom == $taskStatus['assigner']) {
             $this->iszhuan = 1;
             //第二步, 已转交 OR 发起人!=分配人 说明任务已被转交
         }
         if ($taskStatus['status'] == 3) {
             $this->iszhuan = 1;
             //第二步
             $this->iswan = 1;
             //第三步, 完成
         }
     }
     $this->display();
 }
开发者ID:2ger,项目名称:trunk,代码行数:44,代码来源:ChengguoAction.class.php

示例7: _flow_list

 protected function _flow_list()
 {
     $user_id = get_user_id();
     $emp_no = get_emp_no();
     $model = D('Flow');
     //带审批的列表
     $FlowLog = M("FlowLog");
     $where['emp_no'] = $emp_no;
     $where['_string'] = "result is null";
     $log_list = $FlowLog->where($where)->field('flow_id')->select();
     $log_list = rotate($log_list);
     if (!empty($log_list)) {
         $map['id'] = array('in', $log_list['flow_id']);
         $todo_flow_list = $model->where($map)->field("id,name,create_time")->limit(6)->order("create_time desc")->select();
         $this->assign("todo_flow_list", $todo_flow_list);
     }
     //已提交
     $map = array();
     $map['user_id'] = $user_id;
     $map['step'] = array('gt', 10);
     $submit_process_list = $model->where($map)->field("id,name,create_time")->limit(6)->order("create_time desc")->select();
     $this->assign("submit_flow_list", $submit_process_list);
 }
开发者ID:TipTimesPHP,项目名称:tyj_oa,代码行数:23,代码来源:HomeAction.class.php

示例8: edit

 function edit()
 {
     $widget['date'] = true;
     $widget['uploader'] = true;
     $widget['editor'] = true;
     $this->assign("widget", $widget);
     $folder = $_REQUEST['fid'];
     $this->assign("folder", $folder);
     if (empty($folder)) {
         $this->error("系统错误");
     }
     $this->_flow_auth_filter($folder, $map);
     $model = D("Flow");
     $id = $_REQUEST['id'];
     $where['id'] = array('eq', $id);
     $where['_logic'] = 'and';
     $map['_complex'] = $where;
     $vo = $model->where($map)->find();
     if (empty($vo)) {
         $this->error("系统错误");
     }
     $this->assign('vo', $vo);
     $model_flow_field = D("FlowField");
     $field_list = $model_flow_field->get_data_list($id);
     $this->assign("field_list", $field_list);
     $model = M("FlowType");
     $type = $vo['type'];
     $flow_type = $model->find($type);
     $this->assign("flow_type", $flow_type);
     $model = M("FlowLog");
     $where['flow_id'] = $id;
     $where['_string'] = "result is not null";
     $flow_log = $model->where($where)->select();
     $this->assign("flow_log", $flow_log);
     $where = array();
     $where['flow_id'] = $id;
     $where['emp_no'] = get_emp_no();
     $where['_string'] = "result is null";
     $confirm = $model->where($where)->select();
     $this->assign("confirm", $confirm[0]);
     $this->display();
 }
开发者ID:zqstudio2015,项目名称:smeoa,代码行数:42,代码来源:FlowAction.class.php

示例9: get_new_count

function get_new_count()
{
    $data = array();
    //获取待裁决
    $where = array();
    $FlowLog = M("WorkflowLog");
    $emp_no = get_emp_no();
    $where['emp_no'] = $emp_no;
    $where['_string'] = "result is null";
    $data['new_workflow_count'] = $FlowLog->where($where)->count();
    // 会议未读
    $user_id = get_user_id();
    $where = array();
    $where['user_id'] = $user_id;
    $where['is_del'] = array('eq', '0');
    $where['finish'] = array('elt', '0');
    $model = M("Meeting");
    $meeting_count = $model->where($where)->count();
    //    dump($meeting_count);die;
    $data['new_meeting_count'] = $meeting_count;
    // dump($data);
    //获取未读邮件
    $user_id = get_user_id();
    $where = array();
    $where['user_id'] = $user_id;
    $where['is_del'] = array('eq', '0');
    $where['folder'] = array(array('eq', 1), array('gt', 6), 'or');
    $where['read'] = array('eq', '0');
    $model = M("Mail");
    $new_mail_count = $model->where($where)->count();
    $data['new_mail_count'] = $new_mail_count;
    $data['new_mail_class'] = $new_mail_count == 0 ? '' : 'icon-animated-vertical';
    //获取待裁决
    $where = array();
    $FlowLog = M("FlowLog");
    $emp_no = get_emp_no();
    $where['emp_no'] = $emp_no;
    $where['_string'] = "result is null";
    $data['new_documentFlow_count'] = $FlowLog->where($where)->count();
    $data['new_documentFlow_class'] = $data['new_confirm_count'] == 0 ? '' : 'icon-animated-vertical';
    //获取最新通知,一个月以内未被阅读过的公告
    $model = D('Notice');
    $where = array();
    $where['is_del'] = array('eq', '0');
    $folder_list = D("SystemFolder")->get_authed_folder(get_user_id(), "NoticeFolder");
    $new_notice_count = 0;
    if ($folder_list) {
        $where['folder'] = array("in", $folder_list);
        $where['create_time'] = array('egt', time() - 3600 * 24 * 30);
        $new_notice_list = $model->where($where)->field('id')->select();
        $readed = get_user_config("readed_notice");
        if ($new_notice_list) {
            foreach ($new_notice_list as $key => $val) {
                if (!notice_readed($val['id'])) {
                    $new_notice_count++;
                }
            }
        }
    }
    $data['new_notice_count'] = $new_notice_count;
    $data['new_notice_class'] = $new_notice_count == 0 ? '' : 'icon-animated-bell';
    //获取待办事项
    $model = M("Todo");
    $where = array();
    $where['user_id'] = $user_id;
    $where['status'] = array("in", "1,2");
    $new_todo_count = M("Todo")->where($where)->count();
    $data['new_todo_count'] = $new_todo_count;
    //获取最新消息
    $model = M("Message");
    $where = array();
    $where['user_id'] = $user_id;
    $where['receiver_id'] = $user_id;
    $where['is_read'] = array('eq', '0');
    $new_message_count = M("Message")->where($where)->count();
    $data['new_message_count'] = $new_message_count;
    return $data;
}
开发者ID:TipTimesPHP,项目名称:tyj_oa,代码行数:78,代码来源:common.php

示例10: is_last_consult

 function is_last_consult($flow_id)
 {
     $consult = M("Flow")->where("id={$flow_id}")->getField("consult");
     if (empty($consult)) {
         return true;
     }
     $last_consult = array_filter(explode("|", $consult));
     $last_consult_emp_no = end($last_consult);
     if (strpos($last_consult_emp_no, get_emp_no()) !== false) {
         return true;
     }
     return false;
 }
开发者ID:zqstudio2015,项目名称:smeoa,代码行数:13,代码来源:FlowModel.class.php

示例11: _receive_file

 private function _receive_file($str, &$model)
 {
     if (!empty($str)) {
         $ar = array_filter(explode(",", $str));
         foreach ($ar as $key => $value) {
             $ar2 = explode("_", $value);
             $cid = $ar2[0];
             if (true) {
                 //if(strlen($cid)>10){
                 $inline = $ar2[1];
                 $file_name = $ar2[2];
                 $File = M("File");
                 $File->name = $file_name;
                 $File->user_id = $model->user_id;
                 $File->size = filesize($this->tmpPath . urlencode($value));
                 $File->extension = getExt($value);
                 $File->create_time = time();
                 $sid = get_sid();
                 $File->sid = $sid;
                 $File->module = MODULE_NAME;
                 $dir = 'mail/' . get_emp_no() . "/" . date("Ym");
                 $File->savename = $dir . '/' . uniqid() . '.' . $File->extension;
                 $save_name = $File->savename;
                 if (!is_dir(get_save_path() . $dir)) {
                     mkdir(get_save_path() . $dir, 0777, true);
                     chmod(get_save_path() . $dir, 0777);
                 }
                 if (!is_dir($this->tmpPath . $dir)) {
                     mkdir($this->tmpPath . $dir, 0777, true);
                     chmod($this->tmpPath . $dir, 0777);
                 }
                 if (rename($this->tmpPath . urlencode($value), get_save_path() . $save_name)) {
                     $file_id = $File->add();
                     if ($inline == "INLINE") {
                         $model->content = str_replace("cid:" . $cid, "/" . get_save_path() . $save_name, $model->content);
                     } else {
                         $add_file = $add_file . $sid . ';';
                     }
                 }
             }
         }
         return $add_file;
     }
 }
开发者ID:zqstudio2015,项目名称:smeoa,代码行数:44,代码来源:MailAction.class.php

示例12: reject

 public function reject()
 {
     $model = D("CrmLog");
     if (false === $model->create()) {
         $this->error($model->getError());
     }
     $crm_id = $model->crm_id;
     $model->emp_no = get_emp_no();
     //保存当前数据对象
     $list = $model->add();
     if ($list !== false) {
         //保存成功
         M("Crm")->where("id={$crm_id}")->setField('status', 2);
         $this->assign('jumpUrl', U('crm/review'));
         $this->success('操作成功!');
     } else {
         //失败提示
         $this->error('操作失败!');
     }
 }
开发者ID:2ger,项目名称:trunk,代码行数:20,代码来源:CrmAction.class.php

示例13: edit

 function edit()
 {
     $widget['uploader'] = true;
     $widget['editor'] = true;
     $this->assign("widget", $widget);
     $info = M("FlowDocSys")->where("id=1")->find();
     $config = $info;
     if (preg_match("/\\{.*?\\}/is", $info['doc_type'])) {
         $config['doc_type'] = json_decode($info['doc_type'], true);
     }
     if (preg_match("/{.*?\\}/is", $info['doc_level'])) {
         $config['doc_level'] = json_decode($info['doc_level'], true);
     }
     if (preg_match("/\\{.*?\\}/is", $info['doc_acute'])) {
         $config['doc_acute'] = json_decode($info['doc_acute'], true);
     }
     $model = D("Flow");
     $id = $_REQUEST['id'];
     $vo = $model->getById($id);
     $this->assign('vo', $vo);
     $this->assign("config", $config);
     if (in_array('add_file', $model->getDbFields())) {
         $this->_assign_file_list($vo["add_file"]);
     }
     $model = M("FlowType");
     $type = $vo['type'];
     $flow_type = $model->find($type);
     $this->assign("flow_type", $flow_type);
     $model = M("FlowLog");
     $where['flow_id'] = $id;
     $where['_string'] = "result is not null";
     $flow_log = $model->where($where)->select();
     $this->assign("flow_log", $flow_log);
     trace($flow_log);
     $where = array();
     $where['flow_id'] = $id;
     $where['emp_no'] = get_emp_no();
     $where['_string'] = "result is null";
     $confirm = $model->where($where)->select();
     $this->assign("confirm", $confirm[0]);
     $this->display();
 }
开发者ID:TipTimesPHP,项目名称:tyj_oa_cp,代码行数:42,代码来源:FlowAction.class.php

示例14: index

 public function index()
 {
     cookie("current_node", 354);
     // cookie("top_menu", 255);
     // 	   	cookie("top_menu2", 255);
     if (!empty($_GET['id'])) {
         $uid = $_GET['id'];
     } else {
         $uid = get_user_id();
     }
     $this->userlist = M('user')->find($uid);
     $emp_no = $this->userlist['emp_no'];
     $userName = $this->userlist['name'];
     $position_id = $this->userlist['position_id'];
     if ($position_id == 16) {
         $where['user'] = "教研室主任";
     } else {
         $where['user'] = $userName;
     }
     if ($position_id == 14) {
         $where['_string'] = "id >38 and step1_position = " . $position_id;
         $where['_logic'] = 'OR';
     }
     $this->leftMenu = M('task_type')->where($where)->select();
     $sy = "SELECT *FROM onethink_document_syllabus GROUP BY course ";
     $member = M()->query($sy);
     $this->assign('member', $member);
     $teacher = M('user')->select();
     $this->assign('teacher', $teacher);
     $task = M('task');
     $taskgt = $task->where(' executor like "%' . get_user_name() . '%"')->order('id desc')->select();
     $this->assign('taskgt', $taskgt);
     $widget['jquery-ui'] = true;
     $this->assign("widget", $widget);
     //dump($uid);
     //die();
     $config = D("UserConfig")->get_config();
     $this->assign("home_sort", $config['home_sort']);
     $flow = M('flow');
     $flow_log = M('flow_log');
     $this->data01 = $flow->where('user_id ="' . $uid . '" and (type=38)')->limit(1)->select();
     $this->data02 = $flow->where('user_id ="' . $uid . '" and (type=50)')->limit(1)->select();
     $this->data03 = $flow->where('user_id ="' . $uid . '" and (type=53)')->limit(1)->select();
     $this->data04 = $flow->where('user_id ="' . $uid . '" and (type=55)')->limit(1)->select();
     $this->data05 = $flow->where('user_id ="' . $uid . '" and type=68')->limit(1)->select();
     // and jiaoan =""
     $this->data06 = $flow->where('user_id ="' . $uid . '" and (type=77)')->limit(1)->select();
     $this->data11 = $flow->where('user_id ="' . $uid . '" and (type=79)')->limit(1)->select();
     $this->data12 = $flow->where('user_id ="' . $uid . '" and (type=80)')->limit(1)->select();
     $this->data13 = $flow->where('user_id ="' . $uid . '" and (type=81)')->limit(1)->select();
     $this->data14 = $flow->where('user_id ="' . $uid . '" and (type=82)')->limit(1)->select();
     $this->data15 = $flow->where('user_id ="' . $uid . '" and (type=85)')->limit(1)->select();
     $this->data16 = $flow->where('user_id ="' . $uid . '" and (type=89)')->limit(1)->select();
     $this->yichang = M('schedule')->where('user_id ="' . $uid . '" and priority = 5')->limit(6)->select();
     //待办任务
     $task = M('task');
     $wherelog['executor'] = $uid;
     $wherelog['status'] = array('in', '0,1');
     $task_ids = M('task_log')->where($wherelog)->getField("task_id id,task_id");
     $where['id'] = array('in', $task_ids);
     $this->fabu = $task->where($where)->order('id desc')->limit(50)->select();
     //完成任务
     $where_log['executor|assigner|transactor'] = $uid;
     $where_log['status'] = array("in", "3,4");
     $task_ids2 = M('task_log')->where($where_log)->getField("task_id id,task_id");
     $where2['id'] = array('in', $task_ids2);
     $this->jieshou = $task->where($where2)->order('id desc')->limit(50)->select();
     //待审批的列表
     $model = D('Flow');
     $FlowLog = M("FlowLog");
     $model = D('Flow');
     $where['result'] = 3;
     $where['emp_no'] = $emp_no;
     $log_list = $FlowLog->where($where)->getField('flow_id id,flow_id');
     $map['id'] = array('in', $log_list);
     $todo_flow_list = $model->where($map)->limit(6)->order("create_time desc")->select();
     $this->assign("faqi", $todo_flow_list);
     $this->shenpi = $flow->where('(confirm like "%' . get_emp_no() . '%" or user_id ="' . $uid . '") AND step=40 ')->order('id desc')->limit('50')->select();
     //dump($jieshou);
     //die();
     $this->display();
 }
开发者ID:2ger,项目名称:trunk,代码行数:82,代码来源:GrzhongxinAction.class.php

示例15: get_new_count

function get_new_count()
{
    $emp_no = get_emp_no();
    //获取未读邮件
    $data = array();
    $user_id = get_user_id();
    $where['user_id'] = $user_id;
    $where['is_del'] = array('eq', '0');
    $where['folder'] = array('eq', 1);
    $where['read'] = array('eq', '0');
    $new_mail_inbox = M("Mail")->where($where)->count();
    $data['bc-mail']['bc-mail-inbox'] = $new_mail_inbox;
    //获取未读邮件
    $where['user_id'] = $user_id;
    $where['is_del'] = array('eq', '0');
    $where['folder'] = array('gt', 6);
    $where['read'] = array('eq', '0');
    $new_mail_myfolder = M("Mail")->where($where)->count();
    $data['bc-mail']['bc-mail-myfolder'] = $new_mail_myfolder;
    //获取待裁决
    $where = array();
    $FlowLog = M("FlowLog");
    $where['emp_no'] = $emp_no;
    $where['_string'] = "result is null";
    $log_list = $FlowLog->where($where)->field('flow_id')->select();
    $log_list = rotate($log_list);
    $new_confirm_count = 0;
    if (!empty($log_list)) {
        $map['id'] = array('in', $log_list['flow_id']);
        $new_confirm_count = M("Flow")->where($map)->count();
    }
    $data['bc-flow']['bc-flow-confirm'] = $new_confirm_count;
    //获取收到的流程
    $where = array();
    $where['emp_no'] = $emp_no;
    $where['step'] = 100;
    $where['is_read'] = 1;
    $log_list = M("FlowLog")->where($where)->field('flow_id')->select();
    $log_list = rotate($log_list);
    $new_receive_count = 0;
    if (!empty($log_list)) {
        $map['id'] = array('in', $log_list['flow_id']);
        $new_receive_count = M("Flow")->where($map)->count();
    }
    $data['bc-flow']['bc-flow-receive'] = $new_receive_count;
    //获取最新通知
    $where = array();
    $where['is_del'] = array('eq', '0');
    $folder_list = D("SystemFolder")->get_authed_folder(get_user_id(), "NoticeFolder");
    $where['folder'] = array('in', $folder_list);
    $where['create_time'] = array("egt", time() - 3600 * 24 * 30);
    $readed = array_filter(explode(",", get_user_config("readed_notice")));
    $where['id'] = array("not in", $readed);
    $new_notice_count = M('Notice')->where($where)->count();
    $data['bc-notice']['bc-notice-new'] = $new_notice_count;
    //获取待办事项
    $where = array();
    $where['user_id'] = $user_id;
    $where['status'] = array("in", "1,2");
    $new_todo_count = M("Todo")->where($where)->count();
    $data['bc-personal']['bc-personal-todo'] = $new_todo_count;
    //获取日程事项
    $where = array();
    $where['user_id'] = $user_id;
    $where['start_date'] = array("elt", date("Y-m-d"));
    $where['end_date'] = array("egt", date("Y-m-d"));
    $new_schedule_count = M("Schedule")->where($where)->count();
    $data['bc-personal']['bc-personal-schedule'] = $new_schedule_count;
    //获取最新消息
    $model = M("Message");
    $where = array();
    $where['owner_id'] = $user_id;
    $where['receiver_id'] = $user_id;
    $where['is_read'] = array('eq', '0');
    $new_message_count = M("Message")->where($where)->count();
    $data['bc-message']['bc-message-new'] = $new_message_count;
    //等我接受的任务
    $where = array();
    $where_log['type'] = 1;
    $where_log['status'] = 0;
    $where_log['executor'] = get_user_id();
    $task_list = M("TaskLog")->where($where_log)->getField('task_id id,task_id');
    $where['id'] = array('in', $task_list);
    $task_todo_count = M("Task")->where($where)->count();
    $data['bc-task']['task_todo_count'] = $task_todo_count;
    //我部门任务
    $where = array();
    $auth = D("Role")->get_auth("Task");
    if ($auth['admin']) {
        $where_log['type'] = 2;
        $where_log['executor'] = get_dept_id();
        $task_list = M("TaskLog")->where($where_log)->getField('task_id id,task_id');
        $where['id'] = array('in', $task_list);
    } else {
        $where['_string'] = '1=2';
    }
    $task_dept_count = M("Task")->where($where)->count();
    $data['bc-task']['task_dept_count'] = $task_dept_count;
    return $data;
}
开发者ID:hongweipeng,项目名称:oa,代码行数:100,代码来源:common.php


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