修复内容

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', '<=', $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'] ?? '',

View File

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