From c3a0e29b19bf9ba78410d0cf77e9c10f0a234177 Mon Sep 17 00:00:00 2001 From: houhuan Date: Sat, 10 May 2025 14:28:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../__pycache__/processor.cpython-39.pyc | Bin 21883 -> 22371 bytes app/core/excel/processor.py | 12 +- logs/__main__.active | 2 +- logs/app.core.excel.converter.active | 2 +- logs/app.core.excel.converter.log | 31 +++ ....core.excel.handlers.barcode_mapper.active | 2 +- ...el.handlers.unit_converter_handlers.active | 2 +- ...excel.handlers.unit_converter_handlers.log | 26 ++ logs/app.core.excel.merger.active | 2 +- logs/app.core.excel.merger.log | 10 + logs/app.core.excel.processor.active | 2 +- logs/app.core.excel.processor.log | 226 ++++++++++++++++++ logs/app.core.excel.validators.active | 2 +- logs/app.core.excel.validators.log | 3 + logs/app.core.ocr.baidu_ocr.active | 2 +- logs/app.core.ocr.baidu_ocr.log | 2 + logs/app.core.ocr.table_ocr.active | 2 +- logs/app.core.ocr.table_ocr.log | 20 ++ logs/app.core.utils.file_utils.active | 2 +- logs/app.services.ocr_service.active | 2 +- logs/app.services.ocr_service.log | 8 + logs/app.services.order_service.active | 2 +- logs/app.services.order_service.log | 15 ++ logs/app.services.tobacco_service.active | 2 +- 24 files changed, 365 insertions(+), 14 deletions(-) diff --git a/app/core/excel/__pycache__/processor.cpython-39.pyc b/app/core/excel/__pycache__/processor.cpython-39.pyc index a778a34c30322fd89f18673e0460b9d359965e67..973959450a47aa52a249c272925cc169e32affbd 100644 GIT binary patch delta 3607 zcmbtVeQZQu_!89uM1o|wr5z)*e4mmfi8+$eohMnsnkQ3qTPfmxDM_g*u~i%dPu48?+!(`j zQjb{%X}EwbW2Y9~;m@Hvd_SG(N>*?e5R~(BTA9Km4)b!ej5{al2AW*SN7l`%6ECA4 zY2lTL-kGsIo1i7)>@M>CLL6lqmR@B)KWHnpd1t z=(G!3o)Bd_bS*)aElW=<)Mu(b=R%;nyRRI7yzn^NF0jgEGy-V)k!~`&FbQY`?|RB zzlgDy@(kP!ZzcB8&aO#$4$6sZpEDWP?&DkpoX}irGBQACO{u&ASv_G$GI%z#IYJ9P) zEbC(&5`qUx&DEkr6ntjkJ(-@>M{g0utRYHzagywg($DVL(>(s^Q5{OUA8N< z(yV!|W@P1OWlI-PBKRf1hvo5PIakLB6mF%JJy$m=;Z=qAr$0`dMVk@ZA7{(N^@UY^ z_pQ5%eK6;7la3W9N!Pt=8 zWQ)*jC&1rO_&Pv(v8ZkeWm=*`2l`_}iO!bj({UsI%rNT=YbhNJZjYb(=xW{)v&SdI zJI}udB3lCnVYR3kF{5Z(f53=;>;O&CIg*MQ$-(4k*v9sQf*GhKk+c?Ri7*0-^+j9C z7)*v8l7jj6qSY{3*@xL+f1EL~xqcQ&h;;o|b&Ep$s(vF$iWv>->(ahCy>wo03qZK7 zcP=i%X}!0tdv0$#OBF^M231loe%BZxyTrd6XSj=6%ot_e7^6othBi1=7B6av)NU~n z3WyV-?(!J!MG)G=-Oxpyp_mdc&pbhfMBS`V$L~R*l-o2H@yh=`VpAie2C#-S0(KLd z=G1J&MjD7$brKh`*;G;|j9KkoH9$N>Cr(lan^kH+T$%L}$rd`B4EtO>GfM!Z`~bIK zKXNyF^!Ayfx5c4l4Rt%QiA71{VIZyj=woIS=ikWl6p0 zT@)l~ad6QniHg52>a??cz#$eazTw@CWM=`efcsfYI64N25F;Ia-#eh);p&eM4fXX8 z#bXA0TAc0ZQFXO&w_}$^-W6TT&yu|O!}86wN2Do>$7o;t8Sr2|Nc&@i^I~JPvGy{G z^AMIIU~9ro){gRZaVqL3S#dGClJperM288vA+~icATJh9bRJc`Z=lf?gaX3bV#cbc z;F#%ETWa4##W+C94e-$q-u%J8-k;?(NHemR&) z)XGB3xk!knCpLBML1hy{8^U~q*AaFhtV56!hXo6}tkgGxyu-aa#`+J?cwhg4p#*zL z{N#z|P#nz%5M)5S$)CBgW3YU+;9YZ1tA7r6G6>ZO&m(jpmG`iPK-{tC#i+(Iw=Vt&!OJvpZr$!jIE`C0bhAgWs}%2aKlKQ9J`w4; z`{WB)yKf*&9^V>_R@9wBH~~;}3=A4HHZ&CWSab0++&PEv3c|M#UPVZW!SxG+XHa~g zB}n$$!VlN~TI=~VDmK~*jTgq6&eAG6siNVPD_U6kk+%-qiGu%b>18RE4baU4< z$$91!>O7>dQ#+M|J*F2q%S~OD2fVy8o*Uxbmi`#ijWHq4ZSaTpj7@-(*DT{+c$V=p z>X`%=US@f?TZZsLi2Jq!^VOLM{-*dA!Z&sY&IsC# z=&aIeuG5+t1p?Fp3&R1a4kYLZNMVrbrPKftv>CXiAVF-98bN|%Tu?6gF}2NS)pTZt zd$TH=;mTMbw}eBZVH^Bb1+S271sWF9KgPWfXc@17Ah074#E*lLc7CvPZ&awt$(ZAi z0^B{jpH#(ZL!x`wOMH_Zs^6$^B^Ttr4AwkHtN;&WHFlW?AW%~=VKd0~iI(%gLeeZT zuF09#Ls$pfT^bu$%2bZ@?&8=avpC&HvSmIj55GjOEdl))KQaSH+ju9Lzn) zgHXn89?XSk4IHFWN-ZE&@k;2|DqaPpJFJjd&8uLCs(A?W!1=4;*_0`swbc$N8yo_R z@M>^#Vw;Vd^kY_yOk1-kt;V*{k1r$!YgHyG7V^dtCJD|{?`u;*df<~o!PyoB+t=rS9)I!&N&>+RyX`iv6UFnJ$t ze($p4&z&2m@>d(%$pGsEnr#4xs0D`+GYZ<^gb`;1n1cJ@WXv!V=G0(8Gh*ZMf;MR+ z%!tc&N}}fhw9`{8F&by%!rioz7^1!DDQ5zeV`92#JDCu_Y#LNqD*vhGgi4l*t1Fh1 zsCaiplgj$VgB3%ym8lp@$D`>~d^E8)F&Z-y6GlO0agkU#5ZHr(IuO<%42ZW^zU~}H zF(r~MUlwl;d(Nz?Z+j0IrA%{pNkIMuiKd20GtnGwhekBgKmw|pxQV8zq(MBrs?$gO z#0f+rS*BKrS6974PUc%$4c&<+Vum>1)(HRHKs+qw+d9cP@wc|d;MahNIM^)mwq3rd z{U9N;d9nI)#Ca0=uZrJw?1)Gc*<0HVG$XD=I=U~h*BtT04(*HDJv%O9YjzPUe`C!V zjqDeLYu_QQqJG_{$)wo5Zi;k@U$5)d3yuTvDN)~bD-gpBuK*Mr>B(`nNBp%b(fSn( z?q(B*qcmp5M)dUP1dFq4$a+WP$z*gi8IKukuXt(wfck*s-(A1QLGq$w(>Zcp{AAN` zLq?jic#KBlN5F#(0KwiuI4jn7Hj-ZmTos<)=irPl^gi40O(d=WO!@%+^u6!gdF%Qg&R+lX ziPP+g_(ku4^IK@}hG^*gLqHOZar7_LnMEMa7)HV&ELhAZDSwSI8pNtRs3q(i$OaQychIz zDw!~CUup5aDtLd?DJ^6~$v#lU{r>nPL;gn<(*rMjSS2e|g?o@aQlpDYgU>xu;}*3~ z{qgB9;DNq~P%4$lcCSY6O9;~d1=rq$L1W2e#LqgBd>i3agwqIT5ClR>Y#(}(oRTd< z_n+o3554CIe30h^S{)b1hQrQxP&_Rz57+9LBqDAM-`FBI*V6}U{}~1s6w}a1F2q@s zUPF*Ekklc-pq+$S1snB?HXyR&QyQ4YEv)}-momn>OdQ5Wq7f$ 包装数量={package_quantity}") elif column_mapping.get('specification') and not pd.isna(row[column_mapping['specification']]): - # 添加这段逻辑以处理通过列映射找到的规格列 product['specification'] = str(row[column_mapping['specification']]) + # 修正OCR误识别的4.51*4为4.5L*4 + product['specification'] = re.sub(r'(\d+\.\d+)1\*(\d+)', r'\1L*\2', product['specification']) package_quantity = self.parse_specification(product['specification']) if package_quantity: product['package_quantity'] = package_quantity diff --git a/logs/__main__.active b/logs/__main__.active index 0ba361d..5951359 100644 --- a/logs/__main__.active +++ b/logs/__main__.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:52 \ No newline at end of file +Active since: 2025-05-10 14:20:46 \ No newline at end of file diff --git a/logs/app.core.excel.converter.active b/logs/app.core.excel.converter.active index 0ba361d..9093649 100644 --- a/logs/app.core.excel.converter.active +++ b/logs/app.core.excel.converter.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:52 \ No newline at end of file +Active since: 2025-05-10 14:28:31 \ No newline at end of file diff --git a/logs/app.core.excel.converter.log b/logs/app.core.excel.converter.log index 7039109..ac7b97d 100644 --- a/logs/app.core.excel.converter.log +++ b/logs/app.core.excel.converter.log @@ -2030,3 +2030,34 @@ 2025-05-10 12:54:53,022 - app.core.excel.converter - INFO - 解析容量(L)规格: 1L*12 -> 1*12 2025-05-10 12:54:53,023 - app.core.excel.converter - INFO - 解析容量(L)规格: 1L*12 -> 1*12 2025-05-10 12:57:50,073 - app.core.excel.converter - INFO - 成功加载条码映射配置,共19项 +2025-05-10 13:09:39,200 - app.core.excel.converter - INFO - 成功加载条码映射配置,共19项 +2025-05-10 13:09:43,052 - app.core.excel.converter - INFO - 解析容量(L)规格: 2L*8 -> 1*8 +2025-05-10 13:09:43,053 - app.core.excel.converter - INFO - 解析容量(ml)规格: 500ml*24 -> 1*24 +2025-05-10 13:09:43,054 - app.core.excel.converter - INFO - 解析容量(ml)规格: 500ml*24 -> 1*24 +2025-05-10 13:09:43,055 - app.core.excel.converter - INFO - 解析容量(ml)规格: 500ml*15 -> 1*15 +2025-05-10 13:09:43,056 - app.core.excel.converter - INFO - 解析容量(L)规格: 2.08L*8 -> 1*8 +2025-05-10 13:09:43,065 - app.core.excel.converter - INFO - 解析容量(L)规格: 1.5L*12 -> 1*12 +2025-05-10 13:09:43,068 - app.core.excel.converter - WARNING - 无法解析规格: 4.51*4,使用默认值1*1 +2025-05-10 13:09:43,069 - app.core.excel.converter - INFO - 解析容量(ml)规格: 550ml*24 -> 1*24 +2025-05-10 13:09:43,072 - app.core.excel.converter - WARNING - 无法解析规格: 总数:29大,使用默认值1*1 +2025-05-10 14:16:18,084 - app.core.excel.converter - INFO - 成功加载条码映射配置,共19项 +2025-05-10 14:16:59,267 - app.core.excel.converter - INFO - 成功加载条码映射配置,共19项 +2025-05-10 14:17:10,876 - app.core.excel.converter - INFO - 成功加载条码映射配置,共19项 +2025-05-10 14:17:11,015 - app.core.excel.converter - INFO - 解析容量(L)规格: 2L*8 -> 1*8 +2025-05-10 14:17:11,016 - app.core.excel.converter - INFO - 解析容量(ml)规格: 500ml*24 -> 1*24 +2025-05-10 14:17:11,018 - app.core.excel.converter - INFO - 解析容量(ml)规格: 500ml*24 -> 1*24 +2025-05-10 14:17:11,018 - app.core.excel.converter - INFO - 解析容量(ml)规格: 500ml*24 -> 1*24 +2025-05-10 14:17:11,019 - app.core.excel.converter - INFO - 解析容量(ml)规格: 500ml*15 -> 1*15 +2025-05-10 14:17:11,020 - app.core.excel.converter - INFO - 解析容量(L)规格: 2.08L*8 -> 1*8 +2025-05-10 14:17:11,085 - app.core.excel.converter - INFO - 解析容量(L)规格: 1.5L*12 -> 1*12 +2025-05-10 14:17:11,086 - app.core.excel.converter - INFO - 解析容量(L)规格: 4.5L*4 -> 1*4 +2025-05-10 14:17:11,087 - app.core.excel.converter - INFO - 解析容量(ml)规格: 550ml*24 -> 1*24 +2025-05-10 14:20:46,718 - app.core.excel.converter - INFO - 成功加载条码映射配置,共19项 +2025-05-10 14:20:48,448 - app.core.excel.converter - INFO - 解析容量(ml)规格: 600ml*15 -> 1*15 +2025-05-10 14:20:48,449 - app.core.excel.converter - INFO - 解析容量(ml)规格: 600ml*15 -> 1*15 +2025-05-10 14:20:48,452 - app.core.excel.converter - INFO - 解析容量(ml)规格: 600ml*15 -> 1*15 +2025-05-10 14:20:48,453 - app.core.excel.converter - INFO - 解析容量(ml)规格: 600ml*15 -> 1*15 +2025-05-10 14:20:48,454 - app.core.excel.converter - INFO - 解析容量(ml)规格: 600ml*15 -> 1*15 +2025-05-10 14:20:48,496 - app.core.excel.converter - INFO - 解析容量(ml)规格: 600ml*15 -> 1*15 +2025-05-10 14:20:48,497 - app.core.excel.converter - INFO - 解析容量(ml)规格: 600ml*15 -> 1*15 +2025-05-10 14:20:48,497 - app.core.excel.converter - INFO - 解析容量(ml)规格: 600ml*15 -> 1*15 diff --git a/logs/app.core.excel.handlers.barcode_mapper.active b/logs/app.core.excel.handlers.barcode_mapper.active index 0ba361d..9093649 100644 --- a/logs/app.core.excel.handlers.barcode_mapper.active +++ b/logs/app.core.excel.handlers.barcode_mapper.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:52 \ No newline at end of file +Active since: 2025-05-10 14:28:31 \ No newline at end of file diff --git a/logs/app.core.excel.handlers.unit_converter_handlers.active b/logs/app.core.excel.handlers.unit_converter_handlers.active index 0ba361d..9093649 100644 --- a/logs/app.core.excel.handlers.unit_converter_handlers.active +++ b/logs/app.core.excel.handlers.unit_converter_handlers.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:52 \ No newline at end of file +Active since: 2025-05-10 14:28:31 \ No newline at end of file diff --git a/logs/app.core.excel.handlers.unit_converter_handlers.log b/logs/app.core.excel.handlers.unit_converter_handlers.log index d267245..e35176e 100644 --- a/logs/app.core.excel.handlers.unit_converter_handlers.log +++ b/logs/app.core.excel.handlers.unit_converter_handlers.log @@ -111,3 +111,29 @@ 2025-05-10 12:54:53,021 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 12.0, 单价: 42.0 -> 3.5, 单位: 件 -> 瓶 2025-05-10 12:54:53,022 - app.core.excel.handlers.unit_converter_handlers - INFO - 赠品件单位处理: 数量: 1.0 -> 12.0, 单价: 0, 单位: 件 -> 瓶 2025-05-10 12:54:53,023 - app.core.excel.handlers.unit_converter_handlers - INFO - 赠品瓶单位处理: 保持原样 数量: 1.0, 单价: 0, 单位: 瓶 +2025-05-10 13:09:43,052 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 2.0 -> 16.0, 单价: 41.0 -> 5.125, 单位: 件 -> 瓶 +2025-05-10 13:09:43,053 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 3.0 -> 72.0, 单价: 52.0 -> 2.1666666666666665, 单位: 件 -> 瓶 +2025-05-10 13:09:43,054 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 5.0 -> 120.0, 单价: 51.0 -> 2.125, 单位: 件 -> 瓶 +2025-05-10 13:09:43,055 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 3.0 -> 45.0, 单价: 44.0 -> 2.933333333333333, 单位: 件 -> 瓶 +2025-05-10 13:09:43,056 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 5.0 -> 40.0, 单价: 20.0 -> 2.5, 单位: 件 -> 瓶 +2025-05-10 13:09:43,065 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 4.0 -> 48.0, 单价: 26.0 -> 2.1666666666666665, 单位: 件 -> 瓶 +2025-05-10 13:09:43,068 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 2.0 -> 2.0, 单价: 26.0 -> 26.0, 单位: 件 -> 瓶 +2025-05-10 13:09:43,069 - app.core.excel.handlers.unit_converter_handlers - INFO - 赠品件单位处理: 数量: 1.0 -> 24.0, 单价: 0, 单位: 件 -> 瓶 +2025-05-10 13:09:43,073 - app.core.excel.handlers.unit_converter_handlers - INFO - 赠品单位处理: 保持原样 数量: 0.0, 单价: 0, 单位: +2025-05-10 14:17:11,015 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 2.0 -> 16.0, 单价: 41.0 -> 5.125, 单位: 件 -> 瓶 +2025-05-10 14:17:11,017 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 3.0 -> 72.0, 单价: 52.0 -> 2.1666666666666665, 单位: 件 -> 瓶 +2025-05-10 14:17:11,018 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 5.0 -> 120.0, 单价: 51.0 -> 2.125, 单位: 件 -> 瓶 +2025-05-10 14:17:11,019 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 4.0 -> 96.0, 单价: 53.0 -> 2.2083333333333335, 单位: 件 -> 瓶 +2025-05-10 14:17:11,019 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 3.0 -> 45.0, 单价: 44.0 -> 2.933333333333333, 单位: 件 -> 瓶 +2025-05-10 14:17:11,020 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 5.0 -> 40.0, 单价: 20.0 -> 2.5, 单位: 件 -> 瓶 +2025-05-10 14:17:11,085 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 4.0 -> 48.0, 单价: 26.0 -> 2.1666666666666665, 单位: 件 -> 瓶 +2025-05-10 14:17:11,086 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 2.0 -> 8.0, 单价: 26.0 -> 6.5, 单位: 件 -> 瓶 +2025-05-10 14:17:11,087 - app.core.excel.handlers.unit_converter_handlers - INFO - 赠品件单位处理: 数量: 1.0 -> 24.0, 单价: 0, 单位: 件 -> 瓶 +2025-05-10 14:20:48,448 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 65.0 -> 4.333333333333333, 单位: 件 -> 瓶 +2025-05-10 14:20:48,449 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 3.0 -> 45.0, 单价: 55.0 -> 3.6666666666666665, 单位: 件 -> 瓶 +2025-05-10 14:20:48,452 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 55.0 -> 3.6666666666666665, 单位: 件 -> 瓶 +2025-05-10 14:20:48,453 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 55.0 -> 3.6666666666666665, 单位: 件 -> 瓶 +2025-05-10 14:20:48,495 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 55.0 -> 3.6666666666666665, 单位: 件 -> 瓶 +2025-05-10 14:20:48,496 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 55.0 -> 3.6666666666666665, 单位: 件 -> 瓶 +2025-05-10 14:20:48,497 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 55.0 -> 3.6666666666666665, 单位: 件 -> 瓶 +2025-05-10 14:20:48,498 - app.core.excel.handlers.unit_converter_handlers - INFO - 赠品件单位处理: 数量: 2.0 -> 30.0, 单价: 0, 单位: 件 -> 瓶 diff --git a/logs/app.core.excel.merger.active b/logs/app.core.excel.merger.active index 0ba361d..0a1e8d5 100644 --- a/logs/app.core.excel.merger.active +++ b/logs/app.core.excel.merger.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:52 \ No newline at end of file +Active since: 2025-05-10 14:20:45 \ No newline at end of file diff --git a/logs/app.core.excel.merger.log b/logs/app.core.excel.merger.log index 5ac1354..b5994a3 100644 --- a/logs/app.core.excel.merger.log +++ b/logs/app.core.excel.merger.log @@ -524,3 +524,13 @@ 2025-05-10 12:50:31,806 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: templates\银豹-采购单模板.xls 2025-05-10 12:54:52,741 - app.core.excel.merger - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output 2025-05-10 12:54:52,742 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: templates\银豹-采购单模板.xls +2025-05-10 13:09:39,201 - app.core.excel.merger - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-10 13:09:39,201 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: templates\银豹-采购单模板.xls +2025-05-10 14:16:18,086 - app.core.excel.merger - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-10 14:16:18,086 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: templates\银豹-采购单模板.xls +2025-05-10 14:16:59,268 - app.core.excel.merger - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-10 14:16:59,268 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: templates\银豹-采购单模板.xls +2025-05-10 14:17:10,877 - app.core.excel.merger - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-10 14:17:10,878 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: templates\银豹-采购单模板.xls +2025-05-10 14:20:46,719 - app.core.excel.merger - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-10 14:20:46,719 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: templates\银豹-采购单模板.xls diff --git a/logs/app.core.excel.processor.active b/logs/app.core.excel.processor.active index 0ba361d..0a1e8d5 100644 --- a/logs/app.core.excel.processor.active +++ b/logs/app.core.excel.processor.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:52 \ No newline at end of file +Active since: 2025-05-10 14:20:45 \ No newline at end of file diff --git a/logs/app.core.excel.processor.log b/logs/app.core.excel.processor.log index 7188b4a..996dd64 100644 --- a/logs/app.core.excel.processor.log +++ b/logs/app.core.excel.processor.log @@ -6441,3 +6441,229 @@ ValueError: could not convert string to float: '2\n96' 2025-05-10 12:54:56,174 - app.core.excel.processor - INFO - 条码 6922456896362 填充:采购量=12.0,赠品数量13.0 2025-05-10 12:54:56,177 - app.core.excel.processor - INFO - 采购单已保存到: data/output\采购单_微信图片_20250509142700.xls 2025-05-10 12:54:56,179 - app.core.excel.processor - INFO - 采购单已保存到: data/output\采购单_微信图片_20250509142700.xls +2025-05-10 13:09:39,199 - app.core.excel.processor - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-10 13:09:39,199 - app.core.excel.processor - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-10 13:09:39,200 - app.core.excel.processor - INFO - 初始化ExcelProcessor完成,模板文件: templates/银豹-采购单模板.xls +2025-05-10 13:09:42,986 - app.core.excel.processor - INFO - 搜索目录 data/output 中的Excel文件 +2025-05-10 13:09:42,987 - app.core.excel.processor - INFO - 找到最新的Excel文件: data/output\微信图片_20250510130835.xlsx +2025-05-10 13:09:42,987 - app.core.excel.processor - INFO - 开始处理Excel文件: data/output\微信图片_20250510130835.xlsx +2025-05-10 13:09:43,013 - app.core.excel.processor - INFO - 成功读取Excel文件: data/output\微信图片_20250510130835.xlsx, 共 11 行 +2025-05-10 13:09:43,022 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 60 +2025-05-10 13:09:43,022 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2025-05-10 13:09:43,042 - app.core.excel.processor - INFO - 使用表头行重新读取数据,共 10 行有效数据 +2025-05-10 13:09:43,042 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 商品条码 +2025-05-10 13:09:43,042 - app.core.excel.processor - INFO - 使用条码列: 商品条码 +2025-05-10 13:09:43,043 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2025-05-10 13:09:43,043 - app.core.excel.processor - INFO - 找到specification列: 规格 +2025-05-10 13:09:43,043 - app.core.excel.processor - INFO - 找到quantity列: 数量 +2025-05-10 13:09:43,043 - app.core.excel.processor - INFO - 找到unit列: 单位 +2025-05-10 13:09:43,043 - app.core.excel.processor - INFO - 找到price列: 单价 +2025-05-10 13:09:43,043 - app.core.excel.processor - INFO - 列名映射结果: {'barcode': '商品条码', 'name': '商品名称', 'specification': '规格', 'quantity': '数量', 'unit': '单位', 'price': '单价'} +2025-05-10 13:09:43,043 - app.core.excel.processor - INFO - 是否存在规格列: True +2025-05-10 13:09:43,045 - app.core.excel.processor - INFO - 第1行: 提取商品信息 条码=6954767433073, 名称=2L大雪碧, 规格=, 数量=2.0, 单位=件, 单价=41.0 +2025-05-10 13:09:43,051 - app.core.excel.processor - INFO - 解析规格: 2L*8 -> 包装数量=8 +2025-05-10 13:09:43,053 - app.core.excel.processor - INFO - 第2行: 提取商品信息 条码=6954767432076, 名称=中雪碧500ml, 规格=, 数量=3.0, 单位=件, 单价=52.0 +2025-05-10 13:09:43,053 - app.core.excel.processor - INFO - 解析规格: 500ml*24 -> 包装数量=24 +2025-05-10 13:09:43,054 - app.core.excel.processor - INFO - 第3行: 提取商品信息 条码=6954767412573, 名称=中可口可乐500ml, 规格=, 数量=5.0, 单位=件, 单价=51.0 +2025-05-10 13:09:43,054 - app.core.excel.processor - INFO - 解析规格: 500ml*24 -> 包装数量=24 +2025-05-10 13:09:43,054 - app.core.excel.processor - INFO - 第5行: 提取商品信息 条码=6925303730574, 名称=500ml阿萨姆原味, 规格=, 数量=3.0, 单位=件, 单价=44.0 +2025-05-10 13:09:43,055 - app.core.excel.processor - INFO - 解析规格: 500ml*15 -> 包装数量=15 +2025-05-10 13:09:43,055 - app.core.excel.processor - INFO - 第6行: 提取商品信息 条码=6901285992933, 名称=2.08L怡宝, 规格=, 数量=5.0, 单位=件, 单价=20.0 +2025-05-10 13:09:43,056 - app.core.excel.processor - INFO - 解析规格: 2.08L*8 -> 包装数量=8 +2025-05-10 13:09:43,064 - app.core.excel.processor - INFO - 第7行: 提取商品信息 条码=6901285991271, 名称=1.5L怡宝, 规格=, 数量=4.0, 单位=件, 单价=26.0 +2025-05-10 13:09:43,065 - app.core.excel.processor - INFO - 解析规格: 1.5L*12 -> 包装数量=12 +2025-05-10 13:09:43,066 - app.core.excel.processor - INFO - 第8行: 提取商品信息 条码=6901285991530, 名称=4.5L怡宝, 规格=, 数量=2.0, 单位=件, 单价=26.0 +2025-05-10 13:09:43,066 - app.core.excel.processor - INFO - 解析规格: 4.51*4 -> 包装数量=4 +2025-05-10 13:09:43,069 - app.core.excel.processor - INFO - 第9行: 提取商品信息 条码=6921168509256, 名称=550ml(红色包装)中农夫, 规格=, 数量=1.0, 单位=件, 单价=0.0 +2025-05-10 13:09:43,069 - app.core.excel.processor - INFO - 解析规格: 550ml*24 -> 包装数量=24 +2025-05-10 13:09:43,071 - app.core.excel.processor - INFO - 第10行: 提取商品信息 条码=优惠后金额: +1093.00, 名称=壹仟零玖拾叁元整, 规格=, 数量=0, 单位=, 单价=0 +2025-05-10 13:09:43,073 - app.core.excel.processor - INFO - 提取到 9 个商品信息 +2025-05-10 13:09:43,084 - app.core.excel.processor - INFO - 开始处理9 个产品信息 +2025-05-10 13:09:43,084 - app.core.excel.processor - INFO - 处理商品: 条码=6954767433073, 数量=16.0, 单价=5.125, 是否赠品=False +2025-05-10 13:09:43,084 - app.core.excel.processor - INFO - 发现正常商品:条码6954767433073, 数量=16.0, 单价=5.125 +2025-05-10 13:09:43,085 - app.core.excel.processor - INFO - 处理商品: 条码=6954767432076, 数量=72.0, 单价=2.1666666666666665, 是否赠品=False +2025-05-10 13:09:43,085 - app.core.excel.processor - INFO - 发现正常商品:条码6954767432076, 数量=72.0, 单价=2.1666666666666665 +2025-05-10 13:09:43,085 - app.core.excel.processor - INFO - 处理商品: 条码=6954767412573, 数量=120.0, 单价=2.125, 是否赠品=False +2025-05-10 13:09:43,085 - app.core.excel.processor - INFO - 发现正常商品:条码6954767412573, 数量=120.0, 单价=2.125 +2025-05-10 13:09:43,085 - app.core.excel.processor - INFO - 处理商品: 条码=6925303730574, 数量=45.0, 单价=2.933333333333333, 是否赠品=False +2025-05-10 13:09:43,085 - app.core.excel.processor - INFO - 发现正常商品:条码6925303730574, 数量=45.0, 单价=2.933333333333333 +2025-05-10 13:09:43,085 - app.core.excel.processor - INFO - 处理商品: 条码=6901285992933, 数量=40.0, 单价=2.5, 是否赠品=False +2025-05-10 13:09:43,085 - app.core.excel.processor - INFO - 发现正常商品:条码6901285992933, 数量=40.0, 单价=2.5 +2025-05-10 13:09:43,085 - app.core.excel.processor - INFO - 处理商品: 条码=6901285991271, 数量=48.0, 单价=2.1666666666666665, 是否赠品=False +2025-05-10 13:09:43,085 - app.core.excel.processor - INFO - 发现正常商品:条码6901285991271, 数量=48.0, 单价=2.1666666666666665 +2025-05-10 13:09:43,085 - app.core.excel.processor - INFO - 处理商品: 条码=6901285991530, 数量=2.0, 单价=26.0, 是否赠品=False +2025-05-10 13:09:43,085 - app.core.excel.processor - INFO - 发现正常商品:条码6901285991530, 数量=2.0, 单价=26.0 +2025-05-10 13:09:45,883 - app.core.excel.processor - INFO - 处理商品: 条码=6921168509256, 数量=24.0, 单价=0, 是否赠品=True +2025-05-10 13:09:45,884 - app.core.excel.processor - INFO - 发现赠品:条码6921168509256, 数量=24.0 +2025-05-10 13:09:45,884 - app.core.excel.processor - INFO - 处理商品: 条码=109300, 数量=0.0, 单价=0, 是否赠品=True +2025-05-10 13:09:45,884 - app.core.excel.processor - INFO - 发现赠品:条码109300, 数量=0.0 +2025-05-10 13:09:45,884 - app.core.excel.processor - INFO - 分组后共9 个不同条码的商品 +2025-05-10 13:09:45,885 - app.core.excel.processor - INFO - 条码 6954767433073 处理结果:正常商品数量16.0,单价5.125,赠品数量0 +2025-05-10 13:09:45,885 - app.core.excel.processor - INFO - 条码 6954767432076 处理结果:正常商品数量72.0,单价2.1666666666666665,赠品数量0 +2025-05-10 13:09:45,885 - app.core.excel.processor - INFO - 条码 6954767412573 处理结果:正常商品数量120.0,单价2.125,赠品数量0 +2025-05-10 13:09:45,885 - app.core.excel.processor - INFO - 条码 6925303730574 处理结果:正常商品数量45.0,单价2.933333333333333,赠品数量0 +2025-05-10 13:09:45,885 - app.core.excel.processor - INFO - 条码 6901285992933 处理结果:正常商品数量40.0,单价2.5,赠品数量0 +2025-05-10 13:09:45,885 - app.core.excel.processor - INFO - 条码 6901285991271 处理结果:正常商品数量48.0,单价2.1666666666666665,赠品数量0 +2025-05-10 13:09:45,885 - app.core.excel.processor - INFO - 条码 6901285991530 处理结果:正常商品数量2.0,单价26.0,赠品数量0 +2025-05-10 13:09:45,886 - app.core.excel.processor - INFO - 条码 6921168509256 处理结果:只有赠品,数量=24.0 +2025-05-10 13:09:45,886 - app.core.excel.processor - INFO - 条码 109300 处理结果:只有赠品,数量=0.0 +2025-05-10 13:09:45,886 - app.core.excel.processor - INFO - 条码 6921168509256 填充:仅有赠品,采购量=0,赠品数量=24.0 +2025-05-10 13:09:45,887 - app.core.excel.processor - INFO - 条码 109300 填充:仅有赠品,采购量=0,赠品数量=0.0 +2025-05-10 13:09:45,891 - app.core.excel.processor - INFO - 采购单已保存到: data/output\采购单_微信图片_20250510130835.xls +2025-05-10 13:09:45,893 - app.core.excel.processor - INFO - 采购单已保存到: data/output\采购单_微信图片_20250510130835.xls +2025-05-10 14:16:18,083 - app.core.excel.processor - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-10 14:16:18,083 - app.core.excel.processor - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-10 14:16:18,085 - app.core.excel.processor - INFO - 初始化ExcelProcessor完成,模板文件: templates/银豹-采购单模板.xls +2025-05-10 14:16:18,087 - app.core.excel.processor - INFO - 开始处理Excel文件: D:/My Documents/python/orc-order-v2/data/output/采购单_微信图片_20250510130835.xls +2025-05-10 14:16:18,095 - app.core.excel.processor - INFO - 成功读取Excel文件: D:/My Documents/python/orc-order-v2/data/output/采购单_微信图片_20250510130835.xls, 共 10 行 +2025-05-10 14:16:18,099 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 35 +2025-05-10 14:16:18,099 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2025-05-10 14:16:18,105 - app.core.excel.processor - INFO - 使用表头行重新读取数据,共 9 行有效数据 +2025-05-10 14:16:18,105 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 条码(必填) +2025-05-10 14:16:18,105 - app.core.excel.processor - INFO - 使用条码列: 条码(必填) +2025-05-10 14:16:18,105 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2025-05-10 14:16:18,106 - app.core.excel.processor - INFO - 找到price列(部分匹配): 采购单价(必填) +2025-05-10 14:16:18,108 - app.core.excel.processor - INFO - 列名映射结果: {'barcode': '条码(必填)', 'name': '商品名称', 'price': '采购单价(必填)'} +2025-05-10 14:16:18,110 - app.core.excel.processor - INFO - 是否存在规格列: False +2025-05-10 14:16:18,112 - app.core.excel.processor - INFO - 提取到 0 个商品信息 +2025-05-10 14:16:18,113 - app.core.excel.processor - WARNING - 未提取到有效商品信息 +2025-05-10 14:16:59,266 - app.core.excel.processor - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-10 14:16:59,266 - app.core.excel.processor - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-10 14:16:59,267 - app.core.excel.processor - INFO - 初始化ExcelProcessor完成,模板文件: templates/银豹-采购单模板.xls +2025-05-10 14:16:59,269 - app.core.excel.processor - INFO - 搜索目录 data/output 中的Excel文件 +2025-05-10 14:16:59,270 - app.core.excel.processor - WARNING - 找到的最新文件是采购单,不作处理: data/output\采购单_微信图片_20250510130835.xls +2025-05-10 14:16:59,270 - app.core.excel.processor - WARNING - 未找到可处理的Excel文件 +2025-05-10 14:17:10,875 - app.core.excel.processor - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-10 14:17:10,876 - app.core.excel.processor - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-10 14:17:10,877 - app.core.excel.processor - INFO - 初始化ExcelProcessor完成,模板文件: templates/银豹-采购单模板.xls +2025-05-10 14:17:10,878 - app.core.excel.processor - INFO - 开始处理Excel文件: D:/My Documents/python/orc-order-v2/data/output/微信图片_20250510130835.xlsx +2025-05-10 14:17:10,945 - app.core.excel.processor - INFO - 成功读取Excel文件: D:/My Documents/python/orc-order-v2/data/output/微信图片_20250510130835.xlsx, 共 11 行 +2025-05-10 14:17:10,949 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 60 +2025-05-10 14:17:10,949 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2025-05-10 14:17:11,005 - app.core.excel.processor - INFO - 使用表头行重新读取数据,共 10 行有效数据 +2025-05-10 14:17:11,005 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 商品条码 +2025-05-10 14:17:11,005 - app.core.excel.processor - INFO - 使用条码列: 商品条码 +2025-05-10 14:17:11,009 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2025-05-10 14:17:11,009 - app.core.excel.processor - INFO - 找到specification列: 规格 +2025-05-10 14:17:11,010 - app.core.excel.processor - INFO - 找到quantity列: 数量 +2025-05-10 14:17:11,010 - app.core.excel.processor - INFO - 找到unit列: 单位 +2025-05-10 14:17:11,010 - app.core.excel.processor - INFO - 找到price列: 单价 +2025-05-10 14:17:11,010 - app.core.excel.processor - INFO - 列名映射结果: {'barcode': '商品条码', 'name': '商品名称', 'specification': '规格', 'quantity': '数量', 'unit': '单位', 'price': '单价'} +2025-05-10 14:17:11,010 - app.core.excel.processor - INFO - 是否存在规格列: True +2025-05-10 14:17:11,012 - app.core.excel.processor - INFO - 第1行: 提取商品信息 条码=6954767433073, 名称=2L大雪碧, 规格=, 数量=2.0, 单位=件, 单价=41.0 +2025-05-10 14:17:11,014 - app.core.excel.processor - INFO - 解析规格: 2L*8 -> 包装数量=8 +2025-05-10 14:17:11,016 - app.core.excel.processor - INFO - 第2行: 提取商品信息 条码=6954767432076, 名称=中雪碧500ml, 规格=, 数量=3.0, 单位=件, 单价=52.0 +2025-05-10 14:17:11,016 - app.core.excel.processor - INFO - 解析规格: 500ml*24 -> 包装数量=24 +2025-05-10 14:17:11,018 - app.core.excel.processor - INFO - 第3行: 提取商品信息 条码=6954767412573, 名称=中可口可乐500ml, 规格=, 数量=5.0, 单位=件, 单价=51.0 +2025-05-10 14:17:11,018 - app.core.excel.processor - INFO - 解析规格: 500ml*24 -> 包装数量=24 +2025-05-10 14:17:11,018 - app.core.excel.processor - INFO - 第4行: 提取商品信息 条码=6954767423579, 名称=500ml中零度可口可乐, 规格=, 数量=4.0, 单位=件, 单价=53.0 +2025-05-10 14:17:11,018 - app.core.excel.processor - INFO - 解析规格: 500ml*24 -> 包装数量=24 +2025-05-10 14:17:11,019 - app.core.excel.processor - INFO - 第5行: 提取商品信息 条码=6925303730574, 名称=500ml阿萨姆原味, 规格=, 数量=3.0, 单位=件, 单价=44.0 +2025-05-10 14:17:11,019 - app.core.excel.processor - INFO - 解析规格: 500ml*15 -> 包装数量=15 +2025-05-10 14:17:11,020 - app.core.excel.processor - INFO - 第6行: 提取商品信息 条码=6901285992933, 名称=2.08L怡宝, 规格=, 数量=5.0, 单位=件, 单价=20.0 +2025-05-10 14:17:11,020 - app.core.excel.processor - INFO - 解析规格: 2.08L*8 -> 包装数量=8 +2025-05-10 14:17:11,021 - app.core.excel.processor - INFO - 第7行: 提取商品信息 条码=6901285991271, 名称=1.5L怡宝, 规格=, 数量=4.0, 单位=件, 单价=26.0 +2025-05-10 14:17:11,085 - app.core.excel.processor - INFO - 解析规格: 1.5L*12 -> 包装数量=12 +2025-05-10 14:17:11,086 - app.core.excel.processor - INFO - 第8行: 提取商品信息 条码=6901285991530, 名称=4.5L怡宝, 规格=, 数量=2.0, 单位=件, 单价=26.0 +2025-05-10 14:17:11,086 - app.core.excel.processor - INFO - 解析规格: 4.5L*4 -> 包装数量=4 +2025-05-10 14:17:11,087 - app.core.excel.processor - INFO - 第9行: 提取商品信息 条码=6921168509256, 名称=550ml(红色包装)中农夫, 规格=, 数量=1.0, 单位=件, 单价=0.0 +2025-05-10 14:17:11,087 - app.core.excel.processor - INFO - 解析规格: 550ml*24 -> 包装数量=24 +2025-05-10 14:17:11,087 - app.core.excel.processor - INFO - 提取到 9 个商品信息 +2025-05-10 14:17:11,095 - app.core.excel.processor - INFO - 开始处理9 个产品信息 +2025-05-10 14:17:11,095 - app.core.excel.processor - INFO - 处理商品: 条码=6954767433073, 数量=16.0, 单价=5.125, 是否赠品=False +2025-05-10 14:17:11,095 - app.core.excel.processor - INFO - 发现正常商品:条码6954767433073, 数量=16.0, 单价=5.125 +2025-05-10 14:17:11,095 - app.core.excel.processor - INFO - 处理商品: 条码=6954767432076, 数量=72.0, 单价=2.1666666666666665, 是否赠品=False +2025-05-10 14:17:11,095 - app.core.excel.processor - INFO - 发现正常商品:条码6954767432076, 数量=72.0, 单价=2.1666666666666665 +2025-05-10 14:17:11,096 - app.core.excel.processor - INFO - 处理商品: 条码=6954767412573, 数量=120.0, 单价=2.125, 是否赠品=False +2025-05-10 14:17:11,096 - app.core.excel.processor - INFO - 发现正常商品:条码6954767412573, 数量=120.0, 单价=2.125 +2025-05-10 14:17:11,096 - app.core.excel.processor - INFO - 处理商品: 条码=6954767423579, 数量=96.0, 单价=2.2083333333333335, 是否赠品=False +2025-05-10 14:17:11,096 - app.core.excel.processor - INFO - 发现正常商品:条码6954767423579, 数量=96.0, 单价=2.2083333333333335 +2025-05-10 14:17:11,096 - app.core.excel.processor - INFO - 处理商品: 条码=6925303730574, 数量=45.0, 单价=2.933333333333333, 是否赠品=False +2025-05-10 14:17:11,096 - app.core.excel.processor - INFO - 发现正常商品:条码6925303730574, 数量=45.0, 单价=2.933333333333333 +2025-05-10 14:17:11,096 - app.core.excel.processor - INFO - 处理商品: 条码=6901285992933, 数量=40.0, 单价=2.5, 是否赠品=False +2025-05-10 14:17:11,096 - app.core.excel.processor - INFO - 发现正常商品:条码6901285992933, 数量=40.0, 单价=2.5 +2025-05-10 14:17:11,096 - app.core.excel.processor - INFO - 处理商品: 条码=6901285991271, 数量=48.0, 单价=2.1666666666666665, 是否赠品=False +2025-05-10 14:17:11,097 - app.core.excel.processor - INFO - 发现正常商品:条码6901285991271, 数量=48.0, 单价=2.1666666666666665 +2025-05-10 14:17:11,097 - app.core.excel.processor - INFO - 处理商品: 条码=6901285991530, 数量=8.0, 单价=6.5, 是否赠品=False +2025-05-10 14:17:11,097 - app.core.excel.processor - INFO - 发现正常商品:条码6901285991530, 数量=8.0, 单价=6.5 +2025-05-10 14:17:11,097 - app.core.excel.processor - INFO - 处理商品: 条码=6921168509256, 数量=24.0, 单价=0, 是否赠品=True +2025-05-10 14:17:11,097 - app.core.excel.processor - INFO - 发现赠品:条码6921168509256, 数量=24.0 +2025-05-10 14:17:11,097 - app.core.excel.processor - INFO - 分组后共9 个不同条码的商品 +2025-05-10 14:17:11,097 - app.core.excel.processor - INFO - 条码 6954767433073 处理结果:正常商品数量16.0,单价5.125,赠品数量0 +2025-05-10 14:17:11,098 - app.core.excel.processor - INFO - 条码 6954767432076 处理结果:正常商品数量72.0,单价2.1666666666666665,赠品数量0 +2025-05-10 14:17:15,243 - app.core.excel.processor - INFO - 条码 6954767412573 处理结果:正常商品数量120.0,单价2.125,赠品数量0 +2025-05-10 14:17:15,243 - app.core.excel.processor - INFO - 条码 6954767423579 处理结果:正常商品数量96.0,单价2.2083333333333335,赠品数量0 +2025-05-10 14:17:15,243 - app.core.excel.processor - INFO - 条码 6925303730574 处理结果:正常商品数量45.0,单价2.933333333333333,赠品数量0 +2025-05-10 14:17:15,243 - app.core.excel.processor - INFO - 条码 6901285992933 处理结果:正常商品数量40.0,单价2.5,赠品数量0 +2025-05-10 14:17:15,243 - app.core.excel.processor - INFO - 条码 6901285991271 处理结果:正常商品数量48.0,单价2.1666666666666665,赠品数量0 +2025-05-10 14:17:15,243 - app.core.excel.processor - INFO - 条码 6901285991530 处理结果:正常商品数量8.0,单价6.5,赠品数量0 +2025-05-10 14:17:15,243 - app.core.excel.processor - INFO - 条码 6921168509256 处理结果:只有赠品,数量=24.0 +2025-05-10 14:17:15,244 - app.core.excel.processor - INFO - 条码 6921168509256 填充:仅有赠品,采购量=0,赠品数量=24.0 +2025-05-10 14:17:15,247 - app.core.excel.processor - INFO - 采购单已保存到: data/output\采购单_微信图片_20250510130835.xls +2025-05-10 14:17:15,248 - app.core.excel.processor - INFO - 采购单已保存到: data/output\采购单_微信图片_20250510130835.xls +2025-05-10 14:20:46,716 - app.core.excel.processor - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-10 14:20:46,717 - app.core.excel.processor - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-10 14:20:46,718 - app.core.excel.processor - INFO - 初始化ExcelProcessor完成,模板文件: templates/银豹-采购单模板.xls +2025-05-10 14:20:48,381 - app.core.excel.processor - INFO - 搜索目录 data/output 中的Excel文件 +2025-05-10 14:20:48,384 - app.core.excel.processor - INFO - 找到最新的Excel文件: data/output\微信图片_20250510142041.xlsx +2025-05-10 14:20:48,384 - app.core.excel.processor - INFO - 开始处理Excel文件: data/output\微信图片_20250510142041.xlsx +2025-05-10 14:20:48,420 - app.core.excel.processor - INFO - 成功读取Excel文件: data/output\微信图片_20250510142041.xlsx, 共 10 行 +2025-05-10 14:20:48,427 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 60 +2025-05-10 14:20:48,427 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2025-05-10 14:20:48,444 - app.core.excel.processor - INFO - 使用表头行重新读取数据,共 9 行有效数据 +2025-05-10 14:20:48,445 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 商品条码 +2025-05-10 14:20:48,445 - app.core.excel.processor - INFO - 使用条码列: 商品条码 +2025-05-10 14:20:48,445 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2025-05-10 14:20:48,445 - app.core.excel.processor - INFO - 找到specification列: 规格 +2025-05-10 14:20:48,445 - app.core.excel.processor - INFO - 找到quantity列: 数量 +2025-05-10 14:20:48,445 - app.core.excel.processor - INFO - 找到unit列: 单位 +2025-05-10 14:20:48,445 - app.core.excel.processor - INFO - 找到price列: 单价 +2025-05-10 14:20:48,445 - app.core.excel.processor - INFO - 列名映射结果: {'barcode': '商品条码', 'name': '商品名称', 'specification': '规格', 'quantity': '数量', 'unit': '单位', 'price': '单价'} +2025-05-10 14:20:48,446 - app.core.excel.processor - INFO - 是否存在规格列: True +2025-05-10 14:20:48,446 - app.core.excel.processor - INFO - 第1行: 提取商品信息 条码=6902538008920, 名称=600ml脉动电解质西柚口味, 规格=, 数量=1.0, 单位=件, 单价=65.0 +2025-05-10 14:20:48,447 - app.core.excel.processor - INFO - 解析规格: 600ml*15 -> 包装数量=15 +2025-05-10 14:20:48,449 - app.core.excel.processor - INFO - 第2行: 提取商品信息 条码=6902538004045, 名称=600ml脉动青柠口味, 规格=, 数量=3.0, 单位=件, 单价=55.0 +2025-05-10 14:20:48,449 - app.core.excel.processor - INFO - 解析规格: 600ml*15 -> 包装数量=15 +2025-05-10 14:20:48,451 - app.core.excel.processor - INFO - 第3行: 提取商品信息 条码=6902538009040, 名称=600ml脉动沁爽青草口味, 规格=, 数量=1.0, 单位=件, 单价=55.0 +2025-05-10 14:20:48,451 - app.core.excel.processor - INFO - 解析规格: 600ml*15 -> 包装数量=15 +2025-05-10 14:20:48,453 - app.core.excel.processor - INFO - 第4行: 提取商品信息 条码=6902538004052, 名称=600ml脉动雪柚橘子味, 规格=, 数量=1.0, 单位=件, 单价=55.0 +2025-05-10 14:20:48,453 - app.core.excel.processor - INFO - 解析规格: 600ml*15 -> 包装数量=15 +2025-05-10 14:20:48,454 - app.core.excel.processor - INFO - 第5行: 提取商品信息 条码=6902538007169, 名称=600ml脉动菠萝口味, 规格=, 数量=1.0, 单位=件, 单价=55.0 +2025-05-10 14:20:48,454 - app.core.excel.processor - INFO - 解析规格: 600ml*15 -> 包装数量=15 +2025-05-10 14:20:48,495 - app.core.excel.processor - INFO - 第6行: 提取商品信息 条码=6902538008425, 名称=600ml脉动零糖柠檬味, 规格=, 数量=1.0, 单位=件, 单价=55.0 +2025-05-10 14:20:48,496 - app.core.excel.processor - INFO - 解析规格: 600ml*15 -> 包装数量=15 +2025-05-10 14:20:48,496 - app.core.excel.processor - INFO - 第7行: 提取商品信息 条码=6902538008364, 名称=600ml脉动玫瑰葡萄口味, 规格=, 数量=1.0, 单位=件, 单价=55.0 +2025-05-10 14:20:48,496 - app.core.excel.processor - INFO - 解析规格: 600ml*15 -> 包装数量=15 +2025-05-10 14:20:48,497 - app.core.excel.processor - INFO - 第8行: 提取商品信息 条码=6902538005141, 名称=600ml脉动桃子口味, 规格=, 数量=2.0, 单位=件, 单价=0.0 +2025-05-10 14:20:48,497 - app.core.excel.processor - INFO - 解析规格: 600ml*15 -> 包装数量=15 +2025-05-10 14:20:48,498 - app.core.excel.processor - INFO - 提取到 8 个商品信息 +2025-05-10 14:20:48,511 - app.core.excel.processor - INFO - 开始处理8 个产品信息 +2025-05-10 14:20:48,512 - app.core.excel.processor - INFO - 处理商品: 条码=6902538008920, 数量=15.0, 单价=4.333333333333333, 是否赠品=False +2025-05-10 14:20:48,512 - app.core.excel.processor - INFO - 发现正常商品:条码6902538008920, 数量=15.0, 单价=4.333333333333333 +2025-05-10 14:20:48,512 - app.core.excel.processor - INFO - 处理商品: 条码=6902538004045, 数量=45.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-10 14:20:48,512 - app.core.excel.processor - INFO - 发现正常商品:条码6902538004045, 数量=45.0, 单价=3.6666666666666665 +2025-05-10 14:20:48,512 - app.core.excel.processor - INFO - 处理商品: 条码=6902538009040, 数量=15.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-10 14:20:48,512 - app.core.excel.processor - INFO - 发现正常商品:条码6902538009040, 数量=15.0, 单价=3.6666666666666665 +2025-05-10 14:20:48,512 - app.core.excel.processor - INFO - 处理商品: 条码=6902538004052, 数量=15.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-10 14:20:48,512 - app.core.excel.processor - INFO - 发现正常商品:条码6902538004052, 数量=15.0, 单价=3.6666666666666665 +2025-05-10 14:20:48,512 - app.core.excel.processor - INFO - 处理商品: 条码=6902538007169, 数量=15.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-10 14:20:48,512 - app.core.excel.processor - INFO - 发现正常商品:条码6902538007169, 数量=15.0, 单价=3.6666666666666665 +2025-05-10 14:20:48,512 - app.core.excel.processor - INFO - 处理商品: 条码=6902538008425, 数量=15.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-10 14:20:48,513 - app.core.excel.processor - INFO - 发现正常商品:条码6902538008425, 数量=15.0, 单价=3.6666666666666665 +2025-05-10 14:20:48,513 - app.core.excel.processor - INFO - 处理商品: 条码=6902538008364, 数量=15.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-10 14:20:48,513 - app.core.excel.processor - INFO - 发现正常商品:条码6902538008364, 数量=15.0, 单价=3.6666666666666665 +2025-05-10 14:20:48,513 - app.core.excel.processor - INFO - 处理商品: 条码=6902538005141, 数量=30.0, 单价=0, 是否赠品=True +2025-05-10 14:20:48,513 - app.core.excel.processor - INFO - 发现赠品:条码6902538005141, 数量=30.0 +2025-05-10 14:20:48,513 - app.core.excel.processor - INFO - 分组后共8 个不同条码的商品 +2025-05-10 14:20:48,513 - app.core.excel.processor - INFO - 条码 6902538008920 处理结果:正常商品数量15.0,单价4.333333333333333,赠品数量0 +2025-05-10 14:20:52,163 - app.core.excel.processor - INFO - 条码 6902538004045 处理结果:正常商品数量45.0,单价3.6666666666666665,赠品数量0 +2025-05-10 14:20:52,163 - app.core.excel.processor - INFO - 条码 6902538009040 处理结果:正常商品数量15.0,单价3.6666666666666665,赠品数量0 +2025-05-10 14:20:52,164 - app.core.excel.processor - INFO - 条码 6902538004052 处理结果:正常商品数量15.0,单价3.6666666666666665,赠品数量0 +2025-05-10 14:20:52,164 - app.core.excel.processor - INFO - 条码 6902538007169 处理结果:正常商品数量15.0,单价3.6666666666666665,赠品数量0 +2025-05-10 14:20:52,164 - app.core.excel.processor - INFO - 条码 6902538008425 处理结果:正常商品数量15.0,单价3.6666666666666665,赠品数量0 +2025-05-10 14:20:52,164 - app.core.excel.processor - INFO - 条码 6902538008364 处理结果:正常商品数量15.0,单价3.6666666666666665,赠品数量0 +2025-05-10 14:20:52,164 - app.core.excel.processor - INFO - 条码 6902538005141 处理结果:只有赠品,数量=30.0 +2025-05-10 14:20:52,164 - app.core.excel.processor - INFO - 条码 6902538005141 填充:仅有赠品,采购量=0,赠品数量=30.0 +2025-05-10 14:20:52,166 - app.core.excel.processor - INFO - 采购单已保存到: data/output\采购单_微信图片_20250510142041.xls +2025-05-10 14:20:52,168 - app.core.excel.processor - INFO - 采购单已保存到: data/output\采购单_微信图片_20250510142041.xls diff --git a/logs/app.core.excel.validators.active b/logs/app.core.excel.validators.active index 0ba361d..9093649 100644 --- a/logs/app.core.excel.validators.active +++ b/logs/app.core.excel.validators.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:52 \ No newline at end of file +Active since: 2025-05-10 14:28:31 \ No newline at end of file diff --git a/logs/app.core.excel.validators.log b/logs/app.core.excel.validators.log index aa32354..2f96311 100644 --- a/logs/app.core.excel.validators.log +++ b/logs/app.core.excel.validators.log @@ -7,3 +7,6 @@ 2025-05-08 19:45:49,641 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 2025-05-08 19:45:49,878 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 2025-05-08 19:45:49,881 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2025-05-10 13:09:43,071 - app.core.excel.validators - WARNING - 条码长度异常: 109300, 长度=6 +2025-05-10 13:09:43,072 - app.core.excel.validators - WARNING - 条码验证失败: 条码长度异常: 109300, 长度=6 +2025-05-10 13:09:43,072 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 diff --git a/logs/app.core.ocr.baidu_ocr.active b/logs/app.core.ocr.baidu_ocr.active index 26dd9c1..884791a 100644 --- a/logs/app.core.ocr.baidu_ocr.active +++ b/logs/app.core.ocr.baidu_ocr.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:51 \ No newline at end of file +Active since: 2025-05-10 14:20:44 \ 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 41d7caa..962f614 100644 --- a/logs/app.core.ocr.baidu_ocr.log +++ b/logs/app.core.ocr.baidu_ocr.log @@ -91,3 +91,5 @@ 2025-05-10 12:34:15,444 - app.core.ocr.baidu_ocr - ERROR - 无法获取访问令牌 2025-05-10 12:34:15,445 - app.core.ocr.baidu_ocr - ERROR - 无法获取访问令牌,无法进行表格识别 2025-05-10 12:47:25,432 - app.core.ocr.baidu_ocr - INFO - 成功获取访问令牌 +2025-05-10 13:09:39,486 - app.core.ocr.baidu_ocr - INFO - 成功获取访问令牌 +2025-05-10 14:20:47,053 - 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 26dd9c1..884791a 100644 --- a/logs/app.core.ocr.table_ocr.active +++ b/logs/app.core.ocr.table_ocr.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:51 \ No newline at end of file +Active since: 2025-05-10 14:20:44 \ 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 7e2ace5..388f53d 100644 --- a/logs/app.core.ocr.table_ocr.log +++ b/logs/app.core.ocr.table_ocr.log @@ -775,3 +775,23 @@ 2025-05-10 12:54:52,737 - app.core.ocr.table_ocr - INFO - 初始化OCRProcessor完成:输入目录=data/input, 输出目录=data/output 2025-05-10 12:54:52,743 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 0 个未处理 2025-05-10 12:54:52,743 - app.core.ocr.table_ocr - WARNING - 没有需要处理的图片 +2025-05-10 13:09:39,196 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-10 13:09:39,196 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-10 13:09:39,197 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-10 13:09:39,197 - app.core.ocr.table_ocr - INFO - 允许的文件类型: ['.jpg', '.jpeg', '.png', '.bmp'] +2025-05-10 13:09:39,198 - app.core.ocr.table_ocr - INFO - 初始化OCRProcessor完成:输入目录=data/input, 输出目录=data/output +2025-05-10 13:09:39,202 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 1 个未处理 +2025-05-10 13:09:39,202 - app.core.ocr.table_ocr - INFO - 处理批次 1/1: 1 个文件 +2025-05-10 13:09:39,204 - app.core.ocr.table_ocr - INFO - 开始处理图片: data/input\微信图片_20250510130835.jpg +2025-05-10 13:09:42,978 - app.core.ocr.table_ocr - INFO - 图片处理成功: data/input\微信图片_20250510130835.jpg, 输出文件: data/output\微信图片_20250510130835.xlsx +2025-05-10 13:09:42,984 - app.core.ocr.table_ocr - INFO - 所有图片处理完成, 总计: 1, 成功: 1 +2025-05-10 14:20:46,714 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-10 14:20:46,714 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-10 14:20:46,715 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-10 14:20:46,715 - app.core.ocr.table_ocr - INFO - 允许的文件类型: ['.jpg', '.jpeg', '.png', '.bmp'] +2025-05-10 14:20:46,715 - app.core.ocr.table_ocr - INFO - 初始化OCRProcessor完成:输入目录=data/input, 输出目录=data/output +2025-05-10 14:20:46,721 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 1 个未处理 +2025-05-10 14:20:46,721 - app.core.ocr.table_ocr - INFO - 处理批次 1/1: 1 个文件 +2025-05-10 14:20:46,722 - app.core.ocr.table_ocr - INFO - 开始处理图片: data/input\微信图片_20250510142041.jpg +2025-05-10 14:20:48,367 - app.core.ocr.table_ocr - INFO - 图片处理成功: data/input\微信图片_20250510142041.jpg, 输出文件: data/output\微信图片_20250510142041.xlsx +2025-05-10 14:20:48,379 - 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 26dd9c1..884791a 100644 --- a/logs/app.core.utils.file_utils.active +++ b/logs/app.core.utils.file_utils.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:51 \ No newline at end of file +Active since: 2025-05-10 14:20:44 \ No newline at end of file diff --git a/logs/app.services.ocr_service.active b/logs/app.services.ocr_service.active index 26dd9c1..884791a 100644 --- a/logs/app.services.ocr_service.active +++ b/logs/app.services.ocr_service.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:51 \ No newline at end of file +Active since: 2025-05-10 14:20:44 \ No newline at end of file diff --git a/logs/app.services.ocr_service.log b/logs/app.services.ocr_service.log index 4d3cb00..8831c5e 100644 --- a/logs/app.services.ocr_service.log +++ b/logs/app.services.ocr_service.log @@ -316,3 +316,11 @@ 2025-05-10 12:54:52,737 - app.services.ocr_service - INFO - OCRService初始化完成 2025-05-10 12:54:52,742 - app.services.ocr_service - INFO - OCRService.batch_process被调用,转发到process_images_batch 2025-05-10 12:54:52,742 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-10 13:09:39,194 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-10 13:09:39,198 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-10 13:09:39,202 - app.services.ocr_service - INFO - OCRService.batch_process被调用,转发到process_images_batch +2025-05-10 13:09:39,202 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-10 14:20:46,713 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-10 14:20:46,715 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-10 14:20:46,720 - app.services.ocr_service - INFO - OCRService.batch_process被调用,转发到process_images_batch +2025-05-10 14:20:46,720 - 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 0ba361d..0a1e8d5 100644 --- a/logs/app.services.order_service.active +++ b/logs/app.services.order_service.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:52 \ No newline at end of file +Active since: 2025-05-10 14:20:45 \ No newline at end of file diff --git a/logs/app.services.order_service.log b/logs/app.services.order_service.log index 4d9ce2d..3b1abb2 100644 --- a/logs/app.services.order_service.log +++ b/logs/app.services.order_service.log @@ -356,3 +356,18 @@ 2025-05-10 12:54:52,737 - app.services.order_service - INFO - 初始化OrderService 2025-05-10 12:54:52,742 - app.services.order_service - INFO - OrderService初始化完成 2025-05-10 12:54:52,744 - app.services.order_service - INFO - OrderService开始处理最新Excel文件 +2025-05-10 13:09:39,198 - app.services.order_service - INFO - 初始化OrderService +2025-05-10 13:09:39,201 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-10 13:09:42,986 - app.services.order_service - INFO - OrderService开始处理最新Excel文件 +2025-05-10 14:16:18,081 - app.services.order_service - INFO - 初始化OrderService +2025-05-10 14:16:18,087 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-10 14:16:18,087 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: D:/My Documents/python/orc-order-v2/data/output/采购单_微信图片_20250510130835.xls +2025-05-10 14:16:59,264 - app.services.order_service - INFO - 初始化OrderService +2025-05-10 14:16:59,269 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-10 14:16:59,269 - app.services.order_service - INFO - OrderService开始处理最新Excel文件 +2025-05-10 14:17:10,874 - app.services.order_service - INFO - 初始化OrderService +2025-05-10 14:17:10,878 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-10 14:17:10,878 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: D:/My Documents/python/orc-order-v2/data/output/微信图片_20250510130835.xlsx +2025-05-10 14:20:46,715 - app.services.order_service - INFO - 初始化OrderService +2025-05-10 14:20:46,719 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-10 14:20:48,381 - app.services.order_service - INFO - OrderService开始处理最新Excel文件 diff --git a/logs/app.services.tobacco_service.active b/logs/app.services.tobacco_service.active index 0ba361d..5951359 100644 --- a/logs/app.services.tobacco_service.active +++ b/logs/app.services.tobacco_service.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:52 \ No newline at end of file +Active since: 2025-05-10 14:20:46 \ No newline at end of file