Commit 60f496e7 authored by hujun's avatar hujun

office_id

parent 3502f660
...@@ -21,7 +21,7 @@ class StoreFeeService ...@@ -21,7 +21,7 @@ class StoreFeeService
$this->applyForFeeModel = new FApplyForFee(); $this->applyForFeeModel = new FApplyForFee();
$this->imgModel = new FImg(); $this->imgModel = new FImg();
} }
/** /**
* @param $type * @param $type
* @param $fee_item * @param $fee_item
...@@ -36,15 +36,15 @@ class StoreFeeService ...@@ -36,15 +36,15 @@ class StoreFeeService
* @param $count_time * @param $count_time
* @param $img_arr * @param $img_arr
* @param int $id * @param int $id
* @param int $office_id
* @return int|string * @return int|string
* @throws \think\Exception * @throws \app\model\Exception
* @throws \think\exception\PDOException
*/ */
public function addApplyFor($type, $fee_item, $total_fee, $agent_id, $store_id, $purpose, $site_id, $card_name, public function addApplyFor($type, $fee_item, $total_fee, $agent_id, $store_id, $purpose, $site_id, $card_name,
$bank, $card_no, $count_time, $img_arr, $id = 0) $bank, $card_no, $count_time, $img_arr, $id = 0, $office_id = 0)
{ {
$arr = $this->applyForFeeBin($id, $type, $fee_item, $total_fee, $agent_id, $store_id, $purpose, $site_id, $card_name, $arr = $this->applyForFeeBin($id, $type, $fee_item, $total_fee, $agent_id, $store_id, $purpose, $site_id, $card_name,
$bank, $card_no, $count_time); $bank, $card_no, $count_time, $office_id);
$feeId = $this->applyForFeeModel->saveData($arr); $feeId = $this->applyForFeeModel->saveData($arr);
if ($feeId > 0) { if ($feeId > 0) {
$this->imgModel->addImgAll($feeId, 1, $img_arr); $this->imgModel->addImgAll($feeId, 1, $img_arr);
...@@ -95,7 +95,7 @@ class StoreFeeService ...@@ -95,7 +95,7 @@ class StoreFeeService
* @return array * @return array
*/ */
private function applyForFeeBin($id, $type, $fee_item, $total_fee, $agent_id, $store_id, $purpose, $site_id, $card_name, private function applyForFeeBin($id, $type, $fee_item, $total_fee, $agent_id, $store_id, $purpose, $site_id, $card_name,
$bank, $card_no, $count_time) $bank, $card_no, $count_time, $office_id)
{ {
$arr = []; $arr = [];
...@@ -129,6 +129,9 @@ class StoreFeeService ...@@ -129,6 +129,9 @@ class StoreFeeService
if ($card_no) { if ($card_no) {
$arr["card_no"] = $card_no; $arr["card_no"] = $card_no;
} }
if ($office_id) {
$arr["office_id"] = $office_id;
}
if ($count_time) { if ($count_time) {
$arr["count_time"] = $count_time; $arr["count_time"] = $count_time;
} elseif ($id <= 0 && !$count_time) { } elseif ($id <= 0 && !$count_time) {
......
...@@ -378,6 +378,7 @@ class StoreFee extends Basic ...@@ -378,6 +378,7 @@ class StoreFee extends Basic
$bank = $params["bank"]; $bank = $params["bank"];
$card_no = $params["card_no"]; $card_no = $params["card_no"];
$count_time = $params["count_time"]; $count_time = $params["count_time"];
$office_id = $params["office_id"];
$img_arr = isset($params["img_arr"]) ? json_decode($params["img_arr"], true) : ""; $img_arr = isset($params["img_arr"]) ? json_decode($params["img_arr"], true) : "";
if (!$img_arr) { if (!$img_arr) {
return $this->response("101", "请上传图片"); return $this->response("101", "请上传图片");
...@@ -388,7 +389,7 @@ class StoreFee extends Basic ...@@ -388,7 +389,7 @@ class StoreFee extends Basic
return $this->response("101", "类型选择错误"); return $this->response("101", "类型选择错误");
} }
$is_ok = $service_->addApplyFor($type, $fee_item, $total_fee, $agent_id, $store_id, $purpose, $site_id, $card_name, $is_ok = $service_->addApplyFor($type, $fee_item, $total_fee, $agent_id, $store_id, $purpose, $site_id, $card_name,
$bank, $card_no, $count_time, $img_arr, $id); $bank, $card_no, $count_time, $img_arr, $id, $office_id);
if ($is_ok > 0) { if ($is_ok > 0) {
return $this->response("200", "request success", []); return $this->response("200", "request success", []);
} else { } else {
......
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