From 693c17283bb62c60354e047a3b684a360fb85185 Mon Sep 17 00:00:00 2001 From: houhuan Date: Fri, 2 May 2025 19:58:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BA=86README=E6=96=87?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E6=B7=BB=E5=8A=A0=E4=BA=86=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=92=8C=E6=9B=B4=E6=96=B0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../__pycache__/converter.cpython-39.pyc | Bin 7531 -> 8892 bytes .../__pycache__/processor.cpython-39.pyc | Bin 15608 -> 15895 bytes app/core/excel/converter.py | 94 ++++- app/core/excel/processor.py | 18 +- data/processed_files.json | 1 + data/processed_files.json.bak | 3 + logs/__main__.active | 2 +- logs/__main__.log | 37 ++ logs/app.core.excel.converter.active | 2 +- logs/app.core.excel.converter.log | 185 +++++++++ logs/app.core.excel.merger.active | 2 +- logs/app.core.excel.merger.log | 34 ++ logs/app.core.excel.processor.active | 2 +- logs/app.core.excel.processor.log | 381 ++++++++++++++++++ logs/app.core.ocr.baidu_ocr.active | 2 +- logs/app.core.ocr.baidu_ocr.log | 3 + logs/app.core.ocr.table_ocr.active | 2 +- logs/app.core.ocr.table_ocr.log | 52 +++ logs/app.core.utils.file_utils.active | 2 +- logs/app.core.utils.file_utils.log | 3 + logs/app.services.ocr_service.active | 2 +- logs/app.services.ocr_service.log | 20 + logs/app.services.order_service.active | 2 +- logs/app.services.order_service.log | 19 + 启动器.py | 48 ++- 25 files changed, 875 insertions(+), 41 deletions(-) create mode 100644 data/processed_files.json create mode 100644 data/processed_files.json.bak diff --git a/app/core/excel/__pycache__/converter.cpython-39.pyc b/app/core/excel/__pycache__/converter.cpython-39.pyc index a4bc686eb8e80ae1e4b142f016389bc8d8e92b7f..18e75abcf30e17334cd32ace4c50febe6dba7c4f 100644 GIT binary patch delta 2805 zcma)8Z)_7~7{B-KdUtErj{RZoFFPuKdPV2j(YZ|n=s-mgOlBgE5vaW~3R{_P+gQmp z6$JzZxA=lY*mP47BMKS}LBvnQL_g^l6TQ!C3o*toni!+R=eg_J4mGjOJ$>Hi|MR~0 z{NDc5e{F*&>~=dj`26}w!|w0y|I{o#?zS=;D;1JAjicPM+coZU?6;dX?_f zUAjBY>z-Y_UZXDpt`@jDy&kv*;1=tRz}>NnACbX_=uLy1*37=*?_q*4^7zdqkRx>` zkj)Pb%w0W~V+RUHKhIxyCHLOJ!sOv!uARI(Grb#-<1 z-fJxbfu7z_Uw3cU>PvfsI3bPfM{%&p3n4j~C-D7Cl#0K9D79>j<1vo{I(!D;NpLKy zG-k;RKg(r!onOywZ^#G+KO-1|F3j?_{MjW*amJyG20zPZL_?%+>|c|V3~@%*9kb*m zl5tqPG)pp4QkkjJWrLi74Kf@+s|@K3Hw`+%84g3*#XrRjaw3;>K7WF6_0w++N`kHW@Q!Rex*h(pw&7ZiK zKX#yS`e1(MTJG9Je@PwaRJ}ns1+RMd8r2uPOZDPHE9rxv@1FbOvaRn1Jub@nZqNrh zL-~nG+X8s7!DZQIb>}(|o&4nH%M<--sBq?W+Y}9PQ8o-gunv{~^Xp7NORV5zYr{8#3T|Z@#v`My_#BXw}NnS~ovvqQl$CrEiYJTb?yMK*s zmDMe&N5I~pm_rtG@t?lnlPX~TKpLmfU9t3# z>zQyO7TICBnnFA^W{RnJEIH(k>>C>&jizl4ZNw-Rxr6;Icl7kZI?)A$tMw33P>4e6 zglZzfM0tplw82wNB#=lI5)bn$J*4GQSkZWy;%rluO*kLixD;8ON!oy9Ig-18n2yN4 zR6J=4qtUo2jnI9m@dWjuRzu=P6Csg$Mw9F|1FYTE(zF7_5{)KOqsaw@Z*jGdJ#3F_ zYex&1MDVERKQ3S-c&wQ}V$VFzdqzlFvu=>$WIw43Fw3GY&cXyw^BG6dF(c^?gNI3$ zaGs|@gOfbS=`u_^dP^nmsj@FjKgOxD;t0h!Fy8ZVvK4_`8QBU1uu&|-{MRz7%kCB4 z?u=r2EA!rygtq*vzo)`KTkfMKQ)LCHst7Pt(aECHKGaqODES-Q3>Ho@PQwYQ4_Z4` zSG07NcFYMohTv15G7)^(57oWd8|Mz@j=Z@LYSQW4p|gdnSLP8X;7_MjU+(=Ey@Al} znn0+G3;;ugGoR&OI}1aYn>-JpVZs1;{DF{#6v&h?3o$93&i+T51>(vat1Y*}n_u2I zJXH)@DlWJ{90-;xL(EF2H+j|Eh0g)ta>q~3eR&)&I%WQ*1MHesYvKLu^sn^|>#MX< zqx<=QpQ@lqdD$&@b8ktZ^{X_9a-727Pab{!%w)LZSM-eGg?o)-3(yTxU0|Xx6u{yBi$_J-fZYTAL`_aJ$gEoojx zR5sAuLxPv~H}56=^(ZglD#eRUtF>cqL{&eMN0HbOkb4ZtCf3nyUc@3D!Unrs)u_02xa)Mv<998 wzOf1sMP<1fXjsiZJ^@`6j+_2_dmk2jqTpQ0UI0#U;qFB delta 1655 zcmZuxU1%It6rOwMZ+Ejl$!3$yCNbTlvCV9;-860U(^_L=#h+3Nd9X$$j(aEDCCOyH zGi%c@A%*ILAX2!3(p0;Plst%{MnR-c`XnNP4?Yaylg5Y&1t0Xms^`q+S3AS~IQQIp z&YW|<@6N5$zl_AqSS%vJ^L{mTfgS!JUZm$9gDE47GMOn%y)KuCCrwIBV>%15Fl(?W zi%wA%V{xz&U^TKPu##XkvlLh@Q?#f<3}LO~l93i)(?f}g*sn{XHX$vdTOCh!VhtK4!FxyfM~jMA)W;JlctbG8U^t#6zDji#t4d9((M9S}KEH6% zRXtkOm|P=Q$f6wBN{uWku3il>)g#MLxF-YZp0X^xsnrOPJlRvG=o8Yoq)2Y~(hEew z_esg7d1xF;4psh;#BbV3aU+@(@zA^C=g@wV7ER$cF&NI?Yef7=$tl^6YuW|NmmQb; zlv}oZiIg3@^#LKlE9+m%^gsn{i#x1ckCR&hD9XYUc1JGfJd z#EBv|5(SPUP9mfeMwDoDp-+s)TgB~22g$5P8w{%YB*)vuiP)*74orrp$eR)F0q`}) zGC3Ahn5)>XFV9%EuNC=RrR?x-+|`4y7q`kz# zTW>+*mQ$J8Rln2@AuZOt%gus2>6EQPX{uB(-O`+WR;1$RmokvEKmj%%WL1L^F#9VQ z9^r8p&?Q%>lSCRAknGYbkm?a2T=rysjsaE`1{4FC6lhj~{7ssXU|0cy6^Pas)gT&H zYfJU;H@1UWD6qppB6%ZGWJ52z6E!SqK_YFdjBj`3iEfnCj126giTFs%lL-)z3n1gyXnlI zO4yh9K1}(5nCt3=(|xV$7|E@E*)>f@lIY*MS9}zvMpOM;58~1Q!YPD$2DBbRI4#QA z!TfPFPaxb6Fp(&mg=w=01y2Tdc;|`3x}O%$cc_Nd5@I_6Y=5EBa882^dZsAVd@;l+CuMdQC!M{eI5koy= Sdmcqc&^|{0FRi%N)AKKcWqCLN diff --git a/app/core/excel/__pycache__/processor.cpython-39.pyc b/app/core/excel/__pycache__/processor.cpython-39.pyc index 96795de597cd284b6e095c2f038618fdb4ac4943..1483af8a0b18ec198f851fe3ef289a38fdfcad4f 100644 GIT binary patch delta 1329 zcmZ`(U1%It6uxI>v%B5@o&8HT+w5){(Y>{?r@c3GwttzF(uhFq#6cr*X;knkRM!N}@n*7l`UoK;jsCSsKO@ENPLn7SIAe?tjUUl}Z|l1=xBtzui1Ggm_%J;Ihp5ftaPH*R@7 zRjv$W(75St(eu!5`&LXD{uPz@Pt*y~BksIrSN-OZOJc`%ok{99PlmOo5Vcw;jYzOi zC!)B8b|GrFP#2tzAP)XyYP4STiM%C^LZ!$8(>h*4mT{45MhCg(Y z#yPPcWl#f1!(+GO1Q>`Hy{!~1g!^##pXc*~eyynB0oC?!3I zd(X39lAY}F)SK*1D#5-;CE0^i2ZULBIvYRUI+2sJ^7Pnfemp;#Q}X8u+0k=ni&F(Q zo8Hy!IbX~bl)N&Nl@)27FBGSwi>P?qn=g!yNz#~Tg|e^Gy>NwXrjKz>V23)p+FBtD z0kDG;qMQqye7tGJYf9%QJK$Jt-`+@z`!^s&%A($EA3M^YWK#zi{8fX#-vPd1e;#D; zJ)7?zfK%-2{+~)3wc{*;6mVQb7pervY_G!UA%&ad@d}Vh?6BEMh3Fs#O?&G?jgZ2C zjVKWfW-bF!9T=HFmK)!A$3L8xh{&ssOOAr8@xPz!C)7SdhRF!-bPSWG#CJ`JE|h4& z4~03zFuU`_Ziv*J13$nsJMl!u$EzE2E5_^B>#s3m?UjwsnKAe2z2%$6?Zu%~F@=o! zl3uSZ{y&NReCPl~S$ObFczuVg`qVrDBtgSb;7>$UzP?VN9g1EnllkGCBAstLDF~gVaT9=k2P9Z3=Yz zW}9_PGzY_0qfE@wpao+{hAk9F6tPeOQMHBY5!IMzK{RK>9cF1lW(5&SX@a~$8wwa@ zcP!Y6p$qqBg3@#RFW?t;SiAkjb z%tu?s!AkdGT%?OwGC_tus3LRdArlo(+q8L?Vq=aRpi1k4&6?NIPnvg+8~lnC&sWzh z+4%3e9+=?i=vRIy7Ej2B@iLBw@U{B<#`@foFW08mr?s`|TWeEut1qWIV@LT&Y=(#8 zQT{7d%aids@beS#LH;3LFSE3;$a?2w7_-VlQ_a}CK8bVc)<=8 zP;CoC2?qrSROH_!o>f9${%UJgIeg>u`(D7${K>ZO0L%PXJI4ms+LJ(d?SaqfJykn62G|EkKN%p@)=$ca;@4nu42Zf7$mIrw=;ain(F2L!Nj8E%zm)t0e6?dQ z1b9_yl+UK9-67yV*unp#+5qzD&LqGhm(%;9mp@2 (2, "箱") + 2. "3件" -> (3, "件") + 3. "1.5提" -> (1.5, "提") + 4. "数量: 5盒" -> (5, "盒") + 5. "× 2瓶" -> (2, "瓶") + Args: quantity_str: 数量字符串,如"2箱"、"5件" @@ -62,13 +74,29 @@ class UnitConverter: if not quantity_str or not isinstance(quantity_str, str): return None, None - # 匹配数字+单位格式 - match = re.match(r'^([\d\.]+)\s*([^\d\s\.]+)$', quantity_str.strip()) - if match: + # 清理字符串,移除前后空白和一些常见前缀 + cleaned_str = quantity_str.strip() + for prefix in ['数量:', '数量:', '×', 'x', 'X', '*']: + cleaned_str = cleaned_str.replace(prefix, '').strip() + + # 匹配数字+单位格式 (基本格式) + basic_match = re.match(r'^([\d\.]+)\s*([^\d\s\.]+)$', cleaned_str) + if basic_match: try: - num = float(match.group(1)) - unit = match.group(2) - logger.info(f"从数量提取单位: {quantity_str} -> 数量={num}, 单位={unit}") + num = float(basic_match.group(1)) + unit = basic_match.group(2) + logger.info(f"从数量提取单位(基本格式): {quantity_str} -> 数量={num}, 单位={unit}") + return num, unit + except ValueError: + pass + + # 匹配更复杂的格式,如包含其他文本的情况 + complex_match = re.search(r'([\d\.]+)\s*([箱|件|瓶|提|盒|袋|桶|包|kg|g|升|毫升|L|ml|个])', cleaned_str) + if complex_match: + try: + num = float(complex_match.group(1)) + unit = complex_match.group(2) + logger.info(f"从数量提取单位(复杂格式): {quantity_str} -> 数量={num}, 单位={unit}") return num, unit except ValueError: pass @@ -115,6 +143,13 @@ class UnitConverter: """ 从商品名称中推断规格 + 规则: + 1. "xx入纸箱" -> 1*xx (如"15入纸箱" -> 1*15) + 2. 直接包含规格 "1*15" -> 1*15 + 3. "xx纸箱" -> 1*xx (如"15纸箱" -> 1*15) + 4. "xx白膜" -> 1*xx (如"12白膜" -> 1*12) + 5. "xxL" 容量单位特殊处理 + Args: name: 商品名称 @@ -124,34 +159,53 @@ class UnitConverter: if not name or not isinstance(name, str): return None - # 特殊模式的名称处理 - # 如"445水溶C血橙15入纸箱" -> "1*15" - pattern1 = r'.*(\d+)入' - match = re.match(pattern1, name) + # 记录原始商品名称,用于日志 + original_name = name + + # 特殊模式1: "xx入纸箱" 格式,如"445水溶C血橙15入纸箱" -> "1*15" + pattern1 = r'.*?(\d+)入纸箱' + match = re.search(pattern1, name) if match: inferred_spec = f"1*{match.group(1)}" - logger.info(f"从名称推断规格(入): {name} -> {inferred_spec}") + logger.info(f"从名称推断规格(入纸箱): {original_name} -> {inferred_spec}") return inferred_spec - # 如"500-东方树叶-绿茶1*15-纸箱装" -> "1*15" - pattern2 = r'.*(\d+)[*xX×](\d+).*' - match = re.match(pattern2, name) + # 特殊模式2: 直接包含规格,如"500-东方树叶-乌龙茶1*15-纸箱装" -> "1*15" + pattern2 = r'.*?(\d+)[*xX×](\d+).*' + match = re.search(pattern2, name) if match: inferred_spec = f"{match.group(1)}*{match.group(2)}" - logger.info(f"从名称推断规格(直接): {name} -> {inferred_spec}") + logger.info(f"从名称推断规格(直接格式): {original_name} -> {inferred_spec}") return inferred_spec - # 如"12.9L桶装水" -> "12.9L*1" - pattern3 = r'.*?([\d\.]+)L.*' - match = re.match(pattern3, name) + # 特殊模式3: "xx纸箱" 格式,如"500茶π蜜桃乌龙15纸箱" -> "1*15" + pattern3 = r'.*?(\d+)纸箱' + match = re.search(pattern3, name) + if match: + inferred_spec = f"1*{match.group(1)}" + logger.info(f"从名称推断规格(纸箱): {original_name} -> {inferred_spec}") + return inferred_spec + + # 特殊模式4: "xx白膜" 格式,如"1.5L水12白膜" 或 "550水24白膜" -> "1*12" 或 "1*24" + pattern4 = r'.*?(\d+)白膜' + match = re.search(pattern4, name) + if match: + inferred_spec = f"1*{match.group(1)}" + logger.info(f"从名称推断规格(白膜): {original_name} -> {inferred_spec}") + return inferred_spec + + # 特殊模式5: 容量单位如"12.9L桶装水" -> "12.9L*1" + pattern5 = r'.*?([\d\.]+)L.*' + match = re.search(pattern5, name) if match: inferred_spec = f"{match.group(1)}L*1" - logger.info(f"从名称推断规格(L): {name} -> {inferred_spec}") + logger.info(f"从名称推断规格(容量): {original_name} -> {inferred_spec}") return inferred_spec - # 从名称中提取规格 + # 尝试通用模式匹配 spec = self.extract_specification(name) if spec: + logger.info(f"从名称推断规格(通用模式): {original_name} -> {spec}") return spec return None diff --git a/app/core/excel/processor.py b/app/core/excel/processor.py index 5d4b9fd..19037f1 100644 --- a/app/core/excel/processor.py +++ b/app/core/excel/processor.py @@ -270,6 +270,10 @@ class ExcelProcessor: logger.info(f"列名映射结果: {mapped_columns}") + # 检查是否有规格列 + has_specification_column = 'specification' in mapped_columns + logger.info(f"是否存在规格列: {has_specification_column}") + # 提取商品信息 products = [] @@ -298,13 +302,6 @@ class ExcelProcessor: product['name'] = f"商品 ({product['barcode']})" logger.info(f"商品名称为空,使用条码作为名称: {product['name']}") - # 推断规格 - if not product['specification'] and product['name']: - inferred_spec = self.unit_converter.infer_specification_from_name(product['name']) - if inferred_spec: - product['specification'] = inferred_spec - logger.info(f"从商品名称推断规格: {product['name']} -> {inferred_spec}") - # 单位处理:如果单位为空但数量包含单位信息 quantity_str = str(row.get(mapped_columns.get('quantity', ''), '')) if not product['unit'] and 'quantity' in mapped_columns: @@ -316,6 +313,13 @@ class ExcelProcessor: if num is not None: product['quantity'] = num + # 推断规格:如果规格为空或不存在规格列,尝试从商品名称推断 + if (not product['specification'] or not has_specification_column) and product['name']: + inferred_spec = self.unit_converter.infer_specification_from_name(product['name']) + if inferred_spec: + product['specification'] = inferred_spec + logger.info(f"从商品名称推断规格: {product['name']} -> {inferred_spec}") + # 应用单位转换规则 product = self.unit_converter.process_unit_conversion(product) diff --git a/data/processed_files.json b/data/processed_files.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/data/processed_files.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/data/processed_files.json.bak b/data/processed_files.json.bak new file mode 100644 index 0000000..dc635d8 --- /dev/null +++ b/data/processed_files.json.bak @@ -0,0 +1,3 @@ +{ + "D:\\My Documents\\python\\orc-order-v2\\data\\input\\微信图片_20250502191502.jpg": "D:\\My Documents\\python\\orc-order-v2\\data\\output\\微信图片_20250502191502.xlsx" +} \ No newline at end of file diff --git a/logs/__main__.active b/logs/__main__.active index b92430b..6e265cb 100644 --- a/logs/__main__.active +++ b/logs/__main__.active @@ -1 +1 @@ -Active since: 2025-05-02 18:41:16 \ No newline at end of file +Active since: 2025-05-02 19:53:27 \ No newline at end of file diff --git a/logs/__main__.log b/logs/__main__.log index cb62039..c5882f3 100644 --- a/logs/__main__.log +++ b/logs/__main__.log @@ -49,3 +49,40 @@ 2025-05-02 18:38:56,890 - __main__ - INFO - Excel处理成功,输出文件: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250227193150(1).xls 2025-05-02 18:41:16,744 - __main__ - INFO - 处理Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250227193150(1).xlsx 2025-05-02 18:41:17,402 - __main__ - INFO - Excel处理成功,输出文件: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250227193150(1).xls +2025-05-02 19:15:17,472 - __main__ - INFO - 批量处理模式 +2025-05-02 19:15:19,393 - __main__ - INFO - 批量处理完成,总计: 1,成功: 1 +2025-05-02 19:15:43,270 - __main__ - INFO - 处理最新的Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502191502.xlsx +2025-05-02 19:15:51,442 - __main__ - INFO - Excel处理成功,输出文件: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502191502.xls +2025-05-02 19:33:54,964 - __main__ - INFO - === 流程步骤 1: OCR识别 === +2025-05-02 19:33:54,964 - __main__ - INFO - 批量处理所有图片 +2025-05-02 19:33:54,965 - __main__ - WARNING - 没有找到需要处理的图片 +2025-05-02 19:33:54,966 - __main__ - INFO - === 流程步骤 2: Excel处理 === +2025-05-02 19:33:54,967 - __main__ - WARNING - 未找到可处理的Excel文件 +2025-05-02 19:35:48,764 - __main__ - INFO - === 流程步骤 1: OCR识别 === +2025-05-02 19:35:48,764 - __main__ - INFO - 批量处理所有图片 +2025-05-02 19:35:48,766 - __main__ - WARNING - 没有找到需要处理的图片 +2025-05-02 19:35:48,766 - __main__ - INFO - === 流程步骤 2: Excel处理 === +2025-05-02 19:35:48,817 - __main__ - WARNING - 未找到可处理的Excel文件 +2025-05-02 19:36:15,986 - __main__ - INFO - === 流程步骤 1: OCR识别 === +2025-05-02 19:36:15,986 - __main__ - INFO - 批量处理所有图片 +2025-05-02 19:36:15,987 - __main__ - WARNING - 没有找到需要处理的图片 +2025-05-02 19:36:15,988 - __main__ - INFO - === 流程步骤 2: Excel处理 === +2025-05-02 19:36:15,989 - __main__ - WARNING - 未找到可处理的Excel文件 +2025-05-02 19:42:19,207 - __main__ - INFO - === 流程步骤 1: OCR识别 === +2025-05-02 19:42:19,208 - __main__ - INFO - 批量处理所有图片 +2025-05-02 19:42:21,167 - __main__ - INFO - OCR处理完成,总计: 1,成功: 1 +2025-05-02 19:42:21,167 - __main__ - INFO - === 流程步骤 2: Excel处理 === +2025-05-02 19:42:21,167 - __main__ - INFO - 处理最新的Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502191502.xlsx +2025-05-02 19:42:36,439 - __main__ - INFO - Excel处理成功,输出文件: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502191502.xls +2025-05-02 19:42:36,440 - __main__ - INFO - === 流程步骤 3: 订单合并 === +2025-05-02 19:42:36,441 - __main__ - INFO - 合并所有采购单文件: 1 个 +2025-05-02 19:42:36,457 - __main__ - ERROR - 订单合并失败 +2025-05-02 19:53:27,942 - __main__ - INFO - === 流程步骤 1: OCR识别 === +2025-05-02 19:53:27,942 - __main__ - INFO - 批量处理所有图片 +2025-05-02 19:53:29,683 - __main__ - INFO - OCR处理完成,总计: 1,成功: 1 +2025-05-02 19:53:29,683 - __main__ - INFO - === 流程步骤 2: Excel处理 === +2025-05-02 19:53:29,684 - __main__ - INFO - 处理最新的Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502191502.xlsx +2025-05-02 19:53:47,770 - __main__ - INFO - Excel处理成功,输出文件: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502191502.xls +2025-05-02 19:53:47,770 - __main__ - INFO - === 流程步骤 3: 订单合并 === +2025-05-02 19:53:47,771 - __main__ - INFO - 合并所有采购单文件: 1 个 +2025-05-02 19:53:47,786 - __main__ - ERROR - 订单合并失败 diff --git a/logs/app.core.excel.converter.active b/logs/app.core.excel.converter.active index b92430b..6e265cb 100644 --- a/logs/app.core.excel.converter.active +++ b/logs/app.core.excel.converter.active @@ -1 +1 @@ -Active since: 2025-05-02 18:41:16 \ No newline at end of file +Active since: 2025-05-02 19:53:27 \ No newline at end of file diff --git a/logs/app.core.excel.converter.log b/logs/app.core.excel.converter.log index 2edb649..e8276e4 100644 --- a/logs/app.core.excel.converter.log +++ b/logs/app.core.excel.converter.log @@ -143,3 +143,188 @@ 2025-05-02 18:41:17,314 - app.core.excel.converter - INFO - 从名称推断规格(入): 450ml轻乳茶大红袍乌龙12入纸箱 -> 1*2 2025-05-02 18:41:17,315 - app.core.excel.converter - INFO - 解析二级规格: 1*2 -> 1*2 2025-05-02 18:41:17,315 - app.core.excel.converter - INFO - 提/盒单位(二级规格)处理: 保持原样 数量: 1.0, 单价: 65.0, 单位: 提 +2025-05-02 19:15:43,873 - app.core.excel.converter - INFO - 从名称推断规格(入): 450果园30%橙子15入纸箱 -> 1*5 +2025-05-02 19:15:43,874 - app.core.excel.converter - INFO - 从数量提取单位: 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:15:43,874 - app.core.excel.converter - INFO - 解析二级规格: 1*5 -> 1*5 +2025-05-02 19:15:43,874 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 5.0, 单价: 0 -> 0, 单位: 箱 -> 瓶 +2025-05-02 19:15:43,875 - app.core.excel.converter - INFO - 从名称推断规格(入): 450果园30%葡萄15入纸箱 -> 1*5 +2025-05-02 19:15:43,876 - app.core.excel.converter - INFO - 从数量提取单位: 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:15:43,876 - app.core.excel.converter - INFO - 解析二级规格: 1*5 -> 1*5 +2025-05-02 19:15:43,876 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 5.0, 单价: 56.0 -> 11.2, 单位: 箱 -> 瓶 +2025-05-02 19:15:43,876 - app.core.excel.converter - INFO - 从名称推断规格(入): 450果园30%楂苹梅15入纸箱 -> 1*5 +2025-05-02 19:15:43,876 - app.core.excel.converter - INFO - 从数量提取单位: 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:15:43,877 - app.core.excel.converter - INFO - 解析二级规格: 1*5 -> 1*5 +2025-05-02 19:15:43,877 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 5.0, 单价: 56.0 -> 11.2, 单位: 箱 -> 瓶 +2025-05-02 19:15:43,877 - app.core.excel.converter - INFO - 从名称推断规格(直接): 500-东方树叶-青柑普洱1*15-纸 +箱装-开盖活动装 -> 1*15 +2025-05-02 19:15:43,944 - app.core.excel.converter - INFO - 从数量提取单位: 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:15:43,944 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 19:15:43,944 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 55.0 -> 3.6666666666666665, 单位: 箱 -> 瓶 +2025-05-02 19:15:43,945 - app.core.excel.converter - INFO - 从名称推断规格(直接): 500-东方树叶-乌龙茶1*15-纸箱 +装-开盖活动装 -> 1*15 +2025-05-02 19:15:43,945 - app.core.excel.converter - INFO - 从数量提取单位: 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:15:43,946 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 19:15:43,946 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 0 -> 0, 单位: 箱 -> 瓶 +2025-05-02 19:15:43,946 - app.core.excel.converter - INFO - 从名称推断规格(入): 900树叶茉莉花茶12入纸箱 -> 1*2 +2025-05-02 19:15:43,946 - app.core.excel.converter - INFO - 从数量提取单位: 5箱 -> 数量=5.0, 单位=箱 +2025-05-02 19:15:43,946 - app.core.excel.converter - INFO - 解析二级规格: 1*2 -> 1*2 +2025-05-02 19:15:43,947 - app.core.excel.converter - INFO - 箱单位处理: 数量: 5.0 -> 10.0, 单价: 62.0 -> 31.0, 单位: 箱 -> 瓶 +2025-05-02 19:15:43,947 - app.core.excel.converter - INFO - 从名称推断规格(入): 900树叶青柑普洱12入纸箱 -> 1*2 +2025-05-02 19:15:43,947 - app.core.excel.converter - INFO - 从数量提取单位: 2箱 -> 数量=2.0, 单位=箱 +2025-05-02 19:15:43,948 - app.core.excel.converter - INFO - 解析二级规格: 1*2 -> 1*2 +2025-05-02 19:15:43,948 - app.core.excel.converter - INFO - 箱单位处理: 数量: 2.0 -> 4.0, 单价: 62.0 -> 31.0, 单位: 箱 -> 瓶 +2025-05-02 19:15:43,949 - app.core.excel.converter - INFO - 从数量提取单位: 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:15:43,950 - app.core.excel.converter - INFO - 从名称推断规格(直接): 300NFC橙3*10纸箱 -> 3*10 +2025-05-02 19:15:43,950 - app.core.excel.converter - INFO - 从数量提取单位: 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:15:43,950 - app.core.excel.converter - INFO - 解析二级规格: 3*10 -> 3*10 +2025-05-02 19:15:43,950 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 10.0, 单价: 180.0 -> 18.0, 单位: 箱 -> 瓶 +2025-05-02 19:15:47,199 - app.core.excel.converter - INFO - 从数量提取单位: 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:15:47,200 - app.core.excel.converter - INFO - 从名称推断规格(L): 1.5L水12白膜 -> 1.5L*1 +2025-05-02 19:15:47,200 - app.core.excel.converter - INFO - 从数量提取单位: 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:15:47,201 - app.core.excel.converter - INFO - 解析容量规格: 1.5L*1 -> 1.5L*1 +2025-05-02 19:15:47,201 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 1.0, 单价: 28.0 -> 28.0, 单位: 箱 -> 瓶 +2025-05-02 19:15:47,202 - app.core.excel.converter - INFO - 从名称推断规格(L): 2L水8白膜 -> 2L*1 +2025-05-02 19:15:47,202 - app.core.excel.converter - INFO - 从数量提取单位: 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:15:47,202 - app.core.excel.converter - INFO - 解析容量规格: 2L*1 -> 2.0L*1 +2025-05-02 19:15:47,202 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 1.0, 单价: 23.0 -> 23.0, 单位: 箱 -> 瓶 +2025-05-02 19:15:47,202 - app.core.excel.converter - INFO - 从名称推断规格(入): 6L水4入纸箱 -> 1*4 +2025-05-02 19:15:47,202 - app.core.excel.converter - INFO - 从数量提取单位: 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:15:47,203 - app.core.excel.converter - INFO - 解析二级规格: 1*4 -> 1*4 +2025-05-02 19:15:47,203 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 4.0, 单价: 33.0 -> 8.25, 单位: 箱 -> 瓶 +2025-05-02 19:15:47,203 - app.core.excel.converter - INFO - 从名称推断规格(L): 12.9L桶装水 -> 12.9L*1 +2025-05-02 19:15:47,203 - app.core.excel.converter - INFO - 从数量提取单位: 2桶 -> 数量=2.0, 单位=桶 +2025-05-02 19:15:47,203 - app.core.excel.converter - INFO - 解析容量规格: 12.9L*1 -> 12.9L*1 +2025-05-02 19:15:47,203 - app.core.excel.converter - INFO - 其他单位处理: 保持原样 数量: 2.0, 单价: 16.0, 单位: 桶 +2025-05-02 19:15:47,204 - app.core.excel.converter - INFO - 从数量提取单位: 2箱 -> 数量=2.0, 单位=箱 +2025-05-02 19:15:47,204 - app.core.excel.converter - INFO - 从数量提取单位: 5箱 -> 数量=5.0, 单位=箱 +2025-05-02 19:42:21,807 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:42:21,808 - app.core.excel.converter - INFO - 从名称推断规格(入纸箱): 450果园30%橙子15入纸箱 -> 1*15 +2025-05-02 19:42:21,810 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 19:42:21,810 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 0 -> 0, 单位: 箱 -> 瓶 +2025-05-02 19:42:21,812 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:42:21,812 - app.core.excel.converter - INFO - 从名称推断规格(入纸箱): 450果园30%葡萄15入纸箱 -> 1*15 +2025-05-02 19:42:21,813 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 19:42:21,813 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 56.0 -> 3.7333333333333334, 单位: 箱 -> 瓶 +2025-05-02 19:42:21,814 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:42:21,814 - app.core.excel.converter - INFO - 从名称推断规格(入纸箱): 450果园30%楂苹梅15入纸箱 -> 1*15 +2025-05-02 19:42:21,815 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 19:42:21,816 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 56.0 -> 3.7333333333333334, 单位: 箱 -> 瓶 +2025-05-02 19:42:21,816 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:42:21,895 - app.core.excel.converter - INFO - 从名称推断规格(直接格式): 500-东方树叶-青柑普洱1*15-纸 +箱装-开盖活动装 -> 1*15 +2025-05-02 19:42:21,896 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 19:42:21,896 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 55.0 -> 3.6666666666666665, 单位: 箱 -> 瓶 +2025-05-02 19:42:21,897 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:42:21,898 - app.core.excel.converter - INFO - 从名称推断规格(直接格式): 500-东方树叶-乌龙茶1*15-纸箱 +装-开盖活动装 -> 1*15 +2025-05-02 19:42:21,898 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 19:42:21,898 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 0 -> 0, 单位: 箱 -> 瓶 +2025-05-02 19:42:21,899 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 5箱 -> 数量=5.0, 单位=箱 +2025-05-02 19:42:21,899 - app.core.excel.converter - INFO - 从名称推断规格(入纸箱): 900树叶茉莉花茶12入纸箱 -> 1*12 +2025-05-02 19:42:21,899 - app.core.excel.converter - INFO - 解析二级规格: 1*12 -> 1*12 +2025-05-02 19:42:21,900 - app.core.excel.converter - INFO - 箱单位处理: 数量: 5.0 -> 60.0, 单价: 62.0 -> 5.166666666666667, 单位: 箱 -> 瓶 +2025-05-02 19:42:21,900 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 2箱 -> 数量=2.0, 单位=箱 +2025-05-02 19:42:21,900 - app.core.excel.converter - INFO - 从名称推断规格(入纸箱): 900树叶青柑普洱12入纸箱 -> 1*12 +2025-05-02 19:42:21,901 - app.core.excel.converter - INFO - 解析二级规格: 1*12 -> 1*12 +2025-05-02 19:42:21,901 - app.core.excel.converter - INFO - 箱单位处理: 数量: 2.0 -> 24.0, 单价: 62.0 -> 5.166666666666667, 单位: 箱 -> 瓶 +2025-05-02 19:42:21,901 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:42:21,902 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 500茶π蜜桃乌龙15纸箱 -> 1*15 +2025-05-02 19:42:21,902 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 19:42:21,902 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 56.0 -> 3.7333333333333334, 单位: 箱 -> 瓶 +2025-05-02 19:42:21,902 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:42:26,109 - app.core.excel.converter - INFO - 从名称推断规格(直接格式): 300NFC橙3*10纸箱 -> 3*10 +2025-05-02 19:42:26,109 - app.core.excel.converter - INFO - 解析二级规格: 3*10 -> 3*10 +2025-05-02 19:42:26,109 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 10.0, 单价: 180.0 -> 18.0, 单位: 箱 -> 瓶 +2025-05-02 19:42:26,110 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:42:26,110 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 380水24纸箱 -> 1*24 +2025-05-02 19:42:26,110 - app.core.excel.converter - INFO - 解析二级规格: 1*24 -> 1*24 +2025-05-02 19:42:26,111 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 24.0, 单价: 26.0 -> 1.0833333333333333, 单位: 箱 -> 瓶 +2025-05-02 19:42:26,111 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:42:26,112 - app.core.excel.converter - INFO - 从名称推断规格(白膜): 1.5L水12白膜 -> 1*12 +2025-05-02 19:42:26,112 - app.core.excel.converter - INFO - 解析二级规格: 1*12 -> 1*12 +2025-05-02 19:42:26,112 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 12.0, 单价: 28.0 -> 2.3333333333333335, 单位: 箱 -> 瓶 +2025-05-02 19:42:26,112 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:42:26,112 - app.core.excel.converter - INFO - 从名称推断规格(白膜): 2L水8白膜 -> 1*8 +2025-05-02 19:42:26,112 - app.core.excel.converter - INFO - 解析二级规格: 1*8 -> 1*8 +2025-05-02 19:42:26,112 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 8.0, 单价: 23.0 -> 2.875, 单位: 箱 -> 瓶 +2025-05-02 19:42:26,113 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:42:26,113 - app.core.excel.converter - INFO - 从名称推断规格(入纸箱): 6L水4入纸箱 -> 1*4 +2025-05-02 19:42:26,113 - app.core.excel.converter - INFO - 解析二级规格: 1*4 -> 1*4 +2025-05-02 19:42:26,113 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 4.0, 单价: 33.0 -> 8.25, 单位: 箱 -> 瓶 +2025-05-02 19:42:26,114 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 2桶 -> 数量=2.0, 单位=桶 +2025-05-02 19:42:26,114 - app.core.excel.converter - INFO - 从名称推断规格(容量): 12.9L桶装水 -> 12.9L*1 +2025-05-02 19:42:29,206 - app.core.excel.converter - INFO - 解析容量规格: 12.9L*1 -> 12.9L*1 +2025-05-02 19:42:29,206 - app.core.excel.converter - INFO - 其他单位处理: 保持原样 数量: 2.0, 单价: 16.0, 单位: 桶 +2025-05-02 19:42:29,207 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 2箱 -> 数量=2.0, 单位=箱 +2025-05-02 19:42:29,207 - app.core.excel.converter - INFO - 从名称推断规格(白膜): 550水24白膜 -> 1*24 +2025-05-02 19:42:29,207 - app.core.excel.converter - INFO - 解析二级规格: 1*24 -> 1*24 +2025-05-02 19:42:29,208 - app.core.excel.converter - INFO - 箱单位处理: 数量: 2.0 -> 48.0, 单价: 0 -> 0, 单位: 箱 -> 瓶 +2025-05-02 19:42:29,208 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 5箱 -> 数量=5.0, 单位=箱 +2025-05-02 19:42:29,208 - app.core.excel.converter - INFO - 从名称推断规格(白膜): 550水24白膜 -> 1*24 +2025-05-02 19:42:29,208 - app.core.excel.converter - INFO - 解析二级规格: 1*24 -> 1*24 +2025-05-02 19:42:29,209 - app.core.excel.converter - INFO - 箱单位处理: 数量: 5.0 -> 120.0, 单价: 0 -> 0, 单位: 箱 -> 瓶 +2025-05-02 19:53:30,448 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:53:30,449 - app.core.excel.converter - INFO - 从名称推断规格(入纸箱): 450果园30%橙子15入纸箱 -> 1*15 +2025-05-02 19:53:30,450 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 19:53:30,450 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 0 -> 0, 单位: 箱 -> 瓶 +2025-05-02 19:53:30,451 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:53:30,451 - app.core.excel.converter - INFO - 从名称推断规格(入纸箱): 450果园30%葡萄15入纸箱 -> 1*15 +2025-05-02 19:53:30,451 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 19:53:30,451 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 56.0 -> 3.7333333333333334, 单位: 箱 -> 瓶 +2025-05-02 19:53:30,452 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:53:30,452 - app.core.excel.converter - INFO - 从名称推断规格(入纸箱): 450果园30%楂苹梅15入纸箱 -> 1*15 +2025-05-02 19:53:30,452 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 19:53:30,452 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 56.0 -> 3.7333333333333334, 单位: 箱 -> 瓶 +2025-05-02 19:53:30,452 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:53:30,525 - app.core.excel.converter - INFO - 从名称推断规格(直接格式): 500-东方树叶-青柑普洱1*15-纸 +箱装-开盖活动装 -> 1*15 +2025-05-02 19:53:30,525 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 19:53:30,526 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 55.0 -> 3.6666666666666665, 单位: 箱 -> 瓶 +2025-05-02 19:53:30,526 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:53:30,527 - app.core.excel.converter - INFO - 从名称推断规格(直接格式): 500-东方树叶-乌龙茶1*15-纸箱 +装-开盖活动装 -> 1*15 +2025-05-02 19:53:30,527 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 19:53:30,527 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 0 -> 0, 单位: 箱 -> 瓶 +2025-05-02 19:53:30,528 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 5箱 -> 数量=5.0, 单位=箱 +2025-05-02 19:53:30,528 - app.core.excel.converter - INFO - 从名称推断规格(入纸箱): 900树叶茉莉花茶12入纸箱 -> 1*12 +2025-05-02 19:53:30,529 - app.core.excel.converter - INFO - 解析二级规格: 1*12 -> 1*12 +2025-05-02 19:53:30,529 - app.core.excel.converter - INFO - 箱单位处理: 数量: 5.0 -> 60.0, 单价: 62.0 -> 5.166666666666667, 单位: 箱 -> 瓶 +2025-05-02 19:53:30,530 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 2箱 -> 数量=2.0, 单位=箱 +2025-05-02 19:53:30,530 - app.core.excel.converter - INFO - 从名称推断规格(入纸箱): 900树叶青柑普洱12入纸箱 -> 1*12 +2025-05-02 19:53:30,530 - app.core.excel.converter - INFO - 解析二级规格: 1*12 -> 1*12 +2025-05-02 19:53:30,530 - app.core.excel.converter - INFO - 箱单位处理: 数量: 2.0 -> 24.0, 单价: 62.0 -> 5.166666666666667, 单位: 箱 -> 瓶 +2025-05-02 19:53:30,531 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:53:30,531 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 500茶π蜜桃乌龙15纸箱 -> 1*15 +2025-05-02 19:53:30,531 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 19:53:30,531 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 56.0 -> 3.7333333333333334, 单位: 箱 -> 瓶 +2025-05-02 19:53:30,532 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:53:35,279 - app.core.excel.converter - INFO - 从名称推断规格(直接格式): 300NFC橙3*10纸箱 -> 3*10 +2025-05-02 19:53:35,279 - app.core.excel.converter - INFO - 特殊条码处理: 6921168593804, 数量: 1.0 -> 30.0, 单价: 180.0 -> 6.0, 单位: 箱 -> 瓶 +2025-05-02 19:53:35,280 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:53:35,280 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 380水24纸箱 -> 1*24 +2025-05-02 19:53:35,280 - app.core.excel.converter - INFO - 解析二级规格: 1*24 -> 1*24 +2025-05-02 19:53:35,281 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 24.0, 单价: 26.0 -> 1.0833333333333333, 单位: 箱 -> 瓶 +2025-05-02 19:53:35,281 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:53:35,282 - app.core.excel.converter - INFO - 从名称推断规格(白膜): 1.5L水12白膜 -> 1*12 +2025-05-02 19:53:35,282 - app.core.excel.converter - INFO - 解析二级规格: 1*12 -> 1*12 +2025-05-02 19:53:35,282 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 12.0, 单价: 28.0 -> 2.3333333333333335, 单位: 箱 -> 瓶 +2025-05-02 19:53:35,283 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:53:35,283 - app.core.excel.converter - INFO - 从名称推断规格(白膜): 2L水8白膜 -> 1*8 +2025-05-02 19:53:35,284 - app.core.excel.converter - INFO - 解析二级规格: 1*8 -> 1*8 +2025-05-02 19:53:35,284 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 8.0, 单价: 23.0 -> 2.875, 单位: 箱 -> 瓶 +2025-05-02 19:53:35,285 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 19:53:35,285 - app.core.excel.converter - INFO - 从名称推断规格(入纸箱): 6L水4入纸箱 -> 1*4 +2025-05-02 19:53:35,285 - app.core.excel.converter - INFO - 解析二级规格: 1*4 -> 1*4 +2025-05-02 19:53:35,285 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 4.0, 单价: 33.0 -> 8.25, 单位: 箱 -> 瓶 +2025-05-02 19:53:35,286 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 2桶 -> 数量=2.0, 单位=桶 +2025-05-02 19:53:35,287 - app.core.excel.converter - INFO - 从名称推断规格(容量): 12.9L桶装水 -> 12.9L*1 +2025-05-02 19:53:39,726 - app.core.excel.converter - INFO - 解析容量规格: 12.9L*1 -> 12.9L*1 +2025-05-02 19:53:39,727 - app.core.excel.converter - INFO - 其他单位处理: 保持原样 数量: 2.0, 单价: 16.0, 单位: 桶 +2025-05-02 19:53:39,728 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 2箱 -> 数量=2.0, 单位=箱 +2025-05-02 19:53:39,728 - app.core.excel.converter - INFO - 从名称推断规格(白膜): 550水24白膜 -> 1*24 +2025-05-02 19:53:39,729 - app.core.excel.converter - INFO - 解析二级规格: 1*24 -> 1*24 +2025-05-02 19:53:39,729 - app.core.excel.converter - INFO - 箱单位处理: 数量: 2.0 -> 48.0, 单价: 0 -> 0, 单位: 箱 -> 瓶 +2025-05-02 19:53:39,729 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 5箱 -> 数量=5.0, 单位=箱 +2025-05-02 19:53:39,729 - app.core.excel.converter - INFO - 从名称推断规格(白膜): 550水24白膜 -> 1*24 +2025-05-02 19:53:39,730 - app.core.excel.converter - INFO - 解析二级规格: 1*24 -> 1*24 +2025-05-02 19:53:39,730 - app.core.excel.converter - INFO - 箱单位处理: 数量: 5.0 -> 120.0, 单价: 0 -> 0, 单位: 箱 -> 瓶 diff --git a/logs/app.core.excel.merger.active b/logs/app.core.excel.merger.active index b92430b..6e265cb 100644 --- a/logs/app.core.excel.merger.active +++ b/logs/app.core.excel.merger.active @@ -1 +1 @@ -Active since: 2025-05-02 18:41:16 \ No newline at end of file +Active since: 2025-05-02 19:53:27 \ No newline at end of file diff --git a/logs/app.core.excel.merger.log b/logs/app.core.excel.merger.log index ccaa994..bb9d092 100644 --- a/logs/app.core.excel.merger.log +++ b/logs/app.core.excel.merger.log @@ -52,3 +52,37 @@ 2025-05-02 18:38:52,881 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls 2025-05-02 18:41:16,743 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger 2025-05-02 18:41:16,743 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 19:15:17,472 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 19:15:17,472 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 19:15:43,268 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 19:15:43,269 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 19:33:54,963 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 19:33:54,964 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 19:35:48,763 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 19:35:48,764 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 19:36:15,985 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 19:36:15,986 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 19:42:19,206 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 19:42:19,207 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 19:42:36,440 - app.core.excel.merger - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的采购单Excel文件 +2025-05-02 19:42:36,441 - app.core.excel.merger - INFO - 找到 1 个采购单Excel文件 +2025-05-02 19:42:36,441 - app.core.excel.merger - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的采购单Excel文件 +2025-05-02 19:42:36,442 - app.core.excel.merger - INFO - 找到 1 个采购单Excel文件 +2025-05-02 19:42:36,451 - app.core.excel.merger - INFO - 成功读取采购单文件: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502191502.xls +2025-05-02 19:42:36,455 - app.core.excel.merger - INFO - 列名映射结果: {'条码': '条码(必填)', '采购量': '采购量(必填)', '采购单价': '采购单价(必填)', '赠送量': '赠送量'} +2025-05-02 19:42:36,456 - app.core.excel.merger - INFO - 开始合并 1 个采购单文件 +2025-05-02 19:42:36,456 - app.core.excel.merger - WARNING - 数据帧 0 缺少必要的列: ['条码', '采购量', '采购单价'] +2025-05-02 19:42:36,456 - app.core.excel.merger - WARNING - 没有有效的数据帧用于合并 +2025-05-02 19:42:36,457 - app.core.excel.merger - ERROR - 合并采购单失败 +2025-05-02 19:53:27,941 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 19:53:27,941 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 19:53:47,770 - app.core.excel.merger - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的采购单Excel文件 +2025-05-02 19:53:47,771 - app.core.excel.merger - INFO - 找到 1 个采购单Excel文件 +2025-05-02 19:53:47,771 - app.core.excel.merger - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的采购单Excel文件 +2025-05-02 19:53:47,772 - app.core.excel.merger - INFO - 找到 1 个采购单Excel文件 +2025-05-02 19:53:47,780 - app.core.excel.merger - INFO - 成功读取采购单文件: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502191502.xls +2025-05-02 19:53:47,784 - app.core.excel.merger - INFO - 列名映射结果: {'条码': '条码(必填)', '采购量': '采购量(必填)', '采购单价': '采购单价(必填)', '赠送量': '赠送量'} +2025-05-02 19:53:47,784 - app.core.excel.merger - INFO - 开始合并 1 个采购单文件 +2025-05-02 19:53:47,785 - app.core.excel.merger - WARNING - 数据帧 0 缺少必要的列: ['条码', '采购量', '采购单价'] +2025-05-02 19:53:47,785 - app.core.excel.merger - WARNING - 没有有效的数据帧用于合并 +2025-05-02 19:53:47,785 - app.core.excel.merger - ERROR - 合并采购单失败 diff --git a/logs/app.core.excel.processor.active b/logs/app.core.excel.processor.active index b92430b..6e265cb 100644 --- a/logs/app.core.excel.processor.active +++ b/logs/app.core.excel.processor.active @@ -1 +1 @@ -Active since: 2025-05-02 18:41:16 \ No newline at end of file +Active since: 2025-05-02 19:53:27 \ No newline at end of file diff --git a/logs/app.core.excel.processor.log b/logs/app.core.excel.processor.log index 8d03679..3deee05 100644 --- a/logs/app.core.excel.processor.log +++ b/logs/app.core.excel.processor.log @@ -457,3 +457,384 @@ 2025-05-02 18:41:17,396 - app.core.excel.processor - INFO - 条码 6973497202360 填充:仅有赠品,采购量=0,赠品数量=1.0 2025-05-02 18:41:17,396 - app.core.excel.processor - INFO - 条码 6973497202889 填充:仅有赠品,采购量=0,赠品数量=1.0 2025-05-02 18:41:17,400 - app.core.excel.processor - INFO - 采购单已保存到: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250227193150(1).xls +2025-05-02 19:15:17,470 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 19:15:17,471 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 19:15:43,268 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 19:15:43,268 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 19:15:43,269 - app.core.excel.processor - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的Excel文件 +2025-05-02 19:15:43,269 - app.core.excel.processor - INFO - 找到最新的Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502191502.xlsx +2025-05-02 19:15:43,270 - app.core.excel.processor - INFO - 开始处理Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502191502.xlsx +2025-05-02 19:15:43,855 - app.core.excel.processor - INFO - 成功读取Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502191502.xlsx, 共 18 行 +2025-05-02 19:15:43,857 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 35 +2025-05-02 19:15:43,857 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2025-05-02 19:15:43,871 - app.core.excel.processor - INFO - 使用表头行重新读取数据,共 17 行有效数据 +2025-05-02 19:15:43,872 - app.core.excel.processor - INFO - 移除空行后,有效数据行数: 17 +2025-05-02 19:15:43,872 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 条形码 +2025-05-02 19:15:43,872 - app.core.excel.processor - INFO - 使用条码列: 条形码 +2025-05-02 19:15:43,872 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2025-05-02 19:15:43,872 - app.core.excel.processor - INFO - 找到quantity列: 订单数量 +2025-05-02 19:15:43,872 - app.core.excel.processor - INFO - 找到price列: 销售价 +2025-05-02 19:15:43,872 - app.core.excel.processor - INFO - 列名映射结果: {'barcode': '条形码', 'name': '商品名称', 'quantity': '订单数量', 'price': '销售价'} +2025-05-02 19:15:43,873 - app.core.excel.processor - INFO - 第1行: 提取商品信息 条码=6921168532001, 名称=450果园30%橙子15入纸箱, 规格=, 数量=1.0, 单位=, 单价=0 +2025-05-02 19:15:43,874 - app.core.excel.processor - INFO - 从商品名称推断规格: 450果园30%橙子15入纸箱 -> 1*5 +2025-05-02 19:15:43,874 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:15:43,875 - app.core.excel.processor - INFO - 第2行: 提取商品信息 条码=6921168594672, 名称=450果园30%葡萄15入纸箱, 规格=, 数量=1.0, 单位=, 单价=56.0 +2025-05-02 19:15:43,875 - app.core.excel.processor - INFO - 从商品名称推断规格: 450果园30%葡萄15入纸箱 -> 1*5 +2025-05-02 19:15:43,876 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:15:43,876 - app.core.excel.processor - INFO - 第3行: 提取商品信息 条码=6921168598755, 名称=450果园30%楂苹梅15入纸箱, 规格=, 数量=1.0, 单位=, 单价=56.0 +2025-05-02 19:15:43,876 - app.core.excel.processor - INFO - 从商品名称推断规格: 450果园30%楂苹梅15入纸箱 -> 1*5 +2025-05-02 19:15:43,876 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:15:43,877 - app.core.excel.processor - INFO - 第4行: 提取商品信息 条码=6921168596348, 名称=500-东方树叶-青柑普洱1*15-纸 +箱装-开盖活动装, 规格=, 数量=1.0, 单位=, 单价=55.0 +2025-05-02 19:15:43,877 - app.core.excel.processor - INFO - 从商品名称推断规格: 500-东方树叶-青柑普洱1*15-纸 +箱装-开盖活动装 -> 1*15 +2025-05-02 19:15:43,944 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:15:43,945 - app.core.excel.processor - INFO - 第5行: 提取商品信息 条码=6921168558032, 名称=500-东方树叶-乌龙茶1*15-纸箱 +装-开盖活动装, 规格=, 数量=1.0, 单位=, 单价=0 +2025-05-02 19:15:43,945 - app.core.excel.processor - INFO - 从商品名称推断规格: 500-东方树叶-乌龙茶1*15-纸箱 +装-开盖活动装 -> 1*15 +2025-05-02 19:15:43,945 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:15:43,946 - app.core.excel.processor - INFO - 第6行: 提取商品信息 条码=6921168598427, 名称=900树叶茉莉花茶12入纸箱, 规格=, 数量=5.0, 单位=, 单价=62.0 +2025-05-02 19:15:43,946 - app.core.excel.processor - INFO - 从商品名称推断规格: 900树叶茉莉花茶12入纸箱 -> 1*2 +2025-05-02 19:15:43,946 - app.core.excel.processor - INFO - 从数量提取单位: 5箱 -> 箱 +2025-05-02 19:15:43,947 - app.core.excel.processor - INFO - 第7行: 提取商品信息 条码=6921168598649, 名称=900树叶青柑普洱12入纸箱, 规格=, 数量=2.0, 单位=, 单价=62.0 +2025-05-02 19:15:43,947 - app.core.excel.processor - INFO - 从商品名称推断规格: 900树叶青柑普洱12入纸箱 -> 1*2 +2025-05-02 19:15:43,948 - app.core.excel.processor - INFO - 从数量提取单位: 2箱 -> 箱 +2025-05-02 19:15:43,948 - app.core.excel.processor - INFO - 第8行: 提取商品信息 条码=6921168593569, 名称=500茶π蜜桃乌龙15纸箱, 规格=, 数量=1.0, 单位=, 单价=56.0 +2025-05-02 19:15:43,950 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:15:43,950 - app.core.excel.processor - INFO - 第9行: 提取商品信息 条码=6921168593804, 名称=300NFC橙3*10纸箱, 规格=, 数量=1.0, 单位=, 单价=180.0 +2025-05-02 19:15:43,950 - app.core.excel.processor - INFO - 从商品名称推断规格: 300NFC橙3*10纸箱 -> 3*10 +2025-05-02 19:15:43,950 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:15:43,951 - app.core.excel.processor - INFO - 第10行: 提取商品信息 条码=6921168511280, 名称=380水24纸箱, 规格=, 数量=1.0, 单位=, 单价=26.0 +2025-05-02 19:15:47,199 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:15:47,200 - app.core.excel.processor - INFO - 第11行: 提取商品信息 条码=6921168520015, 名称=1.5L水12白膜, 规格=, 数量=1.0, 单位=, 单价=28.0 +2025-05-02 19:15:47,200 - app.core.excel.processor - INFO - 从商品名称推断规格: 1.5L水12白膜 -> 1.5L*1 +2025-05-02 19:15:47,200 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:15:47,201 - app.core.excel.processor - INFO - 第12行: 提取商品信息 条码=6921168593521, 名称=2L水8白膜, 规格=, 数量=1.0, 单位=, 单价=23.0 +2025-05-02 19:15:47,202 - app.core.excel.processor - INFO - 从商品名称推断规格: 2L水8白膜 -> 2L*1 +2025-05-02 19:15:47,202 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:15:47,202 - app.core.excel.processor - INFO - 第13行: 提取商品信息 条码=6921168598113, 名称=6L水4入纸箱, 规格=, 数量=1.0, 单位=, 单价=33.0 +2025-05-02 19:15:47,202 - app.core.excel.processor - INFO - 从商品名称推断规格: 6L水4入纸箱 -> 1*4 +2025-05-02 19:15:47,203 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:15:47,203 - app.core.excel.processor - INFO - 第14行: 提取商品信息 条码=6921168594054, 名称=12.9L桶装水, 规格=, 数量=2.0, 单位=, 单价=16.0 +2025-05-02 19:15:47,203 - app.core.excel.processor - INFO - 从商品名称推断规格: 12.9L桶装水 -> 12.9L*1 +2025-05-02 19:15:47,203 - app.core.excel.processor - INFO - 从数量提取单位: 2桶 -> 桶 +2025-05-02 19:15:47,204 - app.core.excel.processor - INFO - 第15行: 提取商品信息 条码=6921168509256, 名称=550水24白膜, 规格=, 数量=2.0, 单位=, 单价=0 +2025-05-02 19:15:47,204 - app.core.excel.processor - INFO - 从数量提取单位: 2箱 -> 箱 +2025-05-02 19:15:47,204 - app.core.excel.processor - INFO - 第16行: 提取商品信息 条码=6921168509256, 名称=550水24白膜, 规格=, 数量=5.0, 单位=, 单价=0 +2025-05-02 19:15:47,204 - app.core.excel.processor - INFO - 从数量提取单位: 5箱 -> 箱 +2025-05-02 19:15:47,204 - app.core.excel.processor - INFO - 提取到 16 个商品信息 +2025-05-02 19:15:47,211 - app.core.excel.processor - INFO - 开始处理16 个产品信息 +2025-05-02 19:15:47,211 - app.core.excel.processor - INFO - 处理商品: 条码=6921168532001, 数量=5.0, 单价=0, 是否赠品=True +2025-05-02 19:15:49,015 - app.core.excel.processor - INFO - 发现赠品:条码6921168532001, 数量=5.0 +2025-05-02 19:15:49,016 - app.core.excel.processor - INFO - 处理商品: 条码=6921168594672, 数量=5.0, 单价=11.2, 是否赠品=False +2025-05-02 19:15:49,016 - app.core.excel.processor - INFO - 发现正常商品:条码6921168594672, 数量=5.0, 单价=11.2 +2025-05-02 19:15:49,016 - app.core.excel.processor - INFO - 处理商品: 条码=6921168598755, 数量=5.0, 单价=11.2, 是否赠品=False +2025-05-02 19:15:49,016 - app.core.excel.processor - INFO - 发现正常商品:条码6921168598755, 数量=5.0, 单价=11.2 +2025-05-02 19:15:49,016 - app.core.excel.processor - INFO - 处理商品: 条码=6921168596348, 数量=15.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-02 19:15:49,017 - app.core.excel.processor - INFO - 发现正常商品:条码6921168596348, 数量=15.0, 单价=3.6666666666666665 +2025-05-02 19:15:49,017 - app.core.excel.processor - INFO - 处理商品: 条码=6921168558032, 数量=15.0, 单价=0, 是否赠品=True +2025-05-02 19:15:49,017 - app.core.excel.processor - INFO - 发现赠品:条码6921168558032, 数量=15.0 +2025-05-02 19:15:49,017 - app.core.excel.processor - INFO - 处理商品: 条码=6921168598427, 数量=10.0, 单价=31.0, 是否赠品=False +2025-05-02 19:15:49,017 - app.core.excel.processor - INFO - 发现正常商品:条码6921168598427, 数量=10.0, 单价=31.0 +2025-05-02 19:15:49,017 - app.core.excel.processor - INFO - 处理商品: 条码=6921168598649, 数量=4.0, 单价=31.0, 是否赠品=False +2025-05-02 19:15:49,017 - app.core.excel.processor - INFO - 发现正常商品:条码6921168598649, 数量=4.0, 单价=31.0 +2025-05-02 19:15:49,018 - app.core.excel.processor - INFO - 处理商品: 条码=6921168593569, 数量=1.0, 单价=56.0, 是否赠品=False +2025-05-02 19:15:49,018 - app.core.excel.processor - INFO - 发现正常商品:条码6921168593569, 数量=1.0, 单价=56.0 +2025-05-02 19:15:49,018 - app.core.excel.processor - INFO - 处理商品: 条码=6921168593804, 数量=10.0, 单价=18.0, 是否赠品=False +2025-05-02 19:15:49,018 - app.core.excel.processor - INFO - 发现正常商品:条码6921168593804, 数量=10.0, 单价=18.0 +2025-05-02 19:15:49,018 - app.core.excel.processor - INFO - 处理商品: 条码=6921168511280, 数量=1.0, 单价=26.0, 是否赠品=False +2025-05-02 19:15:49,018 - app.core.excel.processor - INFO - 发现正常商品:条码6921168511280, 数量=1.0, 单价=26.0 +2025-05-02 19:15:49,018 - app.core.excel.processor - INFO - 处理商品: 条码=6921168520015, 数量=1.0, 单价=28.0, 是否赠品=False +2025-05-02 19:15:49,019 - app.core.excel.processor - INFO - 发现正常商品:条码6921168520015, 数量=1.0, 单价=28.0 +2025-05-02 19:15:49,019 - app.core.excel.processor - INFO - 处理商品: 条码=6921168593521, 数量=1.0, 单价=23.0, 是否赠品=False +2025-05-02 19:15:49,019 - app.core.excel.processor - INFO - 发现正常商品:条码6921168593521, 数量=1.0, 单价=23.0 +2025-05-02 19:15:49,019 - app.core.excel.processor - INFO - 处理商品: 条码=6921168598113, 数量=4.0, 单价=8.25, 是否赠品=False +2025-05-02 19:15:49,019 - app.core.excel.processor - INFO - 发现正常商品:条码6921168598113, 数量=4.0, 单价=8.25 +2025-05-02 19:15:49,020 - app.core.excel.processor - INFO - 处理商品: 条码=6921168594054, 数量=2.0, 单价=16.0, 是否赠品=False +2025-05-02 19:15:49,020 - app.core.excel.processor - INFO - 发现正常商品:条码6921168594054, 数量=2.0, 单价=16.0 +2025-05-02 19:15:49,020 - app.core.excel.processor - INFO - 处理商品: 条码=6921168509256, 数量=2.0, 单价=0, 是否赠品=True +2025-05-02 19:15:49,020 - app.core.excel.processor - INFO - 发现赠品:条码6921168509256, 数量=2.0 +2025-05-02 19:15:49,020 - app.core.excel.processor - INFO - 处理商品: 条码=6921168509256, 数量=5.0, 单价=0, 是否赠品=True +2025-05-02 19:15:49,021 - app.core.excel.processor - INFO - 发现赠品:条码6921168509256, 数量=5.0 +2025-05-02 19:15:49,021 - app.core.excel.processor - INFO - 分组后共15 个不同条码的商品 +2025-05-02 19:15:49,021 - app.core.excel.processor - INFO - 条码 6921168532001 处理结果:只有赠品,数量=5.0 +2025-05-02 19:15:49,021 - app.core.excel.processor - INFO - 条码 6921168594672 处理结果:正常商品数量5.0,单价11.2,赠品数量0 +2025-05-02 19:15:49,021 - app.core.excel.processor - INFO - 条码 6921168598755 处理结果:正常商品数量5.0,单价11.2,赠品数量0 +2025-05-02 19:15:51,235 - app.core.excel.processor - INFO - 条码 6921168596348 处理结果:正常商品数量15.0,单价3.6666666666666665,赠品数量0 +2025-05-02 19:15:51,235 - app.core.excel.processor - INFO - 条码 6921168558032 处理结果:只有赠品,数量=15.0 +2025-05-02 19:15:51,235 - app.core.excel.processor - INFO - 条码 6921168598427 处理结果:正常商品数量10.0,单价31.0,赠品数量0 +2025-05-02 19:15:51,235 - app.core.excel.processor - INFO - 条码 6921168598649 处理结果:正常商品数量4.0,单价31.0,赠品数量0 +2025-05-02 19:15:51,235 - app.core.excel.processor - INFO - 条码 6921168593569 处理结果:正常商品数量1.0,单价56.0,赠品数量0 +2025-05-02 19:15:51,235 - app.core.excel.processor - INFO - 条码 6921168593804 处理结果:正常商品数量10.0,单价18.0,赠品数量0 +2025-05-02 19:15:51,235 - app.core.excel.processor - INFO - 条码 6921168511280 处理结果:正常商品数量1.0,单价26.0,赠品数量0 +2025-05-02 19:15:51,235 - app.core.excel.processor - INFO - 条码 6921168520015 处理结果:正常商品数量1.0,单价28.0,赠品数量0 +2025-05-02 19:15:51,235 - app.core.excel.processor - INFO - 条码 6921168593521 处理结果:正常商品数量1.0,单价23.0,赠品数量0 +2025-05-02 19:15:51,236 - app.core.excel.processor - INFO - 条码 6921168598113 处理结果:正常商品数量4.0,单价8.25,赠品数量0 +2025-05-02 19:15:51,236 - app.core.excel.processor - INFO - 条码 6921168594054 处理结果:正常商品数量2.0,单价16.0,赠品数量0 +2025-05-02 19:15:51,236 - app.core.excel.processor - INFO - 条码 6921168509256 处理结果:只有赠品,数量=7.0 +2025-05-02 19:15:51,236 - app.core.excel.processor - INFO - 条码 6921168532001 填充:仅有赠品,采购量=0,赠品数量=5.0 +2025-05-02 19:15:51,236 - app.core.excel.processor - INFO - 条码 6921168558032 填充:仅有赠品,采购量=0,赠品数量=15.0 +2025-05-02 19:15:51,236 - app.core.excel.processor - INFO - 条码 6921168509256 填充:仅有赠品,采购量=0,赠品数量=7.0 +2025-05-02 19:15:51,239 - app.core.excel.processor - INFO - 采购单已保存到: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502191502.xls +2025-05-02 19:15:51,441 - app.core.excel.processor - INFO - 已自动打开输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 19:33:54,963 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 19:33:54,963 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 19:33:54,966 - app.core.excel.processor - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的Excel文件 +2025-05-02 19:33:54,967 - app.core.excel.processor - WARNING - 未在 D:\My Documents\python\orc-order-v2\data\output 目录下找到未处理的Excel文件 +2025-05-02 19:35:48,762 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 19:35:48,763 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 19:35:48,766 - app.core.excel.processor - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的Excel文件 +2025-05-02 19:35:48,817 - app.core.excel.processor - WARNING - 未在 D:\My Documents\python\orc-order-v2\data\output 目录下找到未处理的Excel文件 +2025-05-02 19:36:15,984 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 19:36:15,985 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 19:36:15,988 - app.core.excel.processor - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的Excel文件 +2025-05-02 19:36:15,988 - app.core.excel.processor - WARNING - 未在 D:\My Documents\python\orc-order-v2\data\output 目录下找到未处理的Excel文件 +2025-05-02 19:42:19,205 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 19:42:19,206 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 19:42:21,167 - app.core.excel.processor - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的Excel文件 +2025-05-02 19:42:21,167 - app.core.excel.processor - INFO - 找到最新的Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502191502.xlsx +2025-05-02 19:42:21,168 - app.core.excel.processor - INFO - 开始处理Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502191502.xlsx +2025-05-02 19:42:21,792 - app.core.excel.processor - INFO - 成功读取Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502191502.xlsx, 共 18 行 +2025-05-02 19:42:21,794 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 35 +2025-05-02 19:42:21,795 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2025-05-02 19:42:21,805 - app.core.excel.processor - INFO - 使用表头行重新读取数据,共 17 行有效数据 +2025-05-02 19:42:21,806 - app.core.excel.processor - INFO - 移除空行后,有效数据行数: 17 +2025-05-02 19:42:21,806 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 条形码 +2025-05-02 19:42:21,806 - app.core.excel.processor - INFO - 使用条码列: 条形码 +2025-05-02 19:42:21,806 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2025-05-02 19:42:21,806 - app.core.excel.processor - INFO - 找到quantity列: 订单数量 +2025-05-02 19:42:21,806 - app.core.excel.processor - INFO - 找到price列: 销售价 +2025-05-02 19:42:21,806 - app.core.excel.processor - INFO - 列名映射结果: {'barcode': '条形码', 'name': '商品名称', 'quantity': '订单数量', 'price': '销售价'} +2025-05-02 19:42:21,806 - app.core.excel.processor - INFO - 是否存在规格列: False +2025-05-02 19:42:21,807 - app.core.excel.processor - INFO - 第1行: 提取商品信息 条码=6921168532001, 名称=450果园30%橙子15入纸箱, 规格=, 数量=1.0, 单位=, 单价=0 +2025-05-02 19:42:21,808 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:42:21,808 - app.core.excel.processor - INFO - 从商品名称推断规格: 450果园30%橙子15入纸箱 -> 1*15 +2025-05-02 19:42:21,811 - app.core.excel.processor - INFO - 第2行: 提取商品信息 条码=6921168594672, 名称=450果园30%葡萄15入纸箱, 规格=, 数量=1.0, 单位=, 单价=56.0 +2025-05-02 19:42:21,812 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:42:21,813 - app.core.excel.processor - INFO - 从商品名称推断规格: 450果园30%葡萄15入纸箱 -> 1*15 +2025-05-02 19:42:21,814 - app.core.excel.processor - INFO - 第3行: 提取商品信息 条码=6921168598755, 名称=450果园30%楂苹梅15入纸箱, 规格=, 数量=1.0, 单位=, 单价=56.0 +2025-05-02 19:42:21,814 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:42:21,815 - app.core.excel.processor - INFO - 从商品名称推断规格: 450果园30%楂苹梅15入纸箱 -> 1*15 +2025-05-02 19:42:21,816 - app.core.excel.processor - INFO - 第4行: 提取商品信息 条码=6921168596348, 名称=500-东方树叶-青柑普洱1*15-纸 +箱装-开盖活动装, 规格=, 数量=1.0, 单位=, 单价=55.0 +2025-05-02 19:42:21,895 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:42:21,896 - app.core.excel.processor - INFO - 从商品名称推断规格: 500-东方树叶-青柑普洱1*15-纸 +箱装-开盖活动装 -> 1*15 +2025-05-02 19:42:21,897 - app.core.excel.processor - INFO - 第5行: 提取商品信息 条码=6921168558032, 名称=500-东方树叶-乌龙茶1*15-纸箱 +装-开盖活动装, 规格=, 数量=1.0, 单位=, 单价=0 +2025-05-02 19:42:21,897 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:42:21,898 - app.core.excel.processor - INFO - 从商品名称推断规格: 500-东方树叶-乌龙茶1*15-纸箱 +装-开盖活动装 -> 1*15 +2025-05-02 19:42:21,899 - app.core.excel.processor - INFO - 第6行: 提取商品信息 条码=6921168598427, 名称=900树叶茉莉花茶12入纸箱, 规格=, 数量=5.0, 单位=, 单价=62.0 +2025-05-02 19:42:21,899 - app.core.excel.processor - INFO - 从数量提取单位: 5箱 -> 箱 +2025-05-02 19:42:21,899 - app.core.excel.processor - INFO - 从商品名称推断规格: 900树叶茉莉花茶12入纸箱 -> 1*12 +2025-05-02 19:42:21,900 - app.core.excel.processor - INFO - 第7行: 提取商品信息 条码=6921168598649, 名称=900树叶青柑普洱12入纸箱, 规格=, 数量=2.0, 单位=, 单价=62.0 +2025-05-02 19:42:21,900 - app.core.excel.processor - INFO - 从数量提取单位: 2箱 -> 箱 +2025-05-02 19:42:21,900 - app.core.excel.processor - INFO - 从商品名称推断规格: 900树叶青柑普洱12入纸箱 -> 1*12 +2025-05-02 19:42:21,901 - app.core.excel.processor - INFO - 第8行: 提取商品信息 条码=6921168593569, 名称=500茶π蜜桃乌龙15纸箱, 规格=, 数量=1.0, 单位=, 单价=56.0 +2025-05-02 19:42:21,901 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:42:21,902 - app.core.excel.processor - INFO - 从商品名称推断规格: 500茶π蜜桃乌龙15纸箱 -> 1*15 +2025-05-02 19:42:21,902 - app.core.excel.processor - INFO - 第9行: 提取商品信息 条码=6921168593804, 名称=300NFC橙3*10纸箱, 规格=, 数量=1.0, 单位=, 单价=180.0 +2025-05-02 19:42:26,108 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:42:26,109 - app.core.excel.processor - INFO - 从商品名称推断规格: 300NFC橙3*10纸箱 -> 3*10 +2025-05-02 19:42:26,110 - app.core.excel.processor - INFO - 第10行: 提取商品信息 条码=6921168511280, 名称=380水24纸箱, 规格=, 数量=1.0, 单位=, 单价=26.0 +2025-05-02 19:42:26,110 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:42:26,110 - app.core.excel.processor - INFO - 从商品名称推断规格: 380水24纸箱 -> 1*24 +2025-05-02 19:42:26,111 - app.core.excel.processor - INFO - 第11行: 提取商品信息 条码=6921168520015, 名称=1.5L水12白膜, 规格=, 数量=1.0, 单位=, 单价=28.0 +2025-05-02 19:42:26,111 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:42:26,112 - app.core.excel.processor - INFO - 从商品名称推断规格: 1.5L水12白膜 -> 1*12 +2025-05-02 19:42:26,112 - app.core.excel.processor - INFO - 第12行: 提取商品信息 条码=6921168593521, 名称=2L水8白膜, 规格=, 数量=1.0, 单位=, 单价=23.0 +2025-05-02 19:42:26,112 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:42:26,112 - app.core.excel.processor - INFO - 从商品名称推断规格: 2L水8白膜 -> 1*8 +2025-05-02 19:42:26,112 - app.core.excel.processor - INFO - 第13行: 提取商品信息 条码=6921168598113, 名称=6L水4入纸箱, 规格=, 数量=1.0, 单位=, 单价=33.0 +2025-05-02 19:42:26,113 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:42:26,113 - app.core.excel.processor - INFO - 从商品名称推断规格: 6L水4入纸箱 -> 1*4 +2025-05-02 19:42:26,113 - app.core.excel.processor - INFO - 第14行: 提取商品信息 条码=6921168594054, 名称=12.9L桶装水, 规格=, 数量=2.0, 单位=, 单价=16.0 +2025-05-02 19:42:26,114 - app.core.excel.processor - INFO - 从数量提取单位: 2桶 -> 桶 +2025-05-02 19:42:26,114 - app.core.excel.processor - INFO - 从商品名称推断规格: 12.9L桶装水 -> 12.9L*1 +2025-05-02 19:42:29,207 - app.core.excel.processor - INFO - 第15行: 提取商品信息 条码=6921168509256, 名称=550水24白膜, 规格=, 数量=2.0, 单位=, 单价=0 +2025-05-02 19:42:29,207 - app.core.excel.processor - INFO - 从数量提取单位: 2箱 -> 箱 +2025-05-02 19:42:29,207 - app.core.excel.processor - INFO - 从商品名称推断规格: 550水24白膜 -> 1*24 +2025-05-02 19:42:29,208 - app.core.excel.processor - INFO - 第16行: 提取商品信息 条码=6921168509256, 名称=550水24白膜, 规格=, 数量=5.0, 单位=, 单价=0 +2025-05-02 19:42:29,208 - app.core.excel.processor - INFO - 从数量提取单位: 5箱 -> 箱 +2025-05-02 19:42:29,208 - app.core.excel.processor - INFO - 从商品名称推断规格: 550水24白膜 -> 1*24 +2025-05-02 19:42:29,209 - app.core.excel.processor - INFO - 提取到 16 个商品信息 +2025-05-02 19:42:29,220 - app.core.excel.processor - INFO - 开始处理16 个产品信息 +2025-05-02 19:42:29,220 - app.core.excel.processor - INFO - 处理商品: 条码=6921168532001, 数量=15.0, 单价=0, 是否赠品=True +2025-05-02 19:42:29,220 - app.core.excel.processor - INFO - 发现赠品:条码6921168532001, 数量=15.0 +2025-05-02 19:42:29,220 - app.core.excel.processor - INFO - 处理商品: 条码=6921168594672, 数量=15.0, 单价=3.7333333333333334, 是否赠品=False +2025-05-02 19:42:29,221 - app.core.excel.processor - INFO - 发现正常商品:条码6921168594672, 数量=15.0, 单价=3.7333333333333334 +2025-05-02 19:42:29,221 - app.core.excel.processor - INFO - 处理商品: 条码=6921168598755, 数量=15.0, 单价=3.7333333333333334, 是否赠品=False +2025-05-02 19:42:29,221 - app.core.excel.processor - INFO - 发现正常商品:条码6921168598755, 数量=15.0, 单价=3.7333333333333334 +2025-05-02 19:42:29,221 - app.core.excel.processor - INFO - 处理商品: 条码=6921168596348, 数量=15.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-02 19:42:29,221 - app.core.excel.processor - INFO - 发现正常商品:条码6921168596348, 数量=15.0, 单价=3.6666666666666665 +2025-05-02 19:42:29,221 - app.core.excel.processor - INFO - 处理商品: 条码=6921168558032, 数量=15.0, 单价=0, 是否赠品=True +2025-05-02 19:42:29,221 - app.core.excel.processor - INFO - 发现赠品:条码6921168558032, 数量=15.0 +2025-05-02 19:42:29,221 - app.core.excel.processor - INFO - 处理商品: 条码=6921168598427, 数量=60.0, 单价=5.166666666666667, 是否赠品=False +2025-05-02 19:42:29,221 - app.core.excel.processor - INFO - 发现正常商品:条码6921168598427, 数量=60.0, 单价=5.166666666666667 +2025-05-02 19:42:29,222 - app.core.excel.processor - INFO - 处理商品: 条码=6921168598649, 数量=24.0, 单价=5.166666666666667, 是否赠品=False +2025-05-02 19:42:29,222 - app.core.excel.processor - INFO - 发现正常商品:条码6921168598649, 数量=24.0, 单价=5.166666666666667 +2025-05-02 19:42:29,222 - app.core.excel.processor - INFO - 处理商品: 条码=6921168593569, 数量=15.0, 单价=3.7333333333333334, 是否赠品=False +2025-05-02 19:42:29,222 - app.core.excel.processor - INFO - 发现正常商品:条码6921168593569, 数量=15.0, 单价=3.7333333333333334 +2025-05-02 19:42:29,222 - app.core.excel.processor - INFO - 处理商品: 条码=6921168593804, 数量=10.0, 单价=18.0, 是否赠品=False +2025-05-02 19:42:32,851 - app.core.excel.processor - INFO - 发现正常商品:条码6921168593804, 数量=10.0, 单价=18.0 +2025-05-02 19:42:32,851 - app.core.excel.processor - INFO - 处理商品: 条码=6921168511280, 数量=24.0, 单价=1.0833333333333333, 是否赠品=False +2025-05-02 19:42:32,851 - app.core.excel.processor - INFO - 发现正常商品:条码6921168511280, 数量=24.0, 单价=1.0833333333333333 +2025-05-02 19:42:32,851 - app.core.excel.processor - INFO - 处理商品: 条码=6921168520015, 数量=12.0, 单价=2.3333333333333335, 是否赠品=False +2025-05-02 19:42:32,851 - app.core.excel.processor - INFO - 发现正常商品:条码6921168520015, 数量=12.0, 单价=2.3333333333333335 +2025-05-02 19:42:32,852 - app.core.excel.processor - INFO - 处理商品: 条码=6921168593521, 数量=8.0, 单价=2.875, 是否赠品=False +2025-05-02 19:42:32,852 - app.core.excel.processor - INFO - 发现正常商品:条码6921168593521, 数量=8.0, 单价=2.875 +2025-05-02 19:42:32,852 - app.core.excel.processor - INFO - 处理商品: 条码=6921168598113, 数量=4.0, 单价=8.25, 是否赠品=False +2025-05-02 19:42:32,852 - app.core.excel.processor - INFO - 发现正常商品:条码6921168598113, 数量=4.0, 单价=8.25 +2025-05-02 19:42:32,852 - app.core.excel.processor - INFO - 处理商品: 条码=6921168594054, 数量=2.0, 单价=16.0, 是否赠品=False +2025-05-02 19:42:32,852 - app.core.excel.processor - INFO - 发现正常商品:条码6921168594054, 数量=2.0, 单价=16.0 +2025-05-02 19:42:32,852 - app.core.excel.processor - INFO - 处理商品: 条码=6921168509256, 数量=48.0, 单价=0, 是否赠品=True +2025-05-02 19:42:32,852 - app.core.excel.processor - INFO - 发现赠品:条码6921168509256, 数量=48.0 +2025-05-02 19:42:32,852 - app.core.excel.processor - INFO - 处理商品: 条码=6921168509256, 数量=120.0, 单价=0, 是否赠品=True +2025-05-02 19:42:32,852 - app.core.excel.processor - INFO - 发现赠品:条码6921168509256, 数量=120.0 +2025-05-02 19:42:32,852 - app.core.excel.processor - INFO - 分组后共15 个不同条码的商品 +2025-05-02 19:42:32,852 - app.core.excel.processor - INFO - 条码 6921168532001 处理结果:只有赠品,数量=15.0 +2025-05-02 19:42:32,852 - app.core.excel.processor - INFO - 条码 6921168594672 处理结果:正常商品数量15.0,单价3.7333333333333334,赠品数量0 +2025-05-02 19:42:32,852 - app.core.excel.processor - INFO - 条码 6921168598755 处理结果:正常商品数量15.0,单价3.7333333333333334,赠品数量0 +2025-05-02 19:42:32,852 - app.core.excel.processor - INFO - 条码 6921168596348 处理结果:正常商品数量15.0,单价3.6666666666666665,赠品数量0 +2025-05-02 19:42:32,852 - app.core.excel.processor - INFO - 条码 6921168558032 处理结果:只有赠品,数量=15.0 +2025-05-02 19:42:32,853 - app.core.excel.processor - INFO - 条码 6921168598427 处理结果:正常商品数量60.0,单价5.166666666666667,赠品数量0 +2025-05-02 19:42:32,853 - app.core.excel.processor - INFO - 条码 6921168598649 处理结果:正常商品数量24.0,单价5.166666666666667,赠品数量0 +2025-05-02 19:42:32,853 - app.core.excel.processor - INFO - 条码 6921168593569 处理结果:正常商品数量15.0,单价3.7333333333333334,赠品数量0 +2025-05-02 19:42:32,853 - app.core.excel.processor - INFO - 条码 6921168593804 处理结果:正常商品数量10.0,单价18.0,赠品数量0 +2025-05-02 19:42:32,853 - app.core.excel.processor - INFO - 条码 6921168511280 处理结果:正常商品数量24.0,单价1.0833333333333333,赠品数量0 +2025-05-02 19:42:32,853 - app.core.excel.processor - INFO - 条码 6921168520015 处理结果:正常商品数量12.0,单价2.3333333333333335,赠品数量0 +2025-05-02 19:42:32,853 - app.core.excel.processor - INFO - 条码 6921168593521 处理结果:正常商品数量8.0,单价2.875,赠品数量0 +2025-05-02 19:42:32,853 - app.core.excel.processor - INFO - 条码 6921168598113 处理结果:正常商品数量4.0,单价8.25,赠品数量0 +2025-05-02 19:42:32,853 - app.core.excel.processor - INFO - 条码 6921168594054 处理结果:正常商品数量2.0,单价16.0,赠品数量0 +2025-05-02 19:42:32,853 - app.core.excel.processor - INFO - 条码 6921168509256 处理结果:只有赠品,数量=168.0 +2025-05-02 19:42:32,853 - app.core.excel.processor - INFO - 条码 6921168532001 填充:仅有赠品,采购量=0,赠品数量=15.0 +2025-05-02 19:42:32,853 - app.core.excel.processor - INFO - 条码 6921168558032 填充:仅有赠品,采购量=0,赠品数量=15.0 +2025-05-02 19:42:36,293 - app.core.excel.processor - INFO - 条码 6921168509256 填充:仅有赠品,采购量=0,赠品数量=168.0 +2025-05-02 19:42:36,299 - app.core.excel.processor - INFO - 采购单已保存到: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502191502.xls +2025-05-02 19:42:36,439 - app.core.excel.processor - INFO - 已自动打开输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 19:53:27,940 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 19:53:27,941 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 19:53:29,683 - app.core.excel.processor - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的Excel文件 +2025-05-02 19:53:29,684 - app.core.excel.processor - INFO - 找到最新的Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502191502.xlsx +2025-05-02 19:53:29,684 - app.core.excel.processor - INFO - 开始处理Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502191502.xlsx +2025-05-02 19:53:30,430 - app.core.excel.processor - INFO - 成功读取Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502191502.xlsx, 共 18 行 +2025-05-02 19:53:30,432 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 35 +2025-05-02 19:53:30,432 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2025-05-02 19:53:30,442 - app.core.excel.processor - INFO - 使用表头行重新读取数据,共 17 行有效数据 +2025-05-02 19:53:30,443 - app.core.excel.processor - INFO - 移除空行后,有效数据行数: 17 +2025-05-02 19:53:30,444 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 条形码 +2025-05-02 19:53:30,444 - app.core.excel.processor - INFO - 使用条码列: 条形码 +2025-05-02 19:53:30,444 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2025-05-02 19:53:30,445 - app.core.excel.processor - INFO - 找到quantity列: 订单数量 +2025-05-02 19:53:30,445 - app.core.excel.processor - INFO - 找到price列: 销售价 +2025-05-02 19:53:30,445 - app.core.excel.processor - INFO - 列名映射结果: {'barcode': '条形码', 'name': '商品名称', 'quantity': '订单数量', 'price': '销售价'} +2025-05-02 19:53:30,446 - app.core.excel.processor - INFO - 是否存在规格列: False +2025-05-02 19:53:30,447 - app.core.excel.processor - INFO - 第1行: 提取商品信息 条码=6921168532001, 名称=450果园30%橙子15入纸箱, 规格=, 数量=1.0, 单位=, 单价=0 +2025-05-02 19:53:30,449 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:53:30,449 - app.core.excel.processor - INFO - 从商品名称推断规格: 450果园30%橙子15入纸箱 -> 1*15 +2025-05-02 19:53:30,450 - app.core.excel.processor - INFO - 第2行: 提取商品信息 条码=6921168594672, 名称=450果园30%葡萄15入纸箱, 规格=, 数量=1.0, 单位=, 单价=56.0 +2025-05-02 19:53:30,451 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:53:30,451 - app.core.excel.processor - INFO - 从商品名称推断规格: 450果园30%葡萄15入纸箱 -> 1*15 +2025-05-02 19:53:30,451 - app.core.excel.processor - INFO - 第3行: 提取商品信息 条码=6921168598755, 名称=450果园30%楂苹梅15入纸箱, 规格=, 数量=1.0, 单位=, 单价=56.0 +2025-05-02 19:53:30,452 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:53:30,452 - app.core.excel.processor - INFO - 从商品名称推断规格: 450果园30%楂苹梅15入纸箱 -> 1*15 +2025-05-02 19:53:30,452 - app.core.excel.processor - INFO - 第4行: 提取商品信息 条码=6921168596348, 名称=500-东方树叶-青柑普洱1*15-纸 +箱装-开盖活动装, 规格=, 数量=1.0, 单位=, 单价=55.0 +2025-05-02 19:53:30,524 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:53:30,525 - app.core.excel.processor - INFO - 从商品名称推断规格: 500-东方树叶-青柑普洱1*15-纸 +箱装-开盖活动装 -> 1*15 +2025-05-02 19:53:30,526 - app.core.excel.processor - INFO - 第5行: 提取商品信息 条码=6921168558032, 名称=500-东方树叶-乌龙茶1*15-纸箱 +装-开盖活动装, 规格=, 数量=1.0, 单位=, 单价=0 +2025-05-02 19:53:30,527 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:53:30,527 - app.core.excel.processor - INFO - 从商品名称推断规格: 500-东方树叶-乌龙茶1*15-纸箱 +装-开盖活动装 -> 1*15 +2025-05-02 19:53:30,528 - app.core.excel.processor - INFO - 第6行: 提取商品信息 条码=6921168598427, 名称=900树叶茉莉花茶12入纸箱, 规格=, 数量=5.0, 单位=, 单价=62.0 +2025-05-02 19:53:30,528 - app.core.excel.processor - INFO - 从数量提取单位: 5箱 -> 箱 +2025-05-02 19:53:30,529 - app.core.excel.processor - INFO - 从商品名称推断规格: 900树叶茉莉花茶12入纸箱 -> 1*12 +2025-05-02 19:53:30,529 - app.core.excel.processor - INFO - 第7行: 提取商品信息 条码=6921168598649, 名称=900树叶青柑普洱12入纸箱, 规格=, 数量=2.0, 单位=, 单价=62.0 +2025-05-02 19:53:30,530 - app.core.excel.processor - INFO - 从数量提取单位: 2箱 -> 箱 +2025-05-02 19:53:30,530 - app.core.excel.processor - INFO - 从商品名称推断规格: 900树叶青柑普洱12入纸箱 -> 1*12 +2025-05-02 19:53:30,531 - app.core.excel.processor - INFO - 第8行: 提取商品信息 条码=6921168593569, 名称=500茶π蜜桃乌龙15纸箱, 规格=, 数量=1.0, 单位=, 单价=56.0 +2025-05-02 19:53:30,531 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:53:30,531 - app.core.excel.processor - INFO - 从商品名称推断规格: 500茶π蜜桃乌龙15纸箱 -> 1*15 +2025-05-02 19:53:30,532 - app.core.excel.processor - INFO - 第9行: 提取商品信息 条码=6921168593804, 名称=300NFC橙3*10纸箱, 规格=, 数量=1.0, 单位=, 单价=180.0 +2025-05-02 19:53:35,279 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:53:35,279 - app.core.excel.processor - INFO - 从商品名称推断规格: 300NFC橙3*10纸箱 -> 3*10 +2025-05-02 19:53:35,280 - app.core.excel.processor - INFO - 第10行: 提取商品信息 条码=6921168511280, 名称=380水24纸箱, 规格=, 数量=1.0, 单位=, 单价=26.0 +2025-05-02 19:53:35,280 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:53:35,280 - app.core.excel.processor - INFO - 从商品名称推断规格: 380水24纸箱 -> 1*24 +2025-05-02 19:53:35,281 - app.core.excel.processor - INFO - 第11行: 提取商品信息 条码=6921168520015, 名称=1.5L水12白膜, 规格=, 数量=1.0, 单位=, 单价=28.0 +2025-05-02 19:53:35,282 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:53:35,282 - app.core.excel.processor - INFO - 从商品名称推断规格: 1.5L水12白膜 -> 1*12 +2025-05-02 19:53:35,283 - app.core.excel.processor - INFO - 第12行: 提取商品信息 条码=6921168593521, 名称=2L水8白膜, 规格=, 数量=1.0, 单位=, 单价=23.0 +2025-05-02 19:53:35,283 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:53:35,284 - app.core.excel.processor - INFO - 从商品名称推断规格: 2L水8白膜 -> 1*8 +2025-05-02 19:53:35,284 - app.core.excel.processor - INFO - 第13行: 提取商品信息 条码=6921168598113, 名称=6L水4入纸箱, 规格=, 数量=1.0, 单位=, 单价=33.0 +2025-05-02 19:53:35,285 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 19:53:35,285 - app.core.excel.processor - INFO - 从商品名称推断规格: 6L水4入纸箱 -> 1*4 +2025-05-02 19:53:35,286 - app.core.excel.processor - INFO - 第14行: 提取商品信息 条码=6921168594054, 名称=12.9L桶装水, 规格=, 数量=2.0, 单位=, 单价=16.0 +2025-05-02 19:53:35,286 - app.core.excel.processor - INFO - 从数量提取单位: 2桶 -> 桶 +2025-05-02 19:53:35,287 - app.core.excel.processor - INFO - 从商品名称推断规格: 12.9L桶装水 -> 12.9L*1 +2025-05-02 19:53:39,728 - app.core.excel.processor - INFO - 第15行: 提取商品信息 条码=6921168509256, 名称=550水24白膜, 规格=, 数量=2.0, 单位=, 单价=0 +2025-05-02 19:53:39,728 - app.core.excel.processor - INFO - 从数量提取单位: 2箱 -> 箱 +2025-05-02 19:53:39,729 - app.core.excel.processor - INFO - 从商品名称推断规格: 550水24白膜 -> 1*24 +2025-05-02 19:53:39,729 - app.core.excel.processor - INFO - 第16行: 提取商品信息 条码=6921168509256, 名称=550水24白膜, 规格=, 数量=5.0, 单位=, 单价=0 +2025-05-02 19:53:39,729 - app.core.excel.processor - INFO - 从数量提取单位: 5箱 -> 箱 +2025-05-02 19:53:39,729 - app.core.excel.processor - INFO - 从商品名称推断规格: 550水24白膜 -> 1*24 +2025-05-02 19:53:39,730 - app.core.excel.processor - INFO - 提取到 16 个商品信息 +2025-05-02 19:53:39,736 - app.core.excel.processor - INFO - 开始处理16 个产品信息 +2025-05-02 19:53:39,736 - app.core.excel.processor - INFO - 处理商品: 条码=6921168532001, 数量=15.0, 单价=0, 是否赠品=True +2025-05-02 19:53:39,736 - app.core.excel.processor - INFO - 发现赠品:条码6921168532001, 数量=15.0 +2025-05-02 19:53:39,736 - app.core.excel.processor - INFO - 处理商品: 条码=6921168594672, 数量=15.0, 单价=3.7333333333333334, 是否赠品=False +2025-05-02 19:53:39,736 - app.core.excel.processor - INFO - 发现正常商品:条码6921168594672, 数量=15.0, 单价=3.7333333333333334 +2025-05-02 19:53:39,736 - app.core.excel.processor - INFO - 处理商品: 条码=6921168598755, 数量=15.0, 单价=3.7333333333333334, 是否赠品=False +2025-05-02 19:53:39,736 - app.core.excel.processor - INFO - 发现正常商品:条码6921168598755, 数量=15.0, 单价=3.7333333333333334 +2025-05-02 19:53:39,736 - app.core.excel.processor - INFO - 处理商品: 条码=6921168596348, 数量=15.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-02 19:53:39,736 - app.core.excel.processor - INFO - 发现正常商品:条码6921168596348, 数量=15.0, 单价=3.6666666666666665 +2025-05-02 19:53:39,736 - app.core.excel.processor - INFO - 处理商品: 条码=6921168558032, 数量=15.0, 单价=0, 是否赠品=True +2025-05-02 19:53:39,737 - app.core.excel.processor - INFO - 发现赠品:条码6921168558032, 数量=15.0 +2025-05-02 19:53:39,737 - app.core.excel.processor - INFO - 处理商品: 条码=6921168598427, 数量=60.0, 单价=5.166666666666667, 是否赠品=False +2025-05-02 19:53:39,737 - app.core.excel.processor - INFO - 发现正常商品:条码6921168598427, 数量=60.0, 单价=5.166666666666667 +2025-05-02 19:53:39,737 - app.core.excel.processor - INFO - 处理商品: 条码=6921168598649, 数量=24.0, 单价=5.166666666666667, 是否赠品=False +2025-05-02 19:53:39,737 - app.core.excel.processor - INFO - 发现正常商品:条码6921168598649, 数量=24.0, 单价=5.166666666666667 +2025-05-02 19:53:39,737 - app.core.excel.processor - INFO - 处理商品: 条码=6921168593569, 数量=15.0, 单价=3.7333333333333334, 是否赠品=False +2025-05-02 19:53:39,737 - app.core.excel.processor - INFO - 发现正常商品:条码6921168593569, 数量=15.0, 单价=3.7333333333333334 +2025-05-02 19:53:39,737 - app.core.excel.processor - INFO - 处理商品: 条码=6921168593804, 数量=30.0, 单价=6.0, 是否赠品=False +2025-05-02 19:53:44,260 - app.core.excel.processor - INFO - 发现正常商品:条码6921168593804, 数量=30.0, 单价=6.0 +2025-05-02 19:53:44,260 - app.core.excel.processor - INFO - 处理商品: 条码=6921168511280, 数量=24.0, 单价=1.0833333333333333, 是否赠品=False +2025-05-02 19:53:44,260 - app.core.excel.processor - INFO - 发现正常商品:条码6921168511280, 数量=24.0, 单价=1.0833333333333333 +2025-05-02 19:53:44,260 - app.core.excel.processor - INFO - 处理商品: 条码=6921168520015, 数量=12.0, 单价=2.3333333333333335, 是否赠品=False +2025-05-02 19:53:44,260 - app.core.excel.processor - INFO - 发现正常商品:条码6921168520015, 数量=12.0, 单价=2.3333333333333335 +2025-05-02 19:53:44,260 - app.core.excel.processor - INFO - 处理商品: 条码=6921168593521, 数量=8.0, 单价=2.875, 是否赠品=False +2025-05-02 19:53:44,261 - app.core.excel.processor - INFO - 发现正常商品:条码6921168593521, 数量=8.0, 单价=2.875 +2025-05-02 19:53:44,261 - app.core.excel.processor - INFO - 处理商品: 条码=6921168598113, 数量=4.0, 单价=8.25, 是否赠品=False +2025-05-02 19:53:44,261 - app.core.excel.processor - INFO - 发现正常商品:条码6921168598113, 数量=4.0, 单价=8.25 +2025-05-02 19:53:44,261 - app.core.excel.processor - INFO - 处理商品: 条码=6921168594054, 数量=2.0, 单价=16.0, 是否赠品=False +2025-05-02 19:53:44,261 - app.core.excel.processor - INFO - 发现正常商品:条码6921168594054, 数量=2.0, 单价=16.0 +2025-05-02 19:53:44,261 - app.core.excel.processor - INFO - 处理商品: 条码=6921168509256, 数量=48.0, 单价=0, 是否赠品=True +2025-05-02 19:53:44,261 - app.core.excel.processor - INFO - 发现赠品:条码6921168509256, 数量=48.0 +2025-05-02 19:53:44,261 - app.core.excel.processor - INFO - 处理商品: 条码=6921168509256, 数量=120.0, 单价=0, 是否赠品=True +2025-05-02 19:53:44,261 - app.core.excel.processor - INFO - 发现赠品:条码6921168509256, 数量=120.0 +2025-05-02 19:53:44,261 - app.core.excel.processor - INFO - 分组后共15 个不同条码的商品 +2025-05-02 19:53:44,262 - app.core.excel.processor - INFO - 条码 6921168532001 处理结果:只有赠品,数量=15.0 +2025-05-02 19:53:44,262 - app.core.excel.processor - INFO - 条码 6921168594672 处理结果:正常商品数量15.0,单价3.7333333333333334,赠品数量0 +2025-05-02 19:53:44,262 - app.core.excel.processor - INFO - 条码 6921168598755 处理结果:正常商品数量15.0,单价3.7333333333333334,赠品数量0 +2025-05-02 19:53:44,262 - app.core.excel.processor - INFO - 条码 6921168596348 处理结果:正常商品数量15.0,单价3.6666666666666665,赠品数量0 +2025-05-02 19:53:44,262 - app.core.excel.processor - INFO - 条码 6921168558032 处理结果:只有赠品,数量=15.0 +2025-05-02 19:53:44,262 - app.core.excel.processor - INFO - 条码 6921168598427 处理结果:正常商品数量60.0,单价5.166666666666667,赠品数量0 +2025-05-02 19:53:44,262 - app.core.excel.processor - INFO - 条码 6921168598649 处理结果:正常商品数量24.0,单价5.166666666666667,赠品数量0 +2025-05-02 19:53:44,262 - app.core.excel.processor - INFO - 条码 6921168593569 处理结果:正常商品数量15.0,单价3.7333333333333334,赠品数量0 +2025-05-02 19:53:44,262 - app.core.excel.processor - INFO - 条码 6921168593804 处理结果:正常商品数量30.0,单价6.0,赠品数量0 +2025-05-02 19:53:44,262 - app.core.excel.processor - INFO - 条码 6921168511280 处理结果:正常商品数量24.0,单价1.0833333333333333,赠品数量0 +2025-05-02 19:53:44,262 - app.core.excel.processor - INFO - 条码 6921168520015 处理结果:正常商品数量12.0,单价2.3333333333333335,赠品数量0 +2025-05-02 19:53:44,262 - app.core.excel.processor - INFO - 条码 6921168593521 处理结果:正常商品数量8.0,单价2.875,赠品数量0 +2025-05-02 19:53:44,262 - app.core.excel.processor - INFO - 条码 6921168598113 处理结果:正常商品数量4.0,单价8.25,赠品数量0 +2025-05-02 19:53:44,262 - app.core.excel.processor - INFO - 条码 6921168594054 处理结果:正常商品数量2.0,单价16.0,赠品数量0 +2025-05-02 19:53:44,263 - app.core.excel.processor - INFO - 条码 6921168509256 处理结果:只有赠品,数量=168.0 +2025-05-02 19:53:44,263 - app.core.excel.processor - INFO - 条码 6921168532001 填充:仅有赠品,采购量=0,赠品数量=15.0 +2025-05-02 19:53:44,263 - app.core.excel.processor - INFO - 条码 6921168558032 填充:仅有赠品,采购量=0,赠品数量=15.0 +2025-05-02 19:53:47,621 - app.core.excel.processor - INFO - 条码 6921168509256 填充:仅有赠品,采购量=0,赠品数量=168.0 +2025-05-02 19:53:47,624 - app.core.excel.processor - INFO - 采购单已保存到: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502191502.xls +2025-05-02 19:53:47,769 - app.core.excel.processor - INFO - 已自动打开输出目录: D:\My Documents\python\orc-order-v2\data\output diff --git a/logs/app.core.ocr.baidu_ocr.active b/logs/app.core.ocr.baidu_ocr.active index b92430b..6e265cb 100644 --- a/logs/app.core.ocr.baidu_ocr.active +++ b/logs/app.core.ocr.baidu_ocr.active @@ -1 +1 @@ -Active since: 2025-05-02 18:41:16 \ No newline at end of file +Active since: 2025-05-02 19:53:27 \ No newline at end of file diff --git a/logs/app.core.ocr.baidu_ocr.log b/logs/app.core.ocr.baidu_ocr.log index f2a1e55..da0e3fe 100644 --- a/logs/app.core.ocr.baidu_ocr.log +++ b/logs/app.core.ocr.baidu_ocr.log @@ -4,3 +4,6 @@ 2025-05-02 16:34:26,260 - app.core.ocr.baidu_ocr - INFO - 成功获取访问令牌 2025-05-02 16:55:26,799 - app.core.ocr.baidu_ocr - INFO - 成功获取访问令牌 2025-05-02 17:08:58,897 - app.core.ocr.baidu_ocr - INFO - 成功获取访问令牌 +2025-05-02 19:15:17,843 - app.core.ocr.baidu_ocr - INFO - 成功获取访问令牌 +2025-05-02 19:42:19,449 - app.core.ocr.baidu_ocr - INFO - 成功获取访问令牌 +2025-05-02 19:53:28,299 - app.core.ocr.baidu_ocr - INFO - 成功获取访问令牌 diff --git a/logs/app.core.ocr.table_ocr.active b/logs/app.core.ocr.table_ocr.active index b92430b..6e265cb 100644 --- a/logs/app.core.ocr.table_ocr.active +++ b/logs/app.core.ocr.table_ocr.active @@ -1 +1 @@ -Active since: 2025-05-02 18:41:16 \ No newline at end of file +Active since: 2025-05-02 19:53:27 \ No newline at end of file diff --git a/logs/app.core.ocr.table_ocr.log b/logs/app.core.ocr.table_ocr.log index 034d6ad..9c914f8 100644 --- a/logs/app.core.ocr.table_ocr.log +++ b/logs/app.core.ocr.table_ocr.log @@ -103,3 +103,55 @@ 2025-05-02 18:41:16,740 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output 2025-05-02 18:41:16,740 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp 2025-05-02 18:41:16,741 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 19:15:17,469 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 19:15:17,470 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 19:15:17,470 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 19:15:17,470 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 19:15:17,473 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 1 个未处理 +2025-05-02 19:15:17,473 - app.core.ocr.table_ocr - INFO - 处理批次 1/1, 大小: 1 +2025-05-02 19:15:17,475 - app.core.ocr.table_ocr - INFO - 开始处理图片: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502191502.jpg +2025-05-02 19:15:19,390 - app.core.ocr.table_ocr - INFO - 图片处理成功: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502191502.jpg, 输出文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502191502.xlsx +2025-05-02 19:15:19,393 - app.core.ocr.table_ocr - INFO - 批次处理完成, 成功: 1/1 +2025-05-02 19:15:19,393 - app.core.ocr.table_ocr - INFO - 所有图片处理完成, 总计: 1, 成功: 1 +2025-05-02 19:15:43,267 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 19:15:43,267 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 19:15:43,267 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 19:15:43,268 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 19:33:54,960 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 19:33:54,961 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 19:33:54,961 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 19:33:54,962 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 19:33:54,965 - app.core.ocr.table_ocr - INFO - 找到 0 个图片文件,其中 0 个未处理 +2025-05-02 19:33:54,965 - app.core.ocr.table_ocr - WARNING - 没有需要处理的图片 +2025-05-02 19:35:48,760 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 19:35:48,761 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 19:35:48,761 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 19:35:48,761 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 19:35:48,765 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 0 个未处理 +2025-05-02 19:35:48,765 - app.core.ocr.table_ocr - WARNING - 没有需要处理的图片 +2025-05-02 19:36:15,983 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 19:36:15,983 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 19:36:15,983 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 19:36:15,984 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 19:36:15,987 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 0 个未处理 +2025-05-02 19:36:15,987 - app.core.ocr.table_ocr - WARNING - 没有需要处理的图片 +2025-05-02 19:42:19,204 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 19:42:19,204 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 19:42:19,204 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 19:42:19,205 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 19:42:19,208 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 1 个未处理 +2025-05-02 19:42:19,209 - app.core.ocr.table_ocr - INFO - 处理批次 1/1, 大小: 1 +2025-05-02 19:42:19,210 - app.core.ocr.table_ocr - INFO - 开始处理图片: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502191502.jpg +2025-05-02 19:42:21,164 - app.core.ocr.table_ocr - INFO - 图片处理成功: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502191502.jpg, 输出文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502191502.xlsx +2025-05-02 19:42:21,166 - app.core.ocr.table_ocr - INFO - 批次处理完成, 成功: 1/1 +2025-05-02 19:42:21,166 - app.core.ocr.table_ocr - INFO - 所有图片处理完成, 总计: 1, 成功: 1 +2025-05-02 19:53:27,939 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 19:53:27,940 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 19:53:27,940 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 19:53:27,940 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 19:53:27,942 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 1 个未处理 +2025-05-02 19:53:27,942 - app.core.ocr.table_ocr - INFO - 处理批次 1/1, 大小: 1 +2025-05-02 19:53:27,944 - app.core.ocr.table_ocr - INFO - 开始处理图片: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502191502.jpg +2025-05-02 19:53:29,681 - app.core.ocr.table_ocr - INFO - 图片处理成功: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502191502.jpg, 输出文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502191502.xlsx +2025-05-02 19:53:29,683 - app.core.ocr.table_ocr - INFO - 批次处理完成, 成功: 1/1 +2025-05-02 19:53:29,683 - app.core.ocr.table_ocr - INFO - 所有图片处理完成, 总计: 1, 成功: 1 diff --git a/logs/app.core.utils.file_utils.active b/logs/app.core.utils.file_utils.active index 21fec46..6e265cb 100644 --- a/logs/app.core.utils.file_utils.active +++ b/logs/app.core.utils.file_utils.active @@ -1 +1 @@ -Active since: 2025-05-02 18:41:15 \ No newline at end of file +Active since: 2025-05-02 19:53:27 \ No newline at end of file diff --git a/logs/app.core.utils.file_utils.log b/logs/app.core.utils.file_utils.log index 42fd2aa..09024ed 100644 --- a/logs/app.core.utils.file_utils.log +++ b/logs/app.core.utils.file_utils.log @@ -1,3 +1,6 @@ 2025-05-02 16:34:28,699 - app.core.utils.file_utils - ERROR - 创建目录失败: , 错误: [WinError 3] 系统找不到指定的路径。: '' 2025-05-02 16:55:29,252 - app.core.utils.file_utils - ERROR - 创建目录失败: , 错误: [WinError 3] 系统找不到指定的路径。: '' 2025-05-02 17:09:01,344 - app.core.utils.file_utils - ERROR - 创建目录失败: , 错误: [WinError 3] 系统找不到指定的路径。: '' +2025-05-02 19:33:54,966 - app.core.utils.file_utils - WARNING - 未在目录 D:\My Documents\python\orc-order-v2\data\output 中找到符合条件的文件 +2025-05-02 19:35:48,767 - app.core.utils.file_utils - WARNING - 未在目录 D:\My Documents\python\orc-order-v2\data\output 中找到符合条件的文件 +2025-05-02 19:36:15,988 - app.core.utils.file_utils - WARNING - 未在目录 D:\My Documents\python\orc-order-v2\data\output 中找到符合条件的文件 diff --git a/logs/app.services.ocr_service.active b/logs/app.services.ocr_service.active index b92430b..6e265cb 100644 --- a/logs/app.services.ocr_service.active +++ b/logs/app.services.ocr_service.active @@ -1 +1 @@ -Active since: 2025-05-02 18:41:16 \ No newline at end of file +Active since: 2025-05-02 19:53:27 \ No newline at end of file diff --git a/logs/app.services.ocr_service.log b/logs/app.services.ocr_service.log index 3fc133b..593c691 100644 --- a/logs/app.services.ocr_service.log +++ b/logs/app.services.ocr_service.log @@ -51,3 +51,23 @@ 2025-05-02 18:38:52,879 - app.services.ocr_service - INFO - OCRService初始化完成 2025-05-02 18:41:16,739 - app.services.ocr_service - INFO - 初始化OCRService 2025-05-02 18:41:16,741 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 19:15:17,468 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 19:15:17,470 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 19:15:17,472 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-02 19:15:43,266 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 19:15:43,268 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 19:33:54,958 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 19:33:54,962 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 19:33:54,964 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-02 19:35:48,758 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 19:35:48,762 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 19:35:48,764 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-02 19:36:15,981 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 19:36:15,984 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 19:36:15,987 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-02 19:42:19,203 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 19:42:19,205 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 19:42:19,208 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-02 19:53:27,938 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 19:53:27,940 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 19:53:27,942 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None diff --git a/logs/app.services.order_service.active b/logs/app.services.order_service.active index b92430b..6e265cb 100644 --- a/logs/app.services.order_service.active +++ b/logs/app.services.order_service.active @@ -1 +1 @@ -Active since: 2025-05-02 18:41:16 \ No newline at end of file +Active since: 2025-05-02 19:53:27 \ No newline at end of file diff --git a/logs/app.services.order_service.log b/logs/app.services.order_service.log index 14d8c9d..1e2008d 100644 --- a/logs/app.services.order_service.log +++ b/logs/app.services.order_service.log @@ -59,3 +59,22 @@ 2025-05-02 18:41:16,741 - app.services.order_service - INFO - 初始化OrderService 2025-05-02 18:41:16,743 - app.services.order_service - INFO - OrderService初始化完成 2025-05-02 18:41:16,744 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250227193150(1).xlsx +2025-05-02 19:15:17,470 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 19:15:17,472 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 19:15:43,268 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 19:15:43,269 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 19:15:43,270 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502191502.xlsx +2025-05-02 19:33:54,962 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 19:33:54,964 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 19:35:48,762 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 19:35:48,764 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 19:36:15,984 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 19:36:15,986 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 19:42:19,205 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 19:42:19,207 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 19:42:21,167 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502191502.xlsx +2025-05-02 19:42:36,441 - app.services.order_service - INFO - OrderService开始合并所有采购单 +2025-05-02 19:53:27,940 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 19:53:27,942 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 19:53:29,684 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502191502.xlsx +2025-05-02 19:53:47,771 - app.services.order_service - INFO - OrderService开始合并所有采购单 diff --git a/启动器.py b/启动器.py index 84afc4a..50d0b22 100644 --- a/启动器.py +++ b/启动器.py @@ -428,6 +428,35 @@ def clean_data_files(log_widget): add_to_log(log_widget, f"清理完成,共删除 {files_deleted} 个文件\n") messagebox.showinfo("清理完成", f"共删除 {files_deleted} 个文件") +def clean_cache(log_widget): + """清除缓存,重置处理记录""" + add_to_log(log_widget, "开始清除缓存...\n") + + cache_files = [ + "data/processed_files.json", # OCR处理记录 + "data/output/processed_files.json" # Excel处理记录 + ] + + for cache_file in cache_files: + try: + if os.path.exists(cache_file): + # 创建备份 + backup_file = f"{cache_file}.bak" + shutil.copy2(cache_file, backup_file) + + # 清空或删除缓存文件 + with open(cache_file, 'w') as f: + f.write('{}') # 写入空的JSON对象 + + add_to_log(log_widget, f"已清除缓存文件: {cache_file},并创建备份: {backup_file}\n") + else: + add_to_log(log_widget, f"缓存文件不存在: {cache_file}\n") + except Exception as e: + add_to_log(log_widget, f"清除缓存文件时出错: {cache_file}, 错误: {e}\n") + + add_to_log(log_widget, "缓存清除完成,系统将重新处理所有文件\n") + messagebox.showinfo("缓存清除", "缓存已清除,系统将重新处理所有文件。") + def main(): """主函数""" # 确保必要的目录结构存在并转移旧目录内容 @@ -435,8 +464,8 @@ def main(): # 创建窗口 root = tk.Tk() - root.title("OCR订单处理系统 v1.0") - root.geometry("1200x600") # 增加窗口宽度以容纳日志 + root.title("益选-OCR订单处理系统 v1.0") + root.geometry("1200x800") # 增加窗口宽度以容纳日志 # 创建主区域分割 main_pane = tk.PanedWindow(root, orient=tk.HORIZONTAL) @@ -447,7 +476,7 @@ def main(): main_pane.add(left_frame) # 标题 - tk.Label(left_frame, text="OCR订单处理系统", font=("Arial", 16)).pack(pady=10) + tk.Label(left_frame, text="益选-OCR订单处理系统", font=("Arial", 16)).pack(pady=10) # 功能按钮区域 buttons_frame = tk.Frame(left_frame) @@ -466,7 +495,7 @@ def main(): log_text.configure(state=tk.DISABLED) # 设置为只读 # 日志初始内容 - add_to_log(log_text, "OCR订单处理系统启动器 v1.0\n") + add_to_log(log_text, "益选-OCR订单处理系统启动器 v1.0\n") add_to_log(log_text, f"当前工作目录: {os.getcwd()}\n") add_to_log(log_text, "系统已准备就绪,请选择要执行的操作。\n") @@ -515,6 +544,15 @@ def main(): command=lambda: run_command_with_logging(["python", "run.py", "pipeline"], log_text) ).pack(pady=5) + # 清除缓存按钮 + tk.Button( + buttons_frame, + text="清除处理缓存", + width=20, + height=2, + command=lambda: clean_cache(log_text) + ).pack(pady=5) + # 整理文件按钮 tk.Button( buttons_frame, @@ -558,7 +596,7 @@ def main(): ).pack(pady=5) # 底部说明 - tk.Label(left_frame, text="© 2025 OCR订单处理系统 v1.0", font=("Arial", 10)).pack(side=tk.BOTTOM, pady=10) + tk.Label(left_frame, text="© 2025 益选-OCR订单处理系统 v1.0", font=("Arial", 10)).pack(side=tk.BOTTOM, pady=10) # 启动主循环 root.mainloop()