Your Name 3 سال پیش
والد
کامیت
b86c182449
5فایلهای تغییر یافته به همراه26 افزوده شده و 15 حذف شده
  1. 2 2
      tool/clue/database/follow.php
  2. 15 9
      tool/clue/lib/Info.php
  3. 1 1
      tool/clue/lib/Manage.php
  4. 1 1
      tool/work/assets/pc/html/email.html
  5. 7 2
      tool/work/lib/Cron.php

+ 2 - 2
tool/clue/database/follow.php

@@ -10,7 +10,7 @@ $status = array
 (
     1 => '显示',
     2 => '不显示',
-    3 => '不显示算次数'
+    // 3 => '不显示算次数'
 );
 return array
 (
@@ -194,7 +194,7 @@ return array
                 'info_id' => 'yes',
                 'status' => 1,
                 'state' => 1,
-                'status' => array('yes','in'),
+                // 'status' => array('yes','in'),
             ),
             'type' => 'count',
             // 'order' => array('id' => 'asc'),

+ 15 - 9
tool/clue/lib/Info.php

@@ -29,8 +29,8 @@ Class Info
 		$html['area'] = $area;
 		$html['time'] = date('Y.m.d H:i',$info['cdate']).$info['gdate'];
 		$html['user'] = $info['name'].'<br/>'.$info['mobile'];
-		$data= Dever::db('clue/follow')->getCount(array('info_id'=>$id,'status'=>'1,3'));
-		$follow = Dever::db('clue/follow')->find(array('info_id'=>$id,'status'=>1));
+		$data= Dever::db('clue/follow')->getCount(array('info_id'=>$id));
+		$follow = Dever::db('clue/follow')->find(array('info_id'=>$id));
 		if ($follow){
 			if ($follow['xdate']) {
 				$html['xdate'] = date('Y.m.d H:i',$follow['xdate']);
@@ -171,13 +171,19 @@ Class Info
 				// 	$where['follow_id'] = $ids;
 				// } 
 			}
-			$w['admin_id'] = $where['follow'];
+			if (isset($where['follow']) && $where['follow']) {
+				$where['follow'] = $where['follow'];
+			} else {
+				$where['follow'] = $info['follow'];
+			}
+			$w['follow_admin_id'] = $where['follow'];
 				$w['info_id'] = $id;
-				if ($where['type'] == 3) {
-					$w['status'] = 3;
-				} else {
-					$w['status'] = 2;
-				}
+				// if ($where['type'] == 3) {
+				// 	$w['status'] = 3;
+				// } else {
+				// 	$w['status'] = 2;
+				// }
+				$w['status'] = 2;
 				$ids = Dever::db('clue/follow')->insert($w);
 				if ($ids) {
 					$where['follow_id'] = $ids;
@@ -319,7 +325,7 @@ Class Info
 		$data['info']['people'] = $this->group_admin($data['info']['company_id'],$branch[0],$branch[1]);
 		
 		$follow = 0;
-		$follow = Dever::db('clue/follow')->getCount(array('info_id'=>$id,'status'=>'1,3'));
+		$follow = Dever::db('clue/follow')->getCount(array('info_id'=>$id));
 		if ($data['info']['num'] && $data['info']['num']>0) {
 			$data['info']['cishu'] = $data['info']['num'].'次'; 
 		} else {

+ 1 - 1
tool/clue/lib/Manage.php

@@ -34,7 +34,7 @@ Class Manage
 			if ($v['num'] && $v['num'] > 0) {
 				$num = $v['num'];
 			} else {
-				$num = Dever::db('clue/follow')->getCount(array('info_id'=>$v['id'],'status'=>'1,3'));
+				$num = Dever::db('clue/follow')->getCount(array('info_id'=>$v['id']));
 			}
 			$area = '';
 			if ($v['area']) {

+ 1 - 1
tool/work/assets/pc/html/email.html

@@ -77,7 +77,7 @@ tr{
   margin-left:100px;
 }*/
 .zong {
-     margin-left: 100px;
+     /*margin-left: 100px;*/
      margin-top: 30px;
 }
 .container{

+ 7 - 2
tool/work/lib/Cron.php

@@ -12,7 +12,7 @@ Class Cron
         	$group_id = explode(',',$v['group']);
         	$admin = Dever::db('manage/admin')->find($group_id[1]);
             $content = $this->email_api($v);
-             $this->send($admin['email'], $admin['username'], $title, $content);
+            $this->send($admin['email'], $admin['username'], $title, $content);
         }
         // $content = $this->email_api();
         // foreach($admin as $key => $val){
@@ -45,10 +45,15 @@ Class Cron
             $people = $admin[1];
         }
         $data['info']['yi'] = Dever::db('work/info')->getCount(array('fpeople'=>$people,'end'=>$end,'status'=>'3,4'));
+        // echo Dever::sql();die;
         // $data['info']['wei'] = Dever::db('work/info')->getCount(array('group'=>$data['branch']['group_id'],'start'=>$start,'end'=>$end,'status'=>4));
 
         $data['question'] = Dever::db('work/question')->getAll(array('branch_id'=>$data['branch']['group_id']));
-        $data['app'] = Dever::db('work/info')->getAll(array('group'=>$data['branch']['group_id'],'start'=>$start,'end'=>$end));
+        $question = implode(',',$question);
+        // print_R($question);die;
+        $data['app'] = Dever::db('work/info')->fetchAll('select * from churen_work_info where (`group` in ('.$data['branch']['group_id'].') or fpeople in ('.$people.') or question in ('.$question.')) and cdate <='.$end.' and state = 1');
+        // getAll(array('group'=>$data['branch']['group_id'],'end'=>$end));
+        // print_R($data);die;
         foreach ($data['app'] as $k1 => $v1) {
             $data['app'][$k1]['cdate'] = date('Y-m-d H:i:s',$v1['cdate']);
             $data['app'][$k1]['zhipai'] = date('Y-m-d H:i:s',$v1['zdate']);