shish 6 年 前
コミット
be5f438022
1 ファイル変更15 行追加15 行削除
  1. 15 15
      biz/order/services/OrderSendService.php

+ 15 - 15
biz/order/services/OrderSendService.php

@@ -40,8 +40,17 @@ class OrderSendService extends BaseService
 		}
 		$time = time();
 		OrderSendClass::updateByCondition(['orderId' => $id, 'actionId' => $printOrderId], ['option' => $option, 'finishTime' => $time]);
-		OrderClass::updateById($id, ['status' => OrderClass::ORDER_STATUS_UN_SEND, 'currentFlow' => 2, 'printStatus' => 1]);
-		
+		$hasDeliver = 0;
+		if ($option == 1) {
+			//有纸质配送单
+			$hasDeliver = 1;
+		}
+		if ($option == 2) {
+			//填单打单
+			$hasDeliver = 2;
+		}
+		OrderClass::updateById($id, ['status' => OrderClass::ORDER_STATUS_UN_SEND, 'currentFlow' => 2, 'printStatus' => 1, 'hasDeliver' => $hasDeliver]);
+
 		//进入发货流程
 		$deliverId = $actionIdList['deliver'];
 		$data = ['actionId' => $deliverId, 'orderId' => $id, 'finishTime' => 0, 'addTime' => $time, 'inTurn' => $deliverId];
@@ -88,20 +97,11 @@ class OrderSendService extends BaseService
 			];
 			OrderExpressClass::add($sendInfo);
 		}
-
+		
 		OrderSendClass::updateByCondition(['orderId' => $id, 'actionId' => $deliverId], ['option' => $option, 'finishTime' => $time]);
-		$hasDeliver = 0;
-		if ($option == 1) {
-			//有纸质配送单
-			$hasDeliver = 1;
-		}
-		if ($option == 2) {
-			//填单打单
-			$hasDeliver = 2;
-		}
-		OrderClass::updateById($id, ['status' => OrderClass::ORDER_STATUS_SENDING, 'currentFlow' => 3, 'sendType' => $sendType, 'hasDeliver' => $hasDeliver]);
-
-
+		OrderClass::updateById($id, ['status' => OrderClass::ORDER_STATUS_SENDING, 'currentFlow' => 3, 'sendType' => $sendType]);
+		
+		
 		//进入送达流程
 		$reachId = $actionIdList['reach'];
 		$data = ['actionId' => $reachId, 'orderId' => $id, 'finishTime' => 0, 'addTime' => $time, 'inTurn' => $reachId];