Commit 4e07b4da authored by clone's avatar clone

1

parent be262f41
...@@ -736,23 +736,23 @@ class StoreFeeService ...@@ -736,23 +736,23 @@ class StoreFeeService
$fee_item = $sheet->getCellByColumnAndRow(4, $row)->getValue(); $fee_item = $sheet->getCellByColumnAndRow(4, $row)->getValue();
$purpose = $sheet->getCellByColumnAndRow(5, $row)->getValue(); $purpose = $sheet->getCellByColumnAndRow(5, $row)->getValue();
$store_id = $sheet->getCellByColumnAndRow(6, $row)->getValue(); $store_id = $sheet->getCellByColumnAndRow(6, $row)->getValue();
if(!$count_time && !$total_fee && !$type && !$fee_item && !$purpose && !$store_id){ if (!$count_time && !$total_fee && !$type && !$fee_item && !$purpose && !$store_id) {
continue; continue;
} }
$if_verify = $this->verifyType((int)$type, (int)$fee_item); $if_verify = $this->verifyType((int)$type, (int)$fee_item);
if (!$if_verify) { if (!$if_verify) {
return ["code" => 101, "msg" => "类型选择错误,第" . $row . "行"]; return ["code" => 101, "msg" => "类型选择错误,excel第" . $row . "行"];
} }
$storeInfo = $storeModel->getStoreById($store_id); $storeInfo = $storeModel->getStoreById($store_id);
if (!$storeInfo || !$storeInfo["agents_id"] || !$storeInfo["site_id"]) { if (!$storeInfo || !$storeInfo["agents_id"] || !$storeInfo["site_id"]) {
return ["code" => 101, "msg" => "门店信息错误,第" . $row . "行"]; return ["code" => 101, "msg" => $store_id . " 门店信息错误,excel第" . $row . "行"];
} }
$agent_id = $storeInfo["agents_id"]; $agent_id = $storeInfo["agents_id"];
$site_id = $storeInfo["site_id"]; $site_id = $storeInfo["site_id"];
$office_id = $storeInfo["office_id"]; $office_id = $storeInfo["office_id"];
if (!$office_id) { if (!$office_id) {
return ["code" => 101, "msg" => "没有绑定办公楼,第" . $row . "行"]; return ["code" => 101, "msg" => $store_id . " 门店没有绑定办公楼,excel第" . $row . "行"];
} }
array_push($data, $this->applyForFeeBin(0, $type, $fee_item, $total_fee, $agent_id, $store_id, $purpose, $site_id, "", array_push($data, $this->applyForFeeBin(0, $type, $fee_item, $total_fee, $agent_id, $store_id, $purpose, $site_id, "",
"", "", $date, $office_id, 0, 1)); "", "", $date, $office_id, 0, 1));
...@@ -760,7 +760,7 @@ class StoreFeeService ...@@ -760,7 +760,7 @@ class StoreFeeService
if ($data) { if ($data) {
$applyForModel = new FApplyForFee(); $applyForModel = new FApplyForFee();
$is_ok = $applyForModel->addData($data); $is_ok = $applyForModel->addData($data);
if($is_ok > 0){ if ($is_ok > 0) {
return ["code" => 200, "msg" => "$is_ok"]; return ["code" => 200, "msg" => "$is_ok"];
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment