mirror of
https://gitee.com/ShopeX/OMS
synced 2026-03-23 02:45:33 +08:00
71 lines
1.7 KiB
PHP
71 lines
1.7 KiB
PHP
<?php
|
||
/**
|
||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||
* See LICENSE file for license details.
|
||
*/
|
||
|
||
/**
|
||
* 数学逻辑处理类
|
||
*
|
||
* @author chenping<chenping@shopex.cn>
|
||
*/
|
||
class inventorydepth_math {
|
||
|
||
public function __construct($app)
|
||
{
|
||
$this->app = $app;
|
||
}
|
||
|
||
public function get_show_comparison($key)
|
||
{
|
||
$return = array(
|
||
'equal' => $this->app->_('等于'),
|
||
'than' => $this->app->_('大于'),
|
||
'lthan' => $this->app->_('小于'),
|
||
'bthan' => $this->app->_('大于等于'),
|
||
'sthan' => $this->app->_('小于等于'),
|
||
'between' => $this->app->_('介于'),
|
||
);
|
||
|
||
return $key ? $return[$key] : $return;
|
||
}
|
||
|
||
public function get_comparison($key)
|
||
{
|
||
$return = array(
|
||
'equal' => '==',
|
||
'than' => '>',
|
||
'lthan' => '<',
|
||
'bthan' => '>=',
|
||
'sthan' => '<=',
|
||
);
|
||
|
||
return $key ? $return[$key] : $return;
|
||
}
|
||
|
||
public function get_show_calculation($key)
|
||
{
|
||
$return = array(
|
||
'subjoin' => $this->app->_('加'),
|
||
'subtract' => $this->app->_('减'),
|
||
'multiply' => $this->app->_('乘'),
|
||
'divide' => $this->app->_('除'),
|
||
);
|
||
|
||
return $key ? $return[$key] : $return;
|
||
}
|
||
|
||
public function get_calculation($key='')
|
||
{
|
||
$return = array(
|
||
'subjoin' => '+',
|
||
'subtract' => '-',
|
||
'multiply' => '*',
|
||
'divide' => '/',
|
||
);
|
||
|
||
return $key ? $return[$key] : $return;
|
||
}
|
||
|
||
}
|