|
@@ -30,7 +30,7 @@ use think\Db;
|
30
|
30
|
class Cms extends MemberApi
|
31
|
31
|
{
|
32
|
32
|
|
33
|
|
- protected $noNeedLogin = ['login', 'register','getProduct','getProductSmall','createTask','tagHandle','taskHandle'];
|
|
33
|
+ protected $noNeedLogin = ['login', 'register','getProduct','getProductSmall','createTask','tagHandle','taskHandle','getAreaJson'];
|
34
|
34
|
protected $noNeedRight = [];
|
35
|
35
|
|
36
|
36
|
//初始化
|
|
@@ -287,7 +287,39 @@ class Cms extends MemberApi
|
287
|
287
|
}
|
288
|
288
|
|
289
|
289
|
/*
|
290
|
|
- * http://console.zx2049.com/api/cms/tagHandle?taskid=10
|
|
290
|
+ * {"1":"广东","30":"福建","6872":"陕西","6791":"西藏","6645":"云南","6344":"四川","6303":"重庆","6003":"海南","5879":"广西","5742":"湖南","5625":"湖北","5448":"河南","5179":"江西","5056":"安徽","4833":"江苏","4813":"上海","4667":"黑龙江","4589":"吉林","4474":"辽宁","4228":"山西","4042":"河北","4023":"天津","4003":"浙江","6547":"贵州","4359":"内蒙古","4004":"北京","6990":"甘肃","7092":"青海","7144":"宁夏","7171":"新疆","10000":"主站"}
|
|
291
|
+ *
|
|
292
|
+ * http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=1
|
|
293
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=30
|
|
294
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=6872
|
|
295
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=6791
|
|
296
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=6645
|
|
297
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=6344
|
|
298
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=6303
|
|
299
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=6003
|
|
300
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=5879
|
|
301
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=5742
|
|
302
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=5625
|
|
303
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=5448
|
|
304
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=5179
|
|
305
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=5056
|
|
306
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=4833
|
|
307
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=4813
|
|
308
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=4667
|
|
309
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=4589
|
|
310
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=4474
|
|
311
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=4228
|
|
312
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=4042
|
|
313
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=4023
|
|
314
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=4003
|
|
315
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=6547
|
|
316
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=4359
|
|
317
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=4004
|
|
318
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=6990
|
|
319
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=7092
|
|
320
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=7144
|
|
321
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=7171
|
|
322
|
+ http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu=10000
|
291
|
323
|
*/
|
292
|
324
|
public function tagHandle()
|
293
|
325
|
{
|
|
@@ -297,11 +329,18 @@ class Cms extends MemberApi
|
297
|
329
|
$this->error('fail');
|
298
|
330
|
}
|
299
|
331
|
|
|
332
|
+ //地区参数
|
|
333
|
+ $diqu = $this->request->get('diqu',0);
|
|
334
|
+ if((int)$diqu === 0){
|
|
335
|
+ $this->error('fail');
|
|
336
|
+ }
|
|
337
|
+
|
300
|
338
|
$page = 1;
|
301
|
339
|
$list = Db::name('task')->where([
|
302
|
340
|
'catid' => $taskid, //任务分组id
|
303
|
341
|
'tagid' => 0,
|
304
|
342
|
'status' => 0,
|
|
343
|
+ 'diqu' => (int)$diqu
|
305
|
344
|
])
|
306
|
345
|
->order('add_time asc')->paginate(1);
|
307
|
346
|
$list = $list->toArray();
|
|
@@ -417,7 +456,41 @@ class Cms extends MemberApi
|
417
|
456
|
* 增加字段 is_run 未执行0 执行成功1 执行失败2(远程响应错误) 执行忽略3(存在小类或无级别-只有一个主页) 产品异常4(删除或未审核或屏蔽)
|
418
|
457
|
* run_time 执行时间
|
419
|
458
|
* is_run = 0 每次处理10条
|
420
|
|
- * http://console.zx2049.com/api/cms/taskHandle?taskid=10
|
|
459
|
+ *
|
|
460
|
+ * {"1":"广东","30":"福建","6872":"陕西","6791":"西藏","6645":"云南","6344":"四川","6303":"重庆","6003":"海南","5879":"广西","5742":"湖南","5625":"湖北","5448":"河南","5179":"江西","5056":"安徽","4833":"江苏","4813":"上海","4667":"黑龙江","4589":"吉林","4474":"辽宁","4228":"山西","4042":"河北","4023":"天津","4003":"浙江","6547":"贵州","4359":"内蒙古","4004":"北京","6990":"甘肃","7092":"青海","7144":"宁夏","7171":"新疆","10000":"主站"}
|
|
461
|
+ *
|
|
462
|
+ * http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=1
|
|
463
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=30
|
|
464
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=6872
|
|
465
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=6791
|
|
466
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=6645
|
|
467
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=6344
|
|
468
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=6303
|
|
469
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=6003
|
|
470
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=5879
|
|
471
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=5742
|
|
472
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=5625
|
|
473
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=5448
|
|
474
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=5179
|
|
475
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=5056
|
|
476
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=4833
|
|
477
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=4813
|
|
478
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=4667
|
|
479
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=4589
|
|
480
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=4474
|
|
481
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=4228
|
|
482
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=4042
|
|
483
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=4023
|
|
484
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=4003
|
|
485
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=6547
|
|
486
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=4359
|
|
487
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=4004
|
|
488
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=6990
|
|
489
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=7092
|
|
490
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=7144
|
|
491
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=7171
|
|
492
|
+ http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu=10000
|
|
493
|
+ *
|
421
|
494
|
*/
|
422
|
495
|
public function taskHandle()
|
423
|
496
|
{
|
|
@@ -426,12 +499,19 @@ class Cms extends MemberApi
|
426
|
499
|
$this->error('fail');
|
427
|
500
|
}
|
428
|
501
|
|
|
502
|
+ //地区参数
|
|
503
|
+ $diqu = $this->request->get('diqu',0);
|
|
504
|
+ if((int)$diqu === 0){
|
|
505
|
+ $this->error('fail');
|
|
506
|
+ }
|
|
507
|
+
|
429
|
508
|
//查询未执行的任务
|
430
|
509
|
$page = 1;
|
431
|
510
|
$list = Db::name('task')->where([
|
432
|
511
|
'catid' => $taskid, //任务分组id
|
433
|
512
|
'is_run' => 0,
|
434
|
513
|
'status' => 0,
|
|
514
|
+ 'diqu' => (int)$diqu
|
435
|
515
|
])
|
436
|
516
|
->where('tagid','>',0) //标签id需要已经获取到的
|
437
|
517
|
->order('add_time asc')->paginate(1);
|
|
@@ -630,7 +710,7 @@ class Cms extends MemberApi
|
630
|
710
|
$area_name = Db::connect('db1')->name('citysite')->where('id', '=', $diqu)->value('name');
|
631
|
711
|
}
|
632
|
712
|
$title = $this->getName($row['title']);
|
633
|
|
- $str = $area_name.$title.'评定';
|
|
713
|
+ $str = $area_name.$title.'评定学历要求';
|
634
|
714
|
return $str;
|
635
|
715
|
}
|
636
|
716
|
|
|
@@ -678,15 +758,17 @@ class Cms extends MemberApi
|
678
|
758
|
}
|
679
|
759
|
|
680
|
760
|
$h = ['一)','二)','三)','四)','五)','六)','七)','八)','九)','十)','十一)'];
|
|
761
|
+ $jk = 0;
|
681
|
762
|
foreach ($aids as $k=>$v){
|
682
|
763
|
$data = Db::connect('db1')->table('ey_zczygz_content')
|
683
|
764
|
->field('aid,content_6')->where('aid','=',$v['aid'])->find();
|
684
|
765
|
if(!empty($data['content_6'])){
|
685
|
766
|
$pro_title = $this->getName($row['title']);
|
686
|
767
|
$html .= '<p style="text-align: left;font-weight: bold !important;font-size:16px !important;margin-top:5px;">
|
687
|
|
-'.$h[$k].$area_name.$pro_title.'评定'.$v['title'].'学历要求:</p>';
|
|
768
|
+'.$h[$jk].$area_name.$pro_title.'评定'.$v['title'].'学历要求:</p>';
|
688
|
769
|
$html .= '<p style="text-align: left;">
|
689
|
770
|
'.$data['content_6'].'</p>';
|
|
771
|
+ $jk++;
|
690
|
772
|
}
|
691
|
773
|
}
|
692
|
774
|
|
|
@@ -714,14 +796,14 @@ class Cms extends MemberApi
|
714
|
796
|
}
|
715
|
797
|
|
716
|
798
|
$html .= '<p style="text-align: left;margin-top:15px;">
|
717
|
|
- <font style="font-weight: bold !important;font-size:16px !important;">最新'.$area_name.$pro_title.'评定政策详情请点击:</font><a href="'.$link.'" targey="_blank" style="color: blue !important;">'.$area_name.$pro_title.'评审</a></p>';
|
|
799
|
+ <font style="font-weight: bold !important;font-size:16px !important;">最新'.$area_name.$pro_title.'评定政策详情请点击:</font><a href="'.$link.'" targey="_blank" style="color: blue !important;font-size:16px !important;">'.$area_name.$pro_title.'</a></p>';
|
718
|
800
|
|
719
|
801
|
//其他链接
|
720
|
802
|
$html .= '<p style="text-align: left;margin-top:15px;">
|
721
|
|
- <a href="https://'.$domain.'.gdzcfw.com" style="color: blue !important;">职称网</a>更多<a href="https://'.$domain.'.gdzcfw.com" style="color: blue !important;">职称评审</a>相关请点击:<br/>
|
722
|
|
- <a href="https://'.$domain.'.gdzcfw.com/zccl" style="color: blue !important;">'.$area_name.'职称政策文件下载: https://'.$domain.'.gdzcfw.com/zccl</a><br/>
|
723
|
|
- <a href="https://www.gdzcfw.com/zcdb" style="color: blue !important;">职称答辩相关指引请点击: https://www.gdzcfw.com/zcdb</a><br/>
|
724
|
|
- <a href="https://zczl.gdzcfw.com" style="color: blue !important;">职称评审绿色破格通道: https://zczl.gdzcfw.com</a><br/></p><br/>';
|
|
803
|
+ <a href="https://www.gdzcfw.com" style="color: blue !important;">职称网</a>更多<a href="https://www.gdzcfw.com" style="color: blue !important;">职称评审</a>相关请点击:<br/>
|
|
804
|
+ '.$area_name.'职称政策文件下载: <a href="https://www.gdzcfw.com/zccl" style="color: blue !important;">职称材料</a><br/>
|
|
805
|
+ 职称答辩相关指引请点击: <a href="https://www.gdzcfw.com/zcdb" style="color: blue !important;">职称答辩</a><br/>
|
|
806
|
+ 职称评审绿色破格通道: <a href="https://zczl.gdzcfw.com" style="color: blue !important;">职称代办</a><br/></p><br/>';
|
725
|
807
|
|
726
|
808
|
return $html;
|
727
|
809
|
}
|
|
@@ -740,7 +822,43 @@ class Cms extends MemberApi
|
740
|
822
|
*/
|
741
|
823
|
|
742
|
824
|
/*
|
743
|
|
- * 校验产品如果正常了 任务改为未执行
|
|
825
|
+ * 产品异常 校验产品如果正常了 任务改为未执行
|
744
|
826
|
*/
|
745
|
827
|
|
|
828
|
+
|
|
829
|
+ /*
|
|
830
|
+ * 生成地区json 方便增加查询条件
|
|
831
|
+ * http://console.zx2049.com/api/cms/getAreaJson
|
|
832
|
+ */
|
|
833
|
+ public function getAreaJson()
|
|
834
|
+ {
|
|
835
|
+ $area = Db::connect('db1')
|
|
836
|
+ ->table('ey_citysite')
|
|
837
|
+ ->where(['level'=>1,'is_open'=>1,'status'=>1])
|
|
838
|
+ ->select();
|
|
839
|
+ //dump($area);
|
|
840
|
+ $area[] = [
|
|
841
|
+ 'id' => 10000,
|
|
842
|
+ 'name' => '主站',
|
|
843
|
+ ];
|
|
844
|
+
|
|
845
|
+ //{ 0: '待审核', 1: '通过' }
|
|
846
|
+ $collect = [];
|
|
847
|
+ $str = '';
|
|
848
|
+ foreach($area as $k=>$v){
|
|
849
|
+ $collect[(int)$v['id']] = $v['name'];
|
|
850
|
+ //$str .= 'http://console.zx2049.com/api/cms/taskHandle?taskid=10&diqu='.$v['id'].'<br/>';
|
|
851
|
+ $str .= 'http://console.zx2049.com/api/cms/tagHandle?taskid=10&diqu='.$v['id'].'<br/>';
|
|
852
|
+
|
|
853
|
+ }
|
|
854
|
+
|
|
855
|
+ $collect = json_encode($collect,JSON_UNESCAPED_UNICODE);
|
|
856
|
+
|
|
857
|
+
|
|
858
|
+ echo $str;
|
|
859
|
+ //return $collect;
|
|
860
|
+
|
|
861
|
+ }
|
|
862
|
+
|
|
863
|
+
|
746
|
864
|
}
|