Commit 60f496e7 authored by hujun's avatar hujun

office_id

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