Beispiel #1
0
<?php

$_auditorsRole = DAL::get()->find_by_name('followupauditorrole', FollowupAuditorRole::NAME_ASSISTANTDOCTOROPERATION);
$_followupAuditorList = FollowupAuditorClient::getInstance()->getAuditorListByRoleId($_auditorsRole->id);
$theFollowupOwner = $theFollowupCustomer->getFollowupOwner();
$_taskModelListOfDangerMgr = TaskClient::getInstance()->getTaskModelListOfDangerMgr();
?>
<div class="mt10 pt5" style="border-top:1px dotted #ccc;">
<div class="f16"><?php 
echo $_no;
?>
 出组处理 
</div>
<div class="content_div">
<input type="button" class="createTask" value="转任务" />
<table class="adminlist" cellspacing="0" cellpadding="0" border="1" style="margin-top:5px;">
    <tr >
        <th class="ltl" width=60 style="text-align:right"><input type="radio" name="_chuzu[chuzu]" value='0' checked/>不转组</th>
        <td>
           <div class="tip">不做出组处理,不改变运营负责人,不创建任务。</div> 
        </td>
    </tr>
    <tr>
        <th class="ltl" style="text-align:right;"><input type="radio" name="_chuzu[chuzu]" value='1'/> 转组</th>
        <td>
        
            <div>
            转组任务备注: <br/>
            <textarea cols="50" rows="2" name="_chuzu[chuzuRemark]"></textarea>
        
            <br/>
 public function modifyWorkSheetInfo($request, $response)
 {
     /*{{{*/
     $workSheetId = $request->worksheetid;
     $workSheet = DAL::get()->find('worksheet', $workSheetId);
     if ($workSheet->isNull()) {
         throw new BizException('工作单不存在');
     }
     if ($workSheet->submit == WorkSheet::SUBMIT_YES) {
         echo "下一个工作单已经提交,修改下次联系内容已无意义";
         return parent::DIRECT_OUTPUT;
     }
     $response->workSheet = $workSheet;
     $task = DAL::get()->find_by_sourceid('nfstask', $workSheet->id);
     $itemNames = $workSheet->contactHealthItemNames;
     if ($itemNames == null) {
         $itemNames = array();
     }
     $auditorsRole = DAL::get()->find_by_name('followupauditorrole', FollowupAuditorRole::NAME_ASSISTANTDOCTOROPERATION);
     $response->followupAuditorList = FollowupAuditorClient::getInstance()->getAuditorListByRoleId($auditorsRole->id);
     $followupcustomerinforecord = DAL::get()->find_by_customerid('followupcustomerinforecord', $workSheet->customerid);
     $response->auditorId = $followupcustomerinforecord->auditorid;
     $response->itemNames = $itemNames;
     $response->contactTime = $task->deadline->toShortString();
     $userId = $workSheet->customer->userId;
     if (false == empty($workSheet->contactLabelIds)) {
         $response->labels = DAL::get()->find('label', $workSheet->contactLabelIds);
     }
     $lastCollectTimes = WorkSheetClient::getInstance()->getLastCollectTimes($userId);
     foreach ($lastCollectTimes as $key => $time) {
         if (empty($time)) {
             $collectDayStr[$key] = "<span class='fb'>没有采集记录</span>";
         } else {
             $time = XDateTime::valueOf($time);
             $collectDay = (strtotime(XDateTime::today()) - strtotime(XDateTime::valueOf($time->toShortString()))) / 3600 / 24;
             if ($collectDay < 14) {
                 $collectDayStr[$key] = "<span>距离上次采集" . $collectDay . "天</span>";
             } else {
                 $collectDayStr[$key] = "<span class='fb'>距离上次采集" . $collectDay . "天</span>";
             }
         }
     }
     $response->collectDayStr = $collectDayStr;
 }
 public function checkupTasksAddedToday($request, $response)
 {
     /*{{{*/
     $auditor = $this->auditor;
     $followupAuditor = DAL::get()->find_by_auditorid('followupauditor', $auditor->id);
     if ($followupAuditor->isNull()) {
         throw new BizException('你没有权限访问');
     }
     $role = $followupAuditor->role;
     if ($role->isSales()) {
         throw new BizException('请去新的销售任务列表');
     }
     //只需要自助运营的role
     $auditorRole = DAL::get()->find_by_name("followupauditorrole", FollowupAuditorRole::NAME_SELFSERVICEOPERATION);
     $auditorRoleId = $auditorRole->id;
     // 这里只关注 复查任务
     $taskModel = DAL::get()->find_by_title("nfstaskmodel", NfsTaskModel::TITLE_CHECKUP_AFTER_SEVEN_DAYS);
     $taskModelId = $taskModel->id;
     $dispatched = $request->getRequest('dispatched', 0);
     if ($dispatched) {
         $auditorId = 1;
     } else {
         $auditorId = FollowupAuditor::SYSTEMAUDITOR_ID;
     }
     $response->dispatched = $dispatched;
     $response->followupAuditorList = FollowupAuditorClient::getInstance()->getAuditorListByRoleId($auditorRoleId);
     // 每日新增的复查任务时间
     $today = XDateTime::today();
     $ctimeBegin = $request->getRequest('ctimeBegin', $today->toShortString());
     $ctimeEnd = $request->getRequest('ctimeEnd', $today->toShortString());
     $response->ctimeBegin = $ctimeBegin;
     $response->ctimeEnd = $ctimeEnd;
     $nfsTaskList = DAL::get()->find_all_ListOfAuditorByNfsTaskModelIdAndExecutiveRoleId("nfstask", $auditorId, $taskModelId, $auditorRoleId, $ctimeBegin, $ctimeEnd . "23:59:59");
     $response->nfsTaskList = $nfsTaskList;
 }