Commit 347d2c9d authored by hujun's avatar hujun

site_id

parent 96744d79
...@@ -82,7 +82,7 @@ class DailyPaper extends Basic ...@@ -82,7 +82,7 @@ class DailyPaper extends Basic
if (empty($params["agent_id"]) || empty($params["agent_name"]) || empty($params["daily_date"]) || if (empty($params["agent_id"]) || empty($params["agent_name"]) || empty($params["daily_date"]) ||
!isset($params["alipay"]) || !isset($params["tenpay"]) || !isset($params["realty_pay"]) || !isset($params["alipay"]) || !isset($params["tenpay"]) || !isset($params["realty_pay"]) ||
!isset($params["family_pay"]) || !isset($params["private_bank"]) || !isset($params["cash"]) || !isset($params["family_pay"]) || !isset($params["private_bank"]) || !isset($params["cash"]) ||
!isset($params["pos"]) || !isset($params["other_bank"]) !isset($params["pos"]) || !isset($params["other_bank"]) || !isset($params['site_id'])
) { ) {
return $this->response("101", "请求参数错误"); return $this->response("101", "请求参数错误");
} }
...@@ -100,8 +100,9 @@ class DailyPaper extends Basic ...@@ -100,8 +100,9 @@ class DailyPaper extends Basic
$cash = $params["cash"]; $cash = $params["cash"];
$pos = $params["pos"]; $pos = $params["pos"];
$other_bank = $params["other_bank"]; $other_bank = $params["other_bank"];
$site_id = $this->siteId;
$result = $this->service_->addDaily($agent_id, $agent_name, $daily_date, $alipay, $tenpay, $realty_pay, $result = $this->service_->addDaily($agent_id, $agent_name, $daily_date, $alipay, $tenpay, $realty_pay,
$family_pay,$private_bank ,$cash, $pos, $other_bank, $tenpay_2, $alipay_2); $family_pay,$private_bank ,$cash, $pos, $other_bank, $tenpay_2, $alipay_2, $site_id);
if ($result["code"] == 101) { if ($result["code"] == 101) {
return $this->response("101", $result["msg"]); return $this->response("101", $result["msg"]);
} else { } else {
......
...@@ -106,7 +106,8 @@ class DailyPaperService ...@@ -106,7 +106,8 @@ class DailyPaperService
//todo 统计各金额 //todo 统计各金额
$result["total_info"] = $this->getTotal($store_id, $daily_data); $result["total_info"] = $this->getTotal($store_id, $daily_data);
$result["site_id"] = $daily_info['site_id'];
unset($daily_info["site_id"]);
return ["code" => 200, "data" => $result]; return ["code" => 200, "data" => $result];
} }
...@@ -449,13 +450,14 @@ class DailyPaperService ...@@ -449,13 +450,14 @@ class DailyPaperService
* @param $other_bank * @param $other_bank
* @param $tenpay_2 * @param $tenpay_2
* @param $alipay_2 * @param $alipay_2
* @param $site_id
* @return array * @return array
* @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException * @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException * @throws \think\exception\DbException
*/ */
public function addDaily($agent_id, $agent_name, $daily_date, $alipay, $tenpay, $realty_pay, public function addDaily($agent_id, $agent_name, $daily_date, $alipay, $tenpay, $realty_pay,
$family_pay, $private_bank, $cash, $pos, $other_bank, $tenpay_2, $alipay_2) $family_pay, $private_bank, $cash, $pos, $other_bank, $tenpay_2, $alipay_2, $site_id)
{ {
$agent_info_arr["agent_id"] = $agent_id; $agent_info_arr["agent_id"] = $agent_id;
$agent_info_field = "id,name,store_id,district_id,level"; $agent_info_field = "id,name,store_id,district_id,level";
...@@ -470,7 +472,7 @@ class DailyPaperService ...@@ -470,7 +472,7 @@ class DailyPaperService
return ["code" => 101, "msg" => "请勿重复提交日报"]; return ["code" => 101, "msg" => "请勿重复提交日报"];
} }
$params = $this->dailyBin($agent_id, $agent_name, $daily_date, $alipay, $tenpay, $realty_pay, $params = $this->dailyBin($agent_id, $agent_name, $daily_date, $alipay, $tenpay, $realty_pay,
$family_pay, $private_bank, $cash, $pos, $other_bank, $agent_info[0]["store_id"], $agent_info[0]["district_id"], $tenpay_2, $alipay_2); $family_pay, $private_bank, $cash, $pos, $other_bank, $agent_info[0]["store_id"], $agent_info[0]["district_id"], $tenpay_2, $alipay_2, $site_id);
$is_ok = $this->oDailyModel->addDaily($params); $is_ok = $this->oDailyModel->addDaily($params);
if ($is_ok > 0) { if ($is_ok > 0) {
return ["code" => 200, "data" => null]; return ["code" => 200, "data" => null];
...@@ -480,7 +482,7 @@ class DailyPaperService ...@@ -480,7 +482,7 @@ class DailyPaperService
} }
public function dailyBin($agent_id, $agent_name, $daily_date, $alipay, $tenpay, $realty_pay, public function dailyBin($agent_id, $agent_name, $daily_date, $alipay, $tenpay, $realty_pay,
$family_pay, $private_bank, $cash, $pos, $other_bank, $store_id, $district_id, $tenpay_2, $alipay_2) $family_pay, $private_bank, $cash, $pos, $other_bank, $store_id, $district_id, $tenpay_2, $alipay_2, $site_id)
{ {
$arr["agent_id"] = $agent_id; $arr["agent_id"] = $agent_id;
$arr["agent_name"] = $agent_name; $arr["agent_name"] = $agent_name;
...@@ -497,6 +499,7 @@ class DailyPaperService ...@@ -497,6 +499,7 @@ class DailyPaperService
$arr["other_bank"] = $other_bank; $arr["other_bank"] = $other_bank;
$arr["tenpay_2"] = $tenpay_2; $arr["tenpay_2"] = $tenpay_2;
$arr["alipay_2"] = $alipay_2; $arr["alipay_2"] = $alipay_2;
$arr["site_id"] = $site_id;
$arr["create_time"] = date("Y-m-d H:i:s", time()); $arr["create_time"] = date("Y-m-d H:i:s", time());
$arr["update_time"] = date("Y-m-d H:i:s", time()); $arr["update_time"] = date("Y-m-d H:i:s", time());
return $arr; return $arr;
...@@ -609,7 +612,7 @@ class DailyPaperService ...@@ -609,7 +612,7 @@ class DailyPaperService
private function getDailyInfo($store_id, $daily_data,$type = 0) private function getDailyInfo($store_id, $daily_data,$type = 0)
{ {
$field_info_field = "id,agent_id,agent_name,daily_date,alipay,tenpay,realty_pay,family_pay,private_bank, $field_info_field = "id,agent_id,agent_name,daily_date,alipay,tenpay,realty_pay,family_pay,private_bank,
cash,pos,other_bank,status,create_time,update_time"; cash,pos,other_bank,status,create_time,update_time,alipay_2,tenpay_2,site_id";
if($type == 1){ if($type == 1){
$daily_info_params["agent_id"] = $store_id; $daily_info_params["agent_id"] = $store_id;
}else{ }else{
......
...@@ -100,8 +100,9 @@ class DailyPaper extends Basic ...@@ -100,8 +100,9 @@ class DailyPaper extends Basic
$cash = $params["cash"]; $cash = $params["cash"];
$pos = $params["pos"]; $pos = $params["pos"];
$other_bank = $params["other_bank"]; $other_bank = $params["other_bank"];
$site_id = $this->siteId;
$result = $this->service_->addDaily($agent_id, $agent_name, $daily_date, $alipay, $tenpay, $realty_pay, $result = $this->service_->addDaily($agent_id, $agent_name, $daily_date, $alipay, $tenpay, $realty_pay,
$family_pay,$private_bank ,$cash, $pos, $other_bank); $family_pay,$private_bank ,$cash, $pos, $other_bank, $tenpay_2, $alipay_2, $site_id);
if ($result["code"] == 101) { if ($result["code"] == 101) {
return $this->response("101", $result["msg"]); return $this->response("101", $result["msg"]);
} 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