james-patch-30 #43
@ -76,7 +76,7 @@ class CheckBomInfo
|
|||||||
$sql = "SELECT * FROM hf_mes_bkv_batch_process_log WHERE workingsubclass='".$workingsubclass."' AND item_device_code='".$device_code."' AND status=0 ";
|
$sql = "SELECT * FROM hf_mes_bkv_batch_process_log WHERE workingsubclass='".$workingsubclass."' AND item_device_code='".$device_code."' AND status=0 ";
|
||||||
$ret = Db::fetchAll($sql);
|
$ret = Db::fetchAll($sql);
|
||||||
if(empty($ret)){
|
if(empty($ret)){
|
||||||
throw new Exception('批次'.$batch.'下的工序单元'.$workingsubclass.',bom关系不存在in结构物料编码',4002);
|
throw new Exception('批次'.$batch.'下的工序单元'.$workingsubclass.',bom关系不存在in结构物料编码',4003);
|
||||||
}
|
}
|
||||||
|
|
||||||
$item_code = array_column($ret,"item_code");
|
$item_code = array_column($ret,"item_code");
|
||||||
@ -95,7 +95,7 @@ class CheckBomInfo
|
|||||||
$diff_item_code = array_diff($bom_relationship_item_code,$item_code);
|
$diff_item_code = array_diff($bom_relationship_item_code,$item_code);
|
||||||
|
|
||||||
if(count($diff_item_code)>0){
|
if(count($diff_item_code)>0){
|
||||||
throw new Exception("缺少item_code为[".implode(',',$diff_item_code)."]的物料",4002);
|
throw new Exception("缺少item_code为[".implode(',',$diff_item_code)."]的物料",4004);
|
||||||
}
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
#!/usr/bin/env php
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once __DIR__ . '/vendor/autoload.php';
|
require_once __DIR__ . '/vendor/autoload.php';
|
||||||
// 使用 getopt 函数解析命令行参数
|
// 使用 getopt 函数解析命令行参数
|
||||||
$options = getopt('h::', ['APP_ENV::', 'help::']);
|
$options = getopt('h::', ['APP_ENV::', 'help::']);
|
||||||
|
|
||||||
|
|
||||||
// 检查是否请求帮助信息
|
// 检查是否请求帮助信息
|
||||||
if (isset($options['h']) || isset($options['help'])) {
|
if (isset($options['h']) || isset($options['help'])) {
|
||||||
echo "Usage: php start.php [options]\n";
|
echo "Usage: php start.php [options]\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user