@ -287,6 +287,29 @@ class WaybillBillService extends AbstractService {
}
}
public function searchTaskWaybillBillLogList($mallId, $params) {
if ($params['type'] == OrderPrintConst::waybillBillTypeImportAndDuplication) {
list($waybillBillLogList, $total) = $this->searchDuplicationWaybillBillLogList($mallId, $params['taskId']);
} else {
$page = intval($params['page'] ?: 1);
$pageSize = intval($params['pageSize'] ?: 20);
list($waybillBillLogList, $total) = $this->searchWaybillBillLogList($mallId, $params, $page, $pageSize);
}
return [
'waybillBillLogList' => $waybillBillLogList,
'total' => $total,
];
}
public function searchWaybillBillLogList($mallId, $filter, $page, $pageSize) {
list($waybillBillLogList, $total) = $this->opWaybillBillLogDao->searchPage($mallId, $filter, $page, $pageSize);
if (empty($waybillBillLogList)) {
return [$waybillBillLogList, $total];
}
$waybillBillLogList = $this->rebuildWaybillBillLogList($mallId, $waybillBillLogList, $filter['type']);
return [$waybillBillLogList, $total];
}
public function searchDuplicationWaybillBillLogList($mallId, $taskId) {
$taskInfo = $this->opWaybillBillTaskDao->getTask($mallId, $taskId);
if (empty($taskInfo)) {
@ -419,7 +442,7 @@ class WaybillBillService extends AbstractService {
$logisticsNameMap[$logisticsInfo['logisticsId']] = $logisticsInfo['logisticsName'];
while (true) {
list($opWaybillBillLogList, $total) = $this->opWaybillBillLogDao->searchPage($mallId, $taskId, $page, $pageSize);
list($opWaybillBillLogList, $total) = $this->opWaybillBillLogDao->searchPage($mallId, ['taskId' => $taskId] , $page, $pageSize);
if (empty($opWaybillBillLogList)) {
break;
}