<?php
/**
 * Created by PhpStorm.
 * User: sicilon_IT
 * Date: 2020/3/2
 * Time: 11:41
 */

namespace app\index\controller;
use app\index\logic\settlelogic;
use think\Controller;

class Settle extends Controller{
    /*
     * 20200302
     * steelxu
     * 标准输出检查找包
     * 测试成功后，再看是做到扩展的基础类，还是
     */
    public function stdout($arr){
        $res_r=array();
        if (empty($arr)){
            $res_r['code']=0;
            $res_r['errmsg']='无数据';
        }else{
            $res_r['code']=200;
            $res_r['resultData']=$arr;
        }

        return $res_r;
    }

    /*
     * 20200302
     * 按身份证请求数据
     */
    public function querysettlebysfzid(){
        $queryinfo=request() -> param();
        $l_settle=new settlelogic();
        $rec=$l_settle->getsettlebysfz($queryinfo);
        return json_encode($this->stdout($rec),320);
    }


    /*
     * 20200302
     * 按银行卡请求数据
     */
    public function querysettlebycardno(){
        $queryinfo=request() -> param();
        $l_settle=new settlelogic();
        $rec=$l_settle->getsettlebycard($queryinfo);
        return json_encode($this->stdout($rec),320);
    }

}