|
|
|
|
|
|
|
|
unset($param[$k]); |
|
|
unset($param[$k]); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
//from_unixtime(appoint_time) |
|
|
|
|
|
$result = $this->where($param)->field('id,customer_id,hospital_id,status as type,month(from_unixtime(appoint_time)) as months,year(from_unixtime(appoint_time)) as years,from_unixtime(appoint_time,"%d") as days,appoint_time as appoint_time')->with(['getCustomerOneData', 'getUserOneData', 'getCollectioOneData', 'getHospitalOneData'])->select(); |
|
|
|
|
|
//精确到分 |
|
|
|
|
|
$result['appoint_time']=date('Y-m-d H:i', $result['appoint_time']); |
|
|
|
|
|
|
|
|
$result = $this->where($param)->field('id,customer_id,hospital_id,status as type,month(from_unixtime(appoint_time)) as months,year(from_unixtime(appoint_time)) as years,from_unixtime(appoint_time,"%d") as days,from_unixtime(appoint_time,"%Y-%m-%d %H:%m") as appoint_time')->with(['getCustomerOneData', 'getUserOneData', 'getCollectioOneData', 'getHospitalOneData'])->select(); |
|
|
foreach ($result as $k => $v) { |
|
|
foreach ($result as $k => $v) { |
|
|
if (strlen($v['months']) < 2) { |
|
|
if (strlen($v['months']) < 2) { |
|
|
$result[$k]['months'] = ['0' . $v['months']]; |
|
|
$result[$k]['months'] = ['0' . $v['months']]; |