修复内容

This commit is contained in:
2026-01-17 16:44:21 +08:00
parent 41ad75af08
commit 5455aceab5
4 changed files with 23 additions and 4 deletions

View File

@@ -30,16 +30,18 @@ class Calendar extends ApiBase
->where('oe.date', '>=', $startDate) ->where('oe.date', '>=', $startDate)
->where('oe.date', '<=', $endDate) ->where('oe.date', '<=', $endDate)
->where('oe.abnormal', 0) ->where('oe.abnormal', 0)
->where('s.onwork', 1) ->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')
->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')
->order('oe.date asc, oe.addtime asc') ->order('oe.date asc, oe.addtime asc')
->select(); ->select();
$serviceDate = []; $serviceDate = [];
if ($service) { if ($service) {
foreach ($service as $v) { foreach ($service as $v) {
// 如果有绑定员工,但员工状态不符合要求,则跳过
if (!empty($v['staff_id']) && ($v['onwork'] != 1 || $v['leave'] != 1)) {
continue;
}
// 处理服务时间 // 处理服务时间
$timeRange = ''; $timeRange = '';
if (!empty($v['start_time']) && !empty($v['timeout'])) { if (!empty($v['start_time']) && !empty($v['timeout'])) {
@@ -56,6 +58,7 @@ class Calendar extends ApiBase
} }
$serviceDate[] = [ $serviceDate[] = [
'staff_status' => $v['staff_status'],
'date' => $v['date'], 'date' => $v['date'],
'staff_name' => $v['staff_name'] ?? '', 'staff_name' => $v['staff_name'] ?? '',
'goods_name' => $v['goods_name'] ?? '', 'goods_name' => $v['goods_name'] ?? '',

View File

@@ -49,4 +49,12 @@ class Help extends ApiBase
$this->_success('获取成功', $help_detail); $this->_success('获取成功', $help_detail);
} }
//查询承诺
public function commitment()
{
$help = new HelpLogic();
$commitment = $help->commitmentInfo();
$this->_success('获取成功', $commitment);
}
} }

View File

@@ -106,4 +106,11 @@ class HelpLogic
return $res; return $res;
} }
public function commitmentInfo()
{
$data = Db::name('help')->where('title','承诺')->field('id,title,content')->find();
return $data;
}
} }

View File

@@ -1137,6 +1137,7 @@ class OrderLogic extends LogicBase
$list['orderyjfw']= $list['number']-$number; $list['orderyjfw']= $list['number']-$number;
$list['orderdaifw'] = Db::name('order_exe')->where('order_sn',$list['order_sn'])->where('staff_status',0)->count(); //待服务数量 $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['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['showBubble']=false;
$list['more']="更多"; $list['more']="更多";
} }