zhangqian
2024-04-07 a8914a16b23e93f6bfd12bcfd5cbe8b24cf7eb84
controllers/report_forms_controller.go
@@ -97,8 +97,8 @@
      Where("wms_operation.base_operation_type in (?)", []constvar.BaseOperationType{constvar.BaseOperationTypeOutgoing, constvar.BaseOperationTypeInternal, constvar.BaseOperationTypeDisuse}).
      Where("wms_operation.status in (?)", []constvar.OperationStatus{constvar.OperationStatus_Ready, constvar.OperationStatus_Finish})
   if len(locationIds) > 0 {
      dbIn.Where("wms_operation.to_location_id in (?)", locationIds)
      dbOut.Where("wms_operation.from_location_id in (?)", locationIds)
      dbIn.Where("wms_operation_details.to_location_id in (?)", locationIds)
      dbOut.Where("wms_operation_details.from_location_id in (?)", locationIds)
   }
   if len(productIds) > 0 {
      dbIn.Where("wms_operation_details.product_id in (?)", productIds)
@@ -339,6 +339,7 @@
   for _, amount := range amounts {
      var resp response.LocationForms
      resp.Amount = amount.Amount
      resp.LocationId = amount.LocationId
      resp.LocationName = amount.Location.Name
      resp.ProduceId = amount.Product.ID
      resp.ProductName = amount.Product.Name