|
@@ -47,6 +47,59 @@ class JjhcController extends WebBaseController
|
|
|
return response()->json($data);
|
|
|
}
|
|
|
|
|
|
+ public function getGuid(){
|
|
|
+ $redis = Cache::getRedis();
|
|
|
+ $guid = $redis->get('sjhj_guid');
|
|
|
+ if(!$guid){
|
|
|
+ $client = new \SoapClient("http://222.77.0.158:8090/Convergence/webservice/ConvergenceService?wsdl");
|
|
|
+ // 组织参数 根据接口具体提供参数组织对应参数
|
|
|
+ $param = [
|
|
|
+ 'userid'=>'jjswzzb_cxz',
|
|
|
+ 'password'=>'Cxz@1234'
|
|
|
+ ];
|
|
|
+ $guid =$client->LoginByAccount ($param);
|
|
|
+ $redis->set('sjhj_guid',$guid);
|
|
|
+ $redis->expire('sjhj_guid',1800);
|
|
|
+ }
|
|
|
+
|
|
|
+ return $guid;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function push(){
|
|
|
+ $guid = $this->getGuid();
|
|
|
+ $list = DB::table("lt_apppointment")->where('huiju',0)->get();
|
|
|
+ $str = '<?xml version="1.0" encoding="UTF-8"?><table>';
|
|
|
+ $template = '<row type="add">
|
|
|
+ <id name="主键" isattachment="false"><![CDATA[%s]></id>
|
|
|
+ <number name="回执单号" isattachment="false"><![CDATA[%s]></number>
|
|
|
+ <username name="姓名" isattachment="false"><![CDATA[%s]></username>
|
|
|
+ <card name="身份证" isattachment="false"><![CDATA[%s]></card>
|
|
|
+ <phone name="手机号" isattachment="false"><![CDATA[%s]></phone>
|
|
|
+ <service name="服务事项" isattachment="false"><![CDATA[%s]></service>
|
|
|
+ <content name="具体事项" isattachment="false"><![CDATA[%s]></content>
|
|
|
+ <is_talent name="是否申报系统人才" isattachment="false"><![CDATA[%s]></is_talent>
|
|
|
+ <status name="状态" isattachment="false"><![CDATA[%s]></status>
|
|
|
+ <evaluate name="评价内容" isattachment="false"><![CDATA[%s]></evaluate>
|
|
|
+ <createtime name="创建时间" isattachment="false"><![CDATA[%s]></createtime>
|
|
|
+</row>';
|
|
|
+ foreach ($list as $k => $v){
|
|
|
+ $time = strtotime($v->createtime);
|
|
|
+ $item_str = sprintf($template,$v->id,$v->number,$v->username,$v->card,$v->phone,$v->service ,$v->content,$v->is_talent,$v->status,$v->evaluate,date("Y/m/d H:i:s",$time));
|
|
|
+ $str .= $item_str;
|
|
|
+ }
|
|
|
+ $str .= '</table>';
|
|
|
+ echo $str;die;
|
|
|
+ $client = new \SoapClient("http://222.77.0.158:8090/Convergence/webservice/ConvergenceService?wsdl");
|
|
|
+ // 组织参数 根据接口具体提供参数组织对应参数
|
|
|
+ $param = [
|
|
|
+ 'guid'=>$guid,
|
|
|
+ 'catalogid'=>'WEB2443',
|
|
|
+ 'xmlstr' => $str
|
|
|
+ ];
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
public function test(Request $request)
|
|
|
{
|
|
|
$keyword = $request->input('keyword');
|