public function actionIndex() { $op = EnvUtil::getRequest("op"); $op = in_array($op, array("dept", "letter")) ? $op : "dept"; $params = array(); if ($op == "letter") { $params["datas"] = $this->getDataByLetter(); } else { $params["datas"] = $this->getDataByDept(); } $userDatas = array(); if (!empty($params["datas"])) { foreach ($params["datas"] as $datas) { $userDatas = $op == "dept" ? array_merge($userDatas, $datas["users"]) : array_merge($userDatas, $datas); } } $params["uids"] = implode(",", ConvertUtil::getSubByKey($userDatas, "uid")); $uid = Ibos::app()->user->uid; $params["cuids"] = Contact::model()->fetchAllConstantByUid($uid); $this->setPageTitle(Ibos::lang("Contact")); $this->setPageState("breadCrumbs", array(array("name" => Ibos::lang("Contact"), "url" => $this->createUrl("defalut/index")), array("name" => Ibos::lang("Company contact")))); $view = $op == "letter" ? "letter" : "dept"; $params["allLetters"] = $this->allLetters; $this->render($view, $params); }
public function getUids($content, $extraUids = null, $lessUids = null) { preg_match_all($this->_atRegex, $content, $matches); $unames = $matches[1]; $map = "realname in ('" . implode("','", $unames) . "')"; $ulist = User::model()->fetchAll($map); $matchUids = ConvertUtil::getSubByKey($ulist, "uid"); if (empty($matchUids) && !empty($extraUids)) { if (!empty($lessUids)) { foreach ($lessUids as $k => $v) { if (in_array($v, $extraUids)) { unset($extraUids[$k]); } } } return is_array($extraUids) ? $extraUids : array($extraUids); } $suid = array(); foreach ($matchUids as $v) { !in_array($v, $suid) && ($suid[] = (int) $v); } if (!empty($lessUids)) { foreach ($suid as $k => $v) { if (in_array($v, $lessUids)) { unset($suid[$k]); } } } return array_unique(array_filter(array_merge($suid, (array) $extraUids))); }
public static function updateTable($flowId, $structure = array()) { $tableName = sprintf("{{flow_data_%d}}", intval($flowId)); if (!self::tableExists($tableName)) { if (!self::createTable($tableName, $structure)) { return false; } return true; } if ($structure) { $rows = Ibos::app()->db->createCommand()->setText("SHOW FIELDS FROM " . $tableName)->queryAll(); $fields = ConvertUtil::getSubByKey($rows, "Field"); $items = array(); foreach ($structure as $eName => $config) { $field = strtolower(trim($eName)); if (!in_array($field, $fields)) { if (substr($field, 0, 5) == "data_") { $items[] = "ALTER TABLE " . $tableName . " ADD `{$field}` text NOT NULL;"; } } } if (!empty($items)) { Ibos::app()->db->createCommand()->setText(implode("\n", $items))->execute(); } } return true; }
public function actionAllDiggList() { $feedId = intval(EnvUtil::getRequest("feedid")); $result = FeedDigg::model()->fetchUserList($feedId, 5); $uids = ConvertUtil::getSubByKey($result, "uid"); $followStates = Follow::model()->getFollowStateByFids(Ibos::app()->user->uid, $uids); $this->renderPartial("alldigglist", array("list" => $result, "followstates" => $followStates, "feedid" => $feedId)); }
public function delClear($id, $uid) { $fidArr = Yii::app()->db->createCommand()->select("fid")->from($this->tableName())->where("FIND_IN_SET(webid,'{$id}') AND uid = {$uid}")->queryAll(); $fids = ConvertUtil::getSubByKey($fidArr, "fid"); $fid = implode(",", $fids); Yii::app()->db->createCommand()->delete("{{email_folder}}", "FIND_IN_SET(fid,'{$fid}') AND uid = {$uid}"); Yii::app()->db->createCommand()->update("{{email}}", array("fid" => 1), "FIND_IN_SET(fid,'{$fid}') AND toid = {$uid}"); return $this->deleteAll("FIND_IN_SET(webid,'{$id}')"); }
public function fetchAllPositionIdByUid($uid) { static $uids = array(); if (!isset($uids[$uid])) { $posids = $this->fetchAll(array("select" => "positionid", "condition" => "`uid` = :uid", "params" => array(":uid" => $uid))); $uids[$uid] = ConvertUtil::getSubByKey($posids, "positionid"); } return $uids[$uid]; }
public function fetchAuidByUid($uid) { $attentions = $this->fetchAll("uid = :uid", array(":uid" => $uid)); $aUids = array(); if (!empty($attentions)) { $aUids = ConvertUtil::getSubByKey($attentions, "auid"); } return $aUids; }
public function actionLoadMoreDiggUser() { $feedId = intval(EnvUtil::getRequest("feedid")); $offset = intval(EnvUtil::getRequest("offset")); $result = FeedDigg::model()->fetchUserList($feedId, 5, $offset); $uids = ConvertUtil::getSubByKey($result, "uid"); $followStates = Follow::model()->getFollowStateByFids(Ibos::app()->user->uid, $uids); $data["data"] = $this->renderPartial("application.modules.message.views.feed.digglistmore", array("list" => $result, "followstates" => $followStates), true); $data["isSuccess"] = true; $this->ajaxReturn($data); }
public function delBody($bodyIds, $archiveId = 0) { $table = sprintf("{{%s}}", $this->getTableName($archiveId)); $bodys = Yii::app()->db->createCommand()->select("attachmentid")->from($table)->where("FIND_IN_SET(bodyid,'{$bodyIds}')")->queryAll(); $attachIds = ConvertUtil::getSubByKey($bodys, "attachmentid"); $attachId = StringUtil::filterStr(implode(",", $attachIds)); if (!empty($attachId)) { AttachUtil::delAttach($attachId); } return Yii::app()->db->createCommand()->delete($table, "FIND_IN_SET(bodyid,'{$bodyIds}')"); }
public function fetchRepidAndAidByTypeids($typeids) { $typeids = is_array($typeids) ? implode(",", $typeids) : trim($typeids, ","); $reports = $this->fetchAll(array("select" => "repid, attachmentid", "condition" => "typeid IN({$typeids})")); $return = array(); if (!empty($reports)) { $return["repids"] = implode(",", ConvertUtil::getSubByKey($reports, "repid")); $attachmentidArr = ConvertUtil::getSubByKey($reports, "attachmentid"); $return["aids"] = implode(",", array_filter($attachmentidArr)); } return $return; }
protected function getDataByLetter() { $deptid = intval(EnvUtil::getRequest("deptid")); if (!empty($deptid)) { $deptids = Department::model()->fetchChildIdByDeptids($deptid, true); $uids = User::model()->fetchAllUidByDeptids($deptids, false); } else { $users = UserUtil::loadUser(); $uids = ConvertUtil::getSubByKey($users, "uid"); } $uids = $this->removeDisabledUid($uids); $res = UserUtil::getUserByPy($uids); return ContactUtil::handleLetterGroup($res); }
public static function getAllArchiveTableId() { $return = array(); $db = Yii::app()->db->createCommand(); $prefix = $db->getConnection()->tablePrefix; $tables = $db->setText("SHOW TABLES LIKE '" . str_replace("_", "\\_", $prefix . "log_%") . "'")->queryAll(false); if (!empty($tables)) { $tableArr = ConvertUtil::getSubByKey($tables, 0); $return = array_map(function ($archiveTable) { return substr($archiveTable, -4); }, $tableArr); } return $return; }
public function actionIndex() { $uid = Ibos::app()->user->uid; $unreadAtMe = UserData::model()->countUnreadAtMeByUid($uid); $pageCount = Atme::model()->countByAttributes(array("uid" => $uid)); $pages = PageUtil::create($pageCount); $atList = Atme::model()->fetchAllAtmeListByUid($uid, $pages->getLimit(), $pages->getOffset()); $feedIds = ConvertUtil::getSubByKey($atList, "feedid"); $diggArr = FeedDigg::model()->checkIsDigg($feedIds, $uid); $data = array("unreadAtmeCount" => $unreadAtMe, "list" => $atList, "pages" => $pages, "digg" => $diggArr); $this->setPageTitle(Ibos::lang("Mention me")); $this->setPageState("breadCrumbs", array(array("name" => Ibos::lang("Message center"), "url" => $this->createUrl("mention/index")), array("name" => Ibos::lang("Mention me")))); $this->render("index", $data); }
public function actionIndex() { $uid = Ibos::app()->user->uid; $cuids = Contact::model()->fetchAllConstantByUid($uid); $res = UserUtil::getUserByPy($cuids); $group = ContactUtil::handleLetterGroup($res); $userDatas = array(); foreach ($group as $users) { $userDatas = array_merge($userDatas, $users); } $params = array("datas" => $group, "letters" => array_keys($group), "allLetters" => $this->allLetters, "uids" => implode(",", ConvertUtil::getSubByKey($userDatas, "uid"))); $this->setPageTitle(Ibos::lang("Regular contact")); $this->setPageState("breadCrumbs", array(array("name" => Ibos::lang("Contact"), "url" => $this->createUrl("default/index")), array("name" => Ibos::lang("Regular contact")))); $this->render("index", $params); }
public function getSidebar($getUid, $getUser) { $uid = Ibos::app()->user->uid; if (!empty($getUid)) { $subUids = $getUid; } elseif (!empty($getUser)) { $subUids = ConvertUtil::getSubByKey($getUser, "uid"); } else { $subUids = UserUtil::getAllSubs($uid, "", true); } $deptArr = UserUtil::getManagerDeptSubUserByUid($uid); $sidebarAlias = "application.modules.report.views.review.sidebar"; $params = array("statModule" => Ibos::app()->setting->get("setting/statmodules"), "lang" => Ibos::getLangSource("report.default"), "deptArr" => $deptArr, "dashboardConfig" => $this->getReportConfig(), "reportTypes" => ReportType::model()->fetchAllTypeByUid($subUids)); $sidebarView = $this->renderPartial($sidebarAlias, $params, false); return $sidebarView; }
public static function processShareListData($uid, $data) { $result = array(); $attentions = DiaryAttention::model()->fetchAllByAttributes(array("uid" => $uid)); $auidArr = ConvertUtil::getSubByKey($attentions, "auid"); foreach ($data as $diary) { $diary["content"] = StringUtil::cutStr(strip_tags($diary["content"]), 255); $diary["realname"] = User::model()->fetchRealnameByUid($diary["uid"]); $diary["addtime"] = ConvertUtil::formatDate($diary["addtime"], "u"); $isattention = in_array($diary["uid"], $auidArr); $diary["isattention"] = $isattention ? 1 : 0; $diary["user"] = User::model()->fetchByUid($diary["uid"]); $result[] = $diary; } return $result; }
protected function ReplenishingScore($list) { if (empty($list)) { return $list; } $dateScope = array_fill_keys($this->getDateScope(), "'-'"); $diaryIds = ConvertUtil::getSubByKey($list, "diaryid"); $timeList = Diary::model()->fetchAddTimeByDiaryId($diaryIds); $new = array(); foreach ($timeList as $time) { $dayTime = date("Y-m-d", $time["addtime"]); $new[$dayTime] = $time["diaryid"]; } $this->getLegalScore($dateScope, $new, $list); return $dateScope; }
protected function ReplenishingScore($list) { if (empty($list)) { return $list; } $dateScopeTmp = $this->getDateScope(); $dateScope = array_flip($dateScopeTmp); $repIds = ConvertUtil::getSubByKey($list, "repid"); $timeList = Report::model()->fetchAddTimeByRepId($repIds); $new = array(); foreach ($timeList as $time) { $dayTime = date("Y-m-d", $time["addtime"]); $new[$dayTime] = $time["repid"]; } $ret = $this->getLegalScore($dateScope, $new, $list); return $ret; }
public function actionIndex() { $modules = Module::model()->fetchAllClientModule(); $widgetModule = $modules; foreach ($widgetModule as $index => $module) { $conf = CJSON::decode($module["config"]); $param = $conf["param"]; if (!isset($param["indexShow"]) || !isset($param["indexShow"]["widget"])) { unset($widgetModule[$index]); } } $moduleArr = ConvertUtil::getSubByKey($widgetModule, "module"); $moduleSetting = MainUtil::execApiMethod("loadSetting", $moduleArr); $data = array("modules" => $modules, "widgetModule" => $widgetModule, "moduleSetting" => CJSON::encode($moduleSetting), "menus" => MenuPersonal::model()->fetchMenuByUid(Ibos::app()->user->uid)); $this->setPageTitle(Ibos::lang("Home office")); $this->setPageState("breadCrumbs", array(array("name" => Ibos::lang("Home office")))); $this->render("index", $data); }
public function syncUser() { $oplist = array("confirm", "sync"); $op = EnvUtil::getRequest("op"); if (!in_array($op, $oplist)) { $op = "confirm"; } $syncUsers = User::model()->fetchAllByUids($this->getUid()); $flag = $this->getSyncFlag(); if ($op == "confirm") { if ($flag != 1) { $bindingUser = $this->getBindingUser($this->getUid()); if (!empty($bindingUser)) { $userNames = explode(",", User::model()->fetchRealnamesByUids($bindingUser)); $uids = $bindingUser; } else { $exit = "<script>parent.Ui.tip('无需同步','success');parent.Ui.closeDialog();</script>"; EnvUtil::iExit($exit); } } else { $userNames = ConvertUtil::getSubByKey($syncUsers, "realname"); $uids = $this->getUid(); } $properties = array("usernames" => $userNames, "uid" => implode(",", $uids), "flag" => $flag); Ibos::app()->getController()->renderPartial("application.modules.organization.views.im.qqsync", $properties); } elseif ($op == "sync") { $count = count($syncUsers); if ($flag == 1) { $res = $this->addUser($syncUsers); } else { $res = $this->setUserStatus($syncUsers, $flag); } if (1 <= $count && $count == $res) { $exit = "\t\t\t<script>parent.Ui.tip('同步完成','success');parent.Ui.closeDialog();</script>"; } else { $errors = $this->getError(self::ERROR_SYNC); $exit = implode(",", array_unique($errors)); } EnvUtil::iExit($exit); } }
public function deleteComment($ids, $uid = null, $module = "") { $ids = is_array($ids) ? $ids : explode(",", $ids); $map = array("and"); $map[] = array("in", "cid", $ids); $comments = $this->getDbConnection()->createCommand()->select("cid,module,table,rowid,moduleuid,uid")->from($this->tableName())->where($map)->queryAll(); if (empty($comments)) { return false; } foreach ($comments as $value) { Atme::model()->deleteAtme($value["table"], null, $value["cid"], null); } $_comments = array(); foreach ($comments as $comment) { $_comments[$comment["table"]][$comment["rowid"]][] = $comment["cid"]; } $cids = ConvertUtil::getSubByKey($comments, "cid"); $res = $this->updateAll(array("isdel" => 1), "`cid` IN (" . implode(",", $cids) . ")"); if ($res) { foreach ($_comments as $tableName => $rows) { foreach ($rows as $rowid => $cid) { $_table = ucfirst($tableName); $field = $_table::model()->getTableSchema()->primaryKey; if (empty($field)) { $field = $tableName . "id"; } $_table::model()->updateCounters(array("commentcount" => -count($cid)), "`{$field}`={$rowid}"); if ($module == "weibo" || $module == "feed") { $_table::model()->cleanCache($rowid); } } } if ($uid) { UserUtil::updateCreditByAction("delcomment", $uid); } } $this->addError("deletecomment", $res != false ? Ibos::lang("Operation succeed", "message") : Ibos::lang("Operation failure", "message")); return $res; }
private function search() { $conditionCookie = MainUtil::getCookie("condition"); if (empty($conditionCookie)) { MainUtil::setCookie("condition", $this->_condition, 10 * 60); } if (EnvUtil::getRequest("search")) { $keyword = EnvUtil::getRequest("keyword"); if (!empty($keyword)) { $this->_condition = " (`subject` LIKE '%{$keyword}%' "; $users = User::model()->fetchAll("`realname` LIKE '%{$keyword}%'"); if (!empty($users)) { $uids = ConvertUtil::getSubByKey($users, "uid"); $uidStr = implode(",", $uids); $this->_condition .= " OR FIND_IN_SET(`designeeuid`, '{$uidStr}') OR FIND_IN_SET( `chargeuid`, '{$uidStr}' ) "; foreach ($uids as $uid) { $this->_condition .= " OR FIND_IN_SET({$uid}, `participantuid`)"; } } $this->_condition .= ")"; } $daterange = EnvUtil::getRequest("daterange"); if (!empty($daterange)) { $time = explode(" - ", $daterange); $starttime = $time[0]; $endtime = $time[1]; $st = strtotime($starttime); $et = strtotime($endtime); $this->_condition = AssignmentUtil::joinCondition($this->_condition, "`starttime` >= {$st} AND `endtime` <= {$et}"); } MainUtil::setCookie("keyword", $keyword, 10 * 60); MainUtil::setCookie("daterange", $daterange, 10 * 60); } else { $this->_condition = $conditionCookie; } if ($this->_condition != MainUtil::getCookie("condition")) { MainUtil::setCookie("condition", $this->_condition, 10 * 60); } }
public function actionIndex() { $op = EnvUtil::getRequest("op"); if (empty($op) || !in_array($op, array("default", "personal"))) { $op = "default"; } if ($op == "default") { $date = "yesterday"; if (array_key_exists("date", $_GET)) { $date = $_GET["date"]; } if ($date == "today") { $time = strtotime(date("Y-m-d")); $date = date("Y-m-d"); } elseif ($date == "yesterday") { $time = strtotime(date("Y-m-d")) - 24 * 60 * 60; $date = date("Y-m-d", $time); } else { $time = strtotime($date); $date = date("Y-m-d", $time); } $uid = Ibos::app()->user->uid; $attentions = DiaryAttention::model()->fetchAllByAttributes(array("uid" => $uid)); $auidArr = ConvertUtil::getSubByKey($attentions, "auid"); $hanAuidArr = $this->handleAuid($uid, $auidArr); $subUidStr = implode(",", $hanAuidArr["subUid"]); $auidStr = implode(",", $hanAuidArr["aUid"]); $condition = "(FIND_IN_SET(uid, '{$subUidStr}') OR (FIND_IN_SET('{$uid}', shareuid) AND FIND_IN_SET(uid, '{$auidStr}') ) ) AND diarytime={$time}"; $paginationData = Diary::model()->fetchAllByPage($condition); $params = array("dateWeekDay" => DiaryUtil::getDateAndWeekDay(date("Y-m-d", strtotime($date))), "pagination" => $paginationData["pagination"], "data" => ICDiary::processShareListData($uid, $paginationData["data"]), "shareCommentSwitch" => $this->issetSharecomment(), "attentionSwitch" => $this->issetAttention()); $params["prevAndNextDate"] = array("prev" => date("Y-m-d", strtotime($date) - 24 * 60 * 60), "next" => date("Y-m-d", strtotime($date) + 24 * 60 * 60), "prevTime" => strtotime($date) - 24 * 60 * 60, "nextTime" => strtotime($date) + 24 * 60 * 60); $this->setPageTitle(Ibos::lang("Attention diary")); $this->setPageState("breadCrumbs", array(array("name" => Ibos::lang("Personal Office")), array("name" => Ibos::lang("Work diary"), "url" => $this->createUrl("default/index")), array("name" => Ibos::lang("Attention diary")))); $this->render("index", $params); } else { $this->{$op}(); } }
protected function afterAdd($data, $sourceInfo) { if (isset($data["type"])) { if ($data["type"] == "reply") { $this->setParseView("comment", self::REPLY_PARSE_VIEW, "parse"); } else { $this->setParseView("comment", self::COMMENT_PARSE_VIEW, "parse"); } } if (isset($data["stamp"])) { $diaryid = $sourceInfo["diaryid"]; $allStamp = Stamp::model()->fetchAll(array("select" => "id")); $stampArr = ConvertUtil::getSubByKey($allStamp, "id"); $stamp = in_array($data["stamp"], $stampArr) ? intval($data["stamp"]) : 0; if ($stamp == 0) { Diary::model()->modify($diaryid, array("isreview" => 1)); } else { Diary::model()->modify($diaryid, array("isreview" => 1, "stamp" => $stamp)); $uid = Diary::model()->fetchUidByDiaryId($diaryid); DiaryStats::model()->scoreDiary($diaryid, $uid, $stamp); } } }
public function fetchMenuByUid($uid) { $menu = $this->fetch("uid = {$uid}"); if (empty($menu)) { $ret = MenuCommon::model()->fetchCommonAndNotUsed(); } else { $allMenus = MenuCommon::model()->fetchAllEnabledMenu(); $allIds = ConvertUtil::getSubByKey($allMenus, "id"); $menuIds = explode(",", $menu["common"]); $commonMenu = $notUsedMenu = array(); foreach ($menuIds as $id) { if (in_array($id, $allIds)) { $commonMenu[$id] = $allMenus[$id]; } } foreach ($allMenus as $id => $menuInfo) { if (!in_array($menuInfo["id"], $menuIds)) { $notUsedMenu[$id] = $menuInfo; } } $ret = array("commonMenu" => $commonMenu, "notUsedMenu" => $notUsedMenu); } return $ret; }
</div> </div> </div> <!-- Row 8 编辑器 --> <div class="bdbs"> <script id="mail_add_editor" name="emailbody[content]" type="text/plain"><?php echo $content; ?> </script> </div> <div class="att"> <div class="attb"> <a href="javascript:;" id="upload_btn"></a> <input type="hidden" name="emailbody[attachmentid]" id="attachmentid" value="<?php if (isset($attach)) { echo implode(',', ConvertUtil::getSubByKey($attach, 'aid')); } ?> " /> <!--等做到文件柜时再实现此功能 by banyan --> <!--<a href="javascript:;" class="btn btn-icon vat" title="从文件柜选择"> <i class="o-folder-close"></i> </a>--> <span><?php echo $lang['File size limit']; echo $uploadConfig['max'] / 1024; ?> MB</span> </div> <?php if (isset($attach)) {
<?php CacheUtil::set("notifyNode", null); $diaryComments = Comment::model()->fetchAllByAttributes(array("module" => "diary")); $cidArr = ConvertUtil::getSubByKey($diaryComments, "cid"); if (!empty($diaryComments)) { $cidStr = implode(",", $cidArr); Comment::model()->deleteAll("rowid IN({$cidStr})"); Comment::model()->deleteAllByAttributes(array("module" => "diary")); }
public function fetchAllEmailIdsByFolderId($fid, $uid) { $record = $this->fetchAllByAttributes(array("fid" => $fid, "toid" => $uid), array("select" => "emailid")); $emailIds = ConvertUtil::getSubByKey($record, "emailid"); return $emailIds; }
public function actionAttention() { $date = "yesterday"; if (array_key_exists("date", $_GET)) { $date = $_GET["date"]; } if ($date == "today") { $time = strtotime(date("Y-m-d")); $date = date("Y-m-d"); } elseif ($date == "yesterday") { $time = strtotime(date("Y-m-d")) - 24 * 60 * 60; $date = date("Y-m-d", $time); } else { $time = strtotime($date); $date = date("Y-m-d", $time); } $uid = Ibos::app()->user->uid; $attentions = DiaryAttention::model()->fetchAllByAttributes(array("uid" => $uid)); $auidArr = ConvertUtil::getSubByKey($attentions, "auid"); $hanAuidArr = $this->handleAuid($uid, $auidArr); $subUidStr = implode(",", $hanAuidArr["subUid"]); $auidStr = implode(",", $hanAuidArr["aUid"]); $condition = "(FIND_IN_SET(uid, '{$subUidStr}') OR (FIND_IN_SET('{$uid}', shareuid) AND FIND_IN_SET(uid, '{$auidStr}') ) ) AND diarytime={$time}"; $paginationData = Diary::model()->fetchAllByPage($condition, 100); $params = array("dateWeekDay" => DiaryUtil::getDateAndWeekDay(date("Y-m-d", strtotime($date))), "pagination" => $paginationData["pagination"], "data" => ICDiary::processShareListData($uid, $paginationData["data"]), "shareCommentSwitch" => 0, "attentionSwitch" => 1); $params["prevAndNextDate"] = array("prev" => date("Y-m-d", strtotime($date) - 24 * 60 * 60), "next" => date("Y-m-d", strtotime($date) + 24 * 60 * 60), "prevTime" => strtotime($date) - 24 * 60 * 60, "nextTime" => strtotime($date) + 24 * 60 * 60); $this->ajaxReturn($params, "JSONP"); }
public function fetchAllRunIdByFlowIdFeatCondition($flowId, $conArr) { $condition = array(); if (!empty($conArr["begin"]) && !empty($conArr["end"])) { $condition[] = " AND (begintime > {$conArr["begin"]} AND endtime <= {$conArr["end"]})"; } elseif (!empty($conArr["begin"])) { $condition[] = " AND begintime >= {$conArr["begin"]}"; } elseif (!empty($conArr["end"])) { $condition[] = " AND endtime < {$conArr["begin"]}"; } if (!empty($conArr["runbegin"]) && !empty($conArr["runend"])) { $condition[] = " AND runid BETWEEN {$conArr["runbegin"]} AND {$conArr["runend"]}"; } elseif (!empty($conArr["runbegin"])) { $condition[] = " AND runid > {$conArr["runbegin"]}"; } elseif (!empty($conArr["runbegin"])) { $condition[] = " AND runid < {$conArr["runend"]}"; } $condition[] = " AND FIND_IN_SET(flowid,'{$flowId}')"; $criteria = array("select" => "runid", "condition" => sprintf("1 %s", implode("", $condition))); $result = $this->fetchAll($criteria); $runId = ConvertUtil::getSubByKey($result, "runid"); return implode(",", $runId); }