提交 6e455234 authored 作者: 李大见's avatar 李大见

上传文件0912

上级 0e175259
......@@ -118,7 +118,7 @@ class DealPicService extends Service{
try {
self::imageCompress($stream_file_name, $percent, $new_stream_file_name);
} catch (\Exception $e) {
return response()->json(['code'=>500, 'msg'=>'上传失败', 'data'=>'{}']);
return ['code'=>500, 'msg'=>'上传失败', 'data'=>'{}'];
}
// 删除原来的图片
self::deleteImage([$stream_file_name]);
......@@ -143,7 +143,7 @@ class DealPicService extends Service{
$url=ltrim($path_name.$file_name,"./");
$streamFilename['streamFilename'] = "http://jdh.bluearp.com/".$url;
}
return $streamFilename['streamFilename'];
return ['code'=>200, 'msg'=>'未找到上传文件', 'data'=>$streamFilename['streamFilename']];
} else {
return ['code'=>500, 'msg'=>'未找到上传文件', 'data'=>''];
}
......
......@@ -57,6 +57,7 @@ use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Log;
use App\Http\Controllers\BaseController;
use DB;
use App\Services\OrderDeductionFeeService;
class OrderService extends Service
{
......@@ -1094,6 +1095,7 @@ class OrderService extends Service
$shr_phone = CommonService::getUser('id', $input['user_id']);
$post['ser_id'] = $input['ser_id'];//服务中心id
$post['order_status'] = 20;//已派单
}
$install=InstallPerson::whereRaw("(admin_id='".$input['ser_id']."' or company_id='".$input['ser_id']."') and delet_y=1 and install_state=1 and install_is_type=1 and is_shman=2 and bind_id is not null")->select('id','check_code','install_name','install_phone','bind_id')->first();
$push_type=1;
......@@ -1223,6 +1225,10 @@ class OrderService extends Service
if(isset($ol_distype) && !empty($ol_distype)){
$get['ol_distype'] = 1;//手动重复派单
}
$agency_id = DB::table('admin')
->where('id',$input['ser_id'])
->value('company_id');
$get['agency_id'] = $agency_id;//代理商id(运营商)
$returnOrderList = OrderList::insert($get);//派工单列表
$arr['company_id'] = $orderinfo['company_id'];
$returnMan = Management::insert($arr);
......@@ -1295,6 +1301,13 @@ class OrderService extends Service
$post['smart_store'] = $input['smart_store']??1;
$post['distance'] = $input['distance']??0;//派单门店距离
$returnOrder = Orders::where('sys_num', $input['sys_num'])->update($post);
// 派单扣除 订单所属公司金额
// 扣费
$post_data['adm_id'] = $orderinfo['admin_id'];
$post_data['company_id'] = $orderinfo['company_id'];
$post_data['order_number'] = $orderinfo['sys_num'];
$post_data['reo_price'] = -0.5;
$reduce_price = OrderDeductionFeeService::deductFee($post_data);
if ($returnOrder && $returnOrderList && $returnMan && $pt_res) {
DB::commit();
......
......@@ -57,7 +57,7 @@ class ServiceProviderService extends Service
$query = Admin::leftJoin('admin_infor', 'admin.id', '=', 'admin_infor.admin_id')
->leftJoin('certification', 'admin.id', '=', 'certification.ser_id');
$query->where('admin.admin_groupnew', 2);
$query->where('admin.admin_groupnew', Request()->input('admin_groupnew',2));
if (Request()->filled('type')) {
//$query->where('type', Request()->input('type'));
$query->where('mouth_pay', Request()->input('type'));//结算方式
......@@ -148,6 +148,7 @@ class ServiceProviderService extends Service
$export = BmmcService::getTopButton('export,addService', '', $all_button);
$data['button_top'] = $export['button_top'] ?? [];//顶部按钮
$data['button_search'] = $export['button_search'] ?? [];//搜索栏按钮
$data['all_button'] = $all_button;//顶部按钮
if ($list) {
$list = $list->toArray();
......
......@@ -826,10 +826,21 @@ class WashPayservice extends Service
if ($find_order->reo_pay_state == 1) {
return '<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>';
}
$update_were = DB::table('weixin_record')
->where('out_trade_no', $postObj->out_trade_no)
->update(['were_pay_state'=>2,'were_transaction_id'=>$postObj->transaction_id]);
$update_order = DB::table('recharge_order')
->where('reor_order_number', $postObj->out_trade_no)
->update(['reo_pay_state'=>2, 'reo_pay_state'=>2,'reo_paid_money'=>$find_order->reo_price,'reo_pay_way'=>1,'reo_pay_check'=>1, 'reo_pay_time'=>date('Y-m-d H:i:s')]);
->where('reo_order_number', $postObj->out_trade_no)
->update(['reo_pay_state'=>2,'reo_paid_money'=>$find_order['reo_price'],'reo_pay_way'=>1,'reo_pay_check'=>1, 'reo_pay_time'=>date('Y-m-d H:i:s')]);
$find_data = DB::table('admin_recharge')
->where('adre_company_id', $find_order['reo_company_id'])
->first();
if ($find_data) {
$adre_banlance = $find_data['adre_banlance'] + $find_order['reo_price'];
$update_res = DB::table('admin_recharge')
->where('adre_id', $find_data['adre_id'])
->update(['adre_banlance'=>$adre_banlance]);
}
return '<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>';
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论