Skip to content

Commit 54cf1f4

Browse files
fix(summary): note parse incorrect
1 parent 7534b93 commit 54cf1f4

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

summary/src/parse/assign.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ pub fn parse_docx_table(content: Vec<String>) -> SummaryInfo {
5151
}
5252

5353
// 委托单位信息
54-
if (item.contains("委托单位") || item.contains("申请商")) && index + 2 < content.len() {
54+
if (item.contains("委托单位") || item.contains("申请商")) && index + 2 < content.len()
55+
{
5556
let consignor_info = content[index + 2].clone();
5657
if !consignor_info.contains("生产单位") && !consignor_info.contains("Manufacturer")
5758
{
@@ -60,7 +61,8 @@ pub fn parse_docx_table(content: Vec<String>) -> SummaryInfo {
6061
}
6162

6263
// 生产单位信息
63-
if (item.contains("生产单位") || item.contains("制造商")) && index + 2 < content.len() {
64+
if (item.contains("生产单位") || item.contains("制造商")) && index + 2 < content.len()
65+
{
6466
let manufacturer_info = content[index + 2].clone();
6567
if !manufacturer_info.contains("测试单位") && !manufacturer_info.contains("Test Lab")
6668
{
@@ -107,6 +109,11 @@ pub fn parse_docx_table(content: Vec<String>) -> SummaryInfo {
107109
}
108110
}
109111

112+
// 备注
113+
if summary.note.contains("签名") && summary.note.contains("Signatory") {
114+
summary.note = "/".to_string();
115+
}
116+
110117
// 签发日期
111118
if let Some(last_item) = content.last() {
112119
summary.issue_date = last_item.clone();

0 commit comments

Comments
 (0)