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
142a5c19
authored
Oct 12, 2020
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
库存一定要要
parent
4dbf2f2c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletions
internal/logic/bom_matching.go
internal/logic/match.go
internal/logic/bom_matching.go
View file @
142a5c19
...
...
@@ -73,7 +73,7 @@ func batchUpdateItemStatus(bomId int, bomItemIds []int) (err error) {
tableEnd
:=
string
(
bomIdStr
[
len
(
bomIdStr
)
-
1
])
//分别去更新
err
=
model
.
Db
.
Table
(
"lie_bom_item_"
+
tableEnd
)
.
Where
(
"bom_item_id IN (?)"
,
bomItemIds
)
.
Updates
(
map
[
string
]
interface
{}{
"item_status"
:
4
,
"update_time"
:
now
})
.
Error
Updates
(
map
[
string
]
interface
{}{
"item_status"
:
4
,
"update_time"
:
now
,
"is_select"
:
0
})
.
Error
if
err
!=
nil
{
return
}
...
...
internal/logic/match.go
View file @
142a5c19
...
...
@@ -345,6 +345,7 @@ func getTermQuery(index string, bomItem model.BomItem, sort int, flag bool) (que
if
strings
.
Contains
(
index
,
"liexin_ziying"
)
{
query
.
Should
(
es
.
NewTermQuery
(
"brand_id"
,
bomItem
.
ZyBrandId
))
}
query
.
Must
(
es
.
NewRangeQuery
(
"stock"
)
.
Gt
(
0
))
if
bomItem
.
ZyBrandId
!=
""
{
for
_
,
id
:=
range
bomItem
.
LyBrandIds
{
query
.
Should
(
es
.
NewTermQuery
(
"brand_id"
,
id
))
...
...
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