Commit cd86bb1d authored by zhuwei's avatar zhuwei

更新财务日报未提交记录表数据

parent 46a75cf9
...@@ -4,6 +4,7 @@ namespace app\api_broker\service; ...@@ -4,6 +4,7 @@ namespace app\api_broker\service;
use app\api_broker\controller\Agent; use app\api_broker\controller\Agent;
use app\api_broker\service\VerifyService; use app\api_broker\service\VerifyService;
use app\index\controller\DailyUncommitted;
use app\model\AAgents; use app\model\AAgents;
use app\model\AStore; use app\model\AStore;
use app\model\GHouses; use app\model\GHouses;
...@@ -636,6 +637,9 @@ class DailyPaperService ...@@ -636,6 +637,9 @@ class DailyPaperService
$tenpay_2, $alipay_2, $site_id, $bank_card, $bank_card_yun, $bank_card_lin, $bank_card_new); $tenpay_2, $alipay_2, $site_id, $bank_card, $bank_card_yun, $bank_card_lin, $bank_card_new);
$is_ok = $this->oDailyModel->addDaily($params); $is_ok = $this->oDailyModel->addDaily($params);
if ($is_ok > 0) { if ($is_ok > 0) {
//更新财务日报未提交记录表数据
$c_daily_uncommitted = new DailyUncommitted();
$c_daily_uncommitted->updateUncommittedList($agent_info[0]["store_id"],$daily_date);
return ["code" => 200, "data" => null]; return ["code" => 200, "data" => null];
} else { } else {
return ["code" => 101, "msg" => "审核异常"]; return ["code" => 101, "msg" => "审核异常"];
......
...@@ -129,4 +129,22 @@ class DailyUncommitted extends Basic ...@@ -129,4 +129,22 @@ class DailyUncommitted extends Basic
return $this->response("200", "成功", $data); return $this->response("200", "成功", $data);
} }
/**
* 更新已提交
* @param $store_id
* @param $time
* @return bool
*/
public function updateUncommittedList($store_id,$time)
{
$params_d = [];
$params_d['store_id'] = $store_id;
$params_d['daily_date'] = $time;
$result = $this->m_daily_uncommitted->getDailyUncommitted('id',$params_d);
if ($result){
$this->m_daily_uncommitted->updateDailyUncommitted(['id'=>$result['id']],['status'=>1]);
}
return true;
}
} }
\ No newline at end of file
...@@ -79,5 +79,12 @@ class ODailyUncommittedModel extends Model ...@@ -79,5 +79,12 @@ class ODailyUncommittedModel extends Model
return $result; return $result;
} }
public function updateDailyUncommitted($where,$params)
{
$result = $this->db_ ->where($where)->update($params);
//dump($this->getLastSql());
return $result;
}
} }
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