Ejemplo n.º 1
0
 /**
  * 工单分配
  */
 private function _orderAssign()
 {
     $this->_modelAutoOrderQueue = $this->_getGlobalData('Model_AutoOrderQueue', 'object');
     $this->_modelAutoOrderQueue->delById($_GET['Id']);
     $this->_utilRbac = $this->_getGlobalData('Util_Rbac', 'object');
     $this->_utilWorkOrder = $this->_getGlobalData('Util_WorkOrder', 'object');
     $objectOrderManage = $this->_utilWorkOrder->getOrderManage();
     $userClass = $this->_utilRbac->getUserClassById($_GET['userId']);
     $objectOrderManage->updateWorkOrderOwner($userClass, array('work_order_id' => $_GET['workOrderId']));
     $this->_utilMsg->showMsg(false);
 }
Ejemplo n.º 2
0
 private function _documentAdd()
 {
     if ($this->_isPost()) {
         $this->_modelQualityDocument = $this->_getGlobalData('Model_QualityDocument', 'object');
         $data = $this->_modelQualityDocument->add($_POST);
         $this->_utilMsg->showMsg($data['msg'], $data['status'], $data['href']);
     } else {
         $orgList = Model::getTtwoArrConvertOneArr($this->_getGlobalData('org'), 'Id', 'name');
         //组列表
         $users = Model::getTtwoArrConvertOneArr($this->_getGlobalData('user'), 'Id', 'nick_name');
         //用户列表
         $source = $this->_getGlobalData('verify_source');
         //来源
         $socres = Tools::getLang('QUALITY_SOURCE', 'Common');
         //分数
         $feedBack = array('1' => '是', '0' => '否');
         $verifyStatus = $this->_getGlobalData('verify_status');
         if ($_GET['Id']) {
             $workOrderId = Tools::coerceInt($_GET['work_order_id']);
             $qaId = Tools::coerceInt($_GET['qa_id']);
             $id = Tools::coerceInt($_GET['Id']);
             $this->_modelWorkOrder = $this->_getGlobalData('Model_WorkOrder', 'object');
             $this->_utilRbac = $this->_getGlobalData('Util_Rbac', 'object');
             $this->_modelQuality = $this->_getGlobalData('Model_Quality', 'object');
             $qualityDetail = $this->_modelQuality->findById($id);
             $userClass = $this->_utilRbac->getUserClassById($qualityDetail['reply_user_id']);
             $workOrderDetail = $this->_modelWorkOrder->findById($workOrderId);
             $selected = array();
             $selected['title'] = $workOrderDetail['title'];
             $selected['source'] = $workOrderDetail['source'];
             $selected['org_id'] = $userClass['_orgId'];
             $selected['reply_user_id'] = $qualityDetail['reply_user_id'];
             $selected['quality_user_id'] = $qualityDetail['quality_user_id'];
             $selected['option_id'] = $qualityDetail['option_id'];
             $selected['scores'] = $qualityDetail['scores'];
             $this->_view->assign('selected', $selected);
         }
         $this->_view->assign('verifyStatus', $verifyStatus);
         $this->_view->assign('orgList', $orgList);
         $this->_view->assign('users', $users);
         $this->_view->assign('source', $source);
         $this->_view->assign('socres', $socres);
         $this->_view->assign('feedBack', $feedBack);
         $this->_utilMsg->createNavBar();
         $this->_view->set_tpl(array('body' => 'QualityCheck/DocumentAdd.html'));
         $this->_view->display();
     }
 }
Ejemplo n.º 3
0
 /**
  * 发送邮件
  */
 public function send()
 {
     if (!$this->_sendMail) {
         return false;
     }
     $this->_utilRbac = $this->_getGlobalData('Util_Rbac', 'object');
     foreach ($this->_sendUsers as $user) {
         if (is_numeric($user)) {
             //判断是否为userid还是username
             $userClass = $this->_utilRbac->getUserClassById($user);
         } else {
             $userClass = $this->_utilRbac->getUserClass($user);
         }
         if (!is_object($userClass)) {
             //如果发送失败,将记录这个用户的用户名或者是id
             array_push($this->_failureUsers, $user);
         }
         $userClass->addMail($this->_sendMail);
         $userClass->setUpdateInfo(2);
         $userClass = null;
         unset($userClass);
     }
 }