コード例 #1
0
	private function buildBookingTask($space, $note1='', $note2='')
	{/*{{{*/
		if($space->isBookingOpened() && $space->isDoctor() && BookingTask::isCreateTask() )
		{
			$doctor = $space->host;
            $doctor = DAL::get()->find('doctor', $doctor->id, true);
			$announceTime = $doctor->userUpdateTime->toShortString();
            if($note1)
            {
                $note1 = "空间公告1(停诊)-".$note1;
                $remark = $note1."-医生发布公告日期:".$announceTime;
                BookingTaskClient::getInstance()->addDoctorMovementTask($doctor, $remark);
            }
            if($note2)
            {
                $note2 = "公告2(出诊)-".$note2;
                $remark = $note2."-医生发布公告日期:".$announceTime;
                BookingTaskClient::getInstance()->addDoctorMovementTask($doctor, $remark);
            }
		}
	}/*}}}*/
コード例 #2
0
 private function rebuildBookingTask($space, $vars)
 {
     if ($space->isNull() == false && $space->isBookingOpened() && $space->isDoctor() && (isset($vars['note1']) || isset($vars['note2'])) && BookingTask::isCreateTask()) {
         $remark1 = $remark2 = '';
         if ($vars['note1'] != $space->note1 || $vars['note2'] != $space->note2) {
             $announceTime = $space->host->userUpdateTime->toShortString();
             if (isset($vars['note1'])) {
                 $note1 = "空间公告1(停诊)-" . $vars['note1'];
                 $remark1 = $note1 . "-医生发布公告日期:" . $announceTime;
             }
             if (isset($vars['note2'])) {
                 $note2 = "公告2(出诊)-" . $vars['note2'];
                 $remark2 = $note2 . "-医生发布公告日期:" . $announceTime;
             }
             $this->createBookingTask($space, $remark1, $remark2);
         }
     }
 }