Commit 0e963a43 authored by zw's avatar zw

bug

parent cdd14064
......@@ -467,7 +467,7 @@ class DailyPaperService
return ["code" => 101, "msg" => "经纪人信息错误"];
}
//todo 判断是否提交过,
$dailyInfo = $this->getDailyInfo($agent_id,$daily_date);
$dailyInfo = $this->getDailyInfo($agent_id,$daily_date,1);
if(count($dailyInfo) > 0 ){
return ["code" => 101, "msg" => "请勿重复提交日报"];
}
......@@ -600,17 +600,22 @@ class DailyPaperService
* 获取提交的日报记录
* @param $store_id
* @param $daily_data
* @param $type
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
private function getDailyInfo($store_id, $daily_data)
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,
cash,pos,other_bank,status,create_time,update_time";
if($type == 1){
$daily_info_params["agent_id"] = $store_id;
}else{
$daily_info_params["store_id"] = $store_id;
}
$daily_info_params["store_id"] = $store_id;
$daily_info_params["daily_date"] = $daily_data;
return $this->oDailyModel->getDailyList($field_info_field, $daily_info_params, 1, 1);
......
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