You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
information-system/webht/third_party/trippestOrderSync/models/order_update.php

106 lines
3.9 KiB
PHP

<?php
class Order_update extends CI_Model {
function __construct() {
parent::__construct();
$this->HT = $this->load->database('HT', TRUE);
//读取默认配置
$this->COLI_WebCode = $this->config->item('Site_Code');
$this->COLI_Area = $this->config->item('Site_Area');
$this->COLI_CustomerType = $this->config->item('Site_DepartmentID');
$this->COLI_department = $this->config->item('Site_Department');
$this->COLI_Currency = $this->config->item('Site_Currency');
$this->COLI_InterestRate = $this->config->item('Site_InterestRate');
$this->COLI_TrueCardRate = $this->config->item('Site_TrueCardRate');
$this->COLI_TouristLGC = $this->config->item('Site_ServiceLGC');
$this->COLI_OrderStartDate = null;
$this->COLI_Keywords = NULL;
}
public $coli_where_update = "";
public function biz_confirmlineinfo_update($column_data)
{
if ($this->coli_where_update == "" || empty($column_data)) {
return false;
}
$update_str = $this->HT->update_string('BIZ_ConfirmLineInfo', $column_data, $this->coli_where_update);
$update_exc = $this->HT->query($update_str);
return $update_exc;
}
public $cold_where_update = "";
public function biz_confirmlinedetail_update($column_data)
{
if ($this->cold_where_update == "" || empty($column_data)) {
return false;
}
$update_str = $this->HT->update_string('BIZ_ConfirmLineDetail', $column_data, $this->cold_where_update);
$update_exc = $this->HT->query($update_str);
return $update_exc;
}
/*!
* 更新拼团信息
* @date 2018-04-26
* @param array $column_data 需要更新的列数据数组
*/
public $gci_where_update = ""; // where 条件
public function biz_groupcombineinfo_update($column_data)
{
if ($this->gci_where_update == "" || empty($column_data)) {
return false;
}
$update_str = $this->HT->update_string('BIZ_GroupCombineInfo', $column_data, $this->gci_where_update);
$update_exc = $this->HT->query($update_str);
return $update_exc;
}
/*!
* 拼团的调度信息是否已存在
* @param string $combineNo 拼团团号
* @param string $operation 调度类型
*/
public function combineoperation_exist($combineNo='', $operation="")
{
if( ! $combineNo) { return array(); }
$sql = "SELECT TOP 1 GCOD_GCI_combineNo
FROM BIZ_GroupCombineOperationDetail
WHERE GCOD_GCI_combineNo = N? and GCOD_operationType=?";
$query = $this->HT->query($sql, array(
$combineNo,$operation
));
return $query->result();
}
/*!
* 地接计划状态变更
* @param [type] $vas_sn [description]
* @param string $confirminfo [description]
*/
public function vendorStatus_update($vas_sn, $confirminfo="")
{
$sql = "UPDATE VendorArrangeState set VAS_IsConfirm=1,VAS_ConfirmInfo=?+CHAR(10)+VAS_ConfirmInfo
WHERE VAS_SN=?";
$query = $this->HT->query($sql, array($confirminfo, $vas_sn));
return $query;
}
function SendMail($fromName, $fromEmail, $toName, $toEmail, $subject, $body) {
$sql = "INSERT INTO Email_AutomaticSend \n"
. " ( \n"
. " M_ReplyToName, M_ReplyToEmail, M_ToName, M_ToEmail, M_Title, M_Body, M_Web, \n"
. " M_FromName, M_State \n"
. " ) \n"
. "VALUES \n"
. " ( \n"
. " ?, ?, ?, ?, ?, N?, ?, ?, 0 \n"
. " ) ";
$query = $this->HT->query($sql,
array(substr($fromName, 0, 127), $fromEmail, substr($toName, 0, 127), $toEmail, $subject, $body, $this->config->item('Site_Code'), $this->config->item('Site_SenderName'))
);
return $query;
}
}