Esempio n. 1
0
        $up_arr = explode(",", $UserArray['up_uid']);
        $UpUserArray = isDepartment($up_arr[0], 0);
        if (empty($UpUserArray)) {
            continue;
        }
        $up_arr = explode(",", $UpUserArray['up_uid']);
        $UpUserArray2 = isDepartment($up_arr[0], 0);
        if (empty($UpUserArray2)) {
            continue;
        }
        $up_arr = explode(",", $UpUserArray2['up_uid']);
        $UpUserArray3 = isDepartment($up_arr[0], 0);
        if (empty($UpUserArray3)) {
            continue;
        }
        addNeedSend($result, $UpUserArray3['dept_uid'], $nexttime, "条诉求未处理,请您安排处理.", $UpUserArray3, array($result['atuid'] => $UserArray['mobile'] . ',1', $UpUserArray['dept_uid'] => $UpUserArray['mobile'] . ',3', $UpUserArray2['dept_uid'] => $UpUserArray2['mobile'] . ',7'), 10);
        updatetable("complain", array("issendmsg" => 1, "times" => 10), array("id" => $result['id']));
        $note = cplang("note_complain_user", array($complain_url, $result['atdepartment'], '校长'));
        notification_complain_add($result['uid'], 'complain', $note);
        $note = cplang("note_complain_buchu3", array($complain_url, date('Y-m-d H:i', $nexttime)));
        notification_complain_add($UserArray['dept_uid'], 'complain', $note);
        $note = cplang('note_complain_chuzhang2', array($complain_url, date('Y-m-d H:i', $nexttime)));
        notification_complain_add($UpUserArray['dept_uid'], 'complain', $note);
        $note = cplang('note_complain_fuxiaozhang1', array($complain_url, date('Y-m-d H:i', $nexttime), $result['atdepartment']));
        notification_complain_add($UpUserArray2['dept_uid'], 'complain', $note);
        $note = cplang('note_complain_xiaozhang', array($complain_url, date('Y-m-d H:i', $nexttime), $result['atdepartment']));
        notification_complain_add($UpUserArray3['dept_uid'], 'complain', $note);
        $log->debug("complain doid {$result['doid']} send message xiaozhang");
    }
}
var_dump($needSend);
Esempio n. 2
0
            $nexttime = $result['dateline'] + 24 * 3600 * 3;
            addNeedSend($result, $UpUserArray['dept_uid'], $nexttime, "条诉求待处理,最早的一条将于" . fancyDate($nexttime) . "上报给主管副校长,请您安排处理.", $UpUserArray, array($result['atuid'] => $UserArray['mobile'] . ',1'), 3);
            updatetable("complain", array("issendmsg" => 0, "times" => 3), array("id" => $result['id']));
            $note = cplang("note_complain_user", array($complain_url, $result['atdepartment'], '负责人'));
            notification_complain_add($result['uid'], 'complain', $note);
            $note = cplang("note_complain_buchu1", array($complain_url, date('Y-m-d H:i', $nexttime)));
            notification_complain_add($UserArray['dept_uid'], 'complain', $note);
            $note = cplang('note_complain_chuzhang', array($complain_url, date('Y-m-d H:i', $nexttime)));
            notification_complain_add($UpUserArray['dept_uid'], 'complain', $note);
            $log->debug("complain doid {$result['doid']} send message chuzhang");
        }
    } elseif ($result['times'] == 3 && $result['issendmsg'] == 0 && $nowtime - $result['dateline'] > 2 * 24 * 3600) {
        $up_arr = explode(",", $UserArray['up_uid']);
        $UpUserArray = isDepartment($up_arr[0], 0);
        $nexttime = $result['dateline'] + 24 * 3600 * 3;
        addNeedSend($result, $UpUserArray['dept_uid'], $nexttime, "条诉求待处理,最早的一条将于" . fancyDate($nexttime) . "上报给主管副校长,请您安排处理.", $UpUserArray, array($result['atuid'] => $UserArray['mobile'] . ',1'), 3);
        updatetable("complain", array("issendmsg" => 1), array("id" => $result['id']));
        $note = cplang("note_complain_user", array($complain_url, $result['atdepartment'], '负责人'));
        notification_complain_add($result['uid'], 'complain', $note);
        $note = cplang("note_complain_buchu1", array($complain_url, date('Y-m-d H:i', $nexttime)));
        notification_complain_add($UserArray['dept_uid'], 'complain', $note);
        $note = cplang('note_complain_chuzhang', array($complain_url, date('Y-m-d H:i', $nexttime)));
        notification_complain_add($UpUserArray['dept_uid'], 'complain', $note);
        $log->debug("complain doid {$result['doid']} send message chuzhang");
    }
}
var_dump($needSend);
//以上处理投诉的逐级汇报//////////////////////
//发送上次发送未成功的短信
sendDelayMsg();
sendMobileMsg();