|
@@ -79,6 +79,7 @@ class PaymentReceiptService extends Service
|
|
|
foreach ($data['amount_list'] as $value){
|
|
|
$insert[] = [
|
|
|
'payment_receipt_id' => $model->id,
|
|
|
+ 'data_type' => $data['type'],
|
|
|
'data_order_no' => $value['data_order_no'],
|
|
|
'data_order_type' => $data['data_type'],
|
|
|
'amount' => $value['amount'],
|
|
@@ -153,6 +154,7 @@ class PaymentReceiptService extends Service
|
|
|
foreach ($data['amount_list'] as $value){
|
|
|
$insert[] = [
|
|
|
'payment_receipt_id' => $model->id,
|
|
|
+ 'data_type' => $data['type'],
|
|
|
'data_order_no' => $value['data_order_no'],
|
|
|
'data_order_type' => $data['data_type'],
|
|
|
'amount' => $value['amount'],
|
|
@@ -422,6 +424,7 @@ class PaymentReceiptService extends Service
|
|
|
return $data;
|
|
|
}
|
|
|
|
|
|
+ //详情里
|
|
|
public function getPaymentReceiptDataList($data){
|
|
|
$data['data_order_no'] = $data['order_number'];
|
|
|
|
|
@@ -470,11 +473,6 @@ class PaymentReceiptService extends Service
|
|
|
$amount = $map[$value['id']] ?? 0;
|
|
|
$order[$key]['amount'] = $amount;
|
|
|
$finished += $amount;
|
|
|
-// if($value['state'] == PaymentReceipt::STATE_TWO){
|
|
|
-// $finished += $amount;
|
|
|
-// }else{
|
|
|
-// $not_finished += $amount;
|
|
|
-// }
|
|
|
}
|
|
|
|
|
|
$return['receipt_amount'] = $finished;
|
|
@@ -485,6 +483,32 @@ class PaymentReceiptService extends Service
|
|
|
return $return;
|
|
|
}
|
|
|
|
|
|
+ //列表里
|
|
|
+ public function getPaymentReceiptDataCountList($data){
|
|
|
+ $data_order_no = [];
|
|
|
+ foreach ($data as $value){
|
|
|
+ $data_order_no[] = $value['order_number'];
|
|
|
+ }
|
|
|
+ if(empty($data_order_no)) return [];
|
|
|
+
|
|
|
+ $order = PaymentReceiptInfo::where('del_time',0)
|
|
|
+ ->where('type',PaymentReceiptInfo::type_three)
|
|
|
+ ->whereIn('data_order_no',$data_order_no)
|
|
|
+ ->get()->toArray();
|
|
|
+
|
|
|
+ $return = [];
|
|
|
+ foreach ($order as $value){
|
|
|
+ if(isset($return[$value['data_order_no']])){
|
|
|
+ $return[$value['data_order_no']] += $value['amount'];
|
|
|
+ }else{
|
|
|
+ $return[$value['data_order_no']] = $value['amount'];
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return $return;
|
|
|
+ }
|
|
|
+
|
|
|
+ //废弃
|
|
|
public function getPaymentReceiptDeatail($data){
|
|
|
$customer = PaymentReceipt::where('del_time',0)
|
|
|
->where('crt_time',$data['crt_time'])
|
|
@@ -548,30 +572,6 @@ class PaymentReceiptService extends Service
|
|
|
return $customer;
|
|
|
}
|
|
|
|
|
|
- public function getPaymentReceiptDataCountList($data){
|
|
|
- $data_order_no = [];
|
|
|
- foreach ($data as $value){
|
|
|
- $data_order_no[] = $value['order_number'];
|
|
|
- }
|
|
|
- if(empty($data_order_no)) return [];
|
|
|
-
|
|
|
- $order = PaymentReceiptInfo::where('del_time',0)
|
|
|
- ->where('type',PaymentReceiptInfo::type_three)
|
|
|
- ->whereIn('data_order_no',$data_order_no)
|
|
|
- ->get()->toArray();
|
|
|
-
|
|
|
- $return = [];
|
|
|
- foreach ($order as $value){
|
|
|
- if(isset($return[$value['data_order_no']])){
|
|
|
- $return[$value['data_order_no']] += $value['amount'];
|
|
|
- }else{
|
|
|
- $return[$value['data_order_no']] = $value['amount'];
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return $return;
|
|
|
- }
|
|
|
-
|
|
|
public function maked(){
|
|
|
$payment = PaymentReceipt::where('del_time',0)
|
|
|
->where('data_order_no','<>','')
|