|
@@ -49,10 +49,66 @@ class Temporary extends BaseController
|
|
|
// }
|
|
|
}
|
|
|
|
|
|
- public function getOpenId() {
|
|
|
- $redirect_uri = "http://testwxpress.ngrok.natapp.cn/index.php/Home/Index/getCode";
|
|
|
- $url = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' . C('WECHAT_APPID') . '&redirect_uri=' . urlencode($redirect_uri) . '&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect';
|
|
|
- header("Location:" . $url);
|
|
|
+
|
|
|
+ public function kan_list()
|
|
|
+ {
|
|
|
+ //根据所登录的账号,查询跟本身有关的项目
|
|
|
+ $param = get_params();
|
|
|
+
|
|
|
+ $rows = empty($param['limit']) ? get_config('app . page_size') : $param['limit'];
|
|
|
+
|
|
|
+ $order = empty($param['order']) ? 'id desc' : $param['order'];
|
|
|
+
|
|
|
+ if (isset($param["project_start_time"])) {
|
|
|
+ $param["project_start_time"] = $param["project_start_time"] ? strtotime($param["project_start_time"]) : 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (isset($param["project_end_time"])) {
|
|
|
+ $param["project_end_time"] = $param["project_end_time"] ? strtotime($param["project_end_time"]) : 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ $where3 = [];//搜索条件
|
|
|
+ if (!empty($param['project_status'])) {
|
|
|
+ $where3[] = ['project_status', '=', $param['project_status']];
|
|
|
+ }
|
|
|
+ if (!empty($param['province'])) {
|
|
|
+ $where3[] = ['province', '=', $param['province']];
|
|
|
+ }
|
|
|
+ if (!empty($param['city'])) {
|
|
|
+ $where3[] = ['city', '=', $param['city']];
|
|
|
+ }
|
|
|
+ if (!empty($param['area'])) {
|
|
|
+ $where3[] = ['area', '=', $param['area']];
|
|
|
+ }
|
|
|
+ if (!empty($param['project_end_time'])) {
|
|
|
+ $where3[] = ['project_end_time', '<', $param['project_end_time']];
|
|
|
+ }
|
|
|
+ if (!empty($param['project_start_time'])) {
|
|
|
+ $where3[] = ['project_start_time', '>', $param['project_start_time']];
|
|
|
+ }
|
|
|
+ if (!empty($param['keyword'])) {
|
|
|
+ $keyword = $param['keyword'];
|
|
|
+ $where3[] = ['project_num|project_name|review_unit', 'like', '%' . $keyword . '%'];
|
|
|
+ }
|
|
|
+ if (!empty($param['review_unit_name'])) {
|
|
|
+ $where3[] = ['review_unit_name', 'like', '%' . $param['review_unit_name'] . '%'];
|
|
|
+ }
|
|
|
+ if (!empty($param['sent_review_unit_name'])) {
|
|
|
+ $where3[] = ['sent_review_unit_name', 'like', '%' . $param['sent_review_unit_name'] . '%'];
|
|
|
+ }
|
|
|
+ if (!empty($param['entrust_unit_name'])) {
|
|
|
+ $where3[] = ['entrust_unit_name', 'like', '%' . $param['entrust_unit_name'] . '%'];
|
|
|
+ }
|
|
|
+
|
|
|
+ $res = Db::name('follow_project')->where('openid',$param['openid'])->value('project_id');
|
|
|
+ $list = $this->model->where($where3)->where('id','in',$res)
|
|
|
+ ->order("create_time desc")->paginate(9999, false, ['query' => $param])
|
|
|
+ ->each(function ($item) {})->toArray();
|
|
|
+ halt($list);
|
|
|
+ $data = $list["data"];
|
|
|
+ // halt($real_list);
|
|
|
+ View::assign("detail", $data);
|
|
|
+ return view();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -127,20 +183,6 @@ class Temporary extends BaseController
|
|
|
->order($order)
|
|
|
->select();
|
|
|
|
|
|
- //2是公司,0是财政局,1是业主
|
|
|
- $unit_type = Db::name("department")->where("id", get_login_admin("unit_name"))->value("type");
|
|
|
- if ($unit_type == 0) {
|
|
|
- $person = self::user($id);
|
|
|
- View::assign('project_five', self::getProjectFive());
|
|
|
- } elseif ($unit_type == 2) {
|
|
|
- $person = self::user($id);
|
|
|
- View::assign('project_five', self::getProjectFiveCompany());
|
|
|
- } else {
|
|
|
- $person = 0;
|
|
|
- View::assign('project_five', self::getProjectFiveYezhu());
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
$appropriation_uid = Db::name("appropriation_project")->where("project_id", $id)->value("uid");
|
|
|
if (empty($appropriation_uid)) {
|
|
|
$appropriation_data = [];
|
|
@@ -185,8 +227,6 @@ class Temporary extends BaseController
|
|
|
}
|
|
|
|
|
|
|
|
|
- $project_log = self::project_log($id);
|
|
|
-
|
|
|
$red = Db::name("new_msg")->where([["uid", '=', $this->uid], ["project_id", "=", $id]])->field('detail,comment,report,user,contact')->find();
|
|
|
if (empty($red)) {
|
|
|
$red = ["detail" => 0, "comment" => 0, "report" => 0, "user" => 0, "contact" => 0];
|
|
@@ -220,7 +260,6 @@ class Temporary extends BaseController
|
|
|
|
|
|
if (!empty($detail)) {
|
|
|
View::assign('appointmentList', $appointmentList);
|
|
|
- View::assign('project_log', $project_log);
|
|
|
View::assign('project_id', $id);
|
|
|
View::assign('comment', $comment);
|
|
|
View::assign('record', $record);
|
|
@@ -230,9 +269,7 @@ class Temporary extends BaseController
|
|
|
View::assign('file_array', $file_array);
|
|
|
View::assign('appropriation_file_array', $appropriation_file_array);
|
|
|
View::assign('report', $report);
|
|
|
- View::assign('person', $person);
|
|
|
View::assign('red', $red);
|
|
|
- View::assign('unit_type', $unit_type);
|
|
|
|
|
|
return view();
|
|
|
} else {
|
|
@@ -241,6 +278,79 @@ class Temporary extends BaseController
|
|
|
|
|
|
}
|
|
|
|
|
|
+ public function followProject()
|
|
|
+ {
|
|
|
+ if (request()->isAjax()) {
|
|
|
+
|
|
|
+ $param = request()->param();
|
|
|
+ // halt($param);
|
|
|
+ if(!isset($param['id'])|| !isset($param['openid']) ){
|
|
|
+ return to_assign(1, '参数错误请重试');
|
|
|
+ }
|
|
|
+
|
|
|
+ $res = Db::name('follow_project')->where('project_id',$param['id'])->where('openid',$param['openid'])->find();
|
|
|
+ if($res == null){
|
|
|
+ $isTrue =Db::name('follow_project')->insert(['project_id'=>$param['id'] , 'openid'=>$param['openid']]);
|
|
|
+ if($isTrue){
|
|
|
+ return to_assign(0, '关注成功!!');
|
|
|
+ }else{
|
|
|
+ return to_assign(1, '失败请重试!!');
|
|
|
+ }
|
|
|
+
|
|
|
+ }else{
|
|
|
+ return to_assign(1, '已经关注过项目');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ public function notFollowProject()
|
|
|
+ {
|
|
|
+ if (request()->isAjax()) {
|
|
|
+
|
|
|
+ $param = request()->param();
|
|
|
+ // halt($param);
|
|
|
+ if(!isset($param['id'])|| !isset($param['openid']) ){
|
|
|
+ return to_assign(1, '参数错误请重试');
|
|
|
+ }
|
|
|
+
|
|
|
+ $res = Db::name('follow_project')->where('project_id',$param['id'])->where('openid',$param['openid'])->find();
|
|
|
+ if($res !== null){
|
|
|
+ $isTrue =Db::name('follow_project')->where('project_id',$param['id'])->where('openid',$param['openid'])->delete();
|
|
|
+ if($isTrue){
|
|
|
+ return to_assign(0, '取消关注成功!!');
|
|
|
+ }else{
|
|
|
+ return to_assign(1, '取消关注失败请重试!!');
|
|
|
+ }
|
|
|
+
|
|
|
+ }else{
|
|
|
+ return to_assign(1, '还未关注项目!');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public function findFollowProject()
|
|
|
+ {
|
|
|
+ if (request()->isAjax()) {
|
|
|
+
|
|
|
+ $param = request()->param();
|
|
|
+ // halt($param);
|
|
|
+ if(!isset($param['id'])|| !isset($param['openid']) ){
|
|
|
+ return to_assign(1, '参数错误请重试');
|
|
|
+ }
|
|
|
+
|
|
|
+ $res = Db::name('follow_project')->where('project_id',$param['id'])->where('openid',$param['openid'])->find();
|
|
|
+ if($res !== null){
|
|
|
+ return to_assign(0, '已经关注!');
|
|
|
+ }else{
|
|
|
+ return to_assign(1, '还未关注项目!');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* cp代办内容
|
|
|
*/
|
|
@@ -317,10 +427,8 @@ class Temporary extends BaseController
|
|
|
}
|
|
|
View::assign('field', $fields);
|
|
|
|
|
|
- $project_log = self::project_log($id);
|
|
|
// halt($detail);
|
|
|
if (!empty($detail)) {
|
|
|
- View::assign('project_log', $project_log);
|
|
|
View::assign('project_id', $id);
|
|
|
View::assign('comment', $comment);
|
|
|
View::assign('record', $record);
|
|
@@ -328,7 +436,6 @@ class Temporary extends BaseController
|
|
|
View::assign('detail', $detail);
|
|
|
View::assign('file_array', $file_array);
|
|
|
View::assign('report', $report);
|
|
|
- View::assign('person', $person);
|
|
|
return view();
|
|
|
} else {
|
|
|
echo '<div style="text-align:center;color:red;margin-top:20%;font-size:425%"><span>项目不存在!</span><br><span>已被删除</span></div>';
|
|
@@ -410,41 +517,7 @@ class Temporary extends BaseController
|
|
|
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- *项目日志
|
|
|
- */
|
|
|
- public function project_log($project_id)
|
|
|
- {
|
|
|
- // $project_id = 24;
|
|
|
- $login_admin = get_login_admin();
|
|
|
|
|
|
- $where = array();
|
|
|
-
|
|
|
- if ($login_admin['user_type'] == 2) {
|
|
|
- $where = [
|
|
|
- ['project_status', '>=', 3],
|
|
|
- ['unit_name', '=', $login_admin['unit_name']],
|
|
|
- ];
|
|
|
- } else {
|
|
|
-
|
|
|
- if ($login_admin['permission'] != 1) {
|
|
|
- $where = [
|
|
|
- ['unit_name', '=', $login_admin['unit_name']],
|
|
|
- ];
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- // dump($where);
|
|
|
- $project_log = Db::name('ProjectLog')->where($where)->where('project_id', $project_id)->order('create_time', 'desc')->select()->toArray();
|
|
|
-
|
|
|
- foreach ($project_log as $key => $value) {
|
|
|
- $project_log[$key]['create_time'] = date("Y-m-d H:i:s", $value['create_time']);
|
|
|
- }
|
|
|
- // dump($project_log);
|
|
|
- // View::assign('project_log', $project_log);
|
|
|
- // return View();
|
|
|
- return $project_log;
|
|
|
- }
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -661,30 +734,6 @@ class Temporary extends BaseController
|
|
|
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 添加工作记录
|
|
|
- */
|
|
|
- public function record_add()
|
|
|
- {
|
|
|
- $param = get_params();
|
|
|
- $id = isset($param['id']) ? $param['id'] : 0;//记录id
|
|
|
- $project_id = isset($param['project_id']) ? $param['project_id'] : 0;
|
|
|
- $project = Db::name("cost_project")->where("id", $project_id)->value("project_name");
|
|
|
- View::assign('id', $id);
|
|
|
- View::assign('user_type', $this->user_tpe);
|
|
|
- View::assign('project_id', $project_id);
|
|
|
- View::assign('project', $project);
|
|
|
- return view();
|
|
|
- }
|
|
|
- public function appointment_add()
|
|
|
- {
|
|
|
-
|
|
|
- $param = get_params();
|
|
|
- $project_id = isset($param['project_id']) ? $param['project_id'] : 0;
|
|
|
- View::assign('user_type', $this->user_tpe);
|
|
|
- View::assign('project_id', $project_id);
|
|
|
- return view();
|
|
|
- }
|
|
|
|
|
|
/**
|
|
|
* 邀请函
|
|
@@ -1123,243 +1172,6 @@ class Temporary extends BaseController
|
|
|
return view();
|
|
|
}
|
|
|
|
|
|
- public function kan_list()
|
|
|
- {
|
|
|
- //根据所登录的账号,查询跟本身有关的项目
|
|
|
- //2是公司,0是财政局,1是业主
|
|
|
- $param = get_params();
|
|
|
-
|
|
|
- $rows = empty($param['limit']) ? get_config('app . page_size') : $param['limit'];
|
|
|
- $order = empty($param['order']) ? 'id desc' : $param['order'];
|
|
|
- if (isset($param["project_start_time"])) {
|
|
|
- $param["project_start_time"] = $param["project_start_time"] ? strtotime($param["project_start_time"]) : 0;
|
|
|
- }
|
|
|
- if (isset($param["project_end_time"])) {
|
|
|
- $param["project_end_time"] = $param["project_end_time"] ? strtotime($param["project_end_time"]) : 0;
|
|
|
- }
|
|
|
- $where3 = [];//搜索条件
|
|
|
- if (!empty($param['project_status'])) {
|
|
|
- $where3[] = ['project_status', '=', $param['project_status']];
|
|
|
- }
|
|
|
- if (!empty($param['province'])) {
|
|
|
- $where3[] = ['province', '=', $param['province']];
|
|
|
- }
|
|
|
- if (!empty($param['city'])) {
|
|
|
- $where3[] = ['city', '=', $param['city']];
|
|
|
- }
|
|
|
- if (!empty($param['area'])) {
|
|
|
- $where3[] = ['area', '=', $param['area']];
|
|
|
- }
|
|
|
- if (!empty($param['project_end_time'])) {
|
|
|
- $where3[] = ['project_end_time', '<', $param['project_end_time']];
|
|
|
- }
|
|
|
- if (!empty($param['project_start_time'])) {
|
|
|
- $where3[] = ['project_start_time', '>', $param['project_start_time']];
|
|
|
- }
|
|
|
- if (!empty($param['keyword'])) {
|
|
|
- $keyword = $param['keyword'];
|
|
|
- $where3[] = ['project_num|project_name|review_unit', 'like', '%' . $keyword . '%'];
|
|
|
- }
|
|
|
- if (!empty($param['review_unit_name'])) {
|
|
|
- $where3[] = ['review_unit_name', 'like', '%' . $param['review_unit_name'] . '%'];
|
|
|
- }
|
|
|
- if (!empty($param['sent_review_unit_name'])) {
|
|
|
- $where3[] = ['sent_review_unit_name', 'like', '%' . $param['sent_review_unit_name'] . '%'];
|
|
|
- }
|
|
|
- if (!empty($param['entrust_unit_name'])) {
|
|
|
- $where3[] = ['entrust_unit_name', 'like', '%' . $param['entrust_unit_name'] . '%'];
|
|
|
- }
|
|
|
-
|
|
|
- $unit_type = Db::name("department")->where("id", get_login_admin("unit_name"))->value("type");
|
|
|
- $inarr = array();
|
|
|
-
|
|
|
- if ($unit_type == 0) {
|
|
|
- $where[] = ["delete_time", "=", 0];
|
|
|
- $where[] = ["project_status", ">", 0];
|
|
|
- $where[] = ["entrust_unit", "=", get_login_admin('unit_name')];
|
|
|
- $where2[] = ["delete_time", "=", 0];
|
|
|
- $where2[] = ["project_status", ">", 0];
|
|
|
- $where2[] = ["entrust_unit", "=", get_login_admin('unit_name')];
|
|
|
- //项目可见的权限
|
|
|
- $field = $this->Field->get_field_rules_new($this->uid);
|
|
|
- //1全部-可查看可编辑,2全部-可查看,0与我有关
|
|
|
- $see_auth = isset($field["see_auth"]) ? $field["see_auth"] : 3;
|
|
|
- if ($see_auth == 3) {
|
|
|
- $where[] = ["entrust_maker", "=", $this->uid];
|
|
|
-
|
|
|
- $where2[] = ["entrust_approver", "=", $this->uid];
|
|
|
- $where2[] = ["project_status", ">", 1];
|
|
|
-
|
|
|
- } elseif ($see_auth == 0) {
|
|
|
- $where[] = ["entrust_maker", "=", $this->uid];
|
|
|
- $where[] = ["project_status", ">", 0];
|
|
|
- $where2[] = ["entrust_approver", "=", $this->uid];
|
|
|
- $where2[] = ["project_status", ">", 1];
|
|
|
- }
|
|
|
- $list = $this->model->where($where3)
|
|
|
- ->where(function ($query) use ($where,$where2) {
|
|
|
- // 第一组条件(entrust_maker)
|
|
|
- $query->where(function ($q1) use ($where) {
|
|
|
- $q1->where($where);
|
|
|
- });
|
|
|
- // 使用 OR 连接第二组条件(entrust_approver)
|
|
|
- $query->whereOr(function ($q2) use ($where2) {
|
|
|
- $q2->where($where2);
|
|
|
- });
|
|
|
- })
|
|
|
- ->order("create_time desc")->paginate(9999, false, ['query' => $param])
|
|
|
- ->each(function ($item) {
|
|
|
- $red = Db::name("new_msg")->where([["project_id", "=", $item->id], ["uid", "=", $this->uid]])->find();
|
|
|
- if ($red) {
|
|
|
- if ($red["detail"] || $red["comment"] || $red["report"] || $red["user"] || $red["contact"]) {
|
|
|
- $item->red = 1;
|
|
|
- } else {
|
|
|
-
|
|
|
- $item->red = 0;
|
|
|
- }
|
|
|
- } else {
|
|
|
- $item->red = 0;
|
|
|
- }
|
|
|
- if (($item->province && $item->city && $item->area)) {
|
|
|
- $item->project_region = $item->province . '-' . $item->city . '-' . $item->area;
|
|
|
- }
|
|
|
-
|
|
|
- })->toArray();
|
|
|
- } elseif ($unit_type == 2) {
|
|
|
- $order = empty($param['order']) ? 'project_receive_time desc,id desc' : $param['order'];
|
|
|
-
|
|
|
- $where = [
|
|
|
- ["delete_time", "=", 0],
|
|
|
- ["project_status", ">", 3],
|
|
|
- ["review_unit", "=", get_login_admin("unit_name")]
|
|
|
- ];
|
|
|
- $review_unit = $this->model->where($where)->where($where3)->field('id,review_head,operate_head,operate_team')->select()->toArray();
|
|
|
- for ($i = 0; $i < count($review_unit); $i++) {
|
|
|
- $a = $review_unit[$i];
|
|
|
- $ids = $a["review_head"] . ',' . $a["operate_head"] . ',' . $a["operate_team"];
|
|
|
- $ids = explode(",", $ids);
|
|
|
- $c = in_array($this->uid, $ids);
|
|
|
- if ($c) {
|
|
|
- $inarr[] = $a["id"];
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- $field = $this->Field->get_field_rules_New($this->uid);
|
|
|
- $see_auth = isset($field["see_auth"]) ? $field["see_auth"] : 3;
|
|
|
- $this->see_auth = $see_auth;
|
|
|
- if ($see_auth == 3) {
|
|
|
-
|
|
|
- $list = $this->model
|
|
|
- ->where($where)->where($where3)->whereIn("id", $inarr)
|
|
|
- ->order($order)->paginate(9999, false, ['query' => $param])
|
|
|
- ->each(function ($item) {
|
|
|
-
|
|
|
- $red = Db::name("new_msg")->where([["project_id", "=", $item->id], ["uid", "=", $this->uid]])->find();
|
|
|
- if ($red) {
|
|
|
-
|
|
|
- if ($red["detail"] || $red["comment"] || $red["report"] || $red["record"] || $red["user"] || $red["contact"]) {
|
|
|
- $item->red = 1;
|
|
|
- } else {
|
|
|
- $item->red = 0;
|
|
|
- }
|
|
|
- } else {
|
|
|
- $item->red = 0;
|
|
|
- }
|
|
|
-
|
|
|
- })->toArray();
|
|
|
-
|
|
|
- } elseif ($see_auth == 0) {
|
|
|
- $list = $this->model
|
|
|
- ->where($where)->where($where3)->whereIn("id", $inarr)
|
|
|
- ->order($order)->paginate(9999, false, ['query' => $param])
|
|
|
- ->each(function ($item) {
|
|
|
-
|
|
|
- $red = Db::name("new_msg")->where([["project_id", "=", $item->id], ["uid", "=", $this->uid]])->find();
|
|
|
- if ($red) {
|
|
|
- if ($red["detail"] || $red["comment"] || $red["report"] || $red["record"] || $red["user"] || $red["contact"]) {
|
|
|
- $item->red = 1;
|
|
|
- } else {
|
|
|
- $item->red = 0;
|
|
|
- }
|
|
|
- } else {
|
|
|
- $item->red = 0;
|
|
|
- }
|
|
|
-
|
|
|
- })->toArray();
|
|
|
- } else {
|
|
|
- $list = $this->model
|
|
|
- ->where($where)
|
|
|
- ->order($order)->where($where3)->paginate(9999, false, ['query' => $param])
|
|
|
- ->each(function ($item) {
|
|
|
-
|
|
|
- $red = Db::name("new_msg")->where([["project_id", "=", $item->id], ["uid", "=", $this->uid]])->find();
|
|
|
- if ($red) {
|
|
|
- if ($red["detail"] || $red["comment"] || $red["report"] || $red["record"] || $red["user"] || $red["contact"]) {
|
|
|
- $item->red = 1;
|
|
|
- } else {
|
|
|
- $item->red = 0;
|
|
|
- }
|
|
|
- } else {
|
|
|
- $item->red = 0;
|
|
|
- }
|
|
|
- })->toArray();
|
|
|
- }
|
|
|
-
|
|
|
- } elseif ($unit_type == 1) {
|
|
|
- $field = $this->Field->get_field_rules_New($this->uid);
|
|
|
- $see_auth = isset($field["see_auth"]) ? $field["see_auth"] : 3;
|
|
|
- if ($see_auth == 0 || $see_auth == 3) {
|
|
|
- $where = [
|
|
|
- ["delete_time", "=", 0],
|
|
|
- ["sent_review_unit", "=", get_login_admin("unit_name")],
|
|
|
- ["sent_review_head", "=", $this->uid]
|
|
|
- ];
|
|
|
- } else {
|
|
|
- $where = [
|
|
|
- ["delete_time", "=", 0],
|
|
|
- ["sent_review_unit", "=", get_login_admin("unit_name")]
|
|
|
- ];
|
|
|
- }
|
|
|
- $list = $this->model
|
|
|
- ->where($where)
|
|
|
- ->order($order)->where($where3)->paginate(9999, false, ['query' => $param])
|
|
|
- ->each(function ($item) {
|
|
|
-
|
|
|
- $red = Db::name("new_msg")->where([["project_id", "=", $item->id], ["uid", "=", $this->uid]])->find();
|
|
|
- if ($red) {
|
|
|
- if ($red["detail"] || $red["comment"] || $red["report"] || $red["record"] || $red["user"] || $red["contact"]) {
|
|
|
- $item->red = 1;
|
|
|
- } else {
|
|
|
- $item->red = 0;
|
|
|
- }
|
|
|
- } else {
|
|
|
- $item->red = 0;
|
|
|
- }
|
|
|
- })->toArray();
|
|
|
- } else {
|
|
|
- $list["data"] = [];
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- $data = $list["data"];
|
|
|
- $real_list = array_values(array_column($data, NULL, 'id'));
|
|
|
-
|
|
|
- $red = $this->Auditmodel->where("approver", $this->uid)->where("audit_status", 1)->count();
|
|
|
- $red_id = Db::name("new_msg")->where("uid", "=", $this->uid)->select();
|
|
|
- $red_kan = 0;
|
|
|
- foreach ($red_id as $item => $value) {
|
|
|
- if ($value["detail"] || $value["comment"] || $value["report"] || $value["user"] || $value["contact"]) {
|
|
|
- $red_kan = 1;
|
|
|
- }
|
|
|
- }
|
|
|
- View::assign("red_kan", $red_kan);
|
|
|
- View::assign("detail", $real_list);
|
|
|
- View::assign("red", $red);
|
|
|
- View::assign("unit_type", $unit_type);
|
|
|
- return view();
|
|
|
- }
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|