|
|
@@ -1304,15 +1304,16 @@ class ServiceWorkLogic extends BaseLogic
|
|
|
try {
|
|
|
$serviceWork = ServiceWork::where('id',$params['id'])->findOrEmpty();
|
|
|
if(!$serviceWork->isEmpty()){
|
|
|
+ $worker_number = MasterWorker::where('id',$serviceWork->master_worker_id)->value('worker_number');
|
|
|
//goods_id ['user_info']['mobile'] user_id coupon_id=0 worker=1 terminal=1 pay_way=2 address contact_people=real_name contact_number=mobile appointment_time lon lat property_activity_id=0
|
|
|
- ServiceOrderLogic::submitOrder([
|
|
|
+ $res = ServiceOrderLogic::submitOrder([
|
|
|
'goods_id' => $params['goods_id'],
|
|
|
'user_info' => [
|
|
|
'mobile' => $serviceWork->mobile
|
|
|
],
|
|
|
'user_id' => $serviceWork->user_id,
|
|
|
'coupon_id' => 0,
|
|
|
- 'worker' => 1,
|
|
|
+ 'worker' => $worker_number,
|
|
|
'terminal' => 1,
|
|
|
'pay_way' => 2,
|
|
|
'appointment_time' => $serviceWork->appointment_time,
|
|
|
@@ -1323,6 +1324,9 @@ class ServiceWorkLogic extends BaseLogic
|
|
|
'lat' => $serviceWork->lat,
|
|
|
'property_activity_id' => 0
|
|
|
]);
|
|
|
+ if($res == false){
|
|
|
+ throw new \Exception(ServiceOrderLogic::getError());
|
|
|
+ }
|
|
|
}
|
|
|
return true;
|
|
|
} catch (\Exception $e) {
|