Files
OMS/app/ome/lib/autotask/timer/logistestimate.php
2025-12-28 23:13:25 +08:00

36 lines
1.1 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/**
* Copyright © ShopeX http://www.shopex.cn. All rights reserved.
* See LICENSE file for license details.
*/
/**
* 物流对帐任务处理类
*
* @author kamisama.xia@gmail.com
* @version 0.1
*/
class ome_autotask_timer_logistestimate
{
public function process($params, &$error_msg=''){
set_time_limit(0);
ignore_user_abort(1);
@ini_set('memory_limit','512M');
//物流对帐任务开关(系统设置--》财务设置--》物流对帐设置)
$logistestimateSet = app::get('ome')->getConf('ome.task.logistestimate');
if($logistestimateSet == 'off'){
//物流对帐任务已关闭
//@todo更新为当天执行日期防止后面开启任务执行时间范围过大导致内存溢出
$now_time = mktime(0,0,0,date('m'),date('d'),date('Y'));
app::get('logisticsaccounts')->setConf('logisticsaccounts.delivery.downtime', $now_time);
return true;
}
kernel::single('logisticsaccounts_estimate')->crontab_delivery();
return true;
}
}