<?php
/**
 * Created by PhpStorm.
 * User: sicilon_IT
 * Date: 2021/5/1
 * Time: 2:02
 */
namespace app\index\model;
use think\Model;
class paydetailmodel extends Model{
    protected $table='t_paydetail';
    /*
 * 20210430
 *
 */
    public function insinfo($arr){
        $this->allowField(true)->isUpdate(false)->setAttr('id',null)->save($arr);
        return $this->id;
    }

    /*
     * 20210502
     *
     */
    public function insinfolist($arr){
        $icount=$this->saveAll($arr);
        return $icount;
    }

    /*
     * 20210508
     * 按身份证获取支款记录
     */
    public function selinfobysfz($sfz){
        $where_arr['sfzid']=$sfz;
        $rlist=$this->where($where_arr)->order('paydate','desc')->select();
        $rlist=collection($rlist)->toArray();
        return $rlist;
    }

    /*
     * 20210517
     * 按导入查询
     */
    public function sellistbyuplogid($uplogid){
        $where_arr['uplogid']=$uplogid;
        $rlist=$this->where($where_arr)->select();
        $rlist=collection($rlist)->toArray();
        return $rlist;

    }
}