aa
This commit is contained in:
@@ -2776,7 +2776,8 @@ func AddVendorCategoryMap(ctx *jxcontext.Context, vendorCategoryMap *model.Vendo
|
|||||||
dao.Commit(db)
|
dao.Commit(db)
|
||||||
result = vendorCategoryMap
|
result = vendorCategoryMap
|
||||||
if vendorCategoryMap.CategoryID != 0 {
|
if vendorCategoryMap.CategoryID != 0 {
|
||||||
_, err = CurVendorSync.SyncCategory(ctx, nil, vendorCategoryMap.CategoryID, false, ctx.GetUserName())
|
SyncCategories(ctx, nil, []int{vendorCategoryMap.VendorID}, []string{vendorCategoryMap.VendorOrgCode}, []int{vendorCategoryMap.CategoryID}, true)
|
||||||
|
// _, err = CurVendorSync.SyncCategory(ctx, nil, vendorCategoryMap.CategoryID, false, ctx.GetUserName())
|
||||||
}
|
}
|
||||||
return result, err
|
return result, err
|
||||||
}
|
}
|
||||||
@@ -2797,8 +2798,10 @@ func UpdateVendorCategoryMap(ctx *jxcontext.Context, ID int, vendorCategoryMap *
|
|||||||
}
|
}
|
||||||
if vendorCategoryMap.CategoryID != 0 {
|
if vendorCategoryMap.CategoryID != 0 {
|
||||||
valid["categoryID"] = vendorCategoryMap.CategoryID
|
valid["categoryID"] = vendorCategoryMap.CategoryID
|
||||||
|
fmt.Println("111111", utils.Format4Output(vendorCategoryMap, false))
|
||||||
if !isDelete {
|
if !isDelete {
|
||||||
storeCatMaps, _ := dao.GetVendorCategoryMap(db, -1, 0, vendorCategoryMap2.VendorID, vendorCategoryMap2.VendorOrgCode, vendorCategoryMap.CategoryID)
|
storeCatMaps, _ := dao.GetVendorCategoryMap(db, -1, 0, vendorCategoryMap2.VendorID, vendorCategoryMap2.VendorOrgCode, vendorCategoryMap.CategoryID)
|
||||||
|
fmt.Println("2222222", utils.Format4Output(storeCatMaps, false))
|
||||||
if len(storeCatMaps) > 0 {
|
if len(storeCatMaps) > 0 {
|
||||||
for _, v := range storeCatMaps {
|
for _, v := range storeCatMaps {
|
||||||
if v.ID != ID {
|
if v.ID != ID {
|
||||||
@@ -2857,7 +2860,7 @@ func UpdateVendorCategoryMap(ctx *jxcontext.Context, ID int, vendorCategoryMap *
|
|||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
dao.Commit(db)
|
dao.Commit(db)
|
||||||
_, err = CurVendorSync.SyncCategory(ctx, nil, vendorCategoryID, false, ctx.GetUserName())
|
SyncCategories(ctx, nil, []int{vendorCategoryMap.VendorID}, []string{vendorCategoryMap.VendorOrgCode}, []int{vendorCategoryID}, true)
|
||||||
return num, err
|
return num, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user