|
@@ -191,10 +191,11 @@ class Daily extends Index
|
|
|
$addr = Db::name('daily_record')
|
|
|
->alias('dr')
|
|
|
->join('daily d','d.id=dr.daily_id')
|
|
|
+ ->join('address ad','d.address_id=ad.id')
|
|
|
->where('dr.org_id',$this->orgId)
|
|
|
->where('dr.user_id',$v['id'])
|
|
|
->where('dr.create_yyyymmdd',$curday)
|
|
|
- ->value('d.title');
|
|
|
+ ->value('ad.title');
|
|
|
|
|
|
$slist[$k][] = '<span style="color: #2A88F7">'.$v['real_name'].'</span>';
|
|
|
|
|
@@ -220,10 +221,11 @@ class Daily extends Index
|
|
|
$addr = Db::name('daily_record')
|
|
|
->alias('dr')
|
|
|
->join('daily d','d.id=dr.daily_id')
|
|
|
+ ->join('address ad','d.address_id=ad.id')
|
|
|
->where('dr.org_id',$this->orgId)
|
|
|
->where('dr.user_id',$v['id'])
|
|
|
->where('dr.create_yyyymmdd',$curday)
|
|
|
- ->value('d.title');
|
|
|
+ ->value('ad.title');
|
|
|
|
|
|
$slist2[$k][] = '<span style="color: #2DF8F5">'.$v['real_name'].'</span>';
|
|
|
|
|
@@ -252,7 +254,7 @@ class Daily extends Index
|
|
|
$map[] = ['enable', '=', 1];
|
|
|
$map[] = ['org_id', '=', $this->orgId];
|
|
|
$map[] = ['del', '=', 0];
|
|
|
- $lists = Db::name('daily')->where($map)->field('id,title')->order('id desc')->select();
|
|
|
+ $lists = Db::name('daily')->where($map)->field('id,title,address_id')->order('id desc')->select();
|
|
|
$hours = model('Daily')->getTimeDaily($this->orgId);
|
|
|
foreach ($lists as $k=>$v){
|
|
|
$m = [];
|
|
@@ -261,6 +263,9 @@ class Daily extends Index
|
|
|
$m[] = ['create_time','>=',$hours['start']];
|
|
|
$m[] = ['create_time','<',$hours['end']];
|
|
|
$count = Db::name('daily_record')->where($m)->count();
|
|
|
+ $lists[$k]['title'] = $v['address_id']>0?Db::name('address')
|
|
|
+ ->where('id',$v['address_id'])
|
|
|
+ ->value('title'):"";
|
|
|
$lists[$k]['count'] = $count;
|
|
|
|
|
|
}
|
|
@@ -276,7 +281,10 @@ class Daily extends Index
|
|
|
->select();
|
|
|
$data = [];
|
|
|
foreach ($list as $k=>$v){
|
|
|
- $data[$k][] = Db::name('daily')->where('id',$v['daily_id'])->value('title');
|
|
|
+ $addrid = Db::name('daily')->where('id',$v['daily_id'])
|
|
|
+ ->value('address_id');
|
|
|
+ $data[$k][] = $addrid>0?Db::name('address')
|
|
|
+ ->where('id',$addrid)->value('title'):"";
|
|
|
$data[$k][] = Db::name('user')->where('id',$v['user_id'])->value('real_name');
|
|
|
$data[$k][] = date('m-d H:i:s',strtotime($v['create_time']));
|
|
|
}
|