From 5852cd8aa42c5a87340dabf710f1f48603d85501 Mon Sep 17 00:00:00 2001 From: lyt Date: Fri, 11 Jan 2019 16:38:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=9B=B4=E6=96=B0=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=88=90=E6=9C=AC,=20=E4=B8=8D=E5=86=8D=E6=89=8B?= =?UTF-8?q?=E5=8A=A8=E5=88=B7=E6=96=B0=E6=95=B0=E6=8D=AE.=20=E5=9C=A8?= =?UTF-8?q?=E8=B4=A2=E5=8A=A1=E8=A1=A8=E4=B8=AD=E9=87=8D=E6=96=B0=E7=94=9F?= =?UTF-8?q?=E6=88=90=E5=8F=AF=E5=86=8D=E6=AC=A1=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trippestOrderSync/models/orders_model.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/webht/third_party/trippestOrderSync/models/orders_model.php b/webht/third_party/trippestOrderSync/models/orders_model.php index 4c11c095..5b7bf210 100644 --- a/webht/third_party/trippestOrderSync/models/orders_model.php +++ b/webht/third_party/trippestOrderSync/models/orders_model.php @@ -175,7 +175,9 @@ class Orders_model extends CI_Model { public function get_groupCombineInfo_finance() { - return array(); // 历史数据已获取完毕, 财务数据的获取方法待定 2018-11-30 + // return array(); // 历史数据已获取完毕 + $to_update_cost_date = date("Y-M-d", strtotime("-7 days")); + $last_update_time = date("Y-m-d 00:00:00"); $sql = " SELECT top 1 coli.COLI_ID, coli.COLI_SN, coli.COLI_GRI_SN, cold.COLD_SN, coli.COLI_OrderDetailText, coli.COLI_Memo,coli.COLI_State,coli.COLI_OPI_ID, cold.COLD_PlanVEI_SN, cold.COLD_MemoText, gci.*,'1' as 'isHistory' from GroupCombineInfo gci @@ -186,8 +188,12 @@ class Orders_model extends CI_Model { LEFT JOIN BIZ_ConfirmLineDetail cold ON cold.COLD_COLI_SN=coli.COLI_SN where GCI_combineNo is not null and GCI_combineNo not in ('cancel','forbidden') -and GCI_travelDate between '2018-08-01' and '2018-08-31 23:59:59' -and gci.GCI_createTime < '2018-12-06 14:00:00' + -- 7天前的订单 + and gci.gci_leaveDate = '$to_update_cost_date' + -- 今天更新一次 + and gci.GCI_createTime < '$last_update_time' +-- and GCI_travelDate between '2018-08-01' and '2018-08-31 23:59:59' +-- and gci.GCI_createTime < '2018-12-06 14:00:00' and GCI_combineNo not like '%取消%' "; $sql .= " ORDER BY isHistory ASC,GCI_createTime ASC ";