修复内容

This commit is contained in:
2026-01-30 18:48:13 +08:00
parent 5fe5289e26
commit 76cfa6b278
25 changed files with 943 additions and 289 deletions

View File

@@ -291,7 +291,8 @@ class GoodsLogic
'give_integral_type' => $give_integral_type,
'give_integral' => $give_integral,
'spec_type' => $post['spec_type'],
'create_time' => $time
'create_time' => $time,
'type' => $post['type']
];
$goods_id = Db::name('goods')->insertGetId($data);

View File

@@ -34,10 +34,14 @@ class OrderLogic
public static function getListsCondition($get)
{
$where = [];
//订单状态
if ($get['type'] != '') {
$where[] = ['pay_status', '=', $get['type']];
if ($get['type'] != 66){
//订单状态
if ($get['type'] != '') {
$where[] = ['pay_status', '=', $get['type']];
}
$where[] = ['del', '=', 0];
}else{
$where[] = ['del', '=', 1];
}
//订单编号查询
if (isset($get['order_sn']) && $get['order_sn'] != '') {
@@ -117,7 +121,7 @@ class OrderLogic
$order = new Order();
$where = self::getListsCondition($get);
$field = 'o.*,order_status as order_status_text,pay_way as pay_way_text';
$brand = Db::name('goods_brand')->where(['del' => 0])->column('name', 'id'); //订单类型
$brand = Db::name('goods_brand')->column('name', 'id'); //订单类型
$admin = Db::name('admin')->column('name', 'id');
$count = $order
->where($where)

View File

@@ -14,7 +14,9 @@ class OrderautoLogic{
public static function lists($get){
$where = [];
//判断已经支付的订单
$where[] = ['pay_status', '=', 1];
// $where[] = ['pay_status', '=', 1];
$where[] = ['refund_status', '=', 0];
$where[] = ['del', '=', 0];
if(isset($get['type']) && $get['type'] != ''){
$where[] = ['static','=',$get['type']];
}
@@ -38,10 +40,8 @@ class OrderautoLogic{
$where[] = ['status','=',$get['status']];
}
// 执行状态查询
if(isset($get['admin']) && $get['admin']!= ''){
$where[] = ['admin_id','=',$get['admin']];
}
// 如果订单的admin_id不等于空不需要限制支付状态如果admin_id等于空只查询已支付的订单
$where[] = ['', 'exp', Db::raw("(admin_id IS NOT NULL AND admin_id != '') OR pay_status = 1")];
// 订单的来源查询
if(isset($get['pid']) && $get['pid']!= ''){
$where[] = ['channel_id','=',$get['pid']];

View File

@@ -624,6 +624,47 @@ class StaffLogic{
public static function adder($post){
return Db::name('staff')->where('id',$post['id'])->update(['lng'=>$post['store_longitude'],'lat'=>$post['store_latitude']]);
}
// 员工工资导出数据(基于 wages 列表结果,避免重复重算导致超时)
public static function wagesExport($get)
{
// 导出时最多导出 5000 条,且沿用 wages 的统计逻辑
$get['page'] = 1;
$get['limit'] = isset($get['limit']) && (int)$get['limit'] > 0 ? (int)$get['limit'] : 5000;
$data = self::wages($get);
$lists = $data['lists'] ?? [];
// 组装导出数据
$exportTitle = ['员工姓名', '员工电话', '服务总订单', '上午订单', '下午订单', '财务报销', '上午加时', '下午加时', '请假天数', '出勤天数', '罚款金额', '异常订单', '年卡订单', '物料金额'];
$exportData = [];
foreach ($lists as $row) {
$exportData[] = [
$row['name'] ?? '',
$row['mobile'] ?? '',
$row['total_orders'] ?? 0,
$row['sw_orders'] ?? 0,
$row['xw_orders'] ?? 0,
$row['finance'] ?? 0,
$row['sw_addtimes'] ?? 0,
$row['xw_addtimes'] ?? 0,
$row['leaves'] ?? 0,
$row['attendance'] ?? 0,
$row['fine'] ?? 0,
$row['abnormal'] ?? 0,
$row['annual'] ?? 0,
$row['erp_staff'] ?? 0,
];
}
$exportExt = 'xls';
return [
'exportTitle' => $exportTitle,
'exportData' => $exportData,
'exportExt' => $exportExt,
'exportName' => '员工工资-' . date('Y-m-d H:i:s'),
];
}
//获取员工积分记录
public static function points($get){