public static function addInfo() { $importFile = self::$thisTaskDataPath . '20151200-21Good.List.txt'; $exportFile = self::$thisTaskDataPath . '20151200-21Good.Table.txt'; $stockList = parent::ReadList($importFile); $stockList = CommonInfo::CodeArray2ReferArray($stockList); $stockTable = array(); $pre = '2015-11-00'; $start = '2015-12-00'; $end = '2015-12-21'; foreach ($stockList as $stkL) { $stkT = array(); $stkT['name'] = '<a target="_blank" href="' . Url::getBasePhp('Stock') . '?code=' . $stkL['code'] . '">' . '<span class="fore-stock-name">' . $stkL['name'] . '</span>' . '<span class="fore-stock-spell displaynone">' . $stkL['spell'] . '</span></a>'; $stkT['code'] = '<span class="fore-stock-code">' . $stkL['code'] . '</span>'; //以上为标准的 索引 $tdd = new ThsDoctorData($stkL['code']); $t = $tdd->prepareData() ? $tdd->getDayPeriod($start, $end) : array(); //total_score $stkT['total_score_max'] = LogicOperation::highValue($t, 'total_score'); $stkT['total_score_min'] = LogicOperation::lowValue($t, 'total_score'); //message_score $stkT['message_score_max'] = LogicOperation::highValue($t, 'message_score'); $stkT['message_score_min'] = LogicOperation::lowValue($t, 'message_score'); //trade_score $stkT['trade_score_max'] = LogicOperation::highValue($t, 'trade_score'); $stkT['trade_score_min'] = LogicOperation::lowValue($t, 'trade_score'); //basic_score $stkT['basic_score_max'] = LogicOperation::highValue($t, 'basic_score'); $stkT['basic_score_min'] = LogicOperation::lowValue($t, 'basic_score'); //评级买入次数 $rd = new RateData($stkL['code']); $t = $rd->prepareData() ? $rd->getDayPeriod($pre, $end) : array(); $t = $rd->filterBuy($t); $stkT['rate_buy_num'] = $t ? sizeof($t) : 0; //龙虎榜次数 $ld = new LhbData($stkL['code']); $t = $ld->prepareData() ? $ld->getDayPeriod($start, $end) : array(); $stkT['lhb_num'] = $t ? sizeof($t) : 0; $stockTable[] = $stkT; } parent::putTable($exportFile, $stockTable); }