CheckService.php 515 B

123456789101112131415161718192021
  1. <?php
  2. namespace app\service;
  3. use app\model\Check;
  4. use think\facade\Db;
  5. class CheckService
  6. {
  7. public static function getCheckList($page,$xzqdm){
  8. return Db::name("check")->field("t_check.*,count(t_check.qydm) as check_count,e.enterprises_name")->where("t_check.qydm","like",$xzqdm."%")->leftJoin("t_enterprises e","e.qydm=t_check.qydm")->page($page["page"],$page["size"])->select();
  9. }
  10. public static function addCheck($data){
  11. $res=Check::create($data);
  12. return $res->id;
  13. }
  14. }