liujiandao
2023-09-28 1340b6f7bedfa88218cc5e1a00b3eb2a0bd0309e
controllers/report_forms_controller.go
@@ -134,7 +134,7 @@
   for _, detail := range details {
      operationIds = append(operationIds, detail.OperationID)
   }
   //获取操作记录
   //获取已完成的操作记录
   operations, err := models.NewOperationSearch().SetIds(operationIds).SetStatus(constvar.OperationStatus_Finish).FindNotTotal()
   if err != nil {
      util.ResponseFormat(c, code.RequestParamError, "查询操作记录失败")
@@ -145,11 +145,12 @@
      var resp response.InventoryHistory
      resp.Amount = detail.Amount
      resp.Unit = params.Unit
      resp.ProductName = params.ProductName
      for _, operation := range operations {
         if detail.OperationID == operation.Id {
            resp.Number = operation.Number
            resp.Date = operation.UpdateTime
            resp.BaseOperationType = operation.BaseOperationType
            resp.Status = "完成"
            resp.ContactedName = operation.ContacterName
            resp.FromLocation = operation.FromLocation.Name
            resp.ToLocation = operation.ToLocation.Name