liujiandao
2024-04-10 122c79a4b3f16ef9f5c3e92c2ca1812f49b41ccb
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)
@@ -266,7 +266,7 @@
   detailsSearch.Orm = detailsSearch.Orm.Model(&models.MoveHistory{}).
      Select("number, updated_at as date, product_name as product_name, from_location_id, operation_id,to_location_id, amount, " +
         "unit, operator as contacted_name, base_operation_type, weight, product_id, from_location, to_location, operation_type_name").Order("id desc")
         "unit, operator as contacted_name, base_operation_type, weight, product_id, from_location, to_location, operation_type_name, weight").Order("id desc")
   if len(ids) > 0 {
      detailsSearch.Orm = detailsSearch.Orm.Where("id in ?", ids)
   }