Merge branch 'dev'

This commit is contained in:
wucongxing8150 2024-07-31 17:08:09 +08:00
commit 69d2e730c9
2 changed files with 3 additions and 1 deletions

View File

@ -423,6 +423,7 @@ class ReportRegulatoryCommand extends HyperfCommand
$params = array(); $params = array();
$params['user_id'] = $user_doctor['user_id']; $params['user_id'] = $user_doctor['user_id'];
$params['type'] = 2; $params['type'] = 2;
$params['is_latest'] = 1;
$doctor_user_ca_cert = UserCaCert::getOne($params); $doctor_user_ca_cert = UserCaCert::getOne($params);
if (empty($doctor_user_ca_cert)){ if (empty($doctor_user_ca_cert)){
$this->line("错误无医生ca数据"); $this->line("错误无医生ca数据");
@ -433,6 +434,7 @@ class ReportRegulatoryCommand extends HyperfCommand
$params = array(); $params = array();
$params['user_id'] = $user_pharmacist['user_id']; $params['user_id'] = $user_pharmacist['user_id'];
$params['type'] = 2; $params['type'] = 2;
$params['is_latest'] = 1;
$pharmacist_user_ca_cert = UserCaCert::getOne($params); $pharmacist_user_ca_cert = UserCaCert::getOne($params);
if (empty($pharmacist_user_ca_cert)){ if (empty($pharmacist_user_ca_cert)){
$this->line("错误无药师ca数据"); $this->line("错误无药师ca数据");

View File

@ -69,7 +69,7 @@ class UserCoupon extends Model
{ {
return self::with(['Coupon']) return self::with(['Coupon'])
->whereHas('Coupon' , function($query){ ->whereHas('Coupon' , function($query){
$query->where("coupon_client",1)->where("coupon_status",1); $query->where("coupon_client",1)->whereNotIn("coupon_status",[2,4]);
}) })
->where($params)->get($fields); ->where($params)->get($fields);
} }