edit-plan-cost

This commit is contained in:
lccsw
2023-01-09 10:13:32 +08:00
parent 0580ab059e
commit 71ae42ae1c
2 changed files with 8 additions and 3 deletions
+7 -3
View File
@@ -331,10 +331,10 @@ class Order extends CI_Controller{
!$size && $size = 5;
$where = [
'status' => 1,
// 'bill_time>=' => '2022-12-07 00:00:00',
'id not in (select o_id from lc_items_cost)' => null
'id not in (select o_id from lc_items_cost)' => null,
'id>=' => Orders_v2_entity::V2_START_ID
];
$where['id'] = $id;
$id && $where['id'] = $id;
$rows = $this->receiver_orders_v2_model->select($where,'',$page,$size);
if($rows){
foreach ($rows as $item) {
@@ -478,6 +478,10 @@ class Order extends CI_Controller{
}
$srv_json['loan_srv_price'] = $profix_loan + $srv_loan;
}
$sum = $this->app_liche_orders_model->sum('total_price', ['o_id'=>$item['id'],'status'=>1,'pay_price <>'=>0]);
$pay_price = $sum['total_price'] ? $sum['total_price'] : 0;
$need_price = $this->orders_v2_entity->recevable_price($item['id']);
$srv_json['if_pay'] = $pay_price>=$need_price ? 1 : 0;
$add_data['srv_json'] = json_encode($srv_json,JSON_UNESCAPED_UNICODE);
$id = $this->items_cost_model->add($add_data);
if(is_numeric($id)){
+1
View File
@@ -51,6 +51,7 @@ class Plan extends CI_Controller
$plan[] = array('url' => base_url(array('plan', 'order', 'up_old_status')), 'interval' => 30); //更新旧订单状态
$plan[] = array('url' => base_url(array('plan', 'order', 'out_time')), 'interval' => 10); //未支付订单过期
$plan[] = array('url' => base_url(array('plan', 'order', 'send_aggs_biz_ding_piao_rpt')), 'interval' => 1); //向飞书发送小狸播报
$plan[] = array('url' => base_url(array('plan', 'order', 'cost')), 'interval' => 1); //添加成本表数据
// $plan[] = array('url' => base_url(array('plan', 'syt', 'subscribemsg')), 'interval' => 1); //私域通模板消息
// $plan[] = array('url' => base_url(array('plan', 'syt', 'syn_polyv')), 'interval' => 60); //私域通直播间数据同步