Przeglądaj źródła

Merge branch 'master' of http://59.57.98.130:3000/jjhc/report

# Conflicts:
#	app/admin/controller/Talent.php
sugangqiang 2 lat temu
rodzic
commit
f0055fbdc7

+ 26 - 19
app/admin/controller/Enterprise.php

@@ -33,26 +33,33 @@ class Enterprise extends AdminController {
     public function gotoEnterpriseDetailPage() {
         $id = trim($this->request['id']);
         $ep = EnterpriseApi::getOne($id);
-        $rsapi = new RsApi();
-        switch ($ep['special']){
-            case 0:
-                $ep['rs'] = $rsapi->I040102($ep['idCard']);
-                break;
-            case 1:
-                $ep['rs'] = $rsapi->I080101($ep['idCard']);
-                break;
-            case 2:
-                $ep['rs'] = $rsapi->I030501($ep['name'], $ep['idCard']);
-                break;
+        $check_info = ApiData::where('action','=','register_check')->where('uid','=',$ep['idCard'])->where('status','=',1)->find();
+        $force = intval($this->request['force'],0);
+        if($force || !$check_info || !$check_info['status']){
+            $rsapi = new RsApi();
+            switch ($ep['special']){
+                case 0:
+                    $ep['rs'] = $rsapi->I040102($ep['idCard']);
+                    break;
+                case 1:
+                    $ep['rs'] = $rsapi->I080101($ep['idCard']);
+                    break;
+                case 2:
+                    $ep['rs'] = $rsapi->I030501($ep['name'], $ep['idCard']);
+                    break;
+            }
+            ApiData::where('action','=','register_check')->where('uid','=',$ep['idCard'])->where('status','=',1)->update(['status' => 0,'updateTime' => time()]);
+            $api_model_data = [
+                'uid' => $ep['idCard'],
+                'action' => 'register_check',
+                'content' => serialize($ep['rs']),
+                'createTime' => time()
+            ];
+
+            ApiData::create($api_model_data);
+        }else{
+            $ep['rs'] = unserialize($check_info['content']);
         }
-        $api_model_data = [
-            'uid' => $ep['idCard'],
-            'action' => 'register_check',
-            'content' => serialize($ep['rs']),
-            'createTime' => time()
-        ];
-
-        ApiData::create($api_model_data);
 
         if (!$ep) {
             return "无此企业";

+ 25 - 20
app/admin/controller/EnterpriseChangeRecord.php

@@ -53,27 +53,32 @@ class EnterpriseChangeRecord extends AdminController {
                 $ecr['newStreetName'] = $streetList[$ecr['newStreet']];
             }
         }
-
-        $rsapi = new RsApi();
-        switch ($ep['special']){
-            case 0:
-                $ecr['rs'] = $rsapi->I040102($ecr['newIdCard']);
-                break;
-            case 1:
-                $ecr['rs'] = $rsapi->I080101($ep['newIdCard']);
-                break;
-            case 2:
-                $ecr['rs'] = $rsapi->I030501($ep['newName'], $ep['newIdCard']);
-                break;
+        $check_info = ApiData::where('action','=','register_check')->where('uid','=',$ep['idCard'])->where('status','=',1)->find();
+        $force = intval($this->request['force'],0);
+
+        if($force || !$check_info || !$check_info['status']){
+            $rsapi = new RsApi();
+            switch ($ep['special']){
+                case 0:
+                    $ecr['rs'] = $rsapi->I040102($ecr['newIdCard']);
+                    break;
+                case 1:
+                    $ecr['rs'] = $rsapi->I080101($ep['newIdCard']);
+                    break;
+                case 2:
+                    $ecr['rs'] = $rsapi->I030501($ep['newName'], $ep['newIdCard']);
+                    break;
+            }
+            $api_model_data = [
+                'uid' => $ecr['newIdCard'],
+                'action' => 'change_record_check',
+                'content' => serialize($ecr['rs']),
+                'createTime' => time()
+            ];
+            ApiData::create($api_model_data);
+        }else{
+            $ecr['rs'] = unserialize($check_info['content']);
         }
-        $api_model_data = [
-            'uid' => $ecr['newIdCard'],
-            'action' => 'change_record_check',
-            'content' => serialize($ecr['rs']),
-            'createTime' => time()
-        ];
-
-        ApiData::create($api_model_data);
 
         switch ($ecr['checkState']) {
             case 1:

+ 12 - 11
app/admin/controller/Talent.php

@@ -35,11 +35,12 @@ class Talent extends AdminController {
         $params = $request->param();
         $id = $params["id"];
         $info = VerifyApi::getTalentInfoById($id, true);
-        $rsapi = new RsApi();
-        if ($info['card_type'] == 1) {
-            $endTime = strtotime(date('Y-m-d') . '23:59:59');
-            $api_data = ApiData::where('uid', '=', $info['card_number'])->where('action', '=', 'rending')->where('createTime', '<', $endTime)->find(); //当天没有记录就请求
-            if (!$api_data) {
+        $force = intval($this->request['force'],0);
+        $api_data = ApiData::where('uid','=',$info['card_number'])->where('action', '=', 'rending')->where('status','=',1)->find();//
+        if($force || !$api_data || !$api_data['status']){
+            ApiData::where('uid','=',$info['card_number'])->where('action', '=', 'rending')->where('status','=',1)->update(['status' => 0,'updateTime' => time()]);
+            $rsapi = new RsApi();
+            if($info['card_type'] == 1){
                 $content = [];
                 $info['rs']['I010902'] = $content['I010902'] = $rsapi->I010902($info['card_number']);
                 $info['rs']['I030101'] = $content['I030101'] = $rsapi->I030101($info['card_number']);
@@ -49,13 +50,13 @@ class Talent extends AdminController {
                     'content' => serialize($content),
                     'createTime' => time()
                 ];
-
                 ApiData::create($api_model_data);
-            } else {
-                $content = unserialize($api_data['content']);
-                $info['rs'] = $content;
             }
+        }else{
+            $content = unserialize($api_data['content']);
+            $info['rs'] = $content;
         }
+
         if (in_array($info["checkState"], [TalentState::BASE_VERIFY_FAIL, TalentState::FST_SUBMIT, TalentState::BASE_VERIFY_PASS, TalentState::BASE_REVERIFY_REJECT, TalentState::BASE_REVERIFY_FAIL])) {
             return view("talentInfo_base_check", ["info" => $info]);
         } else {
@@ -930,7 +931,7 @@ class Talent extends AdminController {
         $data["checkState"] = $log["new_state"];
         TalentModel::update($data);
         TalentLogApi::setActive($log["id"], 1);
-        $this->sendMsgByState($talent_info, $log["state"], $userIds, $log["description"]);
+        $this->sendMsgByState($talent_info, $log["state"], $userIds);
         return json(["code" => 200, "msg" => "审核成功"]);
     }
 
@@ -1088,7 +1089,7 @@ class Talent extends AdminController {
                   $where[] = ["roleid", "<>", 1];
                   $userIds = User::where($where)->column("id"); */
 
-                $this->sendMsgByState($talent_info, $log_checkState, $userIds, $log["description"]);
+                $this->sendMsgByState($talent_info, $log_checkState, $userIds);
             }
         }
         TalentLogApi::setActive($dept_log["id"], 1);

+ 4 - 1
app/admin/view/enterprise/goto_enterprise_detail_page.html

@@ -56,6 +56,9 @@
             var htm = $(this).data('msg');
             $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
         });
+        $("#force_refresh").on('click',function(){
+            window.location.href = "/admin/enterprise/gotoEnterpriseDetailPage?force=1&id={$ep.id}";
+        });
     });
 
 </script>
@@ -64,7 +67,7 @@
         <input type="text" class="form-control" id="id" name="id" value="{$ep.id}" style="display: none;"/>
         <div class="panel-body">
             <div class="panel panel-default">
-                <div class="panel-heading">单位信息</div>
+                <div class="panel-heading">单位信息<button id="force_refresh">手动刷新接口信息</button></div>
                 <div class="panel-body">
                     <table style="width:100%" class="table table-bordered">
                         <tr>

+ 8 - 1
app/admin/view/enterprise_change_record/goto_enterprise_change_detail_page.html

@@ -56,6 +56,13 @@
     ul.files i.old{text-align:center;height:0;width:0;line-height:15px;color:#fff;position:absolute;right:0;bottom:0;border-top:15px solid transparent;border-right:15px solid #000;border-bottom:15px solid #000;border-left:15px solid transparent;display:block;}
     ul.files i.new{text-align:center;height:0;width:0;line-height:15px;color:#000;position:absolute;right:0;bottom:0;border-top:15px solid transparent;border-right:15px solid #0bfd1a;border-bottom:15px solid #0bfd1a;border-left:15px solid transparent;display:block;}
 </style>
+<script>
+    $(function(){
+        $("#force_refresh").on('click',function(){
+            window.location.href = "/admin/enterpriseChangeRecord/gotoEnterpriseChangeDetailPage?force=1&id={$ecr.id}";
+        });
+    })
+</script>
 <div class="ibox float-e-margins">
     <div class="ibox-content">
         <div class="panel-body">
@@ -63,7 +70,7 @@
                 <input type="hidden" id="id" name="id" value="{$ecr.id}"/>
                 <input type="hidden" id="type" name="type" value="{$ecr.type}"/>
                 <input type="hidden" id="checkState" name="checkState" value="{$ecr.checkState}"/>
-                <div class="panel-heading">{eq name="ecr.special" value="0"}企业{else/}单位{/eq}信息</div>
+                <div class="panel-heading">{eq name="ecr.special" value="0"}企业{else/}单位{/eq}信息<button id="force_refresh">手动刷新接口信息</button></div>
                 <div class="panel-body">
                     <table style="width:100%" class="table table-bordered">
                         <tr>

+ 3 - 3
app/admin/view/integral_verify/fst_verify.html

@@ -139,9 +139,9 @@
                             </button>
                             {/if}
                             {if condition="chkCommission('/admin/integralVerify/firstDownload','')"}
-                            <button type="button" class="btn btn-sm btn-primary " onclick="IntegralVerify.download()" id="">
-                                <i class="fa fa-download"></i>&nbsp;下载
-                            </button>
+<!--                            <button type="button" class="btn btn-sm btn-primary " onclick="IntegralVerify.download()" id="">-->
+<!--                                <i class="fa fa-download"></i>&nbsp;下载-->
+<!--                            </button>-->
                             {/if}
                             {if condition="chkCommission('/admin/integralVerify/updateFieldsAndFiles','')"}
                             <button type="button" class="btn btn-sm btn-primary " onclick="IntegralVerify.updateFieldsAndFiles()" id="">

+ 5 - 5
app/admin/view/integral_verify/re_verify.html

@@ -128,20 +128,20 @@
                             </div>
                         </div>
                         <div class="hidden-xs" id="IntegralVerifyTableToolbar" role="group">
-                            {if condition="chkCommission('/admin/talent/base_verify','')"}
+                            {if condition="chkCommission('/admin/integralVerify/re_verify','')"}
                             <button type="button" class="btn btn-sm btn-primary " onclick="IntegralVerify.openCheckIntegralVerify()" id="">
                                 <i class="fa fa-check"></i>&nbsp;审核
                             </button>
                             {/if}
-                            {if condition="chkCommission('/admin/talent/base_export','')"}
+                            {if condition="chkCommission('/admin/integralVerify/reVerifyListExport','')"}
                             <button type="button" class="btn btn-sm btn-primary " onclick="IntegralVerify.showExportModal(1)" id="">
                                 <i class="fa fa-file-excel-o"></i>&nbsp;导出
                             </button>
                             {/if}
                             {if condition="chkCommission('/admin/talent/base_download','')"}
-                            <button type="button" class="btn btn-sm btn-primary " onclick="IntegralVerify.download()" id="">
-                                <i class="fa fa-download"></i>&nbsp;下载
-                            </button>
+<!--                            <button type="button" class="btn btn-sm btn-primary " onclick="IntegralVerify.download()" id="">-->
+<!--                                <i class="fa fa-download"></i>&nbsp;下载-->
+<!--                            </button>-->
                             {/if}
                             <!--{if condition="chkCommission('/admin/talent/modify_reject_fields','')"}
                                 <button type="button" class="btn btn-sm btn-primary " onclick="IntegralVerify.updateFieldsAndFiles()" id="">

+ 10 - 0
app/admin/view/talent/talentInfo_common_check.html

@@ -67,6 +67,13 @@
         border-left:1px solid #ddd;
     }
 </style>
+<script>
+    $(function(){
+        $("#force_refresh").on('click',function(){
+            window.location.href = "/admin/talent/common_check?force=1&id={$info.id}";
+        });
+    })
+</script>
 <div class="ibox float-e-margins">
     <div class="ibox-content">
         <div class="form-horizontal">
@@ -75,6 +82,9 @@
                     <div class="tabs-container" >
                         <ul class="nav nav-tabs">
                             <li  class="" style="float: right;margin-left: 10px;">
+                                <button type="button" class="btn btn-sm btn-primary" id="force_refresh" >
+                                    <i class="fa fa-refresh"></i>&nbsp;手动刷新接口信息
+                                </button>
                                 <button type="button" class="btn btn-sm btn-primary " onclick="TalentInfoInfoDlg.download()" >
                                     <i class="fa fa-download"></i>&nbsp;打包下载
                                 </button>

+ 3 - 0
app/enterprise/controller/Integral.php

@@ -2,6 +2,7 @@
 
 namespace app\enterprise\controller;
 
+use app\common\api\DictApi;
 use app\enterprise\common\EnterpriseController;
 use think\facade\Db;
 use app\common\api\EnterpriseApi;
@@ -38,6 +39,8 @@ class Integral extends EnterpriseController {
         $id = isset($param["id"]) ? $param["id"] : 0;
         $info = IntegralRecordApi::getOne($id);
         $ep = EnterpriseApi::getOne($this->user["uid"]);
+        $streetList = DictApi::selectByParentCode('street');
+        $ep->streetName = $streetList[$ep->street];
         if ($info) {
             $info["real_state"] = TalentLogApi::getLastLog($id, ProjectState::INTEGRAL)["state"];
         }

+ 14 - 3
public/static/js/common/Feng.js

@@ -347,13 +347,24 @@ var Feng = {
     showImg: function(context) {                                        //传一个<img>对像
     	var pic = $(context);
     	var src = pic.attr("src");
+        var prev = pic.parent().prev();
+        var _title = prev.text();
+        var sn = _title.lastIndexOf(".");
+        var suffix = _title.substring(sn + 1, _title.length).toLowerCase();
+        var title = "图片预览";
+        var allowedPicTypes = ["jpg","jpeg","gif","png"];
+        if(allowedPicTypes.indexOf(suffix) > -1){
+            title = _title;
+        }
+        src='<div id`="#pics" style="padding:0;margin:0;background:#000;"><img id="_pic0002" layer-src="'+src+'" src="'+src+'" style="display:block;width:60%;height:auto; margin:0 auto;padding:0px;"/></div>';
         layer.open({
-            type:2,
-            title:"图片预览",
+            type:1,
+            title:title,
             fixed:false,
             area: ['80%', '80%'],
             content:src,
-            maxmin:true
+            maxmin:true,
+            shade:0
         })
     	/*var sbp = window.top.$("#showBigPic");
     	sbp.empty();

+ 1 - 0
public/static/modular/enterprise/enterprisechangeRecord/ep_change_record_detail.js

@@ -178,4 +178,5 @@ $(function () {
         var htm = $(this).data('msg');
         $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
     });
+
 });