浏览代码

优化部分细节

yuanrf 1 年之前
父节点
当前提交
f43fdab894

+ 3 - 3
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -562,18 +562,18 @@ namespace OASystem.API.Controllers
                     diId = groupData.Data;
                     GeneralMethod.PostGroupRateAddInit(dto.UserId, diId);
                 }
-
-                diId = dto.Id;
+               
 
                 if (dto.Status == 2)
                 {
+                    diId = dto.Id;
                     if (diId == 0)
                     {
                         return Ok(JsonView(false, "修改失败! 未添加团组id" + groupData.Msg));
                     }
                 }
 
-                var viewData = await _tourClientListRep.OperMultiple(dto.TourClientListInfos,dto.Id ,dto.UserId);
+                var viewData = await _tourClientListRep.OperMultiple(dto.TourClientListInfos, diId, dto.UserId);
 
                 if (viewData.Code != 0)
                 {

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

@@ -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) : "";
-                        GroupProcessOperationDtoParam.TontractTime = GroupProcessOperationDtoParam.TontractTime.Length > 10 ? GroupProcessOperationDtoParam.TontractTime.Substring(0, 10) : "";
+                        GroupProcessOperationDtoParam.VisitDate = GroupProcessOperationDtoParam.VisitDate.Length > 10 ? GroupProcessOperationDtoParam.VisitDate.Substring(0, 10).Replace("/","-") : "";
+                        GroupProcessOperationDtoParam.TontractTime = GroupProcessOperationDtoParam.TontractTime.Length > 10 ? GroupProcessOperationDtoParam.TontractTime.Substring(0, 10).Replace("/","-") : "";
 
                         result.Data = GroupProcessOperationDtoParam;
                     }

+ 2 - 0
OASystem/OASystem.Infrastructure/Repositories/Groups/TourClientListRepository.cs

@@ -1,4 +1,5 @@
 using AutoMapper;
+using MathNet.Numerics.Distributions;
 using OASystem.Domain;
 using OASystem.Domain.Dtos.CRM;
 using OASystem.Domain.Dtos.Groups;
@@ -634,6 +635,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
             _sqlSugar.BeginTran();
             try
             {
+                _sqlSugar.Updateable<Grp_TourClientList>().SetColumns(x=> new Grp_TourClientList { IsDel = 1 } ).Where(x=>x.DiId == diid).ExecuteCommand();
 
                 foreach (var item in _TourClientListInfos)
                 {