修复分配工厂创建订单和质检接口

This commit is contained in:
jinling.yang
2024-02-29 14:42:10 +08:00
parent ec5297937d
commit abdc522f9f
4 changed files with 8 additions and 8 deletions

View File

@@ -655,7 +655,8 @@ class ResMrpWorkOrder(models.Model):
reportPath = reportPath[1:]
serverdir = os.path.join('/tmp', reportPath)
logging.info('get_detection_file-serverdir:%s' % serverdir)
for root, dirs, files in os.walk(serverdir):
serverdir_prefix = os.path.dirname(serverdir)
for root, dirs, files in os.walk(serverdir_prefix):
for filename in files:
if filename == os.path.basename(reportPath):
report_file_path = os.path.join(root, filename)