更新时间戳
This commit is contained in:
parent
1f07e64cd6
commit
8baaf16b88
|
@ -88,7 +88,8 @@ class ArticleIndex extends ApiController
|
||||||
$fileArray = Db::name('File')->where('id','in',$detail['file_ids'])->select();
|
$fileArray = Db::name('File')->where('id','in',$detail['file_ids'])->select();
|
||||||
$detail['fileArray'] = $fileArray;
|
$detail['fileArray'] = $fileArray;
|
||||||
}
|
}
|
||||||
|
$detail['create_time'] = date('Y-m-d H:i:s', $detail['create_time']);
|
||||||
|
$detail['update_time'] = date('Y-m-d H:i:s', $detail['update_time']);
|
||||||
$comment = Db::name('ArticleComment')
|
$comment = Db::name('ArticleComment')
|
||||||
->field('a.*,u.name,u.thumb')
|
->field('a.*,u.name,u.thumb')
|
||||||
->alias('a')
|
->alias('a')
|
||||||
|
|
|
@ -106,6 +106,9 @@ class MessageIndex extends ApiController
|
||||||
$users = Db::name('Admin')->where('id', $detail['to_uid'])->value('name');
|
$users = Db::name('Admin')->where('id', $detail['to_uid'])->value('name');
|
||||||
array_push($user_names,$users);
|
array_push($user_names,$users);
|
||||||
}
|
}
|
||||||
|
$detail['create_time'] = date('Y-m-d H:i:s', $detail['create_time']);
|
||||||
|
$detail['update_time'] = date('Y-m-d H:i:s', $detail['update_time']);
|
||||||
|
$detail['read_time'] = date('Y-m-d H:i:s', $detail['read_time']);
|
||||||
$detail['users'] = implode(",", $user_names);
|
$detail['users'] = implode(",", $user_names);
|
||||||
$detail['read_users'] = implode(",", $read_user_names);
|
$detail['read_users'] = implode(",", $read_user_names);
|
||||||
$this->apiSuccess('查看成功', $detail);
|
$this->apiSuccess('查看成功', $detail);
|
||||||
|
|
|
@ -581,6 +581,8 @@ class OaApprove extends ApiController
|
||||||
|
|
||||||
$detail['days'] = floor($detail['duration']*10/80);
|
$detail['days'] = floor($detail['duration']*10/80);
|
||||||
$detail['hours'] = (($detail['duration']*10)%80)/10;
|
$detail['hours'] = (($detail['duration']*10)%80)/10;
|
||||||
|
$detail['create_time'] = date('Y-m-d H:i:s',$detail['create_time']);
|
||||||
|
$detail['update_time'] = date('Y-m-d H:i:s',$detail['update_time']);
|
||||||
|
|
||||||
$detail['create_user'] = Db::name('Admin')->where('id',$detail['admin_id'])->value('name');
|
$detail['create_user'] = Db::name('Admin')->where('id',$detail['admin_id'])->value('name');
|
||||||
$flows = Db::name('FlowStep')->where(['action_id'=>$detail['id'],'type'=>1,'sort'=>$detail['check_step_sort'],'delete_time'=>0])->find();
|
$flows = Db::name('FlowStep')->where(['action_id'=>$detail['id'],'type'=>1,'sort'=>$detail['check_step_sort'],'delete_time'=>0])->find();
|
||||||
|
@ -634,7 +636,8 @@ class OaApprove extends ApiController
|
||||||
->order('check_time desc')
|
->order('check_time desc')
|
||||||
->select()->toArray();
|
->select()->toArray();
|
||||||
foreach ($check_record as $kk => &$vv) {
|
foreach ($check_record as $kk => &$vv) {
|
||||||
$vv['check_time_str'] = date('Y-m-d H:i', $vv['check_time']);
|
$vv['check_time_str'] = date('Y-m-d H:i:s', $vv['check_time']);
|
||||||
|
$vv['check_time_'] = date('Y-m-d H:i:s', $vv['check_time']);
|
||||||
$vv['status_str'] = '提交';
|
$vv['status_str'] = '提交';
|
||||||
if($vv['status'] == 1){
|
if($vv['status'] == 1){
|
||||||
$vv['status_str'] = '审核通过';
|
$vv['status_str'] = '审核通过';
|
||||||
|
@ -680,7 +683,9 @@ class OaApprove extends ApiController
|
||||||
->order('f.id desc')
|
->order('f.id desc')
|
||||||
->paginate(['list_rows' => $rows, 'query' => $param])
|
->paginate(['list_rows' => $rows, 'query' => $param])
|
||||||
->each(function($item, $key){
|
->each(function($item, $key){
|
||||||
$item['create_time'] = date('Y-m-d H:i', $item['create_time']);
|
$item['create_time'] = date('Y-m-d H:i:s', $item['create_time']);
|
||||||
|
$item['start_time'] = date('Y-m-d H:i:s', $item['start_time']);
|
||||||
|
$item['end_time'] = date('Y-m-d H:i:s', $item['end_time']);
|
||||||
$item['check_user'] = '-';
|
$item['check_user'] = '-';
|
||||||
if($item['check_status']<2 && !empty($item['check_admin_ids'])){
|
if($item['check_status']<2 && !empty($item['check_admin_ids'])){
|
||||||
$check_user = Db::name('Admin')->where('id','in',$item['check_admin_ids'])->column('name');
|
$check_user = Db::name('Admin')->where('id','in',$item['check_admin_ids'])->column('name');
|
||||||
|
@ -734,7 +739,9 @@ class OaApprove extends ApiController
|
||||||
->group('f.id')
|
->group('f.id')
|
||||||
->paginate(['list_rows' => $rows, 'query' => $param])
|
->paginate(['list_rows' => $rows, 'query' => $param])
|
||||||
->each(function($item, $key){
|
->each(function($item, $key){
|
||||||
$item['create_time'] = date('Y-m-d H:i', $item['create_time']);
|
$item['create_time'] = date('Y-m-d H:i:s', $item['create_time']);
|
||||||
|
$item['start_time'] = date('Y-m-d H:i:s', $item['start_time']);
|
||||||
|
$item['end_time'] = date('Y-m-d H:i:s', $item['end_time']);
|
||||||
$item['check_user'] = '-';
|
$item['check_user'] = '-';
|
||||||
if($item['check_status']<2 && !empty($item['check_admin_ids'])){
|
if($item['check_status']<2 && !empty($item['check_admin_ids'])){
|
||||||
$check_user = Db::name('Admin')->where('id','in',$item['check_admin_ids'])->column('name');
|
$check_user = Db::name('Admin')->where('id','in',$item['check_admin_ids'])->column('name');
|
||||||
|
@ -756,7 +763,9 @@ class OaApprove extends ApiController
|
||||||
->group('f.id')
|
->group('f.id')
|
||||||
->paginate(['list_rows' => $rows, 'query' => $param])
|
->paginate(['list_rows' => $rows, 'query' => $param])
|
||||||
->each(function($item, $key){
|
->each(function($item, $key){
|
||||||
$item['create_time'] = date('Y-m-d H:i', $item['create_time']);
|
$item['create_time'] = date('Y-m-d H:i:s', $item['create_time']);
|
||||||
|
$item['start_time'] = date('Y-m-d H:i:s', $item['start_time']);
|
||||||
|
$item['end_time'] = date('Y-m-d H:i:s', $item['end_time']);
|
||||||
$item['check_user'] = '-';
|
$item['check_user'] = '-';
|
||||||
if($item['check_status']<2 && !empty($item['check_admin_ids'])){
|
if($item['check_status']<2 && !empty($item['check_admin_ids'])){
|
||||||
$check_user = Db::name('Admin')->where('id','in',$item['check_admin_ids'])->column('name');
|
$check_user = Db::name('Admin')->where('id','in',$item['check_admin_ids'])->column('name');
|
||||||
|
@ -777,7 +786,9 @@ class OaApprove extends ApiController
|
||||||
->group('f.id')
|
->group('f.id')
|
||||||
->paginate(['list_rows' => $rows, 'query' => $param])
|
->paginate(['list_rows' => $rows, 'query' => $param])
|
||||||
->each(function($item, $key){
|
->each(function($item, $key){
|
||||||
$item['create_time'] = date('Y-m-d H:i', $item['create_time']);
|
$item['create_time'] = date('Y-m-d H:i:s', $item['create_time']);
|
||||||
|
$item['start_time'] = date('Y-m-d H:i:s', $item['start_time']);
|
||||||
|
$item['end_time'] = date('Y-m-d H:i:s', $item['end_time']);
|
||||||
$item['check_user'] = '-';
|
$item['check_user'] = '-';
|
||||||
if($item['check_status']<2 && !empty($item['check_admin_ids'])){
|
if($item['check_status']<2 && !empty($item['check_admin_ids'])){
|
||||||
$check_user = Db::name('Admin')->where('id','in',$item['check_admin_ids'])->column('name');
|
$check_user = Db::name('Admin')->where('id','in',$item['check_admin_ids'])->column('name');
|
||||||
|
@ -825,7 +836,9 @@ class OaApprove extends ApiController
|
||||||
->group('f.id')
|
->group('f.id')
|
||||||
->paginate(['list_rows' => $rows, 'query' => $param])
|
->paginate(['list_rows' => $rows, 'query' => $param])
|
||||||
->each(function($item, $key){
|
->each(function($item, $key){
|
||||||
$item['create_time'] = date('Y-m-d H:i', $item['create_time']);
|
$item['create_time'] = date('Y-m-d H:i:s', $item['create_time']);
|
||||||
|
$item['start_time'] = date('Y-m-d H:i:s', $item['start_time']);
|
||||||
|
$item['end_time'] = date('Y-m-d H:i:s', $item['end_time']);
|
||||||
$item['check_user'] = '-';
|
$item['check_user'] = '-';
|
||||||
if($item['check_status']<2 && !empty($item['check_admin_ids'])){
|
if($item['check_status']<2 && !empty($item['check_admin_ids'])){
|
||||||
$check_user = Db::name('Admin')->where('id','in',$item['check_admin_ids'])->column('name');
|
$check_user = Db::name('Admin')->where('id','in',$item['check_admin_ids'])->column('name');
|
||||||
|
|
|
@ -73,7 +73,6 @@ class OaSchedule extends ApiController
|
||||||
$item->end_time_a = empty($item->end_time) ? '' : date('Y-m-d', $item->end_time);
|
$item->end_time_a = empty($item->end_time) ? '' : date('Y-m-d', $item->end_time);
|
||||||
$item->end_time_b = empty($item->end_time) ? '' : date('H:i', $item->end_time);
|
$item->end_time_b = empty($item->end_time) ? '' : date('H:i', $item->end_time);
|
||||||
$item->start_time = empty($item->start_time) ? '' : date('Y-m-d H:i', $item->start_time);
|
$item->start_time = empty($item->start_time) ? '' : date('Y-m-d H:i', $item->start_time);
|
||||||
//$item->end_time = empty($item->end_time) ? '': date('Y-m-d H:i', $item->end_time);
|
|
||||||
$item->end_time = empty($item->end_time) ? '' : date('H:i', $item->end_time);
|
$item->end_time = empty($item->end_time) ? '' : date('H:i', $item->end_time);
|
||||||
});
|
});
|
||||||
$this->apiSuccess('获取成功', $schedule);
|
$this->apiSuccess('获取成功', $schedule);
|
||||||
|
|
|
@ -53,7 +53,8 @@ class ProjectIndex extends ApiController
|
||||||
$item->director_name = Db::name('Admin')->where(['id' => $item->director_uid])->value('name');
|
$item->director_name = Db::name('Admin')->where(['id' => $item->director_uid])->value('name');
|
||||||
$item->plan_time = date('Y-m-d', $item->start_time) . ' 至 ' . date('Y-m-d', $item->end_time);
|
$item->plan_time = date('Y-m-d', $item->start_time) . ' 至 ' . date('Y-m-d', $item->end_time);
|
||||||
$item->status_name = ProjectList::$Status[(int) $item->status];
|
$item->status_name = ProjectList::$Status[(int) $item->status];
|
||||||
|
$item->start_time = empty($item->start_time) ? '-' : date('Y-m-d H:i:s', $item->start_time);
|
||||||
|
$item->end_time = empty($item->end_time) ? '-' : date('Y-m-d H:i:s', $item->end_time);
|
||||||
$task_map = [];
|
$task_map = [];
|
||||||
$task_map[] = ['project_id', '=', $item->id];
|
$task_map[] = ['project_id', '=', $item->id];
|
||||||
$task_map[] = ['delete_time', '=', 0];
|
$task_map[] = ['delete_time', '=', 0];
|
||||||
|
|
|
@ -30,6 +30,11 @@ class ProjectTask extends ApiController
|
||||||
$param = get_params();
|
$param = get_params();
|
||||||
$param['uid'] = JWT_UID;
|
$param['uid'] = JWT_UID;
|
||||||
$list = (new TaskList())->list($param);
|
$list = (new TaskList())->list($param);
|
||||||
|
$list = $list->toArray();
|
||||||
|
foreach($list['data'] as $k=>$v) {
|
||||||
|
$list['data'][$k]['create_time'] = date('Y-m-d H:i:s', $v['create_time']);
|
||||||
|
$list['data'][$k]['update_time'] = date('Y-m-d H:i:s', $v['update_time']);
|
||||||
|
}
|
||||||
$this->apiSuccess('获取成功', $list);
|
$this->apiSuccess('获取成功', $list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,6 +106,9 @@ class ProjectTask extends ApiController
|
||||||
$this->apiError('项目任务不存在');
|
$this->apiError('项目任务不存在');
|
||||||
} else {
|
} else {
|
||||||
$role_uid = [$detail['admin_id'], $detail['director_uid']];
|
$role_uid = [$detail['admin_id'], $detail['director_uid']];
|
||||||
|
$detail['create_time'] = date('Y-m-d H:i:s', $detail['create_time']);
|
||||||
|
$detail['update_time'] = date('Y-m-d H:i:s', $detail['update_time']);
|
||||||
|
$detail['delete_time'] = date('Y-m-d H:i:s', $detail['delete_time']);
|
||||||
$project_ids = Db::name('ProjectUser')->where(['uid' => $this->uid, 'delete_time' => 0])->column('project_id');
|
$project_ids = Db::name('ProjectUser')->where(['uid' => $this->uid, 'delete_time' => 0])->column('project_id');
|
||||||
$auth = isAuth($this->uid,'project_admin');
|
$auth = isAuth($this->uid,'project_admin');
|
||||||
if (in_array($detail['project_id'], $project_ids) || in_array($this->uid, $role_uid) || in_array($this->uid, explode(",",$detail['assist_admin_ids'])) || ($auth==1&&$detail['project_id']>0) || ($this->uid==1)) {
|
if (in_array($detail['project_id'], $project_ids) || in_array($this->uid, $role_uid) || in_array($this->uid, explode(",",$detail['assist_admin_ids'])) || ($auth==1&&$detail['project_id']>0) || ($this->uid==1)) {
|
||||||
|
|
Loading…
Reference in New Issue