paydetailmodel.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: sicilon_IT
  5. * Date: 2021/5/1
  6. * Time: 2:02
  7. */
  8. namespace app\index\model;
  9. use think\Model;
  10. class paydetailmodel extends Model{
  11. protected $table='t_paydetail';
  12. /*
  13. * 20210430
  14. *
  15. */
  16. public function insinfo($arr){
  17. $this->allowField(true)->isUpdate(false)->setAttr('id',null)->save($arr);
  18. return $this->id;
  19. }
  20. /*
  21. * 20210502
  22. *
  23. */
  24. public function insinfolist($arr){
  25. $icount=$this->saveAll($arr);
  26. return $icount;
  27. }
  28. /*
  29. * 20210508
  30. * 按身份证获取支款记录
  31. */
  32. public function selinfobysfz($sfz){
  33. $where_arr['sfzid']=$sfz;
  34. $rlist=$this->where($where_arr)->order('paydate','desc')->select();
  35. $rlist=collection($rlist)->toArray();
  36. return $rlist;
  37. }
  38. /*
  39. * 20210517
  40. * 按导入查询
  41. */
  42. public function sellistbyuplogid($uplogid){
  43. $where_arr['uplogid']=$uplogid;
  44. $rlist=$this->where($where_arr)->select();
  45. $rlist=collection($rlist)->toArray();
  46. return $rlist;
  47. }
  48. }