From 5c1cf4ea402088d8f765e6e9360d5c3861151fe6 Mon Sep 17 00:00:00 2001 From: lyt Date: Wed, 21 Aug 2019 09:38:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=B0=E5=BD=95=E5=9C=B0=E6=8E=A5=E4=BB=A3?= =?UTF-8?q?=E6=94=B6:5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../third_party/trippestOrderSync/models/orders_model.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webht/third_party/trippestOrderSync/models/orders_model.php b/webht/third_party/trippestOrderSync/models/orders_model.php index 0190310c..30c0c10d 100644 --- a/webht/third_party/trippestOrderSync/models/orders_model.php +++ b/webht/third_party/trippestOrderSync/models/orders_model.php @@ -180,8 +180,8 @@ class Orders_model extends CI_Model { public function get_groupCombineInfo_finance() { // return array(); // 历史数据已获取完毕 - $to_update_month_begin = date('Y-m-01', strtotime("-4 months", strtotime(date("Y-m-d")))); - $to_update_month_end = date('Y-m-01', strtotime("-3 months", strtotime(date("Y-m-d")))); + $to_update_month_begin = date('Y-m-01', strtotime("-3 months", strtotime(date("Y-m-d")))); + $to_update_month_end = date('Y-m-01', strtotime("-2 months", strtotime(date("Y-m-d")))); $end_d = strtotime($to_update_month_end)-1; $to_update_month_end = date("Y-m-d 23:59:59", $end_d); $set_time = date("Y-m-d 00:00:00", strtotime("+50 days",$end_d)); @@ -197,8 +197,8 @@ class Orders_model extends CI_Model { where GCI_combineNo is not null and GCI_combineNo not in ('cancel','forbidden') -- 已生成账单的不再自动同步 - -- and NOT exists ( - -- select 1 from report_order where ordernumber=COLI_ID and orderstats=1 + -- and NOT EXISTS ( + -- SELECT 1 FROM report_order WHERE ordernumber=COLI_ID AND orderstats=1 -- ) and GCI_travelDate between '$to_update_month_begin' and '$to_update_month_end' -- and gci.GCI_createTime < '$set_time'