Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
bom_server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b6a5f8b3
authored
Jun 29, 2020
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
单位问题
parent
8709c3b6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
internal/logic/attr.go
internal/mapping/search_keyword.go
internal/logic/attr.go
View file @
b6a5f8b3
...
@@ -33,7 +33,7 @@ func MatchGoodsNameByAttrs(bomItems []model.BomItem) (result []model.BomItem, er
...
@@ -33,7 +33,7 @@ func MatchGoodsNameByAttrs(bomItems []model.BomItem) (result []model.BomItem, er
if
item
.
GoodsName
!=
""
&&
item
.
Attrs
==
""
{
if
item
.
GoodsName
!=
""
&&
item
.
Attrs
==
""
{
search
=
searchAttr
(
item
,
search
)
search
=
searchAttr
(
item
,
search
)
searchFlag
=
true
searchFlag
=
true
}
else
{
}
else
{
search
=
searchAttr
(
item
,
search
)
search
=
searchAttr
(
item
,
search
)
searchFlag
=
true
searchFlag
=
true
}
}
...
@@ -120,6 +120,7 @@ func searchAttr(bomItem model.BomItem, search *es.MultiSearchService) (result *e
...
@@ -120,6 +120,7 @@ func searchAttr(bomItem model.BomItem, search *es.MultiSearchService) (result *e
}
}
}
}
}
}
//fmt.Println(attrsSlice)
query
:=
getQuery
(
attrsSlice
)
query
:=
getQuery
(
attrsSlice
)
//如果ZyBrandId不为空,则代表匹配到了映射id
//如果ZyBrandId不为空,则代表匹配到了映射id
if
bomItem
.
ZyBrandId
!=
""
&&
len
(
attrsSlice
)
>
0
{
if
bomItem
.
ZyBrandId
!=
""
&&
len
(
attrsSlice
)
>
0
{
...
...
internal/mapping/search_keyword.go
View file @
b6a5f8b3
...
@@ -9,7 +9,9 @@ var KeywordRegular = map[string]string{
...
@@ -9,7 +9,9 @@ var KeywordRegular = map[string]string{
`(欧姆|欧|O|o|R|r)$`
:
"Ω"
,
`(欧姆|欧|O|o|R|r)$`
:
"Ω"
,
`(Uf|uf|μf|uF|UF)$`
:
"μF"
,
`(Uf|uf|μf|uF|UF)$`
:
"μF"
,
`(Nf|NF)$`
:
"nF"
,
`(Nf|NF|nf)$`
:
"nF"
,
`(Pf|PF|pf)$`
:
"pF"
,
`(Mf|MF|mf)$`
:
"mF"
,
`(Uh|uh|μh|uH|UH)$`
:
"μH"
,
`(Uh|uh|μh|uH|UH)$`
:
"μH"
,
`K$`
:
"nF"
,
`K$`
:
"nF"
,
`v$`
:
"V"
,
`v$`
:
"V"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment