• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_dept_id函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: 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 = 98 and (user_id=' . $uid . ' or confirm like "%' . $deptid . '%" or confirm like "%' . $uid . '%")')->select();
     //通用任务
     $this->task = M('task')->where('type = "lunwen" and (user_id=' . $uid . ' or executor like "%' . $username . '%")')->select();
     //申报加分
     $this->shenbao = M('flow')->where('type = 46 and user_id=' . $uid)->select();
     $config = D("UserConfig")->get_config();
     $this->assign("home_sort", $config['home_sort']);
     $this->display();
 }
开发者ID:2ger,项目名称:trunk,代码行数:17,代码来源:LunwenAction.class.php


示例2: index

 public function index()
 {
     $widget['jquery-ui'] = true;
     $this->assign("widget", $widget);
     $uid = get_user_id();
     $deptid = get_dept_id();
     $username = get_user_name();
     // 完成
     $where['type'] = array('in', '102,110,111,112,113,114,115,116,117');
     $where['step'] = array('egt', '40');
     $this->flow = M('flow')->where($where)->order('id desc')->select();
     //待办
     $where2['type'] = array('in', '102,110,111,112,113,114,115,116,117');
     $where2['step'] = array('lt', '40');
     $this->todo = M('flow')->where($where2)->order('id desc')->select();
     $this->display();
 }
开发者ID:2ger,项目名称:trunk,代码行数:17,代码来源:ChangguanglAction.class.php


示例3: 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


示例4: log

 public function log()
 {
     $widget['jquery-ui'] = true;
     $this->assign("widget", $widget);
     $uid = get_user_id();
     $deptid = get_dept_id();
     $username = get_user_name();
     //未开
     $tasks1 = M('task_log')->where('task_type=103 and status <3 and step =1')->getField('task_id id', 'task_id');
     $where['id'] = array('in', $tasks1);
     $this->task = M('task')->where($where)->order("id desc")->limit(50)->select();
     //已开
     $tasks = M('task_log')->where('task_type=103 and status =3 and step =2')->getField('task_id id', 'task_id');
     $where_done['id'] = array('in', $tasks);
     $this->task_done = M('task')->where($where_done)->limit(50)->select();
     $config = D("UserConfig")->get_config();
     $this->assign("home_sort", $config['home_sort']);
     $this->display();
 }
开发者ID:2ger,项目名称:trunk,代码行数:19,代码来源:HuiyiAction.class.php


示例5: index

 public function index()
 {
     $widget['jquery-ui'] = true;
     $this->assign("widget", $widget);
     $uid = get_user_id();
     $deptid = get_dept_id();
     $username = get_user_name();
     // 流程提交记录
     $where['type'] = array("in", "104,105,106,107,108,109");
     $this->flow = M('flow')->where($where)->select();
     //	$this->flow=M('flow')->where('type = 92 and (user_id='.$uid.' or confirm like "%'.$deptid.'%" or confirm like "%'.$uid.'%")')->select();
     //通用任务
     $this->task = M('task')->where('type = "shiyanshi" and (user_id=' . $uid . ' or executor like "%' . $username . '%")')->select();
     //申报加分
     $this->shenbao = M('flow')->where('type = 40')->select();
     // and user_id='.$uid
     $config = D("UserConfig")->get_config();
     $this->assign("home_sort", $config['home_sort']);
     $this->display();
 }
开发者ID:2ger,项目名称:trunk,代码行数:20,代码来源:ShiyanshiAction.class.php


示例6: _update

 /** 插入新新数据  **/
 protected function _update()
 {
     $model = D("MonthlyReport");
     if (false === $model->create()) {
         $this->error($model->getError());
     }
     if (in_array('user_id', $model->getDbFields())) {
         $model->user_id = get_user_id();
     }
     if (in_array('user_name', $model->getDbFields())) {
         $model->user_name = get_user_name();
     }
     if (in_array('dept_id', $model->getDbFields())) {
         $model->dept_id = get_dept_id();
     }
     if (in_array('dept_name', $model->getDbFields())) {
         $model->dept_name = get_dept_name();
     }
     $model->create_time = time();
     /*保存当前数据对象 */
     $list = $model->save();
     if ($list !== false) {
         //保存成功
         $this->assign('jumpUrl', get_return_url());
         $this->success('保存成功!');
     } else {
         $this->error('保存失败!');
         //失败提示
     }
 }
开发者ID:zqstudio2015,项目名称:smeoa,代码行数:31,代码来源:MonthlyReportAction.class.php


示例7: addLog

 /**
  * 添加日志
  * @param int $uid
  * @param string $content 今日总结
  * @param string $plan 计划
  * @param string $feedback 问题反馈
  * @param int $time
  * @param int $type 1为安卓 2为ios
  */
 public function addLog()
 {
     $uid = UID;
     // $uid=$_REQUEST['uid'];
     $content = $_REQUEST['content'];
     // $plan=$_REQUEST['plan'];
     // $feedback=$_REQUEST['feedback'];
     $time = NOW_TIME;
     $type = $_REQUEST['type'] ? $_REQUEST['type'] : 1;
     //		if($type!=1){
     //			$content=base64_decode($content);
     //			$plan=base64_decode($plan);
     //			$feedback=base64_decode($feedback);
     //		}
     $model = D('work_log');
     $data = array('user_id' => $uid, 'user_name' => get_user_name(), 'dept_id' => get_dept_id(), 'dept_name' => get_dept_name(), 'create_time' => time(), 'content' => $content ? $content : '', 'start_date' => date('Y-m-d', $time), 'end_date' => date('Y-m-d', $time));
     $res = $model->add($data);
     if ($res) {
         $this->result('1', '添加成功!');
     } else {
         $this->result('0', '未知错误!');
     }
 }
开发者ID:TipTimesPHP,项目名称:tyj_oa,代码行数:32,代码来源:MobilePhoneLogAction.class.php


示例8: _conv_auditor

 function _conv_auditor($val)
 {
     $arr_auditor = array_filter(explode("|", $val));
     $str_auditor;
     foreach ($arr_auditor as $auditor) {
         if (strpos($auditor, "dgp") !== false) {
             $temp = explode("_", $auditor);
             $dept_grade = $temp[1];
             $position = $temp[2];
             $dept_id = $this->_get_dept(get_dept_id(), $dept_grade);
             $model = M("User");
             $where = array();
             $where['dept_id'] = $dept_id;
             $where['position_id'] = $position;
             $where['is_del'] = 0;
             $emp_list = $model->where($where)->select();
             $emp_list = rotate($emp_list);
             if (!empty($emp_list)) {
                 $str_auditor .= implode(",", $emp_list['emp_no']) . "|";
             }
         }
         if (strpos($auditor, "dp") !== false) {
             $temp = explode("_", $auditor);
             $dept = $temp[1];
             $position = $temp[2];
             $model = M("User");
             $where = array();
             $where['dept_id'] = $dept;
             $where['position_id'] = $position;
             $where['is_del'] = 0;
             $emp_list = $model->where($where)->select();
             $emp_list = rotate($emp_list);
             if (!empty($emp_list)) {
                 $str_auditor .= implode(",", $emp_list['emp_no']) . "|";
             }
         }
         if (strpos($auditor, "dept") !== false) {
             $temp = explode("_", $auditor);
             $dept = $temp[1];
             $model = M("User");
             $where = array();
             $where['dept_id'] = $dept;
             $where['is_del'] = 0;
             $emp_list = $model->where($where)->select();
             $emp_list = rotate($emp_list);
             if (!empty($emp_list)) {
                 $str_auditor .= implode(",", $emp_list['emp_no']) . "|";
             }
         }
         if (strpos($auditor, "emp") !== false) {
             $temp = explode("_", $auditor);
             $emp = $temp[1];
             $str_auditor .= $emp . "|";
         }
         if (strpos($val, "_") == false) {
             $str_auditor .= $val . "|";
         }
     }
     return $str_auditor;
 }
开发者ID:zqstudio2015,项目名称:smeoa,代码行数:60,代码来源:FlowModel.class.php


示例9: _task_list

 protected function _task_list()
 {
     //等我接受的任务
     $model = M("Task");
     $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_list = $model->where($where)->order("create_time desc")->limit(6)->select();
     //dump($task_todo_list);
     $this->assign("task_todo_list", $task_todo_list);
     //我部门任务
     $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_list = $model->where($where)->order("create_time desc")->limit(6)->select();
     $this->assign("task_dept_list", $task_dept_list);
 }
开发者ID:2ger,项目名称:trunk,代码行数:27,代码来源:HomeAction.class.php


示例10: _conv_confirm

 function _conv_confirm($key, $val)
 {
     $arr_confirm = array_filter(explode("|", $val));
     $str_confirm = null;
     foreach ($arr_confirm as $confirm) {
         if (strpos($confirm, "dgp") !== false) {
             $temp = explode("_", $confirm);
             $dept_grade = $temp[1];
             $position = $temp[2];
             $dept_id = $this->_get_dept(get_dept_id(), $dept_grade);
             $model = M("User");
             $where = array();
             $where['dept_id'] = $dept_id;
             $where['position_id'] = $position;
             $where['is_del'] = 0;
             $emp_list = $model->where($where)->select();
             //dump($emp_list);
             $emp_list = rotate($emp_list);
             if (!empty($emp_list)) {
                 $str_confirm .= implode(",", $emp_list['emp_no']) . "|";
             }
         }
         if (strpos($confirm, "dp") !== false) {
             $temp = explode("_", $confirm);
             $dept = $temp[1];
             $position = $temp[2];
             $model = M("User");
             $where = array();
             $where['dept_id'] = $dept;
             $where['position_id'] = $position;
             $where['is_del'] = 0;
             $emp_list = $model->where($where)->select();
             //dump($emp_list);
             $emp_list = rotate($emp_list);
             if (!empty($emp_list)) {
                 $str_confirm .= implode(",", $emp_list['emp_no']) . "|";
             }
         }
         if (strpos($confirm, "dept") !== false) {
             $temp = explode("_", $confirm);
             $dept = $temp[1];
             $model = M("User");
             $where = array();
             $where['dept_id'] = $dept;
             $where['is_del'] = 0;
             $emp_list = $model->where($where)->select();
             $emp_list = rotate($emp_list);
             if (!empty($emp_list)) {
                 $str_confirm .= implode(",", $emp_list['emp_no']) . "|";
             }
         }
         if (strpos($confirm, "emp") !== false) {
             $temp = explode("_", $confirm);
             $emp = $temp[1];
             $str_confirm .= $emp . "|";
         }
         if (strpos($confirm, "_") == false) {
             $str_confirm .= $confirm . "|";
         }
     }
     $model = M("Flow");
     $model->where("id={$key}")->setField('confirm', $str_confirm);
     return $str_confirm;
 }
开发者ID:TipTimesPHP,项目名称:tyj_oa,代码行数:64,代码来源:FlowModel.class.php


示例11: mine

 public function mine()
 {
     $widget['date-range'] = true;
     $this->assign("widget", $widget);
     $this->assign('user_id', get_user_id());
     $this->assign("title", '日志查询');
     $auth = $this->config['auth'];
     $this->assign('auth', $auth);
     if ($_GET['id']) {
         $id = $_GET['id'];
         $this->assign("XIN", 0);
     } else {
         $id = get_user_id();
         $this->assign("XIN", 1);
     }
     if ($auth['admin']) {
         $rolein = false;
         $role = D('role_user')->where('user_id = ' . get_user_id())->field('role_id')->select();
         for ($i = 0; $i < count($role); $i++) {
             if ($role[$i]['role_id'] == 1 || $role[$i]['role_id'] == 12) {
                 $rolein = true;
                 continue;
             }
         }
         $node = D("Dept");
         $dept_id = get_dept_id();
         $dept_name = get_dept_name();
         $menu = array();
         $dept_menu = $node->field('id,pid,name')->where("is_del=0")->order('sort asc')->select();
         if ($rolein) {
             $dept_tree = list_to_tree($dept_menu);
         } else {
             $dept_tree = list_to_tree($dept_menu, $dept_id);
         }
         $count = count($dept_tree);
         //            dump(get_user_id());
         //            exit;
         if (empty($count)) {
             /*获取部门列表*/
             $html = '';
             $html = $html . "<option value='{$dept_id}'>{$dept_name}</option>";
             $this->assign('dept_list', $html);
             /*获取人员列表*/
             $where['dept_id'] = array('eq', $dept_id);
             $emp_list = D("User")->where($where)->getField('id,emp_name');
             //				$this->assign('emp_list',$emp_list);
         } else {
             /*获取部门列表*/
             $this->assign('dept_list', select_tree_menu($dept_tree));
             $dept_list = tree_to_list($dept_tree);
             $dept_list = rotate($dept_list);
             $dept_list = $dept_list['id'];
             /*获取人员列表*/
             $where['dept_id'] = array('in', $dept_list);
             $emp_list = D("User")->where($where)->getField('id,emp_name');
             //				$this->assign('emp_list',$emp_list);
         }
     }
     $map = $this->_search();
     $map['user_id'] = $id;
     if (method_exists($this, '_search_filter')) {
         $this->_search_filter($map);
     }
     $model = D("WorkLog");
     if (!empty($model)) {
         $this->_list($model, $map);
         //			$this -> _list($model,'');
     }
     $this->assign("uid", $id);
     $this->display();
 }
开发者ID:TipTimesPHP,项目名称:tyj_oa,代码行数:71,代码来源:WorkLogAction.class.php


示例12: reject

 function reject()
 {
     $widget['editor'] = true;
     $this->assign("widget", $widget);
     if (IS_POST) {
         $model = D("TaskLog");
         if (false === $model->create()) {
             $this->error($model->getError());
         }
         $model->transactor = get_user_id();
         $model->transactor_name = get_user_name();
         $model->finish_time = toDate(time());
         $list = $model->save();
         if ($list !== false) {
             $this->success('提交成功');
         } else {
             $this->success('提交失败');
         }
     }
     $task_id = I('task_id');
     $where_log1['type'] = 2;
     $where_log1['executor'] = get_user_id();
     $where_log1['task_id'] = $task_id;
     $task_log1 = M("TaskLog")->where($where_log1)->find();
     if ($task_list1) {
         $this->assign('task_log', $task_log1);
     } else {
         $where_log2['type'] = 1;
         $where_log2['executor'] = get_dept_id();
         $where_log2['task_id'] = $task_id;
         $task_log2 = M("TaskLog")->where($where_log2)->find();
         if ($task_log2) {
             $this->assign('task_log', $task_log2);
         }
     }
     $this->display();
 }
开发者ID:zqstudio2015,项目名称:smeoa,代码行数:37,代码来源:TaskAction.class.php


示例13: addLog

 /**
  * 添加日志
  * @param int $uid
  * @param string $content 今日总结
  * @param string $plan 计划
  * @param string $feedback 问题反馈
  * @param int $time
  * @param int $type 1为安卓 2为ios
  */
 public function addLog()
 {
     $uid = $_REQUEST('uid');
     $content = $_REQUEST('content');
     $plan = $_REQUEST('plan');
     $feedback = $_REQUEST('feedback');
     $time = $_REQUEST('time');
     $type = $_REQUEST('type') ? $_REQUEST('type') : 1;
     if ($type != 1) {
         $content = base64_decode($content);
         $plan = base64_decode($plan);
         $feedback = base64_decode($feedback);
     }
     $model = D('work_log');
     $data = array('user_id' => $uid, 'user_name' => get_user_name(), 'dept_id' => get_dept_id(), 'dept_name' => get_dept_name(), 'create_time' => time(), 'content' => $content ? $content : '', 'plan' => $plan ? $plan : '', 'feedback' => $feedback ? $feedback : '', 'start_date' => date('Y-m-d', $time), 'end_date' => date('Y-m-d', $time));
     $res = $model->add($data);
     if ($res) {
         $this->result('1', '添加成功!');
     } else {
         $this->result('0', '未知错误!');
     }
 }
开发者ID:TipTimesPHP,项目名称:tyj_oa_cp,代码行数:31,代码来源:MobilePhoneLogAction.class.php


示例14: 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


示例15: addAndEdditDoc

 /**
  * 添加 AND 临时保存  草稿箱修改公文 
  * @param unknown $doc_type 公文类型
  * @param unknown $doc_model 发文字号
  * @param unknown $doc_level 秘密等级
  * @param unknown $doc_acute 紧急程度
  * @param unknown $doc_title 公文标题	
  * @param unknown $doc_content 公文内容
  * @param unknown $doc_keyword 关键词
  * @param string $people_sh 传uid
  * @param string $people_qf 传uid
  * @param string $people_sj 传uid 多人逗号分隔
  * @param string $sid 附件id 多个附件 分号分割
  * @param int $type 1为安卓 2为ios
  * @param int $status 1 添加 2保存 3修改
  * @param int $flow_id 传入要修改的公文id
  */
 public function addAndEdditDoc()
 {
     // var_dump('5456656');
     // exit;
     $doc_type = $_REQUEST['doc_type'];
     $doc_model = $_REQUEST['doc_model'];
     $doc_level = $_REQUEST['doc_level'];
     $doc_acute = $_REQUEST['doc_acute'];
     $doc_title = $_REQUEST['doc_title'];
     $doc_content = $_REQUEST['doc_content'];
     $doc_keyword = $_REQUEST['keyword'];
     $people_sh = $_REQUEST['people_sh'];
     $people_qf = $_REQUEST['people_qf'];
     $people_sj = $_REQUEST['people_sj'];
     $sid = $_REQUEST['sid'];
     $type = $_REQUEST['type'];
     $status = $_REQUEST['status'];
     $id = $_REQUEST['flow_id'];
     $flow = M('flow');
     if ($type == 2) {
         $doc_type = base64_decode($doc_type);
         $doc_level = base64_decode($doc_level);
         $doc_model = base64_decode($doc_model);
         $doc_acute = base64_decode($doc_acute);
         $doc_title = base64_decode($doc_title);
         $doc_content = base64_decode($doc_content);
         $doc_keyword = base64_decode($doc_keyword);
     }
     $str = '';
     $peopel_sj = explode(',', $people_sj);
     for ($i = 0; $i < count($peopel_sj); $i++) {
         $str .= get_userName($peopel_sj[$i]) . "|";
         $html = '<span>' . get_userName($peopel_sj[$i]) . '</span>';
     }
     $id = get_user_id();
     $data = array('docNo' => $doc_model, 'name' => $doc_title, 'content' => $doc_content, 'drafter_name' => get_user_name(), 'confirm' => get_userName($people_sh) . '|', 'confirm_name' => get_userName($people_sh), 'consult' => get_userName($people_qf), 'consult_name' => get_userName($people_qf), 'refer' => $str, 'refer_name' => $html, 'add_file' => $sid, 'user_id' => get_user_id(), 'emp_no' => get_userEmpNo($id), 'user_name' => get_user_name(), 'dept_id' => get_dept_id(), 'dept_name' => get_dept_name(), 'create_time' => time(), 'update_time' => 0, 'step' => $status == 1 ? 20 : 10, 'is_del' => 0, 'doc_type' => $doc_type, 'doc_level' => $doc_level, 'doc_acute' => $doc_acute);
     // var_dump($data);
     // exit;
     $res = $flow->add($data);
     if ($status <= 2) {
         if ($res) {
             $log_data = array('flow_id' => $res, 'emp_no' => get_userName($people_sh), 'step' => 21, 'create_time' => time(), 'update_time' => time(), 'is_del' => 0);
             M('flow_log')->add($log_data);
             $this->result('1', '添加成功!');
         } else {
             $this->result('0', '未知错误!');
         }
     } else {
         if ($status > 2) {
             $info = M('Flow')->where(array('id' => $id))->save($data);
             if ($info) {
                 $this->result('1', '保存成功!');
             } else {
                 $this->result('0', '失败!');
             }
         }
     }
 }
开发者ID:TipTimesPHP,项目名称:tyj_oa,代码行数:75,代码来源:MobilePhoneFlowAction.class.php


示例16: get_dept_sort

function get_dept_sort($depid)
{
    if (empty($depid)) {
        $depid = get_dept_id();
    }
    $sort = M("dept")->where("id=" . $depid)->getField("sort");
    return $sort;
}
开发者ID:2ger,项目名称:trunk,代码行数:8,代码来源:common.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_dept_name函数代码示例发布时间:2022-05-15
下一篇:
PHP get_delivery_sn函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap