|
|
@@ -55,7 +55,7 @@ class SalaryItemPermanently extends BaseModel
|
|
|
// 查询时间范围内所有已经完单的工单
|
|
|
$order_list = ServiceWork::where('master_worker_id',$master_worker_id)->
|
|
|
where('finished_time','between',[$params['start_time'],$params['end_time']])->
|
|
|
- where('service_status',3)->where('work_pay_status',2)->
|
|
|
+ where('service_status',3)->where('work_pay_status',3)->
|
|
|
field(['id','work_sn','work_amount','spare_total','master_worker_id','finished_time','service_status','work_pay_status'])->
|
|
|
select()->toArray();
|
|
|
$amount = 0.00;
|
|
|
@@ -96,7 +96,7 @@ class SalaryItemPermanently extends BaseModel
|
|
|
// 查询时间范围内所有已经完单的工单
|
|
|
$order_list = ServiceWork::where('master_worker_id',$master_worker_id)->
|
|
|
where('finished_time','between',[$params['start_time'],$params['end_time']])->
|
|
|
- where('service_status','=',3)->where('work_pay_status','=',2)->where('work_type','=',2)->
|
|
|
+ where('service_status','=',3)->where('work_pay_status','=',3)->where('work_type','=',2)->
|
|
|
field(['id','work_sn','work_amount','spare_total','master_worker_id','finished_time','service_status','work_pay_status'])->
|
|
|
select()->toArray();
|
|
|
|
|
|
@@ -135,7 +135,7 @@ class SalaryItemPermanently extends BaseModel
|
|
|
// 查询时间范围内所有已经完单的工单工程师排名 - 可以为当月月度
|
|
|
$order_list = ServiceWork::
|
|
|
where('finished_time','between',[$params['start_time'],$params['end_time']])->
|
|
|
- where('service_status','=',3)->where('work_pay_status','=',2)->
|
|
|
+ where('service_status','=',3)->where('work_pay_status','=',3)->
|
|
|
field('master_worker_id,count(id) as work_counts')->
|
|
|
group('master_worker_id')->
|
|
|
order('work_counts desc')->
|
|
|
@@ -172,7 +172,7 @@ class SalaryItemPermanently extends BaseModel
|
|
|
// 查询时间范围内所有已经完单的工单
|
|
|
$order_count = ServiceWork::where('master_worker_id',$master_worker_id)->
|
|
|
where('finished_time','between',[$params['start_time'],$params['end_time']])->
|
|
|
- where('service_status','=',3)->where('work_pay_status','=',2)->count();
|
|
|
+ where('service_status','=',3)->where('work_pay_status','=',3)->count();
|
|
|
$term_amount = 0;
|
|
|
if( 4.8 <= (float)$comprehensive_score && 80 <= $order_count){
|
|
|
$term_amount = 500;
|
|
|
@@ -297,7 +297,7 @@ class SalaryItemPermanently extends BaseModel
|
|
|
// 查询时间范围内所有已经完单的工单
|
|
|
$order_list = ServiceWork::where('master_worker_id',$master_worker_id)->
|
|
|
where('finished_time','between',[$params['start_time'],$params['end_time']])->
|
|
|
- where('service_status','=',3)->where('work_pay_status','=',2)->
|
|
|
+ where('service_status','=',3)->where('work_pay_status','=',3)->
|
|
|
field(['id','work_sn','work_amount','spare_total','master_worker_id','finished_time','service_status','work_pay_status'])->
|
|
|
select()->toArray();
|
|
|
// 15%(单价<300 元时提成15%)至20%(单价>=300元时提成 20%)
|
|
|
@@ -367,7 +367,7 @@ class SalaryItemPermanently extends BaseModel
|
|
|
// 查询时间范围内所有已经完单的工单
|
|
|
$order_list = ServiceWork::where('master_worker_id',$master_worker_id)->
|
|
|
where('finished_time','between',[$params['start_time'],$params['end_time']])->
|
|
|
- where('service_status',3)->where('work_pay_status',2)->
|
|
|
+ where('service_status',3)->where('work_pay_status',3)->
|
|
|
field(['id','work_sn','work_amount','spare_total','master_worker_id','finished_time','service_status','work_pay_status'])->
|
|
|
select()->toArray();
|
|
|
$amount = 0.00;
|