|
@@ -78,6 +78,9 @@ class Transfer extends Start_Controller {
|
|
{
|
|
{
|
|
$this->_linqi();
|
|
$this->_linqi();
|
|
}
|
|
}
|
|
|
|
+ else if($arg == 'jiaji'){
|
|
|
|
+ $this->_jiaji();
|
|
|
|
+ }
|
|
else if($arg == 'overtime_export'){
|
|
else if($arg == 'overtime_export'){
|
|
$this->_overtime_export();
|
|
$this->_overtime_export();
|
|
}
|
|
}
|
|
@@ -867,9 +870,9 @@ class Transfer extends Start_Controller {
|
|
$transfer_str = implode(",",$transfer_ids);
|
|
$transfer_str = implode(",",$transfer_ids);
|
|
$this->data['cz_1_num'] = $this->systemtransfer_cr->find_count("orver_flag = 1 and is_over = 0 and time > ".(time()-3600*24*7) ." and lx in (".$transfer_str.")");
|
|
$this->data['cz_1_num'] = $this->systemtransfer_cr->find_count("orver_flag = 1 and is_over = 0 and time > ".(time()-3600*24*7) ." and lx in (".$transfer_str.")");
|
|
$this->data['cz_2_num'] = $this->systemtransfer_cr->find_count("orver_flag = 2 and is_over = 0 and time > ".(time()-3600*24*7) ." and lx in (".$transfer_str.")");
|
|
$this->data['cz_2_num'] = $this->systemtransfer_cr->find_count("orver_flag = 2 and is_over = 0 and time > ".(time()-3600*24*7) ." and lx in (".$transfer_str.")");
|
|
- $jiaji_num = 0;
|
|
|
|
|
|
+ //$jiaji_num = 0;
|
|
|
|
|
|
- $jiaji_num = $this->systemtransfer->find_count(" is_jiaji = 2 and time > ".(time()-3600*24*7)." and rk not like '%|11|%'" );
|
|
|
|
|
|
+ // $jiaji_num = $this->systemtransfer->find_count(" is_jiaji = 2 and time > ".(time()-3600*24*7)." and rk not like '%|11|%'" );
|
|
foreach($transfer_ids as $k=>$v){
|
|
foreach($transfer_ids as $k=>$v){
|
|
if($v == 11){
|
|
if($v == 11){
|
|
unset($transfer_ids[$k]);
|
|
unset($transfer_ids[$k]);
|
|
@@ -1991,4 +1994,45 @@ class Transfer extends Start_Controller {
|
|
header( "Expires: 0" );
|
|
header( "Expires: 0" );
|
|
exit($str);
|
|
exit($str);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ public function _jiaji(){
|
|
|
|
+ if(isset($_SESSION['api']))
|
|
|
|
+ {
|
|
|
|
+ $user = $this->user->get_api($_SESSION['api']);
|
|
|
|
+ $usp = $user;
|
|
|
|
+ $pid = "";$tid="";$sid="";$wid="";
|
|
|
|
+ $purchase = explode('|',trim($user['purchase'],'|'));
|
|
|
|
+ $transfer = explode('|',trim($user['transfer'],'|'));
|
|
|
|
+ $warehouse = explode('|',trim($user['warehouse'],'|'));
|
|
|
|
+ foreach ($purchase as $value)
|
|
|
|
+ {
|
|
|
|
+ $pid .= " id = ".$value." or";
|
|
|
|
+ }
|
|
|
|
+ foreach ($transfer as $value)
|
|
|
|
+ {
|
|
|
|
+ $tid .= " id = ".$value." or";
|
|
|
|
+ }
|
|
|
|
+ foreach ($warehouse as $value)
|
|
|
|
+ {
|
|
|
|
+ $wid .= " id = ".$value." or";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ header('Location: /');exit;
|
|
|
|
+ }
|
|
|
|
+ $transfer_ids = array_column($transfer,'id');
|
|
|
|
+ foreach($transfer_ids as $k=>$v){
|
|
|
|
+ if($v == 11){
|
|
|
|
+ unset($transfer_ids[$k]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ $transfer_str = implode(",",$transfer_ids);
|
|
|
|
+ $sql_r = $this->db->query("select s.id,s.is_jiaji,s.rk,c.is_over,c.time,c.lx,c.id from crowd_systemtransfer as s inner join crowd_systemtransfer_cr as c on c.fid = s.id and c.is_over = 0 and c.time > ".(time()-3600*24*7) ." and c.lx in (".$transfer_str.") where s.is_jiaji = 2 and s.rk not like '%|11|%'");
|
|
|
|
+ // print_r("select s.id,s.is_jiaji,s.rk,c.is_over,c.time,c.lx,c.id from crowd_systemtransfer as s inner join crowd_systemtransfer_cr as c on c.fid = s.id and c.is_over = 0 and c.time > ".(time()-3600*24*7) ." and c.lx in (".$transfer_str.") where s.is_jiaji = 2 and s.rk not like '%|11|%'");
|
|
|
|
+
|
|
|
|
+ $tmp_list= $sql_r->result_array();
|
|
|
|
+ echo "<pre>";
|
|
|
|
+ var_dump($tmp_list);
|
|
|
|
+ }
|
|
}
|
|
}
|