Commit d643ab73 authored by clone's avatar clone

1

parent 7d199dc1
......@@ -11,6 +11,7 @@ use app\model\FSettingLog;
use app\model\FStoreCost;
use app\model\FStoreCostExt;
use app\model\FStoreData;
use Think\Log;
/**
* Created by PhpStorm.
......@@ -745,19 +746,24 @@ class StoreFeeService
$storeInfo = $storeModel->getStoreById($store_id);
if (!$storeInfo || !$storeInfo["agents_id"] || !$storeInfo["site_id"]) {
return ["code" => 101, "msg" => "门店信息错误"];
return ["code" => 101, "msg" => "门店信息错误,第" . $row . "行"];
}
$agent_id = $storeInfo["agents_id"];
$site_id = $storeInfo["site_id"];
$office_id = $storeInfo["office_id"];
if (!$office_id) {
return ["code" => 101, "msg" => "没有绑定办公楼,第" . $row . "行"];
}
array_push($data, $this->applyForFeeBin(0, $type, $fee_item, $total_fee, $agent_id, $store_id, $purpose, $site_id, "",
"", "", $date, $office_id, 0, 1));
}
if ($data) {
$applyForModel = new FApplyForFee();
$is_ok = $applyForModel->addData($data);
if($is_ok > 0){
return ["code" => 200, "msg" => "$is_ok"];
}
}
return ["code" => 101, "msg" => "未知异常"];
}
......
......@@ -3,6 +3,7 @@
namespace app\model;
use think\Db;
use Think\Log;
use think\Model;
class FApplyForFee extends BaseModel
......@@ -35,7 +36,7 @@ class FApplyForFee extends BaseModel
{
Db::startTrans();
try {
$this->db_->insertAll($params);
$this->insertAll($params);
Db::commit();
return 1;
} catch (\Exception $e) {
......
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