diff --git a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php index accca6fe..c7338520 100644 --- a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php +++ b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php @@ -902,7 +902,7 @@ class Tulanduo $this->ci->BIZ_order->insert_biz_order_log($coli_sn, "vendorPlanUpdateSendout_" . $tour_code); } /** VendorArrangeState VAS_IsReceive */ - $this->ci->Group_model->set_plan_received($vas_sn); + $this->ci->Group_model->set_plan_received($vas_sn, $gri_sn); } } return "[Tulanduo>push_trippest] Done. " . $COLI_ID; diff --git a/webht/third_party/vendorPlanSync/models/Group_model.php b/webht/third_party/vendorPlanSync/models/Group_model.php index 1baa4bce..d3d0b41a 100644 --- a/webht/third_party/vendorPlanSync/models/Group_model.php +++ b/webht/third_party/vendorPlanSync/models/Group_model.php @@ -296,10 +296,13 @@ class Group_model extends CI_Model { return $eva_g_sn; } - public function set_plan_received($vas_sn=0) + public function set_plan_received($vas_sn=0, $gri_sn=null) { - $sql = "UPDATE VendorArrangeState set VAS_IsReceive=1,VAS_ReceiveTime=GETDATE() where VAS_SN=? "; - return $this->HT->query($sql, array($vas_sn)); + $sql = "UPDATE VendorArrangeState set VAS_IsReceive=1,VAS_ReceiveTime=GETDATE() where VAS_SN=$vas_sn "; + if ($gri_sn !== null) { + $sql = "UPDATE VendorArrangeState set VAS_IsReceive=1,VAS_ReceiveTime=GETDATE() where VAS_GRI_SN=$gri_sn "; + } + return $this->HT->query($sql); } /*!