报道机查询 时间字段优化

main
鹿和sa0ChunLuyu 6 days ago
parent 544ddd1b8f
commit c6036f8e76

@ -27,7 +27,9 @@ public function GetEntrustInfo(){
if ($dev == 1 && !empty($testdate)) {
$queryDate = $testdate;
}
$entrust_list=DB::table('s_list')->select(
$entrust_list=DB::table('s_list')
->leftJoin('s_period', 's_list.reservation_time', '=', 's_period.id')
->select(
"list_status",
"is_nullify",
"reg_num",
@ -48,7 +50,7 @@ public function GetEntrustInfo(){
"episodeid",
"RISRAcceptDeptCode",
"reservation_date",
"reservation_time",
's_period.period_begin_time as reservation_time',
"canel_time as cancel_time",
"warddesc",
"wardcode",
@ -62,9 +64,9 @@ public function GetEntrustInfo(){
"reservation_department_code",
"doctor_code",
)->where('reservation_date', $queryDate)
->where('is_del', 0)
->where('is_nullify', 0)
)->where('s_list.reservation_date', $queryDate)
->where('s_list.is_del', 0)
->where('s_list.is_nullify', 0)
->where(function($q) {
$q->where('patient_type', 0) // 住院类型不限制支付状态
->orWhere('is_pay', 1); // 其他类型必须已支付

Loading…
Cancel
Save