Commit 142a5c19 by mushishixian

库存一定要要

parent 4dbf2f2c
......@@ -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
}
......
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment