yinbentan
2024-07-11 e042d530a290bb0e45e59fe5c06d813618d0e546
仓库位置查询从仓库缩写变更为仓库ID查询
2个文件已修改
12 ■■■■■ 已修改文件
request/report_forms_request.go 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/inventory_report_forms.go 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
request/report_forms_request.go
@@ -5,7 +5,8 @@
type GetInventoryForms struct {
    PageInfo
    CategoryIds   []int  `json:"categoryIds"`   //产品类型id
    WarehouseCode string `json:"warehouseCode"` //仓库缩写
    //WarehouseCode string `json:"warehouseCode"` //仓库缩写
    WarehouseId int    `json:"warehouseId"` //仓库ID
    KeyWord       string `json:"keyWord"`       //搜索条件
}
service/inventory_report_forms.go
@@ -130,8 +130,11 @@
    err error) {
    productAmounts = make([]*models.LocationProductAmount, 0)
    locationSearch := models.NewLocationSearch()
    if params.WarehouseCode != "" {
        locationSearch.SetJointName(params.WarehouseCode)
    //if params.WarehouseCode != "" {
    //    locationSearch.SetJointName(params.WarehouseCode)
    //}
    if params.WarehouseId > 0 {
        locationSearch.SetWarehouseId(params.WarehouseId)
    }
    locations, err := locationSearch.FindNotTotal()
@@ -154,7 +157,7 @@
    //查询产品
    search = models.NewMaterialSearch()
    search.Orm = search.Orm.Model(&models.Material{}).
    search.Orm = search.Orm.Model(&models.Material{}). // material
        Select(`material.id, material.name, material.cost, material.amount, material.unit, material.more_unit, material.more_unit_value, wms_product_category.name as category_name `).
        Joins("left join wms_product_category on material.category_id = wms_product_category.id")
    if len(params.CategoryIds) > 0 {