mirror of
https://gitee.com/ShopeX/OMS
synced 2026-04-19 03:35:28 +08:00
1. 【新增】售后单售后原因类型支持搜索
2. 【新增】手工创建订单折扣可输入正数 3. 【优化】盘点申请单确认 4. 【修复】采购退货单模拟出库失败问题 5. 【新增】订单金额客户实付与结算金额 6. 【优化】仓库发货统计报表物料名称显示 7. 【优化】自有仓储虚拟发货逻辑 8. 【修复】基础物料分类管理问题
This commit is contained in:
@@ -28,6 +28,14 @@ class monitor_autotask_timer_checkfreezestore
|
||||
set_time_limit(0);
|
||||
ignore_user_abort(1);
|
||||
@ini_set('memory_limit', '1024M');
|
||||
|
||||
// ---------------------------init time---------------------------
|
||||
// ---------------------------init time---------------------------
|
||||
// $init_time = strtotime('2026-03-27 09:00:00');
|
||||
// base_kvstore::instance('monitor/checkfreezestore')->store('sync-lastexectime-exec', $init_time);
|
||||
// base_kvstore::instance('monitor/checkfreezestore')->store('sync-lastexectime', $init_time);
|
||||
// ---------------------------init time---------------------------
|
||||
// ---------------------------init time---------------------------
|
||||
|
||||
$now = time();
|
||||
|
||||
@@ -528,8 +536,33 @@ class monitor_autotask_timer_checkfreezestore
|
||||
|
||||
}
|
||||
|
||||
// 定时场景下做二次复检,过滤瞬时抖动导致的误报
|
||||
$skipDoubleCheck = false;
|
||||
if (!$params['show'] && !$params['script'] && !$params['skip_double_check'] && $failInfo) {
|
||||
$candidateBmIds = $this->collectFailBmIds($failInfo);
|
||||
if ($candidateBmIds) {
|
||||
$candidateCount = count($candidateBmIds);
|
||||
if ($candidateCount > 600) {
|
||||
$skipDoubleCheck = true;
|
||||
} else {
|
||||
sleep(6);
|
||||
$scriptParams = [
|
||||
'script' => true,
|
||||
'uptime' => false,
|
||||
'script_bm_id_list' => $candidateBmIds,
|
||||
'skip_double_check' => true,
|
||||
];
|
||||
$tmpErr = '';
|
||||
$doubleCheckFailInfo = $this->process($scriptParams, $tmpErr);
|
||||
if (is_array($doubleCheckFailInfo)) {
|
||||
$failInfo = $doubleCheckFailInfo;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$msgHead = [
|
||||
'时间:' . ($last_modified ? date('m/d H:i:s', $last_modified) : 'NULL') . '——' . $timeEnd,
|
||||
'时间:' . ($last_modified ? date('m/d H:i:s', $last_modified) : 'NULL') . '——' . $timeEnd . ($skipDoubleCheck ? ' (未复检)' : ''),
|
||||
// '域名:' . kernel::base_url(1),
|
||||
"====== ====== ======",
|
||||
];
|
||||
@@ -545,7 +578,7 @@ class monitor_autotask_timer_checkfreezestore
|
||||
$earliest = $sfv['last_modified'];
|
||||
}
|
||||
if ($sfk<$showNum) {
|
||||
$stock_freeze_msg = array_merge($msgHead, json_encode($sfv, JSON_UNESCAPED_UNICODE));
|
||||
$stock_freeze_msg = array_merge($msgHead, [json_encode($sfv, JSON_UNESCAPED_UNICODE)]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -686,6 +719,51 @@ class monitor_autotask_timer_checkfreezestore
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 汇总各维度异常中的 bm_id,做二次复检用
|
||||
*/
|
||||
private function collectFailBmIds($failInfo)
|
||||
{
|
||||
$bmIds = [];
|
||||
if (!is_array($failInfo)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (!empty($failInfo['vsFreeze'])) {
|
||||
foreach ($failInfo['vsFreeze'] as $list) {
|
||||
foreach ((array)$list as $info) {
|
||||
if (isset($info['bmId'])) {
|
||||
$bmIds[(int)$info['bmId']] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($failInfo['vsStore'])) {
|
||||
foreach ($failInfo['vsStore'] as $list) {
|
||||
foreach ((array)$list as $info) {
|
||||
if (isset($info['bmId'])) {
|
||||
$bmIds[(int)$info['bmId']] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($failInfo['vsBmFreeze'])) {
|
||||
foreach ((array)$failInfo['vsBmFreeze'] as $bmId => $info) {
|
||||
$bmIds[(int)$bmId] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($failInfo['vsBmStore'])) {
|
||||
foreach ((array)$failInfo['vsBmStore'] as $bmId => $info) {
|
||||
$bmIds[(int)$bmId] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return array_keys($bmIds);
|
||||
}
|
||||
|
||||
private function getMainInfo($type = 'freeze', $info = '')
|
||||
{
|
||||
$freezeLib = kernel::single('material_basic_material_stock_freeze');
|
||||
|
||||
@@ -25,12 +25,15 @@ class monitor_autotask_timer_checkorderisdelivery {
|
||||
@ini_set('memory_limit', '1024M');
|
||||
$now = time() - 180;
|
||||
$last = strtotime('-1 week');
|
||||
$sql = "select order_bn,order_bool_type from sdb_ome_orders where is_delivery='N' and status='active' and createtime<{$now} and createtime>{$last} and process_status in ('unconfirmed','confirmed')";
|
||||
$sql = "select order_bn,order_bool_type,pay_status from sdb_ome_orders where is_delivery='N' and status='active' and createtime<{$now} and createtime>{$last} and process_status in ('unconfirmed','confirmed')";
|
||||
$list = kernel::database()->select($sql);
|
||||
foreach($list as $k => $order) {
|
||||
if($order['order_bool_type'] & ome_order_bool_type::__RISK_CODE) {
|
||||
unset($list[$k]);
|
||||
}
|
||||
if($order['pay_status'] != 1) {
|
||||
unset($list[$k]);
|
||||
}
|
||||
}
|
||||
if($list) {
|
||||
kernel::single('monitor_event_notify')->addNotify('order_360buy_delivery_error', [
|
||||
|
||||
Reference in New Issue
Block a user