修复内容
This commit is contained in:
@@ -30,16 +30,18 @@ class Calendar extends ApiBase
|
||||
->where('oe.date', '>=', $startDate)
|
||||
->where('oe.date', '<=', $endDate)
|
||||
->where('oe.abnormal', 0)
|
||||
->where('s.onwork', 1)
|
||||
->where('s.leave', 1)
|
||||
->where('oe.staff_id', '<>', null)
|
||||
->field('oe.date,oe.addtime,oe.start_time,oe.timeout,oe.xq,oe.staff_id,s.name as staff_name,g.name as goods_name')
|
||||
->field('oe.staff_status,oe.date,oe.addtime,oe.start_time,oe.timeout,oe.xq,oe.staff_id,s.name as staff_name,s.onwork,s.leave,g.name as goods_name')
|
||||
->order('oe.date asc, oe.addtime asc')
|
||||
->select();
|
||||
|
||||
$serviceDate = [];
|
||||
if ($service) {
|
||||
foreach ($service as $v) {
|
||||
// 如果有绑定员工,但员工状态不符合要求,则跳过
|
||||
if (!empty($v['staff_id']) && ($v['onwork'] != 1 || $v['leave'] != 1)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 处理服务时间
|
||||
$timeRange = '';
|
||||
if (!empty($v['start_time']) && !empty($v['timeout'])) {
|
||||
@@ -56,6 +58,7 @@ class Calendar extends ApiBase
|
||||
}
|
||||
|
||||
$serviceDate[] = [
|
||||
'staff_status' => $v['staff_status'],
|
||||
'date' => $v['date'],
|
||||
'staff_name' => $v['staff_name'] ?? '',
|
||||
'goods_name' => $v['goods_name'] ?? '',
|
||||
|
||||
@@ -49,4 +49,12 @@ class Help extends ApiBase
|
||||
$this->_success('获取成功', $help_detail);
|
||||
}
|
||||
|
||||
//查询承诺
|
||||
public function commitment()
|
||||
{
|
||||
$help = new HelpLogic();
|
||||
$commitment = $help->commitmentInfo();
|
||||
$this->_success('获取成功', $commitment);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -106,4 +106,11 @@ class HelpLogic
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
public function commitmentInfo()
|
||||
{
|
||||
$data = Db::name('help')->where('title','承诺')->field('id,title,content')->find();
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
@@ -1137,6 +1137,7 @@ class OrderLogic extends LogicBase
|
||||
$list['orderyjfw']= $list['number']-$number;
|
||||
$list['orderdaifw'] = Db::name('order_exe')->where('order_sn',$list['order_sn'])->where('staff_status',0)->count(); //待服务数量
|
||||
$list['orderfwzhon'] = Db::name('order_exe')->where('order_sn',$list['order_sn'])->where('staff_status',1)->count(); //服务中数量
|
||||
$list['orderyiwanchen'] = Db::name('order_exe')->where('order_sn',$list['order_sn'])->where('staff_status',3)->count(); //服务已完成
|
||||
$list['showBubble']=false;
|
||||
$list['more']="更多";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user