ProPchService.php 458 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace app\service;
  3. use app\model\Grid;
  4. use app\model\ProPch;
  5. class ProPchService
  6. {
  7. public static function addProPch($info,$uuid): bool
  8. {
  9. $info['pch'] = substr($info['rq'],2,2)
  10. .substr($info['rq'],5,2)
  11. .substr($info['rq'],8,2).
  12. '-'.$uuid;
  13. return (new ProPch())->save($info);
  14. }
  15. public static function getPchByProId($id){
  16. return ProPch::where("pro_id",$id)->select();
  17. }
  18. }