Initial commit: 包装审核 POC、Docker 与前后端

Made-with: Cursor
This commit is contained in:
2026-04-15 17:18:49 +08:00
commit bbb4dd43b3
74 changed files with 297415 additions and 0 deletions

656
frontend/src/mockData.ts Normal file
View File

@@ -0,0 +1,656 @@
import type { ProcessResponse } from './types'
export const MOCK_JOB_ID = '8db8b6393957487d974b8cdc043d2edc'
export const MOCK_RESULT: ProcessResponse = {
"preview": {
"type": "png",
"url": "/api/files/8db8b6393957487d974b8cdc043d2edc/crop/cropped_label.png",
"pageWidthPt": 1986,
"pageHeightPt": 1026
},
"fields": [
{
"id": "field-000",
"page": 1,
"block_type": "text",
"text": "过敏原信息:此产品含有肤质的谷物及其制品、大豆及其制品、蛋类及其制品、坚果及其果仁类制品。此生产线也加工含有甲壳纲类动物及其制品、鱼类及其制品、乳及乳制品、花生及其制品的食品。",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 173,
"top_pt": 431,
"x1_pt": 558,
"bottom_pt": 451,
"normalized_text": "过敏原信息:此产品含有肤质的谷物及其制品、大豆及其制品、蛋类及其制品、坚果及其果仁类制品。此生产线也加工含有甲壳纲类动物及其制品、鱼类及其制品、乳及乳制品、花生及其制品的食品。",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "过敏原信息:此产品含有肤质的谷物及其制品、大豆及其制品、蛋类及其制品、坚果及其果"
},
{
"id": "field-001",
"page": 1,
"block_type": "text",
"text": "生产日期/保质期到期日:见礼盒底面喷码处",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 174,
"top_pt": 450,
"x1_pt": 262,
"bottom_pt": 467,
"normalized_text": "生产日期/保质期到期日:见礼盒底面喷码处",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "生产日期/保质期到期日:见礼盒底面喷码处"
},
{
"id": "field-002",
"page": 1,
"block_type": "text",
"text": "保质期6个月",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 174,
"top_pt": 467,
"x1_pt": 203,
"bottom_pt": 483,
"normalized_text": "保质期6个月",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "保质期6个月"
},
{
"id": "field-003",
"page": 1,
"block_type": "text",
"text": "注意:如发现真空包装袋破损或膨胀,请勿食用,并在保质期内及时向当地经销商调换。",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 174,
"top_pt": 483,
"x1_pt": 344,
"bottom_pt": 501,
"normalized_text": "注意:如发现真空包装袋破损或膨胀,请勿食用,并在保质期内及时向当地经销商调换。",
"validation_status": "unmatched",
"validation_reason": "版面文字与 Word 校对稿存在差异,请人工核查",
"matched_excerpt": null
},
{
"id": "field-004",
"page": 1,
"block_type": "text",
"text": "贮存条件:常温干燥通风处保存 ",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 174,
"top_pt": 501,
"x1_pt": 237,
"bottom_pt": 519,
"normalized_text": "贮存条件:常温干燥通风处保存 ",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "贮存条件:常温干燥通风处保存 "
},
{
"id": "field-005",
"page": 1,
"block_type": "text",
"text": "委托单位湖州诸老大实业股份有限公司地址浙江省湖州市吴兴区高新区科创园A幢317室服务热线400-603-1887",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 174,
"top_pt": 518,
"x1_pt": 412,
"bottom_pt": 536,
"normalized_text": "委托单位湖州诸老大实业股份有限公司地址浙江省湖州市吴兴区高新区科创园A幢317室服务热线400-603-1887",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "委托单位湖州诸老大实业股份有限公司地址浙江省湖州市吴兴区高新区科创园A幢31"
},
{
"id": "field-006",
"page": 1,
"block_type": "text",
"text": "【老大黑猪五花肉粽子/老大双蛋黄黑猪肉粽子/酱香黑猪肉粽子/花胶鸡火腿老汤粽子/黑松露味五花肉粽子/高汤五花肉粽子/经典洗沙粽子/玫瑰白玉洗沙粽子/黑芝麻核桃粽子/新会陈皮洗沙粽子】",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 174,
"top_pt": 536,
"x1_pt": 562,
"bottom_pt": 553,
"normalized_text": "【老大黑猪五花肉粽子/老大双蛋黄黑猪肉粽子/酱香黑猪肉粽子/花胶鸡火腿老汤粽子/黑松露味五花肉粽子/高汤五花肉粽子/经典洗沙粽子/玫瑰白玉洗沙粽子/黑芝麻核桃粽子/新会陈皮洗沙粽子】",
"validation_status": "empty_or_garbled",
"validation_reason": "识别结果为空或包含乱码,无法有效校验",
"matched_excerpt": null
},
{
"id": "field-007",
"page": 1,
"block_type": "text",
"text": "受委托单位浙江诸老大供应链管理有限公司地址浙江省嘉兴市海盐县望海街道顾家路5号产地浙江省嘉兴市",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 174,
"top_pt": 553,
"x1_pt": 399,
"bottom_pt": 571,
"normalized_text": "受委托单位浙江诸老大供应链管理有限公司地址浙江省嘉兴市海盐县望海街道顾家路5号产地浙江省嘉兴市",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "受委托单位浙江诸老大供应链管理有限公司地址浙江省嘉兴市海盐县望海街道顾家路5"
},
{
"id": "field-008",
"page": 1,
"block_type": "text",
"text": "电话0573-86981666食品生产许可证编号SC11133042404806产品标准代号GB/T46259",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 174,
"top_pt": 571,
"x1_pt": 369,
"bottom_pt": 589,
"normalized_text": "电话0573-86981666食品生产许可证编号SC11133042404806产品标准代号GB/T46259",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "电话0573-86981666食品生产许可证编号SC111330424048"
},
{
"id": "field-009",
"page": 1,
"block_type": "text",
"text": "【草木灰咸鸭蛋】",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 174,
"top_pt": 603,
"x1_pt": 208,
"bottom_pt": 621,
"normalized_text": "【草木灰咸鸭蛋】",
"validation_status": "unmatched",
"validation_reason": "版面文字与 Word 校对稿存在差异,请人工核查",
"matched_excerpt": null
},
{
"id": "field-010",
"page": 1,
"block_type": "text",
"text": "(受委托单位详见喷码处)",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 174,
"top_pt": 621,
"x1_pt": 225,
"bottom_pt": 639,
"normalized_text": "(受委托单位详见喷码处)",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "(受委托单位详见喷码处)"
},
{
"id": "field-011",
"page": 1,
"block_type": "text",
"text": "A受委托单位高邮市秦邮蛋品有限公司",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 174,
"top_pt": 639,
"x1_pt": 258,
"bottom_pt": 657,
"normalized_text": "A受委托单位高邮市秦邮蛋品有限公司",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "A受委托单位高邮市秦邮蛋品有限公司"
},
{
"id": "field-012",
"page": 1,
"block_type": "text",
"text": "受委托单位地址高邮城南经济新区兴区路5号",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 174,
"top_pt": 657,
"x1_pt": 268,
"bottom_pt": 674,
"normalized_text": "受委托单位地址高邮城南经济新区兴区路5号",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "受委托单位地址高邮城南经济新区兴区路5号"
},
{
"id": "field-013",
"page": 1,
"block_type": "text",
"text": "产地:江苏省扬州市",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 174,
"top_pt": 674,
"x1_pt": 214,
"bottom_pt": 691,
"normalized_text": "产地:江苏省扬州市",
"validation_status": "unmatched",
"validation_reason": "版面文字与 Word 校对稿存在差异,请人工核查",
"matched_excerpt": null
},
{
"id": "field-014",
"page": 1,
"block_type": "text",
"text": "产品类型:真空包装熟咸鸭蛋 ",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 174,
"top_pt": 691,
"x1_pt": 233,
"bottom_pt": 709,
"normalized_text": "产品类型:真空包装熟咸鸭蛋 ",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "产品类型:真空包装熟咸鸭蛋 "
},
{
"id": "field-015",
"page": 1,
"block_type": "text",
"text": "等级:奎级",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 174,
"top_pt": 709,
"x1_pt": 196,
"bottom_pt": 726,
"normalized_text": "等级:奎级",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "等级:奎级"
},
{
"id": "field-016",
"page": 1,
"block_type": "text",
"text": "电话400-8118-252 400-8289-800",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 174,
"top_pt": 726,
"x1_pt": 247,
"bottom_pt": 743,
"normalized_text": "电话400-8118-252 400-8289-800",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "电话400-8118-252 400-8289-800"
},
{
"id": "field-017",
"page": 1,
"block_type": "text",
"text": "食品生产许可证编号SC11932108400062",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 174,
"top_pt": 743,
"x1_pt": 261,
"bottom_pt": 761,
"normalized_text": "食品生产许可证编号SC11932108400062",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "食品生产许可证编号SC11932108400062"
},
{
"id": "field-018",
"page": 1,
"block_type": "text",
"text": "产品标准代号Q/QYDP0001S ",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 174,
"top_pt": 761,
"x1_pt": 237,
"bottom_pt": 778,
"normalized_text": "产品标准代号Q/QYDP0001S ",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "产品标准代号Q/QYDP0001S "
},
{
"id": "field-019",
"page": 1,
"block_type": "text",
"text": "食用方法:本品为熟制品,开袋去壳即食。冬季加热出油后",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 174,
"top_pt": 777,
"x1_pt": 287,
"bottom_pt": 795,
"normalized_text": "食用方法:本品为熟制品,开袋去壳即食。冬季加热出油后",
"validation_status": "unmatched",
"validation_reason": "版面文字与 Word 校对稿存在差异,请人工核查",
"matched_excerpt": null
},
{
"id": "field-020",
"page": 1,
"block_type": "text",
"text": "食用味道更佳。蛋品易破碎,若发现异味或真空袋漏气、胀气,",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 174,
"top_pt": 795,
"x1_pt": 293,
"bottom_pt": 813,
"normalized_text": "食用味道更佳。蛋品易破碎,若发现异味或真空袋漏气、胀气,",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "食用味道更佳。蛋品易破碎,若发现异味或真空袋漏气、胀气,"
},
{
"id": "field-021",
"page": 1,
"block_type": "text",
"text": "请勿食用。可与当地经销商调换",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 174,
"top_pt": 812,
"x1_pt": 237,
"bottom_pt": 829,
"normalized_text": "请勿食用。可与当地经销商调换",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "请勿食用。可与当地经销商调换"
},
{
"id": "field-022",
"page": 1,
"block_type": "text",
"text": "(B)受委托单位:高邮三宝食品有限公司",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 315,
"top_pt": 608,
"x1_pt": 393,
"bottom_pt": 625,
"normalized_text": "(B)受委托单位:高邮三宝食品有限公司",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "(B)受委托单位:高邮三宝食品有限公司"
},
{
"id": "field-023",
"page": 1,
"block_type": "text",
"text": "受委托单位地址高邮市甘燥镇三郎庙路38号",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 315,
"top_pt": 625,
"x1_pt": 406,
"bottom_pt": 643,
"normalized_text": "受委托单位地址高邮市甘燥镇三郎庙路38号",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "受委托单位地址高邮市甘燥镇三郎庙路38号"
},
{
"id": "field-024",
"page": 1,
"block_type": "text",
"text": "产地:江苏省扬州市",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 315,
"top_pt": 643,
"x1_pt": 356,
"bottom_pt": 660,
"normalized_text": "产地:江苏省扬州市",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "产地:江苏省扬州市"
},
{
"id": "field-025",
"page": 1,
"block_type": "text",
"text": "产品类型:高邮咸鸭蛋软罐头(熟)",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 315,
"top_pt": 660,
"x1_pt": 382,
"bottom_pt": 677,
"normalized_text": "产品类型:高邮咸鸭蛋软罐头(熟)",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "产品类型:高邮咸鸭蛋软罐头(熟)"
},
{
"id": "field-026",
"page": 1,
"block_type": "text",
"text": "贮存条件:常温、阴凉干燥,通风处",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 315,
"top_pt": 677,
"x1_pt": 382,
"bottom_pt": 695,
"normalized_text": "贮存条件:常温、阴凉干燥,通风处",
"validation_status": "unmatched",
"validation_reason": "版面文字与 Word 校对稿存在差异,请人工核查",
"matched_excerpt": null
},
{
"id": "field-027",
"page": 1,
"block_type": "text",
"text": "电话400-690-2811",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 315,
"top_pt": 695,
"x1_pt": 357,
"bottom_pt": 711,
"normalized_text": "电话400-690-2811",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "电话400-690-2811"
},
{
"id": "field-028",
"page": 1,
"block_type": "text",
"text": "食品生产许可证编号SC11932108401305",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 315,
"top_pt": 711,
"x1_pt": 402,
"bottom_pt": 729,
"normalized_text": "食品生产许可证编号SC11932108401305",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "食品生产许可证编号SC11932108401305"
},
{
"id": "field-029",
"page": 1,
"block_type": "text",
"text": "产品标准代号GB/T19050",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 315,
"top_pt": 729,
"x1_pt": 371,
"bottom_pt": 745,
"normalized_text": "产品标准代号GB/T19050",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "产品标准代号GB/T19050"
},
{
"id": "field-030",
"page": 1,
"block_type": "text",
"text": "食用方法:去壳即食,冬季加温出油更佳,如出现真",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 315,
"top_pt": 745,
"x1_pt": 414,
"bottom_pt": 763,
"normalized_text": "食用方法:去壳即食,冬季加温出油更佳,如出现真",
"validation_status": "empty_or_garbled",
"validation_reason": "识别结果为空或包含乱码,无法有效校验",
"matched_excerpt": null
},
{
"id": "field-031",
"page": 1,
"block_type": "text",
"text": "空咸鸭蛋漏气、胀袋、变质请勿食用",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 315,
"top_pt": 763,
"x1_pt": 385,
"bottom_pt": 781,
"normalized_text": "空咸鸭蛋漏气、胀袋、变质请勿食用",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "空咸鸭蛋漏气、胀袋、变质请勿食用"
},
{
"id": "field-032",
"page": 1,
"block_type": "text",
"text": "等级:叁级",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 315,
"top_pt": 781,
"x1_pt": 338,
"bottom_pt": 799,
"normalized_text": "等级:叁级",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "等级:叁级"
},
{
"id": "field-033",
"page": 1,
"block_type": "text",
"text": "粽子食用方法:水煮加热法",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 446,
"top_pt": 589,
"x1_pt": 508,
"bottom_pt": 606,
"normalized_text": "粽子食用方法:水煮加热法",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "粽子食用方法:水煮加热法"
},
{
"id": "field-034",
"page": 1,
"block_type": "text",
"text": "生产日期:",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 603,
"top_pt": 768,
"x1_pt": 642,
"bottom_pt": 801,
"normalized_text": "生产日期:",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "生产日期:"
},
{
"id": "field-035",
"page": 1,
"block_type": "text",
"text": "保质期到期日:",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 604,
"top_pt": 802,
"x1_pt": 659,
"bottom_pt": 835,
"normalized_text": "保质期到期日:",
"validation_status": "matched",
"validation_reason": "文字内容与 Word 稿一致",
"matched_excerpt": "保质期到期日:"
},
{
"id": "field-036",
"page": 1,
"block_type": "text",
"text": "食品名称:卜居礼品粽(粽子/草木灰咸鸭蛋/低糖原味绿豆糕) 净含量:1.73千克(粽子:170克 \\times 3+130克 \\times 5, 草木灰咸鸭蛋:70克 \\times 6, 低糖原味绿豆糕:25克 \\times 6)",
"font_name": "SourceHanSansCN-Regular",
"font_size_pt": 8.0,
"font_height_mm": 2.8,
"x0_pt": 175,
"top_pt": 862,
"x1_pt": 878,
"bottom_pt": 909,
"normalized_text": "食品名称:卜居礼品粽(粽子/草木灰咸鸭蛋/低糖原味绿豆糕) 净含量:1.73千克(粽子:170克 \\times 3+130克 \\times 5, 草木灰咸鸭蛋:70克 \\times 6, 低糖原味绿豆糕:25克 \\times 6)",
"validation_status": "unmatched",
"validation_reason": "版面文字与 Word 校对稿存在差异,请人工核查",
"matched_excerpt": null
}
],
"word_text": "诸老大粽子配料表:糯米、猪肉(黑猪)、酱油、食盐、白砂糖、味精。",
"barcodes": [
{
"format": "EAN_13",
"format_label": "EAN-13",
"text": "6901234567890",
"x0": 820,
"y0": 180,
"x1": 900,
"y1": 280,
"valid": true
}
]
}