Ejemplo n.º 1
0
 /**
  * WhPositionDistributionModel::delete_data()
  * 逻辑删除仓位数据
  * @param mixed $where
  * @return void
  */
 public static function delete_data($where)
 {
     self::initDB();
     $where = array2where($where);
     $sql = 'delete from ' . self::$tablename . ' where ' . $where;
     return self::$dbConn->query($sql);
 }
Ejemplo n.º 2
0
 /**
  * WhWaveInfoModel::update_wave_info()
  * 更新配货单信息
  * @param array $update 更新字段内容
  * @param array $where 条件内容
  * @return void
  */
 public static function update_wave_info($update, $where)
 {
     self::initDB();
     $sql = 'update ' . self::$tablename . ' set ' . array2sql($update) . ' where ' . array2where($where);
     //echo $sql;
     $sql = self::$dbConn->query($sql);
     return $sql;
 }
Ejemplo n.º 3
0
 public static function updateOrderRecord($where, $update)
 {
     self::initDB();
     $sql = 'update wh_orderb_history set ' . array2sql($update) . ' where ' . array2where($where);
     //echo $sql;exit;
     $sql = self::$dbConn->query($sql);
     return $sql;
 }
 /**
  * whWaveMultiShipAreaRecordModel::get_multi_ship_records()
  * 获取多料号订单区域临时信息 
  * @param array $select 查询字段 多个数组,单个字符串
  * @param array $where 数组
  * @author Gary
  * @return $res
  */
 public static function get_multi_ship_records($select, $where)
 {
     self::initDB();
     $select = array2select($select);
     $where = array2where($where);
     $sql = "select {$select} from " . self::$tablename . " where {$where}";
     //echo $sql;exit;
     $sql = self::$dbConn->query($sql);
     $res = self::$dbConn->fetch_array_all($sql);
     return $res;
 }
Ejemplo n.º 5
0
 /**
  * WhOrderPartionPrintDHLModel::get_packageInfo()
  * 获取新加坡DHL口袋信息
  * @param mixed $select
  * @param mixed $where
  * @param bool $fetch_row
  * @return void
  */
 public static function get_packageInfo($select, $where, $fetch_row = FALSE)
 {
     self::initDB();
     $select = array2select($select);
     $where = array2where($where);
     $sql = "select {$select} from " . self::$tablename . ' where ' . $where;
     $sql = self::$dbConn->query($sql);
     $fetch = $fetch_row ? 'fetch_array' : 'fetch_array_all';
     $res = self::$dbConn->{$fetch}($sql);
     return $res;
 }
Ejemplo n.º 6
0
 /**
  * WhShippingOrderModel::get_order_info()
  * 获取发货单信息
  * @param array $select 多个数组,单个字符
  * @param array $where 条件数组
  * @param bool $fetch_one  是否只获取一条记录
  * @author Gary
  * @return void
  */
 public static function get_order_info($select, $where, $fetch_one = FALSE)
 {
     self::initDB();
     $select = array2select($select);
     $where = array2where($where);
     $sql = "select {$select} from " . self::$tablename . " where {$where} and is_delete = 0";
     $sql = self::$dbConn->query($sql);
     $func = $fetch_one ? 'fetch_array' : 'fetch_array_all';
     $res = self::$dbConn->{$func}($sql);
     return $res;
 }
Ejemplo n.º 7
0
 public static function update($data, $where)
 {
     self::initDB();
     if (!$where || !$data) {
         self::$errCode = "001";
         self::$errMsg = "参数错误";
         return false;
     }
     //if(is_array($data)){
     //			foreach($data as $key => $val){
     //				$sqlArr[] = $key."='".$val."'";
     //			}
     //		}else{
     //			$sqlArr[] = $data;
     //		}
     //		if(is_numeric($where)){
     //			$whereArr[] = 'id='.$where;
     //		}else if(is_array($where)){
     //			foreach($where as $key => $val){
     //				$whereArr[] = $key."='".$val."'";
     //			}
     //		}else{
     //			$whereArr[] = $where;
     //		}
     $data = array2sql($data);
     $where = array2where($where);
     $sql = 'update ' . self::$tablename . ' set ' . $data . ' where ' . $where;
     //echo $sql."<br />";
     $query = self::$dbConn->query($sql);
     if ($query) {
         return true;
     } else {
         self::$errCode = "002";
         self::$errMsg = "更新数据失败";
         return false;
         //失败则设置错误码和错误信息, 返回false
     }
 }
Ejemplo n.º 8
0
 /**
  * 根据查询条件组装查询SQL语句
  * @prama array
  * @return string
  * @author zjr
  */
 private function getWhereSql($data)
 {
     $where = implode(" AND ", array2where($data));
     return $where;
 }
Ejemplo n.º 9
0
 /**
  * 获取退款记录
  */
 public function getRefundList($condition)
 {
     $condition = implode(" and ", array2where($condition));
     return $this->sql("SELECT * FROM " . $this->getTableName() . " WHERE {$condition} ")->limit("*")->select(array("mysql"), 1800);
 }
Ejemplo n.º 10
0
 /**
  * 根据平台和入系统时间获取订单信息
  * @param array condition (键值对形式)
  * @return bool
  * @author yxd
  */
 public function getOrdersByPlatForm($condition)
 {
     $condition = implode(" and ", array2where($condition));
     return $this->sql("SELECT platformId,accountId,orderStatus,orderType FROM " . C('DB_PREFIX') . "unshipped_order WHERE {$condition} ")->limit("*")->select();
 }
Ejemplo n.º 11
0
 /**
  * whShelfModel::selectTallyingList()
  * 获取点货信息
  * @param array or string $seelct
  * @param array $where
  */
 public static function selectTallyingList($select, $where)
 {
     self::initDB();
     $select = array2select($select);
     $where = array2where($where);
     $where .= $where ? ' and is_delete = 0' : ' is_delete = 0';
     $sql = "select {$select} from wh_tallying_list where " . $where;
     $sql = self::$dbConn->query($sql);
     $res = self::$dbConn->fetch_array_all($sql);
     return $res;
 }
Ejemplo n.º 12
0
 /**
  * WhIoRecordsModel::selectIoRecords()
  * 获取出入库表记录
  * @author Gary
  * @return void
  */
 public static function selectIoRecords($select, $where)
 {
     self::initDB();
     $select = array2select($select);
     $where = array2where($where);
     $sql = 'SELECT ' . $select . ' from wh_iorecords where ' . $where;
     //echo $sql;exit;
     $sql = self::$dbConn->query($sql);
     $res = self::$dbConn->fetch_array_all($sql);
     return $res;
 }
Ejemplo n.º 13
0
 public function updateOrderAuditByWhereArr($data, $whereArr)
 {
     $tableName = 'om_records_order_audit';
     $data = $this->formatUpdateField($tableName, $data);
     if ($data === false) {
         self::$errMsg = $this->validatemsg;
         return false;
     }
     if ($this->formatWhereField($tableName, $data) === false) {
         self::$errMsg = $this->validatemsg;
         return false;
     }
     return $this->sql("UPDATE " . $tableName . " SET " . array2sql($data) . " WHERE " . implode(' AND ', array2where($whereArr)))->update();
 }
Ejemplo n.º 14
0
 /**
  * WhWaveScanRecordModel::get_scan_record_union_area()
  * 获取指定配货单的配货记录及区域负责人UID 
  * @param mixed $waveId
  * @return void
  */
 public static function get_scan_record_union_area($waveId)
 {
     self::initDB();
     $where = array2where(array('a.waveId in' => $waveId, 'a.is_delete' => 0));
     //        $sql    =   'select a.sku,a.skuAmount,a.pName,a.storey,a.area,c.userId from wh_wave_scan_record a
     //                        left join wh_wave_area_info b on a.area = b.areaName left join wh_wave_area_user_relation c on
     //                        c.areaId = b.id where '.$where.' order by a.storey desc, b.id asc,a.pName asc';
     $sql = 'select a.sku,a.skuAmount,a.pName,a.storey,a.area from wh_wave_scan_record a
                     left join wh_wave_route_relation c on c.name = a.pName where ' . $where . 'and c.routeType = 4 order by c.route asc, a.pName asc';
     //echo $sql;exit;
     $sql = self::$dbConn->query($sql);
     $res = self::$dbConn->fetch_array_all($sql);
     return $res;
 }
Ejemplo n.º 15
0
 /**
  * 根据查询条件组装查询SQL语句
  * @prama array
  * @return string
  * @author yxd
  */
 public function getBlacklistSql($data)
 {
     $where = implode(" AND ", array2where($data));
     return $where;
 }
Ejemplo n.º 16
0
 /**
  * 根据查询条件组装查询SQL语句
  * @prama array
  * @return string
  * @author yxd
  */
 private function getPaypalEmailSql($data)
 {
     $where = implode(" AND ", array2where($data));
     return $where;
 }
Ejemplo n.º 17
0
 public function getTopmenuSql($data)
 {
     $where = implode(" AND ", array2where($data));
     return $where;
 }
Ejemplo n.º 18
0
 /**
  * 根据查询条件组装查询SQL语句
  * @prama array
  * @return string
  * @author yxd
  */
 public function getPlatformToCarrierSql($data)
 {
     $where = implode(" AND ", array2where($data));
     return $where;
 }