|
@@ -38,6 +38,45 @@ class Talent extends AdminController {
|
|
|
$info = VerifyApi::getTalentInfoById($id, true);
|
|
|
$force = intval($this->request['force'], 0);
|
|
|
$api_data = ApiData::where('uid', '=', $info['card_number'])->where('action', '=', 'rending')->where('status', '=', 1)->find(); //
|
|
|
+// $api_test = [
|
|
|
+// 'code' => 200,
|
|
|
+// 'data' => [
|
|
|
+// 'list' => [
|
|
|
+// [
|
|
|
+// "aae022" => 150.8,
|
|
|
+// "aae020" => 301.6,
|
|
|
+// "aae003" => 201911,
|
|
|
+// "aab034" => "晋江市社会劳动保险中心",
|
|
|
+// "aae002" => 201912,
|
|
|
+// "aab004" => "福建省晋江人力资本有限公司",
|
|
|
+// "aaa115" => "正常应缴",
|
|
|
+// "aae180" => 1885,
|
|
|
+// ],
|
|
|
+// [
|
|
|
+// "aae022" => 150.8,
|
|
|
+// "aae020" => 301.6,
|
|
|
+// "aae003" => 201912,
|
|
|
+// "aab034" => "晋江市社会劳动保险中心",
|
|
|
+// "aae002" => 201912,
|
|
|
+// "aab004" => "福建省晋江人力资本有限公司",
|
|
|
+// "aaa115" => "正常应缴",
|
|
|
+// "aae180" => 1885,
|
|
|
+// ]
|
|
|
+// ],
|
|
|
+// 'totalCount' => 70
|
|
|
+// ]
|
|
|
+// ];
|
|
|
+// $tmp_time = explode(' - ',$info['tax_insurance_month']);
|
|
|
+// $formatDate = formatDateByMonth($tmp_time[0],$tmp_time[1],$api_test['data']['list']);
|
|
|
+// $str = '';
|
|
|
+// foreach ($formatDate as $item){
|
|
|
+// $str .= $item . "<br />";
|
|
|
+// }
|
|
|
+// $info['shenbao'] = "该人员社保填写日期为{$tmp_time[0]}至{$tmp_time[1]},共" . count($formatDate) . "个月,接口返回{$api_test['data']['totalCount']}个月数据,分别为:<br />$str";
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //dd($tmp_time,diffDate($tmp_time[0],$tmp_time[1]));
|
|
|
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();
|
|
@@ -45,6 +84,22 @@ class Talent extends AdminController {
|
|
|
$content = [];
|
|
|
$info['rs']['I010902'] = $content['I010902'] = $rsapi->I010902($info['card_number']);
|
|
|
$info['rs']['I030101'] = $content['I030101'] = $rsapi->I030101($info['card_number']);
|
|
|
+ $tmp_time = explode(' - ',$info['tax_insurance_month']);
|
|
|
+ $content['YL00018'] = $rsapi->YL00018($info['card_number'],str_replace('-','',$tmp_time[0]),str_replace('-','',$tmp_time[1]));
|
|
|
+ $formatDate = formatDateByMonth($tmp_time[0],$tmp_time[1],$content['YL00018']['data']['list']);
|
|
|
+ $str = '';
|
|
|
+ foreach ($formatDate as $tmp_item){
|
|
|
+ $str .= $tmp_item . "<br />";
|
|
|
+ }
|
|
|
+ if(count($formatDate) == $content['YL00018']['data']['totalCount']){
|
|
|
+ $content['YL00018']['status'] = 'success';
|
|
|
+ }else{
|
|
|
+ $content['YL00018']['status'] = 'warning';
|
|
|
+ }
|
|
|
+ $content['YL00018']['content'] = "该人员社保填写日期为{$tmp_time[0]}至{$tmp_time[1]},共" . count($formatDate) . "个月,接口返回{$content['YL00018']['data']['totalCount']}个月数据,分别为:<br />$str";
|
|
|
+
|
|
|
+ unset($tmp_time);
|
|
|
+ unset($tmp_item);
|
|
|
$api_model_data = [
|
|
|
'uid' => $info['card_number'],
|
|
|
'action' => 'rending',
|
|
@@ -55,6 +110,24 @@ class Talent extends AdminController {
|
|
|
}
|
|
|
} else {
|
|
|
$content = unserialize($api_data['content']);
|
|
|
+ if(array_key_exists('YL00018',$content)){
|
|
|
+ $tmp_time = explode(' - ',$info['tax_insurance_month']);
|
|
|
+ $formatDate = formatDateByMonth($tmp_time[0],$tmp_time[1],$content['YL00018']['data']['list']);
|
|
|
+ $str = '';
|
|
|
+ foreach ($formatDate as $tmp_item){
|
|
|
+ $str .= $tmp_item . "<br />";
|
|
|
+ }
|
|
|
+ if(count($formatDate) == $content['YL00018']['data']['totalCount']){
|
|
|
+ $content['YL00018']['status'] = 'success';
|
|
|
+ }else{
|
|
|
+ $content['YL00018']['status'] = 'warning';
|
|
|
+ }
|
|
|
+ $content['YL00018']['content'] = "该人员社保填写日期为{$tmp_time[0]}至{$tmp_time[1]},共" . count($formatDate) . "个月,接口返回{$content['YL00018']['data']['totalCount']}个月数据,分别为:<br />$str";
|
|
|
+ unset($tmp_time);
|
|
|
+ unset($tmp_item);
|
|
|
+ }else{
|
|
|
+ $content['YL00018'] = [];
|
|
|
+ }
|
|
|
$info['rs'] = $content;
|
|
|
}
|
|
|
$info["process"] = $process;
|