Browse Source

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

leiy 8 months ago
parent
commit
bf9e38c7da

+ 4 - 0
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -12855,6 +12855,10 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
                     {
                         Grp_ApprovalTravelDetails chi = new Grp_ApprovalTravelDetails();
                         chi.Details = "拜访" + item.Client;
+                        if (string.IsNullOrWhiteSpace(item.ReqSample))
+                        {
+                            chi.Details += "," + item.ReqSample;
+                        }
                         chi.ParentId = thisId;
                         chi.Time = item.Time;
                         chiarr.Add(chi);

+ 2 - 1
OASystem/OASystem.Infrastructure/Repositories/Groups/CarTouristGuideGroundRepository.cs

@@ -1070,7 +1070,8 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 foreach (var item in carTouristList)
                 {
 
-                    Grp_CarTouristGuideGroundReservationsContent QueryData = _sqlSugar.Queryable<Grp_CarTouristGuideGroundReservationsContent>().First(a => a.SId == item.SId && a.Id == item.Id && a.DiId == item.DiId && a.IsDel == 0);
+                    Grp_CarTouristGuideGroundReservationsContent QueryData = _sqlSugar.Queryable<Grp_CarTouristGuideGroundReservationsContent>().First(a => a.SId == item.SId && a.Id == item.Id && a.DiId == item.DiId
+                    && a.CTGGRId == dto.CTGGRId && a.IsDel == 0);
                     if (QueryData == null)
                     {
                         int id = await _sqlSugar.Insertable(item).ExecuteReturnIdentityAsync();

+ 13 - 1
OASystem/OASystem.Infrastructure/Repositories/Resource/ThreeCodeRepository.cs

@@ -219,11 +219,23 @@ namespace OASystem.Infrastructure.Repositories.Resource
 
         public Dictionary<string,Res_ThreeCode> QueryThreeCodeArray(List<string> codeArr)
         {
+            Dictionary<string, Res_ThreeCode> dic = new Dictionary<string, Res_ThreeCode>();
+
             codeArr.ForEach(code =>
             {
                 code = code.ToUpper();
             });
-            return Query(x => codeArr.Contains(x.Three.ToUpper())).ToList().ToDictionary(x => x.Three, x => x);
+
+            var queryData =  Query(x => codeArr.Contains(x.Three.ToUpper()) && x.IsDel == 0).ToList();
+
+            var groupData = queryData.GroupBy(x => x.Three).ToList();
+
+            foreach (var item in groupData)
+            {
+                dic.Add(item.Key, item.ToList()[0]);
+            }
+
+            return dic;
         }
     }
 }