|
@@ -4004,7 +4004,7 @@ class WholeController extends Curd
|
|
|
_syslog("订单", "核销失败");
|
|
|
return json_fail('核销失败');
|
|
|
} finally {
|
|
|
- if (!empty($appointmentIds)){
|
|
|
+ if (!empty($appointmentIds)) {
|
|
|
// 打印核销小票
|
|
|
foreach ($appointmentIds as $id) {
|
|
|
$this->doPrinterWriterOff($id);
|
|
@@ -4707,10 +4707,13 @@ class WholeController extends Curd
|
|
|
$result = json_decode(json_encode($result), true);
|
|
|
if (!empty($result['return_code']) && $result['return_code'] == 'SUCCESS' && !empty($result['result_code']) && $result['result_code'] == 'SUCCESS' && !empty($result['trade_state']) && $result['trade_state'] == 'SUCCESS') {
|
|
|
$order->order_status_payment = 'SUCCESS';
|
|
|
- if (in_array($order->order_category, ['SERVICE', 'CHNMED', 'CHNNCD', 'DISHES', 'MEALS', 'VIP'])) {
|
|
|
+// if (in_array($order->order_category, ['SERVICE', 'CHNMED', 'CHNNCD', 'PACKAGE'])) {
|
|
|
+// $order->order_status_system = 'WAITING';
|
|
|
+// } else
|
|
|
+ if (in_array($order->order_category, ['DISHES', 'MEALS'])) {
|
|
|
$order->order_is_complete = 'Y';
|
|
|
$order->order_status_system = 'DONE';
|
|
|
- } else {
|
|
|
+ } else if (in_array($order->order_category, ['GOODS'])) {
|
|
|
$order->order_status_system = 'SENDING';
|
|
|
}
|
|
|
$order->save();
|
|
@@ -4728,11 +4731,14 @@ class WholeController extends Curd
|
|
|
$result = Pay::alipay(config('payment.alipay'))->find($order->order_groupby);
|
|
|
$result = json_decode(json_encode($result), true);
|
|
|
if (!empty($result['code']) && $result['code'] == '10000' && !empty($result['trade_status']) && $result['trade_status'] == 'TRADE_SUCCESS') {
|
|
|
- if (in_array($order->order_category, ['SERVICE', 'CHNMED', 'CHNNCD', 'DISHES', 'MEALS', 'VIP'])) {
|
|
|
+ $order->order_status_payment = 'SUCCESS';
|
|
|
+// if (in_array($order->order_category, ['SERVICE', 'CHNMED', 'CHNNCD','PACKAGE'])){
|
|
|
+// $order->order_status_system = 'WAITING';
|
|
|
+// }else
|
|
|
+ if (in_array($order->order_category, ['DISHES', 'MEALS'])) {
|
|
|
$order->order_is_complete = 'Y';
|
|
|
$order->order_status_system = 'DONE';
|
|
|
- $order->order_status_payment = 'SUCCESS';
|
|
|
- } else {
|
|
|
+ } else if (in_array($order->order_category, ['GOODS'])) {
|
|
|
$order->order_status_system = 'SENDING';
|
|
|
}
|
|
|
$order->save();
|