|
@@ -9,14 +9,30 @@
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
$code = isset($_GET['code'])?safeCheck($_GET['code'],0):'0';
|
|
$code = isset($_GET['code'])?safeCheck($_GET['code'],0):'0';
|
|
|
- $date = isset($_GET['date'])?safeCheck($_GET['date'],1):'0';
|
|
|
|
|
|
|
|
|
|
if(empty($code))
|
|
if(empty($code))
|
|
|
{
|
|
{
|
|
|
echo action_msg("code参数不能为空",101);
|
|
echo action_msg("code参数不能为空",101);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- $stock_info=Index_day_k::get_current_day_index($code,$date);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ //循环找到最近天数的起始日期
|
|
|
|
|
+ $count = 0;
|
|
|
|
|
+ $current_date = (int)date('Ymd', time());
|
|
|
|
|
+ $recent_date = AddOrSubDate($current_date, -1);
|
|
|
|
|
+ do {
|
|
|
|
|
+ $filter = array(
|
|
|
|
|
+ 'code' => array($code, '=s'),
|
|
|
|
|
+ 'date' => array($current_date, 'date_between', $recent_date),
|
|
|
|
|
+ );
|
|
|
|
|
+ $count = Index_day_k::getList($filter, 1);
|
|
|
|
|
+ $recent_date = AddOrSubDate($recent_date, -1);
|
|
|
|
|
+ }while(($count < 1) and ($recent_date >= AddOrSubDate(GLOBAL_BEGIN_DATE, -1)));
|
|
|
|
|
+
|
|
|
|
|
+ //获取列表
|
|
|
|
|
+ $rs = Index_day_k::getListOrderByDate($filter, 0, 0, 0, $order);
|
|
|
|
|
+ $stock_info = $rs[0];
|
|
|
|
|
+
|
|
|
if(!empty($stock_info))
|
|
if(!empty($stock_info))
|
|
|
{
|
|
{
|
|
|
$params=array();
|
|
$params=array();
|