Пример #1
0
 public static void SetEngineMaintainPlan(EngineMaintainPlan engineMaintainPlan, int maintainPlanType, decimal dollarRate, string companyLeader, string departmentLeader,
     string budgetManager, string phoneNumber, Guid annual)
 {
     engineMaintainPlan.MaintainPlanType = maintainPlanType;
     engineMaintainPlan.DollarRate = dollarRate;
     engineMaintainPlan.CompanyLeader = companyLeader;
     engineMaintainPlan.DepartmentLeader = departmentLeader;
     engineMaintainPlan.BudgetManager = budgetManager;
     engineMaintainPlan.PhoneNumber = phoneNumber;
     engineMaintainPlan.AnnualId = annual;
 }
Пример #2
0
 /// <summary>
 ///     更新发动机维修计划行集合
 /// </summary>
 /// <param name="sourceEngineMaintainPlanDetails">客户端集合</param>
 /// <param name="dstEngineMaintainPlan">数据库集合</param>
 private void UpdateEngineMaintainPlanDetails(
     IEnumerable<EngineMaintainPlanDetailDTO> sourceEngineMaintainPlanDetails,
     EngineMaintainPlan dstEngineMaintainPlan)
 {
     var engineMaintainPlanLines = new List<EngineMaintainPlanDetail>();
     foreach (EngineMaintainPlanDetailDTO sourceEngineMaintainPlanLine in sourceEngineMaintainPlanDetails)
     {
         EngineMaintainPlanDetail result =
             dstEngineMaintainPlan.EngineMaintainPlanDetails.FirstOrDefault(
                 p => p.Id == sourceEngineMaintainPlanLine.Id);
         if (result == null)
         {
             result = AnnualMaintainPlanFactory.CreatEngineMaintainPlanDetail();
             result.ChangeCurrentIdentity(sourceEngineMaintainPlanLine.Id);
         }
         AnnualMaintainPlanFactory.SetEngineMaintainPlanDetail(result, sourceEngineMaintainPlanLine.ChangeLlpFee,
             sourceEngineMaintainPlanLine.ChangeLlpNumber, sourceEngineMaintainPlanLine.CustomsTax,
             sourceEngineMaintainPlanLine.EngineNumber,
             sourceEngineMaintainPlanLine.FreightFee, sourceEngineMaintainPlanLine.InMaintainDate,
             sourceEngineMaintainPlanLine.MaintainLevel, sourceEngineMaintainPlanLine.NonFhaFee,
             sourceEngineMaintainPlanLine.Note, sourceEngineMaintainPlanLine.OutMaintainDate,
             sourceEngineMaintainPlanLine.PartFee,
             sourceEngineMaintainPlanLine.TsnCsn, sourceEngineMaintainPlanLine.TsrCsr,
             sourceEngineMaintainPlanLine.FeeLittleSum, sourceEngineMaintainPlanLine.FeeTotalSum,
             sourceEngineMaintainPlanLine.BudgetToalSum);
         engineMaintainPlanLines.Add(result);
     }
     dstEngineMaintainPlan.EngineMaintainPlanDetails.ToList().ForEach(p =>
     {
         if (engineMaintainPlanLines.FirstOrDefault(t => t.Id == p.Id) == null)
         {
             _aunualMaintainPlanRepository.RemoveEngineMaintainPlanDetail(p);
         }
     });
     dstEngineMaintainPlan.EngineMaintainPlanDetails = engineMaintainPlanLines;
 }
Пример #3
0
 /// <summary>
 /// 创建发动机维修计划
 /// </summary>
 /// <returns></returns>
 public static EngineMaintainPlan CreatEngineMaintainPlan()
 {
     var engineMaintainPlan = new EngineMaintainPlan();
     engineMaintainPlan.GenerateNewIdentity();
     return engineMaintainPlan;
 }