Commit bf7714c7 authored by zw's avatar zw

bug

parent 8dd63d74
...@@ -424,7 +424,12 @@ class DailyPaperService ...@@ -424,7 +424,12 @@ class DailyPaperService
} }
$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"]); $family_pay, $private_bank, $cash, $pos, $other_bank, $agent_info[0]["store_id"], $agent_info[0]["district_id"]);
return $this->oDailyModel->addDaily($params); $is_ok = $this->oDailyModel->addDaily($params);
if ($is_ok > 0) {
return ["code" => 200, "data" => null];
} else {
return ["code" => 101, "msg" => "审核异常"];
}
} }
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,
...@@ -488,13 +493,19 @@ class DailyPaperService ...@@ -488,13 +493,19 @@ class DailyPaperService
$family_pay, $private_bank, $cash, $pos, $other_bank, $remark,$operation_status); $family_pay, $private_bank, $cash, $pos, $other_bank, $remark,$operation_status);
$is_ok = $this->oDailyLogModel->addDailyCheck($params); $is_ok = $this->oDailyLogModel->addDailyCheck($params);
if($is_ok > 0 && $operation_status == 1){//修改主表审核状态
if($is_ok > 0){
if($operation_status == 1){//修改主表审核状态
$update_where["id"] = $daily_id; $update_where["id"] = $daily_id;
$update_params["status"] = 1; $update_params["status"] = 1;
$update_params["update_time"] = date("Y-m-d H:i:s",time()); $update_params["update_time"] = date("Y-m-d H:i:s",time());
$this->oDailyModel->updateDaily($update_where,$update_params); $this->oDailyModel->updateDaily($update_where,$update_params);
} }
return $is_ok; return ["code" => 200, "data"=>null];
}else{
return ["code" => 101, "msg" => "审核异常"];
}
} }
......
...@@ -96,12 +96,12 @@ class DailyPaper extends Basic ...@@ -96,12 +96,12 @@ class DailyPaper extends Basic
$cash = $params["cash"]; $cash = $params["cash"];
$pos = $params["agent_id"]; $pos = $params["agent_id"];
$other_bank = $params["other_bank"]; $other_bank = $params["other_bank"];
$is_ok = $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);
if($is_ok > 0){ if ($result["code"] == 101) {
return $this->response("200","success",[]); return $this->response("101", $result["msg"]);
}else{ } else {
return $this->response("101", "保存数据异常"); return $this->response("200", "success", $result["data"]);
} }
} }
...@@ -114,7 +114,7 @@ class DailyPaper extends Basic ...@@ -114,7 +114,7 @@ class DailyPaper extends Basic
*/ */
public function commitCheck(){ public function commitCheck(){
$params = $this->params; $params = $this->params;
/* $params = array( /*$params = array(
"daily_id" => 1,//日报id "daily_id" => 1,//日报id
"agent_id" => 5775,//经纪人id "agent_id" => 5775,//经纪人id
"agent_name" => "222",//经纪人姓名 "agent_name" => "222",//经纪人姓名
...@@ -126,7 +126,7 @@ class DailyPaper extends Basic ...@@ -126,7 +126,7 @@ class DailyPaper extends Basic
"cash" => "666",//现金 "cash" => "666",//现金
"pos" => "777",//pos机 "pos" => "777",//pos机
"other_bank" => "888",//其他, "other_bank" => "888",//其他,
"operation_status" => 0,//0审核通过 1转为已审核 "operation_status" => 1,//0审核通过 1转为已审核
"remark" => "888"//备注, "remark" => "888"//备注,
);*/ );*/
if (!isset($params["daily_id"]) || empty($params["agent_id"]) || empty($params["agent_name"]) || if (!isset($params["daily_id"]) || empty($params["agent_id"]) || empty($params["agent_name"]) ||
...@@ -150,12 +150,12 @@ class DailyPaper extends Basic ...@@ -150,12 +150,12 @@ class DailyPaper extends Basic
$other_bank = $params["other_bank"]; $other_bank = $params["other_bank"];
$remark = $params["remark"]; $remark = $params["remark"];
$operation_status = $params["operation_status"]; $operation_status = $params["operation_status"];
$is_ok = $this->service_->addDailyCheck($daily_id,$agent_id, $agent_name, $alipay, $tenpay, $realty_pay, $result = $this->service_->addDailyCheck($daily_id,$agent_id, $agent_name, $alipay, $tenpay, $realty_pay,
$family_pay,$private_bank ,$cash, $pos, $other_bank,$remark,$operation_status); $family_pay,$private_bank ,$cash, $pos, $other_bank,$remark,$operation_status);
if($is_ok > 0){ if ($result["code"] == 101) {
return $this->response("200","success",[]); return $this->response("101", $result["msg"]);
}else{ } else {
return $this->response("101", "保存数据异常"); return $this->response("200", "success", $result["data"]);
} }
} }
......
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