yuanrf пре 1 година
родитељ
комит
828730069b

+ 4 - 4
OASystem/OASystem.Infrastructure/Repositories/Groups/DelegationInfoRepository.cs

@@ -295,7 +295,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
                             param.IDCardNo = clientIDInfo.CertNo;
                             param.Remark = item.Remark;
-                            param.BirthDay = clientInfo.BirthDay;
+                            param.BirthDay = clientInfo.BirthDay.Length > 10 ? clientInfo.BirthDay.Substring(0, 10).Replace("/", "-").Trim() : "";
                             param.FirstName = clientInfo.FirstName;
                             param.LastName = clientInfo.LastName;
                             param.CompanyFullName = Company.CompanyFullName;
@@ -314,8 +314,8 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
                         GroupProcessOperationDtoParam.PortType = dto.PortType;
                         GroupProcessOperationDtoParam.TourClientListInfos = TourClientListInfoArr;
-                        GroupProcessOperationDtoParam.VisitDate = GroupProcessOperationDtoParam.VisitDate.Length > 10 ? GroupProcessOperationDtoParam.VisitDate.Substring(0, 10).Replace("/","-") : "";
-                        GroupProcessOperationDtoParam.TontractTime = GroupProcessOperationDtoParam.TontractTime.Length > 10 ? GroupProcessOperationDtoParam.TontractTime.Substring(0, 10).Replace("/","-") : "";
+                        GroupProcessOperationDtoParam.VisitDate = GroupProcessOperationDtoParam.VisitDate.Length > 10 ? GroupProcessOperationDtoParam.VisitDate.Substring(0, 10).Replace("/","-").Trim() : "";
+                        GroupProcessOperationDtoParam.TontractTime = GroupProcessOperationDtoParam.TontractTime.Length > 10 ? GroupProcessOperationDtoParam.TontractTime.Substring(0, 10).Replace("/","-").Trim() : "";
 
                         result.Data = GroupProcessOperationDtoParam;
                     }
@@ -513,7 +513,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                         SpecialNeeds = dto.SpecialNeeds,
                         OtherNeeds = dto.OtherNeeds,
                         Remark = dto.Remark,
-                        JietuanOperator = dto.UserId,
+                        JietuanOperator = dto.JietuanOperator,
                         TellPhone = dto.TellPhone,
                         CGRWSPBMMC = dto.CGRWSPBMMC,
                         CGRWSPWH = dto.CGRWSPWH,

+ 7 - 33
OASystem/OASystem.Infrastructure/Repositories/Groups/TourClientListRepository.cs

@@ -636,9 +636,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
             _sqlSugar.BeginTran();
             try
             {
-                var ids = new List<int>();
-                ids = _TourClientListInfos.Select(x => x.Id).ToList();
-                _sqlSugar.Updateable<Grp_TourClientList>().SetColumns(x=> new Grp_TourClientList { IsDel = 1 } ).Where(x=>x.DiId == diid && !(ids.Contains(x.Id)) ).ExecuteCommand();
+                _sqlSugar.Updateable<Grp_TourClientList>().SetColumns(x=> new Grp_TourClientList { IsDel = 1 } ).Where(x=>x.DiId == diid).ExecuteCommand();
 
                 foreach (var item in _TourClientListInfos)
                 {
@@ -848,38 +846,14 @@ namespace OASystem.Infrastructure.Repositories.Groups
                         CreateUserId = userId,
                     };
 
-                    if (item.Id < 1) // 添加
-                    {
-                        var tourClientAdd = await _sqlSugar.Insertable(_TourClientList).ExecuteReturnIdentityAsync();
-                        if (tourClientAdd < 0)
-                        {
-                            _result.Msg = "接团客户名单添加失败!";
-                            _sqlSugar.RollbackTran();
-                            return _result;
-                        }
-                    }
-                    else if (item.Id > 0) //修改
+                    var tourClientAdd = await _sqlSugar.Insertable(_TourClientList).ExecuteReturnIdentityAsync();
+                    if (tourClientAdd < 0)
                     {
-                        var certEdit = await _sqlSugar.Updateable(_TourClientList).UpdateColumns(it =>
-                                                                                    new
-                                                                                    {
-                                                                                        it.ClientId,
-                                                                                        it.ShippingSpaceTypeId,
-                                                                                        it.ShippingSpaceSpecialNeeds,
-                                                                                        it.HotelSpecialNeeds,
-                                                                                        it.MealSpecialNeeds,
-                                                                                        it.Remark,
-                                                                                    }
-                        )
-                                                                               .Where(it => it.Id == item.Id)
-                                                                               .ExecuteCommandAsync();
-                        if (certEdit < 0)
-                        {
-                            _result.Msg = "接团客户名单失败修改!";
-                            _sqlSugar.RollbackTran();
-                            return _result;
-                        }
+                        _result.Msg = "接团客户名单添加失败!";
+                        _sqlSugar.RollbackTran();
+                        return _result;
                     }
+                    
                 }
 
                 _result.Code = 0;