|
|
@@ -33,8 +33,6 @@ class WorkOrderVerification extends Api
|
|
|
if(!$this->request->isGet()){
|
|
|
$this->error('请求方式错误');
|
|
|
}
|
|
|
- $is_have_cache = Cache::get('WorkOrderVerification/getTab');
|
|
|
- if ($is_have_cache === false){
|
|
|
$rows = db()->table('db_qczl')
|
|
|
->field('LEFT(sys_rq, 10) as date, COUNT(*) as counts')
|
|
|
->group('date')
|
|
|
@@ -59,10 +57,6 @@ class WorkOrderVerification extends Api
|
|
|
}
|
|
|
$rows[$key]['date'] = str_replace('-', '.', $rows[$key]['date']);
|
|
|
}
|
|
|
- Cache::set('WorkOrderVerification/getTab',$rows,86400);
|
|
|
- }else{
|
|
|
- $rows = Cache::get('WorkOrderVerification/getTab');
|
|
|
- }
|
|
|
|
|
|
$this->success('成功',$rows);
|
|
|
}
|
|
|
@@ -79,7 +73,7 @@ class WorkOrderVerification extends Api
|
|
|
}
|
|
|
$date = date('Y-m-d',strtotime("-1 year"));
|
|
|
|
|
|
- $rows = db()->table('db_qczl')->alias('d')->cache(true)
|
|
|
+ $rows = db()->table('db_qczl')->alias('d')
|
|
|
->field('d.qczl_gdbh, rtrim(y.Gd_cpmc) as Gd_cpmc')
|
|
|
->join('工单_基本资料 y','y.Gd_gdbh = d.qczl_gdbh','left')
|
|
|
->where('d.sys_rq','>=',$date)
|
|
|
@@ -87,7 +81,7 @@ class WorkOrderVerification extends Api
|
|
|
->order('d.qczl_gdbh desc')
|
|
|
->limit(65)
|
|
|
->select();
|
|
|
- $arr = db()->table('db_qczl')->cache(true)
|
|
|
+ $arr = db()->table('db_qczl')
|
|
|
->field('qczl_gdbh, rtrim(sys_id) as sys_id, COUNT(*) as count')
|
|
|
->where('qczl_gdbh','>=',$rows[count($rows)-1]['qczl_gdbh'])
|
|
|
->group('qczl_gdbh, sys_id')
|
|
|
@@ -145,7 +139,6 @@ class WorkOrderVerification extends Api
|
|
|
rtrim(sys_id) as sys_id,UniqId')
|
|
|
->where($where)
|
|
|
->order('UniqId desc')
|
|
|
-// ->cache(true,300)
|
|
|
->page($page,$limit)
|
|
|
->select();
|
|
|
|
|
|
@@ -401,7 +394,7 @@ class WorkOrderVerification extends Api
|
|
|
$where['a.sczl_type'] = array('like','%'.$search.'%');
|
|
|
$list = db('设备_产量计酬')->alias('a')
|
|
|
->join('人事_基本资料 b','a.sczl_bh1 = b.员工编号','left')
|
|
|
- ->where($where)->cache(true,86400)->field('distinct(a.sczl_gxmc),a.sczl_bzdh,a.sczl_jtbh,a.sczl_bh1,b.员工姓名 as name')
|
|
|
+ ->where($where)->cache(true,3600)->field('distinct(a.sczl_gxmc),a.sczl_bzdh,a.sczl_jtbh,a.sczl_bh1,b.员工姓名 as name')
|
|
|
->select();
|
|
|
$count = count($list);
|
|
|
$list[$count]['sczl_gxmc'] = '99-外发加工';
|