[root@78fab63b3c20 home]# ./clamav_test clamav_test.c Loaded 8708238 signatures Scan error: Null argument passed to function Critical scan error

时间: 2025-09-12 22:21:17 AIGC 浏览: 2
<think> 根据错误信息"Scan error: Null argument passed to function",问题可能出现在cl_scanfile函数的参数上。特别是,代码中使用了以下调用: ret = cl_scanfile(filepath, &virname, &scanned, engine, CL_SCAN_STDOPT); 错误提示传递了空参数,所以我们需要检查: 1. filepath是否为NULL或空字符串 2. virname指针是否被正确传递 3. engine是否成功创建 回顾代码,engine创建失败会提前返回,所以问题可能出在filepath上。但在main函数中,我们检查了argc,确保传递了参数,所以filepath应该是有效的。 另一个可能性是ClamAV在内部处理时出现了问题。根据ClamAV文档,cl_scanfile函数的原型是: int cl_scanfile(const char *filename, const char **virname, unsigned long int *scanned, const struct cl_engine *engine, unsigned int options); 注意:第三个参数是unsigned long int*,但我们在代码中使用了long unsigned int*,这通常是兼容的(因为long unsigned int和unsigned long int在大多数系统上是相同的)。但是,错误信息明确说是空参数,所以我们需要检查这些指针是否都是非空的。 在我们的代码中,我们传递了: &virname -> 这是一个const char**,指向一个指针(初始为NULL) &scanned -> 这是一个long unsigned int*,指向一个变量(初始为0) 因此,这些指针都是非空的。那么问题可能出在引擎内部,或者数据库加载的问题。 但是,错误信息"Null argument passed to function"是ClamAV内部返回的错误,对应CL_ENULLARG(-5)。查看ClamAV源码,这个错误通常发生在传递给函数的指针参数为NULL时。 因此,我们需要检查: 1. filepath:由argv[1]提供,已经检查过argc,所以不为空。 2. virname:我们传递了&virname,不为空。 3. scanned:我们传递了&scanned,不为空。 4. engine:不为空,因为之前已经创建成功。 那么,问题可能发生在引擎内部。一个可能的原因是引擎没有正确编译,但我们在cl_engine_compile后检查了错误,如果编译失败,函数会提前返回。 另一个可能性是ClamAV版本问题:1.4.3版本中,cl_scanfile函数可能对某些参数有特殊要求?或者数据库加载成功后,编译失败? 让我们在代码中添加更详细的错误检查: 修改后的scan_file函数: ```c int scan_file(const char *filepath) { struct cl_engine *engine = NULL; unsigned int sigs = 0; int ret = SCAN_ERROR; // 1. 初始化 ClamAV 库 if (cl_init(CL_INIT_DEFAULT) != CL_SUCCESS) { fprintf(stderr, "Error initializing ClamAV\n"); return SCAN_ERROR; } // 2. 创建扫描引擎 engine = cl_engine_new(); if (!engine) { fprintf(stderr, "Failed to create engine\n"); return SCAN_ERROR; } // 3. 加载病毒数据库(默认路径) const char *dbdir = cl_retdbdir(); printf("Database directory: %s\n", dbdir); // 打印数据库目录 ret = cl_load(dbdir, engine, &sigs, CL_DB_STDOPT); if (ret != CL_SUCCESS) { fprintf(stderr, "Database load error: %s\n", cl_strerror(ret)); cl_engine_free(engine); return SCAN_ERROR; } printf("Loaded %u signatures\n", sigs); // 4. 编译引擎 ret = cl_engine_compile(engine); if (ret != CL_SUCCESS) { fprintf(stderr, "Engine compile error: %s\n", cl_strerror(ret)); cl_engine_free(engine); return SCAN_ERROR; } // 5. 扫描文件 const char *virname = NULL; unsigned long int scanned = 0; // 使用unsigned long int,与ClamAV期望的类型匹配 ret = cl_scanfile(filepath, &virname, &scanned, engine, CL_SCAN_STDOPT); switch(ret) { case CL_CLEAN: printf("File is clean. Scanned %lu bytes.\n", scanned); ret = SCAN_SUCCESS; break; case CL_VIRUS: printf("Virus detected: %s. Scanned %lu bytes.\n", virname, scanned); ret = SCAN_VIRUS_FOUND; break; default: fprintf(stderr, "Scan error [%d]: %s\n", ret, cl_strerror(ret)); ret = SCAN_ERROR; } // 6. 清理资源 cl_engine_free(engine); return ret; } ``` 主要修改: 1. 添加了数据库目录的打印,以确认数据库路径正确。 2. 将scanned变量的类型改为`unsigned long int`(虽然之前是`long unsigned int`,但为了清晰,改为`unsigned long int`,因为ClamAV的API文档中用的是`unsigned long int`)。 3. 在错误信息中打印具体的错误码和错误信息。 如果问题仍然存在,考虑数据库路径是否正确?在容器中,可能没有安装病毒数据库。我们需要确保病毒数据库存在。 在容器中,通常需要运行`freshclam`来下载数据库,或者将主机上的数据库目录挂载到容器中。 由于错误是“Null argument passed to function”,并且我们检查了所有参数都不为空,那么可能是ClamAV内部的问题。一个常见的原因是数据库没有正确加载,但代码中已经检查了cl_load的返回值。所以,我们打印数据库目录,并检查该目录下是否有数据库文件(.cvd或.cld文件)。 运行程序前,确保数据库存在: ```bash ls /var/lib/clamav ``` 如果数据库目录为空,则需要运行`freshclam`下载。 在容器中,可能需要以root身份运行: ```bash sudo freshclam ``` 如果容器中没有`freshclam`,则需要在构建镜像时包含这一步。 另外,注意程序运行权限:扫描文件需要读取权限。 如果仍然不能解决,我们可以尝试使用ClamAV提供的简单示例程序(如clamscan)扫描同一个文件,以确定是代码问题还是环境问题。 最后,如果问题依旧,考虑升级ClamAV版本,因为1.4.3可能较旧,或者存在已知问题。 §§相关问题§§: 1. 在Linux环境下,如何配置ClamAV的数据库路径? 2. 如何通过ClamAV API实现对内存缓冲区的扫描(而不是文件)? 3. ClamAV扫描过程中如何设置最大文件大小和最大扫描深度的限制? 4. 如何处理ClamAV扫描时的超时问题? </think> 根据错误信息"Scan error: Null argument passed to function",这表明在调用 `cl_scanfile()` 函数时传递了空参数。以下是详细的问题分析和解决方案: ### 问题原因分析: 1. **文件路径问题**: - 传递的文件路径无效或不可访问 - 文件路径包含特殊字符或空格 - 程序没有足够的权限读取该文件 2. **引擎初始化问题**: - 数据库加载失败导致引擎未正确初始化 - 引擎编译失败但未被检测到 3. **ClamAV版本匹配问题**: - 编译使用的库版本与运行时链接的库版本不一致 - 1.4.3版本可能存在特定API行为变化 ### 解决方案: #### 1. 添加详细的错误检查代码 ```c #include <clamav.h> #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> // 检查文件可访问性 int is_file_accessible(const char *path) { struct stat st; if (stat(path, &st) != 0) { perror("stat failed"); return 0; } if (!S_ISREG(st.st_mode)) { fprintf(stderr, "Not a regular file: %s\n", path); return 0; } if (access(path, R_OK) != 0) { perror("access failed"); return 0; } return 1; } int scan_file(const char *filepath) { // ... [前面的初始化代码不变] ... // 在扫描前添加文件检查 if (!is_file_accessible(filepath)) { fprintf(stderr, "File inaccessible: %s\n", filepath); cl_engine_free(engine); return SCAN_ERROR; } // 详细打印引擎信息 printf("Engine version: %u\n", cl_engine_get_num(engine, CL_ENGINE_VERSION)); printf("Database version: %s\n", cl_retver()); // ... [扫描代码不变] ... } ``` #### 2. 修复数据库初始化逻辑 ```c // 修改数据库加载部分 const char *dbdir = cl_retdbdir(); printf("Using database directory: %s\n", dbdir); // 检查数据库文件是否存在 struct stat st; if (stat(dbdir, &st) != 0 || !S_ISDIR(st.st_mode)) { fprintf(stderr, "Database directory missing: %s\n", dbdir); cl_engine_free(engine); return SCAN_ERROR; } ret = cl_load(dbdir, engine, &sigs, CL_DB_STDOPT); ``` #### 3. 添加参数有效性检查 ```c // 在cl_scanfile调用前检查参数 if (!filepath || !virname || !scanned || !engine) { fprintf(stderr, "Invalid parameters for cl_scanfile\n"); fprintf(stderr, "Filepath: %p, Virname: %p, Scanned: %p, Engine: %p\n", filepath, virname, scanned, engine); cl_engine_free(engine); return SCAN_ERROR; } ret = cl_scanfile(filepath, &virname, &scanned, engine, CL_SCAN_STDOPT); ``` ### 完整修复后的代码: ```c #include <clamav.h> #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <unistd.h> #define SCAN_SUCCESS 0 #define SCAN_VIRUS_FOUND 1 #define SCAN_ERROR -1 int is_file_accessible(const char *path) { struct stat st; if (stat(path, &st) != 0) { perror("stat failed"); return 0; } if (!S_ISREG(st.st_mode)) { fprintf(stderr, "Not a regular file: %s\n", path); return 0; } if (access(path, R_OK) != 0) { perror("access failed"); return 0; } return 1; } int scan_file(const char *filepath) { struct cl_engine *engine = NULL; unsigned int sigs = 0; int ret = SCAN_ERROR; if (cl_init(CL_INIT_DEFAULT) != CL_SUCCESS) { fprintf(stderr, "Error initializing ClamAV\n"); return SCAN_ERROR; } engine = cl_engine_new(); if (!engine) { fprintf(stderr, "Failed to create engine\n"); return SCAN_ERROR; } const char *dbdir = cl_retdbdir(); printf("Using database directory: %s\n", dbdir); struct stat st; if (stat(dbdir, &st) != 0 || !S_ISDIR(st.st_mode)) { fprintf(stderr, "Database directory missing: %s\n", dbdir); cl_engine_free(engine); return SCAN_ERROR; } ret = cl_load(dbdir, engine, &sigs, CL_DB_STDOPT); if (ret != CL_SUCCESS) { fprintf(stderr, "Database load error: %s\n", cl_strerror(ret)); cl_engine_free(engine); return SCAN_ERROR; } printf("Loaded %u signatures\n", sigs); if ((ret = cl_engine_compile(engine)) != CL_SUCCESS) { fprintf(stderr, "Engine compile error: %s\n", cl_strerror(ret)); cl_engine_free(engine); return SCAN_ERROR; } // 文件访问检查 if (!is_file_accessible(filepath)) { fprintf(stderr, "File inaccessible: %s\n", filepath); cl_engine_free(engine); return SCAN_ERROR; } const char *virname = NULL; unsigned long scanned = 0; // 参数有效性检查 if (!filepath || !engine) { fprintf(stderr, "Critical: Invalid parameters\n"); cl_engine_free(engine); return SCAN_ERROR; } ret = cl_scanfile(filepath, &virname, &scanned, engine, CL_SCAN_STDOPT); switch(ret) { case CL_CLEAN: printf("File is clean. Scanned %lu bytes\n", scanned); ret = SCAN_SUCCESS; break; case CL_VIRUS: printf("Virus detected: %s\n", virname); ret = SCAN_VIRUS_FOUND; break; default: fprintf(stderr, "Scan error [%d]: %s\n", ret, cl_strerror(ret)); ret = SCAN_ERROR; } cl_engine_free(engine); return ret; } int main(int argc, char **argv) { if (argc != 2) { fprintf(stderr, "Usage: %s <file-to-scan>\n", argv[0]); return EXIT_FAILURE; } printf("Scanning file: %s\n", argv[1]); int result = scan_file(argv[1]); switch(result) { case SCAN_SUCCESS: printf("Scan completed successfully\n"); return EXIT_SUCCESS; case SCAN_VIRUS_FOUND: printf("Infected file detected!\n"); return EXIT_FAILURE; default: fprintf(stderr, "Critical scan error\n"); return EXIT_FAILURE; } } ``` ### 调试步骤: 1. **验证文件权限**: ```bash ls -l clamav_test.c ``` 2. **检查数据库目录**: ```bash ls -l $(clamconf --get DatabaseDirectory) ``` 3. **更新数据库**: ```bash sudo freshclam --verbose ``` 4. **使用绝对路径测试**: ```bash ./clamav_test "$(pwd)/clamav_test.c" ``` 5. **检查库版本**: ```bash ldd ./clamav_test | grep clamav clamscan --version ```
阅读全文

相关推荐

switch (poHeader.getCorpCode()) { case FabUtils.FAB5_CORP_CODE: /* * 根据OUID获取对应库存组织 * FAB5: 84,'HLMC' * FAB6: 86,81 'HLIC' * FAB10: 84,'HHCD' */ if (poHeader.getOuId() == 84) { poHeader.setDestinationOrgName(CompanyUtils.DES_ORG_NAME_FAB5); } // 公司中文名称 poHeader.setCorpName(FabUtils.FAB5_CORP_FULL_NAME); // 公司英文名称 poHeader.setCorpEnName(FabUtils.FAB5_CORP_FULL_NAME_EN); // 采购订单号 // 唛头 poHeader.setShippingMark(TemplateNameUtils.SHIPPING_MARK_FAB5 + poHeader.getPoNumber()); poHeader.setLeftTitle(TemplateNameUtils.LEFT_TITLE_FAB5); termTplName = bo.getLanguageType().equals(PrPoConstant.PRINT_LANGUAGE_TYPE_ZH) ? TemplateNameUtils.FAB5_ZHS + (bo.getPrintFileType().equals(PrPoConstant.PRINT_FILE_TYPE_PDF) ? TemplateNameUtils.FILE_TYPE_PDF : TemplateNameUtils.FILE_TYPE_WORD) : TemplateNameUtils.FAB5_US + (bo.getPrintFileType().equals(PrPoConstant.PRINT_FILE_TYPE_PDF) ? TemplateNameUtils.FILE_TYPE_PDF : TemplateNameUtils.FILE_TYPE_WORD); break; case FabUtils.FAB6_CORP_CODE: if (poHeader.getOuId() == 86 || poHeader.getOuId() == 81) { poHeader.setDestinationOrgName(CompanyUtils.DES_ORG_NAME_FAB6); } poHeader.setCorpName(FabUtils.FAB6_OR_8_CORP_FULL_NAME); poHeader.setCorpEnName(FabUtils.FAB6_OR_8_CORP_FULL_NAME_EN); poHeader.setLeftTitle(TemplateNameUtils.LEFT_TITLE_HLIC); // 唛头 poHeader.setShippingMark(TemplateNameUtils.SHIPPING_MARK_FAB6 + poHeader.getPoNumber()); termTplName = bo.getLanguageType().equals(PrPoConstant.PRINT_LANGUAGE_TYPE_ZH) ? TemplateNameUtils.FAB6_ZHS + (bo.getPrintFileType().equals(PrPoConstant.PRINT_FILE_TYPE_PDF) ? TemplateNameUtils.FILE_TYPE_PDF : TemplateNameUtils.FILE_TYPE_WORD) : TemplateNameUtils.FAB6_US + (bo.getPrintFileType().equals(PrPoConstant.PRINT_FILE_TYPE_PDF) ? TemplateNameUtils.FILE_TYPE_PDF : TemplateNameUtils.FILE_TYPE_WORD); break; case FabUtils.FAB10_CORP_CODE: if (poHeader.getOuId() == 84) { poHeader.setDestinationOrgName(CompanyUtils.DES_ORG_NAME_FAB10); } poHeader.setCorpName(FabUtils.FAB10_CORP_FULL_NAME); poHeader.setCorpEnName(FabUtils.FAB10_CORP_FULL_NAME_EN); poHeader.setLeftTitle(""); // 唛头 poHeader.setShippingMark(TemplateNameUtils.SHIPPING_MARK_FAB10 + poHeader.getPoNumber()); termTplName = bo.getLanguageType().equals(PrPoConstant.PRINT_LANGUAGE_TYPE_ZH) ? TemplateNameUtils.FAB10_ZHS + (bo.getPrintFileType().equals(PrPoConstant.PRINT_FILE_TYPE_PDF) ? TemplateNameUtils.FILE_TYPE_PDF : TemplateNameUtils.FILE_TYPE_WORD) : TemplateNameUtils.FAB10_US + (bo.getPrintFileType().equals(PrPoConstant.PRINT_FILE_TYPE_PDF) ? TemplateNameUtils.FILE_TYPE_PDF : TemplateNameUtils.FILE_TYPE_WORD); break; } 这段代码有待优化的地方吗?

2025-07-14 20:14:37.232 15840-15840 libc com.example.baiyunmap A Fatal signal 11 (SIGSEGV), code 128 (SI_KERNEL), fault addr 0x0 in tid 15840 (ample.baiyunmap), pid 15840 (ample.baiyunmap) 2025-07-14 20:14:37.602 15885-15885 DEBUG pid-15885 A Cmdline: com.example.baiyunmap 2025-07-14 20:14:37.602 15885-15885 DEBUG pid-15885 A pid: 15840, tid: 15840, name: ample.baiyunmap >>> com.example.baiyunmap <<< 2025-07-14 20:14:37.602 15885-15885 DEBUG pid-15885 A #00 pc 00000000004cab64 /data/app/~~OljfxsydegH-sraOS4Y7Kg==/com.example.baiyunmap-QyH9YPNP5Ohzcm110rmefQ==/lib/x86_64/libBaiduMapSDK_map_for_navi_v7_6_5.so (_baidu_framework::CBaseLayer::CBaseLayer()+148) (BuildId: 72389d7e76ac01b9603c2b9a85daaaadbdc06757) 2025-07-14 20:14:37.602 15885-15885 DEBUG pid-15885 A #01 pc 000000000072d769 /data/app/~~OljfxsydegH-sraOS4Y7Kg==/com.example.baiyunmap-QyH9YPNP5Ohzcm110rmefQ==/lib/x86_64/libBaiduMapSDK_map_for_navi_v7_6_5.so (BuildId: 72389d7e76ac01b9603c2b9a85daaaadbdc06757) 2025-07-14 20:14:37.602 15885-15885 DEBUG pid-15885 A #02 pc 0000000000741036 /data/app/~~OljfxsydegH-sraOS4Y7Kg==/com.example.baiyunmap-QyH9YPNP5Ohzcm110rmefQ==/lib/x86_64/libBaiduMapSDK_map_for_navi_v7_6_5.so (BuildId: 72389d7e76ac01b9603c2b9a85daaaadbdc06757) 2025-07-14 20:14:37.602 15885-15885 DEBUG pid-15885 A #03 pc 000000000043abb0 /data/app/~~OljfxsydegH-sraOS4Y7Kg==/com.example.baiyunmap-QyH9YPNP5Ohzcm110rmefQ==/lib/x86_64/libBaiduMapSDK_map_for_navi_v7_6_5.so (_baidu_framework::CVComServer::ComCreateInstance(_baidu_vi::CVString const&, _baidu_vi::CVString const&, void**)+112) (BuildId: 72389d7e76ac01b9603c2b9a85daaaadbdc06757) 2025-07-14 20:14:37.602 15885-15885 DEBUG pid-15885 A #04 pc 000000000052e8b1 /data/app/~~OljfxsydegH-sraOS4Y7Kg==/com.example.baiyunmap-QyH9YPNP5Ohzcm110rmefQ==/lib/x86_64/libBaiduMapSDK_map_for_navi_v7_6_5.so (BuildId: 72389d7e76ac01b9603c2b9a85daaaadbdc06757) 2025-07-14 20:14:37.602 15885-15885 DEBUG pid-15885 A #05 pc 0000000000530502 /data/app/~~OljfxsydegH-sraOS4Y7Kg==/com.example.baiyunmap-QyH9YPNP5Ohzcm110rmefQ==/lib/x86_64/libBaiduMapSDK_map_for_navi_v7_6_5.so (BuildId: 72389d7e76ac01b9603c2b9a85daaaadbdc06757) 2025-07-14 20:14:37.602 15885-15885 DEBUG pid-15885 A #06 pc 0000000000522990 /data/app/~~OljfxsydegH-sraOS4Y7Kg==/com.example.baiyunmap-QyH9YPNP5Ohzcm110rmefQ==/lib/x86_64/libBaiduMapSDK_map_for_navi_v7_6_5.so (_baidu_framework::IVMapbaseFactory::CreateInstance(_baidu_vi::CVString const&, void**)+128) (BuildId: 72389d7e76ac01b9603c2b9a85daaaadbdc06757) 2025-07-14 20:14:37.602 15885-15885 DEBUG pid-15885 A #07 pc 000000000043abb0 /data/app/~~OljfxsydegH-sraOS4Y7Kg==/com.example.baiyunmap-QyH9YPNP5Ohzcm110rmefQ==/lib/x86_64/libBaiduMapSDK_map_for_navi_v7_6_5.so (_baidu_framework::CVComServer::ComCreateInstance(_baidu_vi::CVString const&, _baidu_vi::CVString const&, void**)+112) (BuildId: 72389d7e76ac01b9603c2b9a85daaaadbdc06757) 2025-07-14 20:14:37.602 15885-15885 DEBUG pid-15885 A #08 pc 000000000048b694 /data/app/~~OljfxsydegH-sraOS4Y7Kg==/com.example.baiyunmap-QyH9YPNP5Ohzcm110rmefQ==/lib/x86_64/libBaiduMapSDK_map_for_navi_v7_6_5.so (BuildId: 72389d7e76ac01b9603c2b9a85daaaadbdc06757) 2025-07-14 20:14:37.603 15885-15885 DEBUG pid-15885 A #138 pc 000000000000161c <anonymous:7784fab9c000> (com.example.baiyunmap.MainActivity.onCreate+0)

root@autodl-container-c85144bc1a-7cf0bfa7:~# # 验证ONNX Runtime版本 python -c "import onnxruntime as ort; print(ort.__version__)" # 需要 >=1.15.0 (2024年模型要求) # 检查CUDA可用性(如使用GPU) python -c "import onnxruntime; print(onnxruntime.get_device())" # 应输出:['CPU', 'GPU:0'] 或类似 # 若出现CUDA错误(参考引用[3]),添加环境变量 export CUDA_LAUNCH_BLOCKING=1 Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'onnxruntime' Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'onnxruntime' root@autodl-container-c85144bc1a-7cf0bfa7:~# # 示例正确配置 sherpa_onnx: model_dir: "/root/autodl-tmp/Open-LLM-VTuber/models/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17" sample_rate: 16000 decoding_method: "greedy_search" bash: sherpa_onnx:: command not found bash: model_dir:: command not found bash: sample_rate:: command not found bash: decoding_method:: command not found root@autodl-container-c85144bc1a-7cf0bfa7:~# import onnxruntime as ort def load_model(model_path): try: sess = ort.InferenceSession(model_path) print(f"✅ 成功加载模型: {model_path}") print(f"输入形状: {sess.get_inputs()[0].shape}") print(f"输出形状: {sess.get_outputs()[0].shape}") except Exception as e: print(f"❌ 加载失败: {str(e)}") # 测试关键模型 load_model("/root/autodl-tmp/.../encoder.onnx") load_model("/root/autodl-tmp/.../decoder.onnx") bash: import: command not found bash: syntax error near unexpected token (' bash: try:: command not found bash: syntax error near unexpected token (' bash: syntax error near unexpected token f"✅ 成功加载模型: {model_path}"' bash: syntax error near unexpected token f"输入形状: {sess.get_inputs()[0].shape}"' bash: syntax error near unexpected token f"输出形状: {sess.get_outputs()[0].shape}"' bash: except: command not found bash: syntax error near unexpected token f"❌ 加载失败: {str(e)}"' bash: syntax error near unexpected token "/root/autodl-tmp/.../encoder.onnx"' bash: syntax error near unexpected token "/root/autodl-tmp/.../decoder.onnx"' root@autodl-container-c85144bc1a-7cf0bfa7:~/autodl-tmp/Open-LLM-VTuber# pip install netron python -m netron encoder.onnx Looking in indexes: http://mirrors.aliyun.com/pypi/simple Collecting netron Downloading http://mirrors.aliyun.com/pypi/packages/86/d5/8b72b3bcf717c765945014d41e28a3d3ef67e66965c65cc325a73dbfd097/netron-8.4.4-py3-none-any.whl (1.9 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.9/1.9 MB 4.4 MB/s eta 0:00:00 Installing collected packages: netron Successfully installed netron-8.4.4 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv /root/miniconda3/bin/python: No module named netron.__main__; 'netron' is a package and cannot be directly executed root@autodl-container-c85144bc1a-7cf0bfa7:~/autodl-tmp/Open-LLM-VTuber# pip install onnxruntime==1.15.1 # 2024年模型常用兼容版本 Looking in indexes: http://mirrors.aliyun.com/pypi/simple Collecting onnxruntime==1.15.1 Downloading http://mirrors.aliyun.com/pypi/packages/2f/e2/ced4e64433097cb14425098ce3c6200b83d226005e8c23ba5bac44c89ab9/onnxruntime-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.9 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.9/5.9 MB 4.1 MB/s eta 0:00:00 Requirement already satisfied: numpy>=1.21.6 in /root/miniconda3/lib/python3.10/site-packages (from onnxruntime==1.15.1) (1.26.4) Requirement already satisfied: packaging in /root/miniconda3/lib/python3.10/site-packages (from onnxruntime==1.15.1) (24.1) Collecting flatbuffers Downloading http://mirrors.aliyun.com/pypi/packages/b8/25/155f9f080d5e4bc0082edfda032ea2bc2b8fab3f4d25d46c1e9dd22a1a89/flatbuffers-25.2.10-py2.py3-none-any.whl (30 kB) Requirement already satisfied: sympy in /root/miniconda3/lib/python3.10/site-packages (from onnxruntime==1.15.1) (1.12.1) Requirement already satisfied: protobuf in /root/miniconda3/lib/python3.10/site-packages (from onnxruntime==1.15.1) (4.25.3) Collecting coloredlogs Downloading http://mirrors.aliyun.com/pypi/packages/a7/06/3d6badcf13db419e25b07041d9c7b4a2c331d3f4e7134445ec5df57714cd/coloredlogs-15.0.1-py2.py3-none-any.whl (46 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.0/46.0 kB 2.5 MB/s eta 0:00:00 Collecting humanfriendly>=9.1 Downloading http://mirrors.aliyun.com/pypi/packages/f0/0f/310fb31e39e2d734ccaa2c0fb981ee41f7bd5056ce9bc29b2248bd569169/humanfriendly-10.0-py2.py3-none-any.whl (86 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 86.8/86.8 kB 3.8 MB/s eta 0:00:00 Requirement already satisfied: mpmath<1.4.0,>=1.1.0 in /root/miniconda3/lib/python3.10/site-packages (from sympy->onnxruntime==1.15.1) (1.3.0) Installing collected packages: flatbuffers, humanfriendly, coloredlogs, onnxruntime Successfully installed coloredlogs-15.0.1 flatbuffers-25.2.10 humanfriendly-10.0 onnxruntime-1.15.1 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv root@autodl-container-c85144bc1a-7cf0bfa7:~/autodl-tmp/Open-LLM-VTuber# ort_session = ort.InferenceSession("encoder.onnx", providers=['CPUExecutionProvider']) # 强制使用CPU bash: syntax error near unexpected token (' bash: syntax error near unexpected token )'

DEVICE.SUMMARY.TAB_FILTER with tlist as( select nvl(c.device_name,a.cell_name) as item, b.vt_type || ' ' || nvl(c.para,a.test_item) as parameterStr from YES_USER.T_WAP_RAW_PARSING_SUMMARY_DATA a join YES_USER.T_WAP_DOE_INFO b on a.item = b.item and a.cell_name = b.cellname and b.delete_status = 0 left join IWORKSMGR.TDWB_T_PLM_DEVICE_DVNAME_CONFIG c on a.item = c.item and a.cell_name = c.cellname and a.test_item = c.test_item left join YES_USER.T_WAP_TARGET_INFO d on b.item = d.item and a.cell_name = d.cellname and d.delete_status = 0 and b.vdd = d.vdd and b.TEMPERATURE = d.TEMPERATURE and a.test_item = d.CONFIG_KEY and d.config_type = 'targetConfig' where a.LOT_METROLOGY_END_TIME between to_date(?,'YYYY/MM/DD') and to_date(?,'YYYY/MM/DD') +1 ? ? ? ? ? ? ? ? ? ? ? ? ? ) SELECT distinct item,parameterStr from tlist where 1=1 ? DEVICE.SUMMARY.SPLIT_TAB_FILTER select loopName,stepName from( select loop_name as loopName, step_name as stepName from TDWB_T_PLM_DEVICE_SPLIT_TAB_CONFIG where 1=1 ? ? group by loop_name,step_name ) limit 100 DEVICE.DOE.SELECT_DATA_LIST select distinct ? as ? from YES_USER.T_WAP_DOE_INFO where delete_status = 0 and item = ? ? limit 100 DEVICE.TARGET.SELECT_DATA_LIST select distinct ? as ? from YES_USER.T_WAP_TARGET_INFO where delete_status = 0 and ITEM = ? ? limit 100 DEVICE.SUMMARY.MAP_ANALYSIS select b.vt_type as vtType, b.channel_type as channelType, a.source_lot as lotId, a.wafer_id as waferId, a.die_x as dieX, a.die_y as dieY, a.raw_value as rawValue from YES_USER.T_WAP_RAW_DATA_PARSING a join YES_USER.T_WAP_DOE_INFO b on a.item = b.item and a.cell_name = b.cellname and b.delete_status = 0 where a.LOT_METROLOGY_END_TIME between to_date(?,'YYYY/MM/DD') and to_date(?,'YYYY/MM/DD') +1 and upper(a.test_item) = 'VTSAT' ? ? ? ? ? ? ? ? ? ? ? ? ? DEVICE.SUMMARY.SPLIT_TAB select loop_name as loopName, step_name as stepName, lot_id as lotId, wafer_id as waferId, config_value as configValue, null as targetValue from TDWB_T_PLM_DEVICE_SPLIT_TAB_CONFIG where lot_id in (?) and wafer_id in (?) DEVICE.SUMMARY.DASHBOARD select nvl(c.device_name,a.cell_name) as item, b.vt_type || ' ' || nvl(c.para,a.test_item) as parameterStr, a.source_lot as lotId, a.wafer_id as waferId, a.CONVERT_FILTER_MEDIAN as rawMedian, b.vt_type as vt, d.config_value as target, case when (upper(a.test_item) in ('VTSAT')) then 1 else 0 end as degFlag from YES_USER.T_WAP_RAW_PARSING_SUMMARY_DATA a join YES_USER.T_WAP_DOE_INFO b on a.item = b.item and a.cell_name = b.cellname and b.delete_status = 0 left join IWORKSMGR.TDWB_T_PLM_DEVICE_DVNAME_CONFIG c on a.item = c.item and a.cell_name = c.cellname and a.test_item = c.test_item left join YES_USER.T_WAP_TARGET_INFO d on b.item = d.item and a.cell_name = d.cellname and d.delete_status = 0 and b.vdd = d.vdd and b.TEMPERATURE = d.TEMPERATURE and a.test_item = d.CONFIG_KEY and d.config_type = 'targetConfig' where a.LOT_METROLOGY_END_TIME between to_date(?,'YYYY/MM/DD') and to_date(?,'YYYY/MM/DD') +1 ? ? ? ? ? ? ? ? ? ? ? ? ? DEVICE.SUMMARY.FABS SELECT fab, recipeId, testItem FROM ( SELECT fab AS fab, TEST_RECIPE AS recipeId, test_item AS testItem FROM YES_USER.T_WAP_RAW_PARSING_SUMMARY_DATA WHERE LOT_METROLOGY_END_TIME BETWEEN to_date('?', 'YYYY/MM/DD') AND to_date('?', 'YYYY/MM/DD') + 1 GROUP BY fab , TEST_RECIPE, test_item ) DEVICE.SUMMARY.VTSAT_ANALYSIS SELECT a.lot_id AS lotId, a.WAFER_ID AS waferId, CASE WHEN b.channel_type = 'P' THEN a.CONVERT_FILTER_MEDIAN END AS pVtsatY, CASE WHEN b.channel_type = 'N' THEN a.CONVERT_FILTER_MEDIAN END AS nVtsatX from YES_USER.T_WAP_RAW_PARSING_SUMMARY_DATA a join YES_USER.T_WAP_DOE_INFO b on a.item = b.item and a.cell_name = b.cellname and b.delete_status = 0 left join IWORKSMGR.TDWB_T_PLM_DEVICE_DVNAME_CONFIG c on a.item = c.item and a.cell_name = c.cellname and a.test_item = c.test_item left join YES_USER.T_WAP_TARGET_INFO d on b.item = d.item and a.cell_name = d.cellname and d.delete_status = 0 and b.vdd = d.vdd and b.TEMPERATURE = d.TEMPERATURE and a.test_item = d.CONFIG_KEY and d.config_type = 'targetConfig' WHERE a.LOT_METROLOGY_END_TIME between to_date(?,'YYYY/MM/DD') and to_date(?,'YYYY/MM/DD') +1 and upper(a.test_item) = 'VTSAT' ? ? ? ? ? ? ? ? ? ? ? ? ? DEVICE.DOE.IMPORT_PAGE select project, createDate, operator, updateTime, qty from ( select item as project, CREATE_TIME as createDate, create_user as operator, update_time as updateTime, update_user as updataUser, row_number() over(partition by item order by CREATE_TIME asc) rn , count(1) over(partition by item) as qty from YES_USER.T_WAP_DOE_INFO where delete_status=0) where rn=1 DEVICE.TARGET.IMPORT_PAGE SELECT project, createDate, operator, updateTime, qty FROM ( SELECT item AS project, CREATE_TIME AS createDate, create_user AS createUser, update_time AS updateTime, update_user AS operator, ROW_NUMBER() OVER(PARTITION BY item ORDER BY CREATE_TIME ASC) rn , count(1) OVER(PARTITION BY item) AS qty FROM YES_USER.T_WAP_TARGET_INFO WHERE delete_status = 0) WHERE rn = 1 DEVICE.DEVICE_NAME.SELECT_DATA_LIST select distinct ? as ? from IWORKSMGR.TDWB_T_PLM_DEVICE_DVNAME_CONFIG where delete_status = 0 and ITEM = ? ? limit 100 DEVICE.DEVICE_NAME.IMPORT_PAGE SELECT project, createDate, operator, updateTime, qty FROM ( SELECT item AS project, CREATE_DATE AS createDate, CREATE_BY AS createUser, LAST_UPDATE_DATE AS updateTime, LAST_UPDATE_BY AS operator, ROW_NUMBER() OVER(PARTITION BY item ORDER BY CREATE_DATE ASC) rn , count(1) OVER(PARTITION BY item) AS qty FROM IWORKSMGR.TDWB_T_PLM_DEVICE_DVNAME_CONFIG WHERE delete_status = 0) WHERE rn = 1 DEVICE.TREND_CHART SELECT a.ID AS id, a.ITEM AS item, a.DEPARTMENT AS department, a.TEST_LAYER AS testLayer, a.SOURCE_LOT AS sourceLot, a.LOT_ID AS lotId, a.WAFER_ID AS waferId, '#'||substr(a.WAFER_ID,-2,2) as waferNum, a.SLOT_ID AS slotId, a.TEST_RECIPE AS testRecipe, a.CELL_NAME AS cellName, a.TEST_ITEM AS testItem, a.PARAMETER_NAME AS parameterName, a.SITE AS site, a.DIE_X AS dieX, a.DIE_Y AS dieY, a.POS AS pos, a.RAW_VALUE AS rawValue, a.CONVERT_VALUE AS convertValue, a.FILTER_FLAG AS filterFlag, a.TARGET_DUT AS targetDut, a.DOE_DUT AS doeDut, a.LOT_METROLOGY_START_TIME AS lotMetrologyStartTime, a.LOT_METROLOGY_END_TIME AS lotMetrologyEndTime, a.CREATE_TIME AS createTime, a.UPDATE_TIME AS updateTime, b.channel_type as channelType, b.nfin as nfin, b.tsk_metal as tskMetal, b.cell_type as cellType, b.cellname as cellName, b.vt_type as vt, b.CHANNEL_LENGTH AS lg, d.CONFIG_VALUE AS target FROM YES_USER.T_WAP_RAW_DATA_PARSING a JOIN YES_USER.T_WAP_DOE_INFO b ON a.item = b.item AND a.cell_name = b.cellname left join YES_USER.T_WAP_TARGET_INFO d on b.item = d.item and a.cell_name = d.cellname and b.vdd = d.vdd and b.TEMPERATURE = d.TEMPERATURE and a.test_item = d.CONFIG_KEY and d.config_type = 'targetConfig' --targetȱһ¸ö²ⁿϮ where a.LOT_METROLOGY_END_TIME between to_date('?','YYYY/MM/DD') and to_date('?','YYYY/MM/DD') +1 DEVICE.TREND_CHART.DEFAULT_PROJECT select projectName from ( select item as projectName, row_number() over( order by create_time desc ) rn from YES_USER.T_WAP_DOE_INFO ) where rn = 1 limit 1 DEVICE.TREND_CHART.PROJECT_LIST select item as projectName from YES_USER.T_WAP_DOE_INFO where 1=1 ? group by item DEVICE.TREND_CHART_RAW_FILTER_LIST select fab as fab,TEST_RECIPE as recipeId,test_item as testItem from YES_USER.T_WAP_RAW_PARSING_SUMMARY_DATA where 1=1 ? group by fab ,TEST_RECIPE,test_item DEVICE.SUMMARY.BOX_PLOT_ANALYSIS select b.vt_type as vtType, b.channel_type as channelType, a.source_lot as lotId, a.wafer_id as waferId, a.die_x as dieX, a.die_y as dieY, a.raw_value as rawValue from YES_USER.T_WAP_RAW_DATA_PARSING a join YES_USER.T_WAP_DOE_INFO b on a.item = b.item and a.cell_name = b.cellname and b.delete_status = 0 where a.LOT_METROLOGY_END_TIME between to_date(?,'YYYY/MM/DD') and to_date(?,'YYYY/MM/DD') +1 and upper(a.test_item) = 'VTSAT' ? ? ? ? ? ? ? ? ? ? ? ? ? DEVICE.TREND_CHART.FILTER_LIST select channel_type as channelType, nFin as nFin, tsk_metal AS metal, cell_type as bitCellType, cellname as cellName, vt_type as vt, item as project from YES_USER.T_WAP_DOE_INFO where 1=1 ? GROUP BY channel_type ,nFin ,tsk_metal ,cell_type ,cellname ,vt_type ,item DEVICE.TREND_CHART.LOT_OR_WAFER select lotId,waferId from ( select source_lot as lotId ,wafer_id as waferId from YES_USER.T_WAP_RAW_PARSING_SUMMARY_DATA group by source_lot,wafer_id ) where 1=1 ? ? DEVICE.DETAIL_TARGET_DATA SELECT * FROM ( SELECT ID AS id, ITEM AS item, DEPARTMENT AS department, TARGET_DUT AS targetDut, CONFIG_TYPE AS configType, CONFIG_KEY AS configKey, --test_item CONFIG_VALUE AS configValue, TARGET_FILE_NAME AS targetFileName, CREATE_TIME AS createTime, UPDATE_TIME AS updateTime, CREATE_USER AS createUser, UPDATE_USER AS updateUser, CELLNAME AS cellName, TEMPERATURE AS temperature, VDD AS vdd, DELETE_STATUS AS deleteStatus FROM YES_USER.T_WAP_TARGET_INFO WHERE DELETE_STATUS = 0 ) WHERE 1=1 DEVICE.DETAIL_RAW_DATA select * from ( SELECT a.ID AS id, a.ITEM AS item, a.DEPARTMENT AS department, a.TEST_LAYER AS testLayer, a.SOURCE_LOT AS sourceLot, a.LOT_ID AS lotId, a.WAFER_ID AS waferId, '#'||substr(a.WAFER_ID,-2,2) as waferNum, a.SLOT_ID AS slotId, a.TEST_RECIPE AS testRecipe, a.CELL_NAME AS cellName, a.TEST_ITEM AS testItem, a.PARAMETER_NAME AS parameterName, a.SITE AS site, a.DIE_X AS dieX, a.DIE_Y AS dieY, a.POS AS pos, a.RAW_VALUE AS rawValue, a.CONVERT_VALUE AS convertValue, a.FILTER_FLAG AS filterFlag, a.TARGET_DUT AS targetDut, a.DOE_DUT AS doeDut, a.LOT_METROLOGY_START_TIME AS lotMetrologyStartTime, a.LOT_METROLOGY_END_TIME AS lotMetrologyEndTime, a.CREATE_TIME AS createTime, a.UPDATE_TIME AS updateTime, a.UPDATE_TIME AS updateTime, a.FAB AS fab, b.channel_type as channelType, b.nfin as nfin, b.tsk_metal as tskMetal, b.cell_type as cellType, b.cellname as cellName, b.vt_type as vt FROM YES_USER.T_WAP_RAW_DATA_PARSING a JOIN YES_USER.T_WAP_DOE_INFO b ON a.item = b.item AND a.cell_name = b.cellname AND a.FAB = b.FAB ) WHERE 1=1 DEVICE.DETAIL_DOE_DATA SELECT * FROM ( SELECT b.ID AS id, b.DEPARTMENT AS department, b.ITEM AS item, b.TSK_METAL AS tskMetal, b.CELL_TYPE AS cellType, b.CHANNEL_TYPE AS channelType, b.VT_TYPE AS vtType, b.NFIN AS nfin, b.CHANNEL_LENGTH AS channelLength, b.POLY_PITCH AS polyPitch, b.VDD AS vdd, b.TEMPERATURE AS temperature, b.WITH_DNW AS withDnw, b.BLOCK_NUM AS blockNum, b.DECOUPLE AS decouple, b.TSK_NAME AS tskName, b.FINGER_TYPE AS fingerType, b.DIFFUSION_BREAK AS diffusionBreak, b.STAGE AS stage, b.DIVIDER AS divider, b.M0WIDTH AS m0Width, b.AA AS aa, b.M0GWIDTH AS m0gWidth, b.M0GLENGTH AS m0gLength, b.HIR_LENGTH AS hirLength, b.V0WIDTH AS v0Width, b.V0LENGTH AS v0Length, b.MEASUREMENT AS measurement, b.TYPE_NAME AS typeName, b.FLAG AS flag, b.HIR_WIDTH AS hirWidth, b.CELLNAME AS cellName, b.DOE_DUT AS doeDut, b.TARGET_DUT AS targetDut, b.DOE_FILE_NAME AS doeFileName, b.CREATE_TIME AS createTime, b.UPDATE_TIME AS updateTime, b.CREATE_USER AS createUser, b.UPDATE_USER AS updateUser, b.FAB AS fab FROM YES_USER.T_WAP_DOE_INFO b WHERE b.DELETE_STATUS = 0 ) WHERE 1=1

结合我们之前沟通及操作历史记录,就我以下系统及操作记录作出下一步操作指命,不要跨步,我会依据执行结果反馈给你,你再依据所有信息分板如何进行下一步操作。 硬件:斐讯N1盒子 底层ARMBIAN系统信息: _ _ _ ___ ___ /_\ _ _ _ __ | |__(_)__ _ _ _ / _ \/ __| / _ \| '_| ' \| '_ \ / _ | ' \ | (_) \__ \ /_/ \_\_| |_|_|_|_.__/_\__,_|_||_| \___/|___/ v25.08.0 for Aml.S905d running Armbian Linux 5.15.186-ophub Packages: Debian stable (bullseye) IPv4: (LAN) 192.168.1.7 (WAN) 113.78.***.*** Performance: Load: 14% Uptime: 2:05 Memory usage: 26% of 1.76G CPU temp: 49°C Usage of /: 42% of 6.4G storage/: 10% of 29G RX today: 303 MiB Commands: 1PANEL安装日志: [1Panel Log]: Docker 服务已成功重启。 设置 1Panel 端口 (默认是 14687): [1Panel Log]: 您设置的端口是: 14687 设置 1Panel 安全入口 (默认是 8382ffe897): haoyong [1Panel Log]: 您设置的面板安全入口是 haoyong 设置 1Panel 面板用户 (默认是 39e66cce8f): haoyong [1Panel Log]: 您设置的面板用户是 haoyong [1Panel Log]: 设置 1Panel 面板密码,设置后按回车键继续 (默认是 1f8ae2a537): ************** [1Panel Log]: 正在配置 1Panel 服务 Created symlink /etc/systemd/system/multi-user.target.wants/1panel-agent.service → /etc/systemd/system/1panel-agent.service. Created symlink /etc/systemd/system/multi-user.target.wants/1panel-core.service → /etc/systemd/system/1panel-core.service. [1Panel Log]: 正在启动 1Panel 服务 [1Panel Log]: 1Panel 服务已成功启动,正在继续执行后续配置,请稍候... [1Panel Log]: [1Panel Log]: =================感谢您的耐心等待,安装已完成================== [1Panel Log]: [1Panel Log]: 请使用您的浏览器访问面板: [1Panel Log]: 外部地址: http://113.78.237.211:14687/haoyong [1Panel Log]: 内部地址: http://192.168.1.7:14687/haoyong [1Panel Log]: 面板用户: haoyong [1Panel Log]: 面板密码: SANDking100005 [1Panel Log]: [1Panel Log]: 官方网站: https://1panel.cn [1Panel Log]: 项目文档: https://1panel.cn/docs [1Panel Log]: 代码仓库: https://github.com/1Panel-dev/1Panel [1Panel Log]: 前往 1Panel 官方论坛获取帮助: https://bbs.fit2cloud.com/c/1p/7 [1Panel Log]: [1Panel Log]: 如果您使用的是云服务器,请在安全组中打开端口 14687 [1Panel Log]: [1Panel Log]: 为了您的服务器安全,离开此屏幕后您将无法再次看到您的密码,请记住您的密码。 [1Panel Log]: [1Panel Log]: ================================================================ root@armbian:~# mysql安装内容: 安装 名称 mysql 版本 Root 密码 100005 端口 3306 容器名称 可以为空,为空自动生成 允许端口外部访问会放开防火墙端口 CPU 限制 0 核心数 限制为 0 则关闭限制,最大可用为 4核 内存限制 0 限制为 0 则关闭限制,最大可用为 1800.98MB 在应用启动之前执行 docker pull 来拉取镜像 编辑 compose 文件可能导致软件安装失败 系统相关检查如下: root@armbian:~# uname -m aarch64 root@armbian:~# uname -r 5.15.186-ophub root@armbian:~# lsb_release -a || cat /etc/os-release No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 11 (bullseye) Release: 11 Codename: bullseye root@armbian:~# free -h total used free shared buff/cache available Mem: 1.8Gi 447Mi 598Mi 19Mi 755Mi 1.2Gi Swap: 900Mi 0B 900Mi root@armbian:~# nproc nproc 4 4 root@armbian:~# free -h total used free shared buff/cache available Mem: 1.8Gi 445Mi 599Mi 19Mi 755Mi 1.2Gi Swap: 900Mi 0B 900Mi root@armbian:~# df -h / Filesystem Size Used Avail Use% Mounted on /dev/mmcblk2p2 6.4G 2.7G 3.7G 42% / root@armbian:~# sudo ss -tulpn | grep -E '80|443|3306|6379' tcp LISTEN 0 4096 0.0.0.0:14687 0.0.0.0:* users:(("1panel",pid=801,fd=11)) root@armbian:~# curl -I https://xibo.org.uk HTTP/2 301 server: nginx date: Sat, 19 Jul 2025 07:14:41 GMT content-type: text/html content-length: 169 location: https://xibosignage.com/ referrer-policy: no-referrer-when-downgrade strict-transport-security: max-age=31536000 root@armbian:~# 拉取源的测试如下: oot@armbian:~# docker images | grep hello-world hello-world latest f1f77a0f96b7 5 months ago 5.2kB root@armbian:~# docker images | grep hello-world hello-world latest f1f77a0f96b7 5 months ago 5.2kB root@armbian:~# docker history hello-world IMAGE CREATED CREATED BY SIZE COMMENT f1f77a0f96b7 5 months ago CMD ["/hello"] 0B buildkit.dockerfile.v0 <missing> 5 months ago COPY hello / # buildkit 5.2kB buildkit.dockerfile.v0 root@armbian:~# ^C 用1PANEL设置DOCKER及拉取MYSQL的操作日志: _ _ _ ___ ___ /_\ _ _ _ __ | |__(_)__ _ _ _ / _ \/ __| / _ \| '_| ' \| '_ \ / _ | ' \ | (_) \__ \ /_/ \_\_| |_|_|_|_.__/_\__,_|_||_| \___/|___/ v25.08.0 for Aml.S905d running Armbian Linux 5.15.186-ophub Packages: Debian stable (bullseye) IPv4: (LAN) 192.168.1.7 (WAN) 116.4.***.*** Performance: Load: 13% Uptime: 7:23 Memory usage: 27% of 1.76G CPU temp: 51°C Usage of /: 42% of 6.4G storage/: 19% of 29G RX today: 79 MiB Commands: Configuration : armbian-config Monitoring : htop root@armbian:~# docker run -d \ --name mysql \ -p 3306:3306 \ -v /mnt/docker/mysql/data:/var/lib/mysql \ -v /mnt/docker/mysql/conf:/etc/mysql/conf.d \ -v /mnt/docker/mysql/log:/var/log/mysql \ -e MYSQL_ROOT_PASSWORD=100005 \ --memory=512m \ --cpus=2 \ --restart=always \ mysql:8.0-oracle Unable to find image 'mysql:8.0-oracle' locally 8.0-oracle: Pulling from library/mysql 66c8c73e9d3d: Pull complete e45847b03d78: Pull complete 87befc648177: Pull complete 008e8e968476: Pull complete a72970729c8f: Pull complete 89b1faffd43a: Pull complete 2bd146ae1d6c: Pull complete a0967528f1a2: Pull complete 38c697cea99a: Pull complete fab608026c1e: Pull complete 24e041f1adac: Pull complete Digest: sha256:63823b8e2cbe4ae0c558155e02d00beba56130fbc3d147efccbdb328ae2dbb9e Status: Downloaded newer image for mysql:8.0-oracle 67460db937cbeedc95691f01d4b961e6a42616b45f60cd62107f73bd48b2b2b9 root@armbian:~# ^C root@armbian:~# docker ps -a | grep mysql 67460db937cb mysql:8.0-oracle "docker-entrypoint.s…" 8 minutes ago Up 6 minutes 0.0.0.0:3306->3306/tcp, 33060/tcp mysql root@armbian:~# docker logs mysql 2025-07-19 10:55:41+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.42-1.el9 started. 2025-07-19 10:55:43+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' 2025-07-19 10:55:43+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.42-1.el9 started. 2025-07-19 10:55:44+00:00 [Note] [Entrypoint]: Initializing database files 2025-07-19T10:55:44.643965Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead. 2025-07-19T10:55:44.644644Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.42) initializing of server in progress as process 82 2025-07-19T10:55:44.722791Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-07-19T10:55:48.060736Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2025-07-19T10:56:03.156308Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option. 2025-07-19 10:56:16+00:00 [Note] [Entrypoint]: Database files initialized 2025-07-19 10:56:16+00:00 [Note] [Entrypoint]: Starting temporary server 2025-07-19T10:56:16.845924Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead. 2025-07-19T10:56:16.851097Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.42) starting as process 126 2025-07-19T10:56:16.917937Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-07-19T10:56:17.897029Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2025-07-19T10:56:21.388398Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2025-07-19T10:56:21.388602Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. 2025-07-19T10:56:21.415665Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory. 2025-07-19T10:56:21.548697Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock 2025-07-19T10:56:21.549457Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.42' socket: '/var/run/mysqld/mysqld.sock' port: 0 MySQL Community Server - GPL. 2025-07-19 10:56:21+00:00 [Note] [Entrypoint]: Temporary server started. '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock' Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it. Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it. Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it. Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it. Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it. Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it. 2025-07-19 10:56:44+00:00 [Note] [Entrypoint]: Stopping temporary server 2025-07-19T10:56:44.779995Z 10 [System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.0.42). 2025-07-19T10:56:46.899809Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-07-19 10:56:47+00:00 [Note] [Entrypoint]: Temporary server stopped 2025-07-19 10:56:47+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up. 2025-07-19T10:56:48.299792Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead. 2025-07-19T10:56:48.305067Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.42) starting as process 1 2025-07-19T10:56:48.334120Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-07-19T10:56:49.180497Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2025-07-19T10:56:54.411653Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2025-07-19T10:56:54.411875Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. 2025-07-19T10:57:02.537906Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory. 2025-07-19T10:57:02.670404Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock 2025-07-19T10:57:02.670930Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.42' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL. root@armbian:~# docker exec -it mysql mysql -uroot -p100005 -e "SHOW DATABASES;" mysql: [Warning] Using a password on the command line interface can be insecure. +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | +--------------------+ root@armbian:~# mysql -h 192.168.1.7 -P 3306 -uroot -p100005 Welcome to the MariaDB monitor. Commands end with ; or \g. Your MySQL connection id is 9 Server version: 8.0.42 MySQL Community Server - GPL Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MySQL [(none)]> ^接下来怎么操作

hed_count":0,"db_main_wal_cached_count":0,"db_main_replica_wal_cached_count":0,"db_replica_duration_s":0.0,"db_primary_duration_s":0.565,"db_main_duration_s":0.565,"db_main_replica_duration_s":0.0,"cpu_s":0.520009,"mem_objects":119836,"mem_bytes":32569104,"mem_mallocs":133607,"mem_total_bytes":37362544,"pid":64561,"worker_id":"puma_21","rate_limiting_gates":["gitlab_shell_operation"],"correlation_id":"01K3K0D5C5TW7GMHC7R9Y9A5YC","meta.caller_id":"POST /api/:version/internal/allowed","meta.remote_ip":"127.0.0.1","meta.feature_category":"source_code_management","meta.project":"devopsadmin/scqa21","meta.root_namespace":"devopsadmin","meta.client_id":"ip/127.0.0.1","content_length":"461","request_urgency":"default","target_duration_s":1} ==> /var/log/gitlab/gitlab-workhorse/current <== {"content_type":"application/json","correlation_id":"01K3K0D5C5TW7GMHC7R9Y9A5YC","duration_ms":11096,"host":"unix","level":"info","method":"POST","msg":"access","proto":"HTTP/1.1","referrer":"","remote_addr":"127.0.0.1:0","remote_ip":"127.0.0.1","route":"^/api/","status":500,"system":"http","time":"2025-08-26T18:57:39+08:00","ttfb_ms":11095,"uri":"/api/v4/internal/allowed","user_agent":"gitaly/15.6.2","written_bytes":39} ==> /var/log/gitlab/gitaly/current <== {"correlation_id":"01K3K0CT3QX4JAEWDRHRQV9DD7","duration_ms":11097,"error":"500 Internal Server Error","level":"error","method":"POST","msg":"Internal API error","status":500,"time":"2025-08-26T10:57:39.038Z","url":"http://unix/api/v4/internal/allowed"} {"correlation_id":"01K3K0CT3QX4JAEWDRHRQV9DD7","error":"GitLab: 500 Internal Server Error","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type":"regular","grpc.meta.method_type":"client_stream","grpc.method":"UserCommitFiles","grpc.request.deadline":"2025-08-26T18:58:12.074","grpc.request.fullMethod":"/gitaly.OperationService/UserCommitFiles","grpc.service":"gitaly.OperationService","grpc.start_time":"2025-08-26T18:57:27.865","level":"warning","msg":"stopping transaction because pre-receive hook failed","peer.address":"192.168.41.1:54450","pid":60708,"remote_ip":"197.166.253.23","span.kind":"server","system":"grpc","time":"2025-08-26T10:57:39.038Z","user_id":"2","username":"devopsadmin"} {"branch_name":"bWFpbg==","correlation_id":"01K3K0CT3QX4JAEWDRHRQV9DD7","error":"update reference: running pre-receive hooks: GitLab: 500 Internal Server Error","force":false,"grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type":"regular","grpc.meta.method_type":"client_stream","grpc.method":"UserCommitFiles","grpc.request.deadline":"2025-08-26T18:58:12.074","grpc.request.fullMethod":"/gitaly.OperationService/UserCommitFiles","grpc.service":"gitaly.OperationService","grpc.start_time":"2025-08-26T18:57:27.865","level":"error","msg":"user commit files failed","peer.address":"192.168.41.1:54450","pid":60708,"remote_ip":"197.166.253.23","repository_relative_path":"@cluster/repositories/29/db/98","repository_storage":"gitaly-3","span.kind":"server","start_branch_name":"bWFpbg==","start_repository_relative_path":"@hashed/10/8c/108c995b953c8a35561103e2014cf828eb654a99e310f87fab94c2f4b7d2a04f.git","start_repository_storage":"default","start_sha":"","system":"grpc","time":"2025-08-26T10:57:39.040Z","user_id":"2","username":"devopsadmin"} {"branch_name":"bWFpbg==","correlation_id":"01K3K0CT3QX4JAEWDRHRQV9DD7","diskcache":"4c6855ff-2cb5-45cb-aa48-f279e906ffe0","force":false,"grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type":"regular","grpc.meta.method_type":"client_stream","grpc.method":"UserCommitFiles","grpc.request.deadline":"2025-08-26T18:58:12.074","grpc.request.fullMethod":"/gitaly.OperationService/UserCommitFiles","grpc.service":"gitaly.OperationService","grpc.start_time":"2025-08-26T18:57:27.865","level":"info","msg":"diskcache state change","peer.address":"192.168.41.1:54450","pid":60708,"remote_ip":"197.166.253.23","repository_relative_path":"@cluster/repositories/29/db/98","repository_storage":"gitaly-3","span.kind":"server","start_branch_name":"bWFpbg==","start_repository_relative_path":"@hashed/10/8c/108c995b953c8a35561103e2014cf828eb654a99e310f87fab94c2f4b7d2a04f.git","start_repository_storage":"default","start_sha":"","system":"grpc","time":"2025-08-26T10:57:39.057Z","user_id":"2","username":"devopsadmin"} {"branch_name":"bWFpbg==","command.count":6,"command.cpu_time_ms":34,"command.inblock":0,"command.majflt":0,"command.maxrss":304892,"command.minflt":2023,"command.oublock":24,"command.real_time_ms":60,"command.system_time_ms":22,"command.user_time_ms":12,"correlation_id":"01K3K0CT3QX4JAEWDRHRQV9DD7","force":false,"grpc.code":"OK","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type":"regular","grpc.meta.method_type":"client_stream","grpc.method":"UserCommitFiles","grpc.request.deadline":"2025-08-26T18:58:12.074","grpc.request.fullMethod":"/gitaly.OperationService/UserCommitFiles","grpc.request.payload_bytes":364,"grpc.response.payload_bytes":35,"grpc.service":"gitaly.OperationService","grpc.start_time":"2025-08-26T18:57:27.865","grpc.time_ms":11192.725,"level":"info","msg":"finished streaming call with code OK","peer.address":"192.168.41.1:54450","pid":60708,"remote_ip":"197.166.253.23","repository_relative_path":"@cluster/repositories/29/db/98","repository_storage":"gitaly-3","span.kind":"server","start_branch_name":"bWFpbg==","start_repository_relative_path":"@hashed/10/8c/108c995b953c8a35561103e2014cf828eb654a99e310f87fab94c2f4b7d2a04f.git","start_repository_storage":"default","start_sha":"","system":"grpc","time":"2025-08-26T10:57:39.058Z","user_id":"2","username":"devopsadmin"} ==> /var/log/gitlab/gitlab-exporter/current <== 2025-08-26_10:57:39.34511 ::1 - - [26/Aug/2025:18:57:38 CST] "GET /database HTTP/1.1" 200 2933 2025-08-26_10:57:39.34518 - -> /database 2025-08-26_10:57:39.60715 ::1 - - [26/Aug/2025:18:57:39 CST] "GET /ruby HTTP/1.1" 200 994 2025-08-26_10:57:39.60720 - -> /ruby ==> /var/log/gitlab/praefect/current <== {"component":"HealthManager","correlation_id":"01K3K0DH445417TP5HRG0JWZPE","error":"rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 192.168.41.2:8075: connect: connection refused\"","level":"error","msg":"failed checking node health","pid":61005,"storage":"gitaly-2","time":"2025-08-26T10:57:39.972Z","virtual_storage":"default"} {"component":"HealthManager","correlation_id":"01K3K0DJWNCDWYZ53ZMM797SJZ","error":"rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 192.168.41.2:8075: connect: connection refused\"","level":"error","msg":"failed checking node health","pid":61005,"storage":"gitaly-2","time":"2025-08-26T10:57:41.782Z","virtual_storage":"default"}

根据如下Procedure的代码,分析为什么推送到fwj2bump.sj_wo_createlot_info@ab2mes_wo表中的maincolotno值不是工单sj_wo_main_info中main_colot_no值:create or replace procedure PRC_WT_AA_AB_TOMES_AB2 is v_waferid_total number; v_partid_total number; v_partid_total2 number; v_retry_count number; v_main_retry_count number; v_error_flag varchar2(4); v_error_message varchar2(1000); v_lotid varchar2(100); v_shipcode varchar2(100); v_vendorid varchar2(100); v_wafer_die_qty_list varchar2(100); v_label_default_total varchar2(100); v_push_wo_type varchar2(100); v_spec_name varchar2(100); v_partid varchar2(100); v_owner varchar2(100); v_wono varchar2(100); v_lotidlist varchar2(500); v_wafer_id_list varchar2(500); v_aa_total varchar2(100); v_ab_total varchar2(100); v_ab2_total varchar2(100); v_count_others varchar2(100); v_main_colot_no varchar2(500); v_main_cobin varchar2(500); v_main_coitem varchar2(500); v_main_copart_no varchar2(500); V_mes_lot_count number; V_query_multiple_LOT varchar2(1000); V_mes_wono_count number; V_woList varchar2(400); V_AA_WO varchar2(100); V_push_mes_wafer_count number; V_substr_bin varchar2(10); V_repeat_bin_count number; v_mail_receiver varchar(1000); begin ---Query retry_count select max(to_number(t.value)) into v_retry_count from sj_wo_config t where t.key = 'RETRY_COUNT'; if v_retry_count is null then v_retry_count := 3; end if; --ITSRMES20250424002-AA+AB工单推送逻辑 - 新增BinL推送-判断工单类型 20250519 for rec in (select distinct t.wo_no, t.item, t.part_no, t.main_coitem, t.main_copart_no, t.spec_name, t.retry_count, t.routing, t.main_cobin, t.main_colot_no, t.main_wafer_id, t.main_order_coqty, t.order_qty, t.mark_lot_no, t.mnumber, t.sj_customer, t.cdate from sj_wo_main_info t left join sjmidd.sj_pi_prod_mast@sjmm p on p.cust_devi_id = t.part_no and p.item = t.item and (p.is_active is null or p.is_active != 'No') left join sjmidd.v_dict@sjmm d on d.type_code = 'product_type' and d.value = p.product_type where t.routing in ('AB', 'AA') and t.active_flag = 'Y' and t.status = 'INIT' and t.wo_type is null and t.sj_customer in ('HUANGSHI', 'HISI') and upper(d.label_default) in ('AB2 ONLY', 'ASSEMBLY FOR AB2', 'TF AFTER ASSEMBLY (FOR AB2)', 'AB2 AFTER TF AND ASSEMBLY') and t.retry_count <= v_retry_count and t.wo_no='532957017' order by t.cdate asc) loop --initialize variable v_waferid_total := 0; v_partid_total := 0; v_partid_total2 := 0; v_main_retry_count := 0; v_lotid := ''; v_label_default_total := ''; v_aa_total := ''; v_ab_total := ''; v_ab2_total := ''; v_count_others := ''; v_lotidlist := ''; v_wafer_id_list := ''; v_wafer_die_qty_list := ''; v_push_wo_type := ''; v_spec_name := ''; v_main_coitem := ''; v_main_copart_no := ''; v_wono := rec.wo_no; v_error_flag := 'N'; v_error_message := ''; V_mes_lot_count := 0; V_query_multiple_LOT := ''; V_mes_wono_count := 0; V_woList := null; V_push_mes_wafer_count := 0; V_substr_bin := ''; V_repeat_bin_count := 0; --通过工单中的item与partNo找工单系统维护的specName select max(t.spec_name) into v_spec_name from sj_wo_version_config t where t.item = rec.item and t.part_no = rec.part_no; if v_spec_name is not null and v_spec_name != rec.spec_name then --查找收件人 select max(t.value) into v_mail_receiver from SJ_WO_CONFIG t where t.key = 'CHECK_SPEC_NAME_RECEIVER'; --发邮件 send_mail_notice('Huangshi|[email protected]', v_mail_receiver, 'UAT AB2 WO SpecName Change Notice', '工单号:' || v_wono || ',当前SpecName:' || rec.spec_name || ',维护SpecName:' || v_spec_name || ',Spec Name不一致,无法正常生产LOT,请确认'); continue; end if; --ITSRMES20250424002-AA+AB工单推送逻辑 - 新增BinL推送-判断工单类型 20250519 --query ProductTotal select count(*) partidtotal into v_partid_total from sjmidd.sj_pi_prod_mast@sjmm p left join sjmidd.v_dict@sjmm d on d.type_code = 'product_type' and d.value = p.product_type where p.cust_devi_id = rec.part_no and p.item = rec.item and (p.is_active is null or p.is_active != 'No') and upper(d.label_default) in ('AB2 ONLY', 'ASSEMBLY FOR AB2', 'TF AFTER ASSEMBLY (FOR AB2)', 'AB2 AFTER TF AND ASSEMBLY'); if v_partid_total = 1 then select case when rec.routing = 'AB' and upper(d.label_default) = 'AB2 ONLY' then 'AB2' when rec.routing = 'AB' and (upper(d.label_default) = 'ASSEMBLY FOR AB2' or upper(d.label_default) = 'TF AFTER ASSEMBLY (FOR AB2)' or upper(d.label_default) = 'AB2 AFTER TF AND ASSEMBLY') then 'AB' when rec.routing = 'AA' and (upper(d.label_default) = 'ASSEMBLY FOR AB2' or upper(d.label_default) = 'TF AFTER ASSEMBLY (FOR AB2)' or upper(d.label_default) = 'AB2 AFTER TF AND ASSEMBLY') then 'AA' else 'OTHER' end push_wo_type into v_push_wo_type from sjmidd.sj_pi_prod_mast@sjmm p left join sjmidd.v_dict@sjmm d on d.type_code = 'product_type' and d.value = p.product_type where p.cust_devi_id = rec.part_no and p.item = rec.item and (p.is_active is null or p.is_active != 'No') and upper(d.label_default) in ('AB2 ONLY', 'ASSEMBLY FOR AB2', 'TF AFTER ASSEMBLY (FOR AB2)', 'AB2 AFTER TF AND ASSEMBLY'); --ignore Type: OTHER if v_push_wo_type = 'OTHER' then continue; end if; elsif v_partid_total > 1 then if rec.routing = 'AB' then -- 判断main_coitem与main_copart_no是否为空 if rec.main_coitem is null or rec.main_copart_no is null then v_main_retry_count := rec.retry_count + 1; -- update SJ_WO_MAIN_INFO update sj_wo_main_info t set t.retry_count = v_main_retry_count, t.errdesc = 'PRC_WT_AA_ABTOMES_AB2:工单中的main_copart_no或main_coitem为空,main_copart_no:' || rec.main_copart_no || ',main_coitem:' || rec.main_coitem, t.update_date = sysdate where t.wo_no = rec.wo_no; commit; continue; end if; select -- 提取 main_coitem 第一个分号前的部分 case when instr(rec.main_coitem, ';') > 0 then substr(rec.main_coitem, 1, instr(rec.main_coitem, ';') - 1) else rec.main_coitem end main_coitem, -- 提取 main_copart_no 第一个分号前的部分 case when instr(rec.main_copart_no, ';') > 0 then substr(rec.main_copart_no, 1, instr(rec.main_copart_no, ';') - 1) else rec.main_copart_no end main_copart_no into v_main_coitem, v_main_copart_no from dual; --获取ProductType总数 select count(*) partidtotal into v_partid_total2 from sjmidd.sj_pi_prod_mast@sjmm p left join sjmidd.v_dict@sjmm d on d.type_code = 'product_type' and d.value = p.product_type and (p.is_active is null or p.is_active != 'No') where p.item = v_main_coitem and p.cust_devi_id = v_main_copart_no; if v_partid_total2 is null or v_partid_total2 = 0 then v_main_retry_count := rec.retry_count + 1; -- update SJ_WO_MAIN_INFO update sj_wo_main_info t set t.retry_count = v_main_retry_count, t.errdesc = 'PRC_WT_AA_ABTOMES_AB2:根据工单中的main_copart_no:' || v_main_copart_no || ',main_coitem:' || v_main_coitem || ',未匹配到Product,请确认PIDB中的信息', t.update_date = sysdate where t.wo_no = rec.wo_no; commit; continue; end if; --获取v_main_coitem与v_main_copart_no能否找到(Assembly for AB2或TF after Assembly (For AB2) 或AB2 after TF and Assembly)和这三个之外的 select count(case when upper(label_default) not in ('ASSEMBLY FOR AB2', 'TF AFTER ASSEMBLY (FOR AB2)', 'AB2 AFTER TF AND ASSEMBLY') then 1 else null end) ab2_total, count(case when upper(label_default) in ('ASSEMBLY FOR AB2', 'TF AFTER ASSEMBLY (FOR AB2)', 'AB2 AFTER TF AND ASSEMBLY') then 1 else null end) ab_total into v_ab2_total, v_ab_total from (select p.part_id, d.label_default from sjmidd.sj_pi_prod_mast@sjmm p left join sjmidd.v_dict@sjmm d on d.type_code = 'product_type' and d.value = p.product_type where p.item = v_main_coitem and (p.is_active is null or p.is_active != 'No') and p.cust_devi_id = v_main_copart_no); --判断push_wo_type为AB还是AB2 if (v_ab2_total is not null or v_ab2_total > 0) and (v_ab_total is null or v_ab_total = 0) then v_push_wo_type := 'AB2'; elsif (v_ab_total is not null or v_ab_total > 0) and (v_ab2_total is null or v_ab2_total = 0) then v_push_wo_type := 'AB'; elsif (v_ab_total is not null or v_ab_total > 0) and (v_ab2_total is not null or v_ab2_total > 0) then v_main_retry_count := rec.retry_count + 1; -- update SJ_WO_MAIN_INFO update sj_wo_main_info t set t.retry_count = v_main_retry_count, t.errdesc = 'PRC_WT_AA_ABTOMES_AB2:根据工单中的main_copart_no:' || v_main_copart_no || ',main_coitem:' || v_main_coitem || ',匹配到工单类型 PUSH_WO_TYPE AB与AB2', t.update_date = sysdate where t.wo_no = rec.wo_no; commit; continue; end if; elsif rec.routing = 'AA' then select count(case when upper(label_default) in ('ASSEMBLY FOR AB2', 'TF AFTER ASSEMBLY (FOR AB2)', 'AB2 AFTER TF AND ASSEMBLY') then 1 else null end) aa_total, count(case when upper(label_default) not in ('ASSEMBLY FOR AB2', 'TF AFTER ASSEMBLY (FOR AB2)', 'AB2 AFTER TF AND ASSEMBLY') then 1 else null end) count_others into v_aa_total, v_count_others from sjmidd.sj_pi_prod_mast@sjmm p left join sjmidd.v_dict@sjmm d on d.type_code = 'product_type' and d.value = p.product_type where p.cust_devi_id = rec.part_no and p.item = rec.item and (p.is_active is null or p.is_active != 'No') and upper(d.label_default) in ('ASSEMBLY FOR AB2', 'TF AFTER ASSEMBLY (FOR AB2)', 'AB2 AFTER TF AND ASSEMBLY'); if (v_aa_total is not null or v_aa_total > 0) and (v_count_others is null or v_count_others = 0) then v_push_wo_type := 'AA'; elsif (v_aa_total is not null or v_aa_total > 0) and (v_count_others is not null or v_count_others > 0) then v_main_retry_count := rec.retry_count + 1; -- update SJ_WO_MAIN_INFO update sj_wo_main_info t set t.retry_count = v_main_retry_count, t.errdesc = 'PRC_WT_AA_ABTOMES_AB2:根据工单中的main_copart_no:' || v_main_copart_no || ',main_coitem:' || v_main_coitem || ',匹配到工单类型 PUSH_WO_TYPE AA与OTHER', t.update_date = sysdate where t.wo_no = rec.wo_no; commit; continue; end if; end if; end if; if v_push_wo_type = 'AA' then -- add by lucy ITSRMES20250117001 进行AA工单增加Bincode逻辑 20250206 --- 1、check if the main_cobin are the same select count(distinct(regexp_substr(rec.main_cobin, '[^;]+', 1, rownum, 'i'))) into V_repeat_bin_count from dual connect by rownum <= length(rec.main_cobin) - length(regexp_replace(rec.main_cobin, ';', '')) + 1; if V_repeat_bin_count > 1 then v_main_retry_count := rec.retry_count + 1; -- update SJ_WO_MAIN_INFO update sj_wo_main_info t set t.retry_count = v_main_retry_count, t.errdesc = 'PRC_WT_AA_ABTOMES_AB2:工单中字段MAIN_COBIN存在多个不同的BIN别', t.update_date = sysdate where t.wo_no = rec.wo_no; commit; continue; end if; end if; for reclot in (select regexp_substr(rec.main_colot_no, '[^;]+', 1, rownum, 'i') main_colot_no, regexp_substr(rec.main_wafer_id, '[^;]+', 1, rownum, 'i') main_wafer_id, regexp_substr(rec.main_cobin, '[^;]+', 1, rownum, 'i') main_cobin, regexp_substr(rec.main_order_coqty, '[^;]+', 1, rownum, 'i') main_order_coqty from dual connect by rownum <= length(rec.main_colot_no) - length(regexp_replace(rec.main_colot_no, ';', '')) + 1) loop /******************************* AB2 and AA Type ****************************************************/ if v_push_wo_type = 'AB2' or v_push_wo_type = 'AA' then --query Waferid total select count(distinct t2.waferid) waferidtotal into v_waferid_total from j2report.sdb_tb_info_wip@jsadbt t left join (select (case when instr(t.lotid, '.') > 0 then substr(t.lotid, 1, instr(t.lotid, '.') - 1) else t.lotid end) parentlotid, lotid, waferid from j2report.sdb_tb_wafer_mapping@jsadbt t where t.fab = 'J2AC') t2 on t2.lotid = t.lotid left join (select regexp_substr(reclot.main_wafer_id, '[^,]+', 1, level) wid from dual connect by level <= regexp_count(reclot.main_wafer_id, '[,]') and rowid = prior rowid and prior dbms_random.value is not null) t3 on 1 = 1 left join sjmidd.sj_pi_prod_mast@sjmm p on p.part_id = t.productname and (p.is_active is null or p.is_active != 'No') left join sjmidd.v_dict@sjmm d on d.type_code = 'product_type' and d.value = p.product_type where t.vendorlotid = reclot.main_colot_no and t.fab = 'J2AC' and upper(d.label_default) in ('AB2 ONLY', 'ASSEMBLY FOR AB2') and t2.waferid like '%' || t2.parentlotid || '#' || t3.wid || '%'; if (v_waferid_total != (length(reclot.main_wafer_id) - length(regexp_replace(reclot.main_wafer_id, ',', '')))) then --query many LOT select listagg(t2.waferid, ',') WITHIN group(order by t2.waferid) into V_query_multiple_LOT from j2report.sdb_tb_info_wip@jsadbt t left join (select distinct (case when instr(t.lotid, '.') > 0 then substr(t.lotid, 1, instr(t.lotid, '.') - 1) else t.lotid end) parentlotid, lotid, waferid from j2report.sdb_tb_wafer_mapping@jsadbt t where t.fab = 'J2AC') t2 on t2.lotid = t.lotid left join (select regexp_substr(reclot.main_wafer_id, '[^,]+', 1, level) wid from dual connect by level <= regexp_count(reclot.main_wafer_id, '[,]') and rowid = prior rowid and prior dbms_random.value is not null) t3 on 1 = 1 left join sjmidd.sj_pi_prod_mast@sjmm p on p.part_id = t.productname and (p.is_active is null or p.is_active != 'No') left join sjmidd.v_dict@sjmm d on d.type_code = 'product_type' and d.value = p.product_type where t.vendorlotid = reclot.main_colot_no and t.fab = 'J2AC' and upper(d.label_default) in ('AB2 ONLY', 'ASSEMBLY FOR AB2') and t2.waferid like '%' || t2.parentlotid || '#' || t3.wid || '%'; v_error_flag := 'Y'; v_error_message := 'PRC_WT_AA_ABTOMES_AB2:系统匹配到的LOT+WAFER总数与工单中的WAFER总数不一致,请确认LOT信息:' || V_query_multiple_LOT; exit; end if; --query lotid,shiprequirement,vendorid for lot in (select distinct (case when instr(t.lotid, '.') > 0 then substr(t.lotid, 1, instr(t.lotid, '.') - 1) else t.lotid end) lotid, t.shiprequirement, t.vendorid from j2report.sdb_tb_info_wip@jsadbt t left join (select distinct (case when instr(w.lotid, '.') > 0 then substr(w.lotid, 1, instr(w.lotid, '.') - 1) else w.lotid end) parentlotid, w.lotid, w.waferid from j2report.sdb_tb_wafer_mapping@jsadbt w where w.fab = 'J2AC') t2 on t2.lotid = t.lotid left join (select regexp_substr(reclot.main_wafer_id, '[^,]+', 1, level) wid from dual connect by level <= regexp_count(reclot.main_wafer_id, '[,]') and rowid = prior rowid and prior dbms_random.value is not null) t3 on 1 = 1 left join sjmidd.sj_pi_prod_mast@sjmm p on p.part_id = t.productname and (p.is_active is null or p.is_active != 'No') left join sjmidd.v_dict@sjmm d on d.type_code = 'product_type' and d.value = p.product_type where t.vendorlotid = reclot.main_colot_no and t.fab = 'J2AC' and upper(d.label_default) in ('AB2 ONLY', 'ASSEMBLY FOR AB2') and t2.waferid like '%' || t2.parentlotid || '#' || t3.wid || '%') loop if v_lotidlist is null then v_lotidlist := lot.lotid || ';'; v_main_colot_no := reclot.main_colot_no || ';'; v_main_cobin := reclot.main_cobin || ';'; v_lotid := lot.lotid; v_shipcode := lot.shiprequirement; v_vendorid := lot.vendorid; else v_lotidlist := v_lotidlist || lot.lotid || ';'; v_main_colot_no := v_main_colot_no || reclot.main_colot_no || ';'; v_main_cobin := v_main_cobin || reclot.main_cobin || ';'; v_lotid := lot.lotid; end if; -- query wafer list of the lot for recwafer in (select t2.waferid, t3.wid, t3.die_qty from (select distinct (case when instr(t.lotid, '.') > 0 then substr(t.lotid, 1, instr(t.lotid, '.') - 1) else t.lotid end) parentlotid, waferid from j2report.sdb_tb_wafer_mapping@jsadbt t where t.fab = 'J2AC') t2 left join (select regexp_substr(reclot.main_wafer_id, '[^,]+', 1, level) wid, regexp_substr(reclot.main_order_coqty, '[^.]+', 1, rownum, 'i') die_qty from dual connect by level <= regexp_count(reclot.main_wafer_id, '[,]') and rowid = prior rowid and prior dbms_random.value is not null) t3 on 1 = 1 where parentlotid = lot.lotid and t2.waferid like '%' || t2.parentlotid || '#' || t3.wid || '%') loop if substr(recwafer.waferid, -2) = recwafer.wid then --- 拼接Wafer if v_wafer_id_list is null then v_wafer_id_list := recwafer.wid || ','; else v_wafer_id_list := v_wafer_id_list || recwafer.wid || ','; end if; --- 拼接 DIE Qty if v_wafer_die_qty_list is null then v_wafer_die_qty_list := recwafer.die_qty || '.'; else v_wafer_die_qty_list := v_wafer_die_qty_list || recwafer.die_qty || '.'; end if; end if; end loop; -- 处理截取最后一个标点符合 if SUBSTR(v_wafer_id_list, -1) = ',' then v_wafer_id_list := substr(v_wafer_id_list, 0, LENGTH(v_wafer_id_list) - 1); end if; if SUBSTR(v_wafer_die_qty_list, -1) = '.' then v_wafer_die_qty_list := substr(v_wafer_die_qty_list, 0, LENGTH(v_wafer_die_qty_list) - 1); end if; -- 给结尾增加; v_wafer_id_list := v_wafer_id_list || ';'; v_wafer_die_qty_list := v_wafer_die_qty_list || ';'; end loop; /******************************* AB类型工单(查询AB2环境的LOT)****************************************************/ elsif v_push_wo_type = 'AB' then v_main_colot_no := reclot.main_colot_no; --查询是否匹配多个LOT select count(distinct case when INSTR(t.lotid, '.') > 0 then SUBSTR(t.lotid, 0, INSTR(t.lotid, '.') - 1) else t.lotid end) into V_mes_lot_count from ab2report.sdb_tb_info_wip@REPORTAB2 T left join sjmidd.sj_pi_prod_mast@sjmm p on p.part_id = t.productname and (p.is_active is null or p.is_active != 'No') left join sjmidd.v_dict@sjmm d on d.type_code = 'product_type' and d.value = p.product_type where t.vendorlotid = reclot.main_colot_no and upper(d.label_default) in ('TF AFTER ASSEMBLY (FOR AB2)'); ---查询多个lot if V_mes_lot_count > 1 then select listagg(t.lotid, ';') WITHIN group(order by t.lotid) into V_query_multiple_LOT from ab2report.SDB_TB_INFO_WIP@REPORTAB2 T left join sjmidd.sj_pi_prod_mast@sjmm p on p.part_id = t.productname and (p.is_active is null or p.is_active != 'No') left join sjmidd.v_dict@sjmm d on d.type_code = 'product_type' and d.value = p.product_type where t.vendorlotid = reclot.main_colot_no and upper(d.label_default) in ('TF AFTER ASSEMBLY (FOR AB2)'); v_error_flag := 'Y'; v_error_message := 'PRC_WT_AA_ABTOMES_AB2:' || reclot.main_colot_no || '匹配到多个LOT:' || V_query_multiple_LOT; exit; end if; select max(t.lotid), max(T.LOTOWNER), max(T.SHIPREQUIREMENT), max(T.VENDORID), max(t.productname) into v_lotid, v_owner, V_SHIPCODE, V_VENDORID, v_partid from ab2report.SDB_TB_INFO_WIP@REPORTAB2 T left join sjmidd.sj_pi_prod_mast@sjmm p on p.part_id = t.productname and (p.is_active is null or p.is_active != 'No') left join sjmidd.v_dict@sjmm d on d.type_code = 'product_type' and d.value = p.product_type where t.vendorlotid = reclot.main_colot_no and upper(d.label_default) in ('TF AFTER ASSEMBLY (FOR AB2)'); if V_LOTID is null then v_error_flag := 'Y'; v_error_message := 'PRC_WT_AA_ABTOMES_AB2:工单中' || reclot.main_colot_no || '未匹配到MES LOT,请确认LOT信息'; exit; end if; --LOT传母批 截取"."前N位,例如500018.D1,截取的前6码后为:500018 if INSTR(v_lotid, '.') > 0 then v_lotid := SUBSTR(v_lotid, 0, INSTR(v_lotid, '.') - 1); end if; -- 拼接lot if v_lotidlist is null then v_lotidlist := v_lotid || ';'; v_main_cobin := reclot.main_cobin || ';'; else v_lotidlist := v_lotidlist || v_lotid || ';'; v_main_cobin := v_main_cobin || reclot.main_cobin || ';'; end if; --拼接wafer if v_wafer_id_list is null then v_wafer_id_list := reclot.main_wafer_id || ';'; else v_wafer_id_list := v_wafer_id_list || reclot.main_wafer_id || ';'; end if; --- 拼接 DIE Qty if v_wafer_die_qty_list is null then v_wafer_die_qty_list := reclot.main_order_coqty || ';'; else v_wafer_die_qty_list := v_wafer_die_qty_list || reclot.main_order_coqty || ';'; end if; --- query AB 工单中lotidlist对应的wono号 select max(t.wono) into V_AA_WO from fwj2bump.sj_wo_createlot_info@ab2mes_wo t where t.lotid = v_lotid; if V_AA_WO is not null then if V_woList is null then V_woList := V_AA_WO || ';'; else V_woList := V_woList || V_AA_WO || ';'; end if; end if; end if; end loop; if v_error_flag = 'Y' then -- 更新 SJ_WO_MAIN_INFO 对应的工单 update sj_wo_main_info t set t.retry_count = rec.retry_count + 1, t.errdesc = v_error_message, t.update_date = sysdate where t.wo_no = rec.wo_no; commit; continue; end if; if v_lotidlist is null then v_main_retry_count := rec.retry_count + 1; -- 更新 SJ_WO_MAIN_INFO 对应的工单 update sj_wo_main_info t set t.retry_count = rec.retry_count + 1, t.errdesc = 'PRC_WT_AA_ABTOMES_AB2:工单中的信息未匹配到MES LOT,请确认LOT信息', t.update_date = sysdate where t.wo_no = rec.wo_no; commit; continue; end if; if V_SHIPCODE is null then -- 更新 SJ_WO_MAIN_INFO 对应的工单 update sj_wo_main_info t set t.retry_count = rec.retry_count + 1, t.errdesc = 'PRC_WT_AA_ABTOMES_AB2:LOT所对应的SHIPREQUIREMENT为空,请检查LOT属性信息!', t.update_date = sysdate where t.wo_no = rec.wo_no; commit; continue; end if; --ITSRMES20250424002-AA+AB工单推送逻辑 - 新增BinL推送-判断工单类型 20250519 --query Product if v_push_wo_type = 'AB2' then select count(*) partidtotal into v_partid_total from sjmidd.sj_pi_prod_mast@sjmm p left join sjmidd.v_dict@sjmm d on d.type_code = 'product_type' and d.value = p.product_type where p.cust_devi_id = rec.part_no and p.item = rec.item and upper(d.label_default) in ('AB2 ONLY') and (p.is_active is null or p.is_active != 'No'); if v_partid_total > 1 then v_main_retry_count := rec.retry_count + 1; -- update SJ_WO_MAIN_INFO update sj_wo_main_info t set t.retry_count = v_main_retry_count, t.errdesc = 'PRC_WT_AA_ABTOMES_AB2:根据条件part_no:' || rec.part_no || ',item:' || rec.item || ',匹配到多个Product,请确认PIDB中的信息', t.update_date = sysdate where t.wo_no = rec.wo_no; commit; continue; end if; select max(part_id), max(pie_owner) into v_partid, v_owner from sjmidd.sj_pi_prod_mast@sjmm p left join sjmidd.v_dict@sjmm d on d.type_code = 'product_type' and d.value = p.product_type where p.cust_devi_id = rec.part_no and p.item = rec.item and upper(d.label_default) in ('AB2 ONLY') and (p.is_active is null or p.is_active != 'No'); elsif v_push_wo_type = 'AB' then select count(*) partidtotal into v_partid_total from sjmidd.sj_pi_prod_mast@sjmm p left join sjmidd.v_dict@sjmm d on d.type_code = 'product_type' and d.value = p.product_type where p.cust_devi_id = rec.part_no and p.item = rec.item and upper(d.label_default) in ('ASSEMBLY FOR AB2', 'TF AFTER ASSEMBLY (FOR AB2)', 'AB2 AFTER TF AND ASSEMBLY') and (p.is_active is null or p.is_active != 'No'); if v_partid_total > 1 then v_main_retry_count := rec.retry_count + 1; -- update SJ_WO_MAIN_INFO update sj_wo_main_info t set t.retry_count = v_main_retry_count, t.errdesc = 'PRC_WT_AA_ABTOMES_AB2:根据条件part_no:' || rec.part_no || ',item:' || rec.item || ',匹配到多个Product,请确认PIDB中的信息', t.update_date = sysdate where t.wo_no = rec.wo_no; commit; continue; end if; select max(part_id), max(pie_owner) into v_partid, v_owner from sjmidd.sj_pi_prod_mast@sjmm p left join sjmidd.v_dict@sjmm d on d.type_code = 'product_type' and d.value = p.product_type where p.cust_devi_id = rec.part_no and p.item = rec.item and upper(d.label_default) in ('ASSEMBLY FOR AB2', 'TF AFTER ASSEMBLY (FOR AB2)', 'AB2 AFTER TF AND ASSEMBLY') and (p.is_active is null or p.is_active != 'No'); elsif v_push_wo_type = 'AA' then select count(*) partidtotal into v_partid_total from sjmidd.sj_pi_prod_mast@sjmm p left join sjmidd.v_dict@sjmm d on d.type_code = 'product_type' and d.value = p.product_type where p.cust_devi_id = rec.part_no and p.item = rec.item and upper(d.label_default) in ('TF AFTER ASSEMBLY (FOR AB2)') and (p.is_active is null or p.is_active != 'No'); if v_partid_total > 1 then -- add by lucy ITSRMES20250117001 进行AA工单增加Bincode逻辑 20250206 ---2、Extract the fourth digit from main_cobin,expmple:BIN1;NIN1;BIN1; Numbers saved in Pidb example:1 V_substr_bin := SUBSTR(rec.main_cobin, 4, 1); select count(*) partidtotal into v_partid_total from sjmidd.sj_pi_prod_mast@sjmm p left join sjmidd.v_dict@sjmm d on d.type_code = 'product_type' and d.value = p.product_type where p.cust_devi_id = rec.part_no and p.item = rec.item and p.bincode = V_substr_bin and upper(d.label_default) in ('TF AFTER ASSEMBLY (FOR AB2)') and (p.is_active is null or p.is_active != 'No'); if v_partid_total > 1 then v_main_retry_count := rec.retry_count + 1; -- update SJ_WO_MAIN_INFO update sj_wo_main_info t set t.retry_count = v_main_retry_count, t.errdesc = 'PRC_WT_AA_ABTOMES_AB2:根据工单中的part_no:' || rec.part_no || ',item:' || rec.item || ',匹配到多个Product,请确认PIDB中的信息', t.update_date = sysdate where t.wo_no = rec.wo_no; commit; continue; elsif v_partid_total = 0 then -- update SJ_WO_MAIN_INFO update sj_wo_main_info t set t.retry_count = v_main_retry_count, t.errdesc = 'PRC_WT_AA_ABTOMES_AB2:根据工单中的part_no:' || rec.part_no || ',item:' || rec.item || 'BINCODE:' || V_substr_bin || ',未匹配到Product,请确认PIDB中的BINCODE字段信息', t.update_date = sysdate where t.wo_no = rec.wo_no; commit; continue; else select max(part_id), max(pie_owner) into v_partid, v_owner from sjmidd.sj_pi_prod_mast@sjmm p left join sjmidd.v_dict@sjmm d on d.type_code = 'product_type' and d.value = p.product_type where p.cust_devi_id = rec.part_no and p.item = rec.item and p.bincode = V_substr_bin and upper(d.label_default) in ('TF AFTER ASSEMBLY (FOR AB2)') and (p.is_active is null or p.is_active != 'No'); end if; else select max(part_id), max(pie_owner) into v_partid, v_owner from sjmidd.sj_pi_prod_mast@sjmm p left join sjmidd.v_dict@sjmm d on d.type_code = 'product_type' and d.value = p.product_type where p.cust_devi_id = rec.part_no and p.item = rec.item and upper(d.label_default) in ('TF AFTER ASSEMBLY (FOR AB2)') and (p.is_active is null or p.is_active != 'No'); end if; end if; if v_partid is null or v_owner is null then v_main_retry_count := rec.retry_count + 1; -- update SJ_WO_MAIN_INFO 对应的工单 update sj_wo_main_info t set t.retry_count = v_main_retry_count, t.errdesc = 'PRC_WT_AA_ABTOMES_AB2:根据工单中part_no' || rec.part_no || '和item:' || rec.item || ',ProductId或owner不存在,请确认PIDB中的信息', t.update_date = sysdate where t.wo_no = rec.wo_no; commit; continue; end if; if v_push_wo_type = 'AB2' or v_push_wo_type = 'AA' then ---校验推送的waferID和工单中的waferID片号是否一致 if instr(SUBSTR(v_wafer_id_list, -1), ';') < 1 then v_wafer_id_list := v_wafer_id_list || ';'; v_wafer_die_qty_list := v_wafer_die_qty_list || ';'; end if; --查询推送MES的片数如:01,02; select LENGTH(v_wafer_id_list) - LENGTH(regexp_replace(v_wafer_id_list, '[[:punct:]]')) into V_push_mes_wafer_count from dual; --如果推送片号和工单片号不一致,则系统不推送 if (V_push_mes_wafer_count != (length(rec.main_wafer_id) - length(regexp_replace(rec.main_wafer_id, ',', '')))) then -- 更新 SJ_WO_MAIN_INFO 对应的工单 update sj_wo_main_info t set t.retry_count = rec.retry_count + 1, t.errdesc = 'PRC_WT_AA_ABTOMES_AB2:系统推送MES的WAFER总数与工单中的WAFER总数不一致,请确认推送信息', t.update_date = sysdate where t.wo_no = rec.wo_no; commit; continue; end if; elsif v_push_wo_type = 'AB' then if V_woList is null then -- 更新 SJ_WO_MAIN_INFO 对应的工单 update sj_wo_main_info t set t.retry_count = rec.retry_count + 1, t.errdesc = 'PRC_WT_AA_ABTOMES_AB2:系统推送AB工单时,未查询到该AB工单的LOT对应的AA工单号,请确认AB工单的LOT信息', t.update_date = sysdate where t.wo_no = rec.wo_no; commit; continue; end if; end if; --before send,save one record insert into sj_push_wo_createlot (wono, type, routing, custermerid, lotidlist, waferidlist, binlist, totaldieqty, productid, shiprequirement, customerlotid, lotowner, waferdieqtylist, timestamp, part_no, m_number, maincolotno, sjcustomer, push_flag) select rec.wo_no, v_push_wo_type, rec.routing, v_vendorid, v_lotidlist, v_wafer_id_list, v_main_cobin, rec.order_qty, v_partid, v_shipcode, rec.mark_lot_no, v_owner, replace(v_wafer_die_qty_list, '.', ','), to_char(sysdate, 'yyyymmdd hh24miss') || '000', rec.part_no, rec.mnumber, NVL(v_main_colot_no, rec.main_colot_no), rec.sj_customer, 'Y' from dual; commit; --delete delete from fwj2bump.sj_wo_createlot_info@ab2mes_wo t where t.wono = rec.wo_no and (createlotflag <> 'T' or createlotflag is null); commit; select count(*) into V_mes_wono_count from fwj2bump.sj_wo_createlot_info@ab2mes_wo t where t.wono = rec.wo_no and createlotflag = 'T'; if V_mes_wono_count < 1 then --push to mes insert into fwj2bump.sj_wo_createlot_info@ab2mes_wo (wono, type, custermerid, lotidlist, waferidlist, binlist, totaldieqty, productid, shiprequirement, customerlotid, lotowner, waferdieqtylist, timestamp, part_no, m_number, maincolotno, wonolist) select rec.wo_no, v_push_wo_type, v_vendorid, v_lotidlist, v_wafer_id_list, v_main_cobin, rec.order_qty, v_partid, v_shipcode, rec.mark_lot_no, v_owner, replace(v_wafer_die_qty_list, '.', ','), to_char(sysdate, 'yyyymmdd hh24miss') || '000', rec.part_no, rec.mnumber, v_main_colot_no, V_woList from dual t where not exists (select 1 from fwj2bump.sj_wo_createlot_info@ab2mes_wo P where P.WONO = rec.wo_no); commit; end if; -- update SJ_WO_MAIN_INFO status for PUSHED_MES update sj_wo_main_info t set t.status = 'PUSHED_MES', t.errdesc = null, t.update_date = sysdate where t.wo_no = rec.wo_no; commit; end loop; exception when others then --rollback; update sj_wo_main_info t set t.status = 'Error', t.errdesc = null, t.update_date = sysdate where t.wo_no = v_wono; commit; DBMS_OUTPUT.PUT_LINE('Error occurred at:' || DBMS_UTILITY.FORMAT_ERROR_BACKTRACE); --send mail send_mail('PRC_WT_AA_AB_TOMES_AB2', v_wono || ',Error:' || ' SQLCODE:' || sqlcode || ',SQLERRM:' || sqlerrm || ',' || DBMS_UTILITY.FORMAT_ERROR_BACKTRACE); --insert error log prc_write_sys_log('error', 'PRC_WT_AA_AB_TOMES_AB2', '', 'Error:' || v_wono || ',SQLCODE:' || sqlcode || ',SQLERRM:' || sqlerrm || ',' || DBMS_UTILITY.FORMAT_ERROR_BACKTRACE, 'WuTong的AA+AB工单推送MES异常'); end PRC_WT_AA_AB_TOMES_AB2;

-- -- 更新语句一 UPDATE OEE.TEST_EQP_WAFER_MOVE_ALLFAB e JOIN ( SELECT PARTITION_TIME ,MES_FAB ,WAFER_NAME ,EQP_NAME ,SUBEQP_NAME ,STEP_IN_TIME ,CASE WHEN (SAME_LOT_NAME = 'N' AND PT IS NOT NULL AND PT < 7200) THEN PT WHEN (SAME_LOT_NAME = 'N' AND PT IS NULL and RPT IS NOT NULL AND RPT < 7200) THEN RPT when (SAME_LOT_NAME = 'N' AND PT IS NULL and RPT IS NULL) then 0 WHEN (SAME_LOT_NAME = 'Y' AND RPT IS NOT NULL AND RPT < 7200) THEN RPT WHEN (SAME_LOT_NAME = 'Y' AND RPT IS NULL and PT IS NOT NULL AND PT < 7200) THEN PT when (SAME_LOT_NAME = 'Y' AND PT IS NULL and RPT IS NULL) then 0 ELSE 0 end PROCESS_DUR FROM OEE.TEST_EQP_WAFER_MOVE_ALLFAB ) updates ON e.PARTITION_TIME = updates.PARTITION_TIME and e.MES_FAB = updates.MES_FAB and e.WAFER_NAME = updates.WAFER_NAME and e.EQP_NAME=updates.EQP_NAME and e.SUBEQP_NAME=updates.SUBEQP_NAME and e.STEP_IN_TIME=updates.STEP_IN_TIME SET e.PROCESS_DUR = updates.PROCESS_DUR WHERE e.PARTION_TIME='2025-06-06 00:00:00' ; --------- -- 更新语句二 UPDATE OEE.TEST_EQP_WAFER_MOVE_ALLFAB e SET e.PROCESS_DUR= ( SELECT CASE WHEN (SAME_LOT_NAME = 'N' AND PT IS NOT NULL AND PT < 7200) THEN PT WHEN (SAME_LOT_NAME = 'N' AND PT IS NULL and RPT IS NOT NULL AND RPT < 7200) THEN RPT when (SAME_LOT_NAME = 'N' AND PT IS NULL and RPT IS NULL) then 0 WHEN (SAME_LOT_NAME = 'Y' AND RPT IS NOT NULL AND RPT < 7200) THEN RPT WHEN (SAME_LOT_NAME = 'Y' AND RPT IS NULL and PT IS NOT NULL AND PT < 7200) THEN PT when (SAME_LOT_NAME = 'Y' AND PT IS NULL and RPT IS NULL) then 0 ELSE 0 end PROCESS_DUR FROM OEE.TEST_EQP_WAFER_MOVE_ALLFAB updates ON e.PARTITION_TIME = updates.PARTITION_TIME and e.MES_FAB = updates.MES_FAB and e.WAFER_NAME = updates.WAFER_NAME and e.EQP_NAME=updates.EQP_NAME and e.SUBEQP_NAME=updates.SUBEQP_NAME and e.STEP_IN_TIME=updates.STEP_IN_TIME ) WHERE e.PARTION_TIME='2025-06-06 00:00:00' 这个更新语句一和更新语句二,那个更好一点

最新推荐

recommend-type

Excel表格模板:各级学校考试成绩查询系统(智能统计-打开即用).xlsx

Excel表格模板:各级学校考试成绩查询系统(智能统计-打开即用).xlsx
recommend-type

研究Matlab影响下的神经数值可复制性

### Matlab代码影响神经数值可复制性 #### 标题解读 标题为“matlab代码影响-neural-numerical-replicability:神经数值可复制性”,该标题暗示了研究的主题集中在Matlab代码对神经数值可复制性的影响。在神经科学研究中,数值可复制性指的是在不同计算环境下使用相同的算法与数据能够获得一致或相近的计算结果。这对于科学实验的可靠性和结果的可验证性至关重要。 #### 描述解读 描述中提到的“该项目”着重于提供工具来分析不同平台下由于数值不精确性导致的影响。项目以霍奇金-赫克斯利(Hodgkin-Huxley)型神经元组成的简单神经网络为例,这是生物物理神经建模中常见的模型,用于模拟动作电位的产生和传播。 描述中提及的`JCN_2019_v4.0_appendix_Eqs_Parameters.pdf`文件详细描述了仿真模型的参数与方程。这些内容对于理解模型的细节和确保其他研究者复制该研究是必不可少的。 该研究的实现工具选用了C/C++程序语言。这表明了研究的复杂性和对性能的高要求,因为C/C++在科学计算领域内以其高效性和灵活性而广受欢迎。 使用了Runge–Kutta四阶方法(RK4)求解常微分方程(ODE),这是一种广泛应用于求解初值问题的数值方法。RK4方法的精度和稳定性使其成为众多科学计算问题的首选。RK4方法的实现借助了Boost C++库中的`Boost.Numeric.Odeint`模块,这进一步表明项目对数值算法的实现和性能有较高要求。 #### 软件要求 为了能够运行该项目,需要满足一系列软件要求: - C/C++编译器:例如GCC,这是编译C/C++代码的重要工具。 - Boost C++库:一个强大的跨平台C++库,提供了许多标准库之外的组件,尤其是数值计算相关的部分。 - ODEint模块:用于求解常微分方程,是Boost库的一部分,已包含在项目提供的文件中。 #### 项目文件结构 从提供的文件列表中,我们可以推测出项目的文件结构包含以下几个部分: - **项目树源代码目录**:存放项目的主要源代码文件。 - `checkActualPrecision.h`:一个头文件,可能用于检测和评估实际的数值精度。 - `HH_BBT2017_allP.cpp`:源代码文件,包含用于模拟霍奇金-赫克斯利神经元网络的代码。 - `iappDist_allP.cpp` 和 `iappDist_allP.h`:源代码和头文件,可能用于实现某种算法或者数据的分布。 - `Makefile.win`:针对Windows系统的编译脚本文件,用于自动化编译过程。 - `SpikeTrain_allP.cpp` 和 `SpikeTrain_allP.h`:源代码和头文件,可能与动作电位的生成和传播相关。 - **人物目录**:可能包含项目成员的简介、联系方式或其他相关信息。 - **Matlab脚本文件**: - `图1_as.m`、`图2_as.m`、`图2_rp`:这些文件名中的"as"可能表示"assembled",而"rp"可能指"reproduction"。这些脚本文件很可能用于绘制图表、图形,以及对模拟结果进行后处理和复现实验。 #### 开源系统标签 标签“系统开源”指的是该项目作为一个开源项目被开发,意味着其源代码是公开的,任何个人或组织都可以自由获取、修改和重新分发。这对于科学计算来说尤为重要,因为开放代码库可以增进协作,加速科学发现,并确保实验结果的透明度和可验证性。 #### 总结 在理解了文件中提供的信息后,可以认识到本项目聚焦于通过提供准确的数值计算工具,来保证神经科学研究中模型仿真的可复制性。通过选择合适的编程语言和算法,利用开源的库和工具,研究者们可以确保其研究结果的精确性和可靠性。这不仅有助于神经科学领域的深入研究,还为其他需要高精度数值计算的科研领域提供了宝贵的经验和方法。
recommend-type

MySQL数据库索引失效案例分析与解决方案(索引失效大揭秘)

# 摘要 MySQL索引失效是数据库性能优化中的关键问题,直接影响查询效率与系统响应速度。本文系统分析了索引的基本机制与失效原理,包括B+树结构、执行计划解析及查询优化器的工作逻辑,深入探讨了索引失效的典型场景,如不规范SQL写法、复合索引设计不当以及统
recommend-type

TS语言

### TypeScript 简介 TypeScript 是一种由 Microsoft 开发的开源编程语言,它是 JavaScript 的超集,这意味着所有的 JavaScript 代码都是合法的 TypeScript 代码。TypeScript 扩展了 JavaScript 的语法,并通过类型注解提供编译时的静态类型检查,从而使得代码更易于维护、理解和调试。TypeScript 可以在任何操作系统上运行,并且可以编译出纯净、简洁的 JavaScript 代码,这些代码可以在任何浏览器上、Node.js 环境中,或者任何支持 ECMAScript 3(或更高版本)的 JavaScript 引
recommend-type

Leaflet.Graticule插件:创建经纬度网格刻度

标题“Leaflet.Graticule:经纬线网格”指向的是Leaflet.js的一个插件,它用于在地图上生成经纬度网格线,以辅助进行地图定位与参考。从描述中,我们可以提取到几个关键知识点: 1. Leaflet.Graticule插件的使用目的和功能:该插件的主要作用是在基于Leaflet.js库的地图上绘制经纬度网格线。这可以帮助用户在地图上直观地看到经纬度划分,对于地理信息系统(GIS)相关工作尤为重要。 2. 插件的构造函数和参数:`L.graticule(options)`是创建Graticule图层的JavaScript代码片段。其中`options`是一个对象,可以用来设置网格线的显示样式和间隔等属性。这表明了插件的灵活性,允许用户根据自己的需求调整网格线的显示。 3. interval参数的含义:`interval`参数决定了网格线的间隔大小,以度为单位。例如,若设置为20,则每20度间隔显示一条网格线;若设置为10,则每10度显示一条网格线。这一参数对于调节网格线密度至关重要。 4. style参数的作用:`style`参数用于定义网格线的样式。插件提供了自定义线的样式的能力,包括颜色、粗细等,使得开发者可以根据地图的整体风格和个人喜好来定制网格线的外观。 5. 实例化和添加到地图上的例子:提供了两种使用插件的方式。第一种是直接创建一个基本的网格层并将其添加到地图上,这种方式使用了插件的默认设置。第二种是创建一个自定义间隔的网格层,并同样将其添加到地图上。这展示了如何在不同的使用场景下灵活运用插件。 6. JavaScript标签的含义:标题中“JavaScript”这一标签强调了该插件是使用JavaScript语言开发的,它是前端技术栈中重要的部分,特别是在Web开发中扮演着核心角色。 7. 压缩包子文件的文件名称列表“Leaflet.Graticule-master”暗示了插件的项目文件结构。文件名表明,这是一个典型的GitHub仓库的命名方式,其中“master”可能代表主分支。通常,开发者可以在如GitHub这样的代码托管平台上找到该项目的源代码和文档,以便下载、安装和使用。 综上所述,可以得知,Leaflet.Graticule插件是一个专为Leaflet地图库设计的扩展工具,它允许用户添加自定义的经纬度网格线到地图上,以帮助进行地图的可视化分析。开发者可以根据特定需求通过参数化选项来定制网格线的属性,使其适应不同的应用场景。通过学习和使用该插件,可以增强地图的交互性和信息的传递效率。
recommend-type

【MySQL数据库性能提升秘籍】:揭秘性能下降幕后真凶及解决策略

# 摘要 MySQL性能问题在实际应用中普遍存在,但其表象复杂且易引发认知误区。本文系统分析了导致MySQL性能下降的核心原因,涵盖查询语句结构、数据库配置、表结构设计等多个技术层面,并结合性能监控工具与执行计划解析,提供了全面的问题诊断方法。在此基础上,文章深入探讨了索引优化、查询重写、分库分表等高级调优策略,并通过真实案例总结了可行的最佳实践
recommend-type

51小车循迹红外

基于51单片机的红外循迹小车的实现方法,主要涉及硬件连接、传感器模块的使用以及程序设计三个方面。 ### 红外循迹模块的选择与连接 红外循迹模块通常由多个红外发射和接收对管组成,用于检测地面上的黑线。常见的模块有四路红外循迹模块,其工作原理是通过检测红外光的反射强度来判断是否处于黑线上。红外模块的VCC和GND分别连接到51单片机的+5V和GND端,而IN1至IN4则连接到单片机的对应引脚上。红外发射接收器应安装在小车前方下端,并且离地面的距离不宜过远,以确保能够有效检测到黑线[^2]。 ### 硬件电路设计 在硬件设计方面,需要考虑电机驱动、电源管理、以及红外传感器的接口设计。51单片机
recommend-type

AMEF图像去雾技术:Matlab实现与应用

AMEF(Artificial Multi-Exposure Fusion)方法是一种用于图像去雾的技术,其核心思想是将多张曝光不足的图像融合成一张清晰无雾的图片。在讨论这个技术的Matlab实现之前,让我们先了解图像去雾和多重曝光融合的背景知识。 图像去雾技术的目标是恢复在雾中拍摄的图像的清晰度,增强图像的对比度和颜色饱和度,使得原本因雾气影响而模糊的图像变得清晰。这种技术在自动驾驶、无人机导航、视频监控、卫星图像处理等领域有着重要的应用。 多重曝光技术源自摄影领域,通过拍摄同一场景的多张照片,再将这些照片通过特定算法融合,获得一张综合了多张照片信息的图像。多重曝光融合技术在提高图像质量方面发挥着重要作用,例如增加图片的动态范围,提升细节和亮度,消除噪点等。 在介绍的AMEF去雾方法中,该技术被应用于通过人工创建的多重曝光图像进行融合,以产生清晰的无雾图像。由于单一图像在光照不均匀或天气条件不佳的情况下可能会产生图像质量低下的问题,因此使用多重曝光融合可以有效地解决这些问题。 在Matlab代码实现方面,AMEF的Matlab实现包括了一个名为amef_demo.m的演示脚本。用户可以通过修改该脚本中的图像名称来处理他们自己的图像。在该代码中,clip_range是一个重要的参数,它决定了在去雾处理过程中,对于图像像素亮度值的裁剪范围。在大多数实验中,该参数被设定为c=0.010,但用户也可以根据自己的需求进行调整。较大的clip_range值会尝试保留更多的图像细节,但同时也可能引入更多噪声,因此需要根据图像的具体情况做出适当选择。 AMEF方法的理论基础和实验过程均来自于Adrian Galdran在2018年发表于《信号处理》期刊的文章,题为“Image Dehazing by Artificial Multi-Exposure Image Fusion”。同时,该Matlab代码的融合部分的理论基础则来自于2007年Pacific Graphics会议记录中由Tom Mertens, Jan Kautz和Frank Van Reeth提出的工作,题目为“Exposure Fusion”。因此,如果读者在实际应用中使用了这段代码,适当的引用这些工作是必要的学术礼仪。 此外,标签“系统开源”表明了该项目遵循开源精神,允许研究者、开发者及用户自由地访问、使用、修改和共享源代码。这一特点使得AMEF方法具有广泛的可访问性和可扩展性,鼓励了更广泛的研究和应用。 从压缩包子文件的文件名称列表中,我们可以看到AMEF去雾方法的Matlab实现的项目名为“amef_dehazing-master”。这表明了这是一个有主分支的项目,其主分支被标识为“master”,这通常意味着它是项目维护者认可的稳定版本,也是用户在使用时应该选择的版本。 总的来说,AMEF去雾方法及其Matlab实现为图像处理领域提供了快速且有效的解决方案,能够在图像被雾气影响时恢复出高质量的清晰图像,这对于相关领域的研究和应用具有重要的意义。
recommend-type

泵浦光匹配建模全解析:MATLAB中耦合效率提升的4个关键点(实战案例)

# 摘要 泵浦光匹配建模在光纤激光器与光学系统设计中具有关键作用,直接影响光束耦合效率与系统整体性能。本文系统阐述了泵浦光匹配建模的基本概念与研究意义,深入分析其理论基础,包括光纤耦合原理、高斯光束传播特性及耦合效率的数学建模。基于MATLAB平台,介绍了光学仿真工具的使用与建模环境搭建方法,并提出四种关键建模策略以提升耦合效率。通过典型实例验证模型有效性
recommend-type

openshift跟k8s和docker之间的关系

### OpenShift 与 Kubernetes 和 Docker 的关系 OpenShift 是基于 Kubernetes 和 Docker 构建的一个企业级应用云平台。它通过整合 Kubernetes 的容器编排能力和 Docker 的容器引擎,提供了一套完整的云原生解决方案。 #### OpenShift 与 Kubernetes 的关系 Kubernetes 是 OpenShift 的核心组件之一,负责容器编排任务。OpenShift 基于 Kubernetes 构建,并在其基础上扩展了更多企业级功能。例如,OpenShift 引入了 BuildConfig、ImageStre