Quellcode durchsuchen

Merge branch 'develop' of http://132.232.92.186:3000/XinXiBu/OA2023 into develop

LEIYI vor 5 Monaten
Ursprung
Commit
6e3726944e

+ 1 - 1
OASystem/OASystem.Api/Controllers/MarketCustomerResourcesController.cs

@@ -307,7 +307,7 @@ namespace OASystem.API.Controllers
             var res = await _clientDataRepository._BatchAssignment(dto);
             if (res.Code != 0)
             {
-                return Ok(JsonView(false, "操作失败!"));
+                return Ok(JsonView(false, res.Msg));
             }
             return Ok(JsonView(true, "操作成功!"));
         }

+ 12 - 0
OASystem/OASystem.Infrastructure/Repositories/CRM/NewClientDataRepository.cs

@@ -947,6 +947,9 @@ namespace OASystem.Infrastructure.Repositories.CRM
                                                                                            dto.UserIdItem.Contains(it.usersId)
                                                                                      )
                                                                               .ToListAsync();
+
+            var existsCount = 0;
+
             foreach (var clientDataId in dto.ClientDataIdItem)
             {
                 foreach (var userId1 in dto.UserIdItem)
@@ -963,6 +966,10 @@ namespace OASystem.Infrastructure.Repositories.CRM
                             usersId = userId1
                         });
                     }
+                    else
+                    {
+                        existsCount++;
+                    }
                 }
             }
             if (_ClientDataAndUsers.Count > 0)
@@ -1000,6 +1007,11 @@ namespace OASystem.Infrastructure.Repositories.CRM
                     return AcrionResult;
                 }
             }
+            else
+            {
+                if(existsCount > 0)
+                    AcrionResult.Msg += $" {existsCount}条数据已被指派,无法重复指派!";
+            }
 
             return AcrionResult;
         }