yuanrf 2 giorni fa
parent
commit
f0e232debe
1 ha cambiato i file con 30 aggiunte e 15 eliminazioni
  1. 30 15
      OASystem/OASystem.Api/Controllers/GroupsController.cs

+ 30 - 15
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -6479,7 +6479,7 @@ FROM
                             string applicantAddressAndEmail = $"{custInfo.Address} {custInfo.Email}";
                             SetFieldValue(formFields, "applicant_address_and_email", applicantAddressAndEmail);
                             // 申请人的电话
-                            SetFieldValue(formFields, "applicant_tel", custInfo.Tel);   
+                            SetFieldValue(formFields, "applicant_tel", custInfo.Tel);
 
                             #region 在非当前国籍所属国家的居住情况 “默认空”
                             SetFieldValue(formFields, "uncurrent_count_no", "Yes");      // 否
@@ -6527,7 +6527,7 @@ FROM
                                 {
                                     SetFieldValue(formFields, "purpose_business", "Yes");               // 商务
                                 }
-                                else if (visit_purpose.contains("亲友") )
+                                else if (visit_purpose.contains("亲友"))
                                 {
                                     SetFieldValue(formFields, "purpose_visiting_family_friends", "Yes");// 庆祝亲友团聚
                                 }
@@ -14000,7 +14000,7 @@ FROM
                         x.Remark
                     })
                     .OrderBy((x) => x.Index)
-                    .ToList();                                               
+                    .ToList();
 
                 var peiceItemCurrencys = new List<string>();
                 if (_DayAndCosts.Any())
@@ -15473,12 +15473,12 @@ FROM
                         designer.SetDataSource("DeptOffice", "");   // 处室
                         // 报销日期
                         var currDateStr = DateTime.Now.ToString(dateFormat);
-                        designer.SetDataSource("ReimbDate", currDateStr);               
+                        designer.SetDataSource("ReimbDate", currDateStr);
                         designer.SetDataSource("GroupUnit", _DelegationInfo.ClientUnit); // 组团单位
                         // 出国人员姓名
                         var overseasName = string.Join("、", DeleClientList.Select(it => it.Name).ToList()).TrimEnd('、');
                         if (string.IsNullOrEmpty(overseasName)) overseasName = "-";
-                        designer.SetDataSource("OverseasName", overseasName);                   
+                        designer.SetDataSource("OverseasName", overseasName);
                         // 国家和地区(含经停) 
                         string countryRegionStops = _groupRepository.FormartTeamName(_DelegationInfo.VisitCountry);
                         designer.SetDataSource("CountryRegionStops", countryRegionStops);
@@ -15526,7 +15526,7 @@ FROM
                         // 数据整理
                         // 住宿费
                         var accomFees = dac1.GroupBy(x => x.NationalTravelFeeId)
-                            .Select(group => 
+                            .Select(group =>
                             {
                                 var currData = group.FirstOrDefault();
 
@@ -15553,7 +15553,8 @@ FROM
                                 // 人名币金额
                                 decimal totalCNY = totalDays * totalAmount * currencyRate;
 
-                                return new {
+                                return new
+                                {
                                     TravelFeeId = group.Key,
                                     PlaceName = placeName,
                                     TotalDays = totalDays,
@@ -15618,15 +15619,18 @@ FROM
                         // 其他费用
                         var otherFeestrs = new List<string>();
                         decimal totalOtherFee = 0.00M;
-                        if (_EnterExitCosts.Visa > 0) { 
-                            otherFeestrs.Add($"签证费:{_EnterExitCosts.Visa:#0.00}元/人"); 
-                            totalOtherFee += _EnterExitCosts.Visa; 
+                        if (_EnterExitCosts.Visa > 0)
+                        {
+                            otherFeestrs.Add($"签证费:{_EnterExitCosts.Visa:#0.00}元/人");
+                            totalOtherFee += _EnterExitCosts.Visa;
                         }
-                        if (_EnterExitCosts.YiMiao > 0) {
+                        if (_EnterExitCosts.YiMiao > 0)
+                        {
                             otherFeestrs.Add($"疫苗费:{_EnterExitCosts.YiMiao:#0.00}元/人");
                             totalOtherFee += _EnterExitCosts.YiMiao;
                         }
-                        if (_EnterExitCosts.HeSuan > 0) {
+                        if (_EnterExitCosts.HeSuan > 0)
+                        {
                             otherFeestrs.Add($"核酸费:{_EnterExitCosts.HeSuan:#0.00}元/人");
                             totalOtherFee += _EnterExitCosts.HeSuan;
                         }
@@ -15802,7 +15806,7 @@ FROM
                         if (_EnterExitCosts.SumJJC == 0)
                         {
                             var sheetNameToDelete1 = "经济舱";
-                            if (workbook.Worksheets[sheetNameToDelete1] != null) 
+                            if (workbook.Worksheets[sheetNameToDelete1] != null)
                             {
                                 workbook.Worksheets.RemoveAt(sheetNameToDelete1);
                             }
@@ -34929,6 +34933,17 @@ ORDER BY
         public async Task<IActionResult> ConferenceAffairsChildAddRowReturnId(ConferenceAffairsChildAddRowReturnIdDto dto)
         {
             var data = _mapper.Map<Grp_ConferenceAffairsCostChild>(dto.data);
+
+            if (data.Rate == 0)
+            {
+                data.Rate = 1;
+            }
+
+            if (data.Coefficient == 0)
+            {
+                data.Coefficient = 1;
+            }
+
             var id = await _sqlSugar.Insertable(data).ExecuteReturnIdentityAsync();
             return Ok(JsonView(true, "SUCCESS", new { id }));
         }
@@ -34968,10 +34983,10 @@ ORDER BY
             child.PriceName = "";
             child.CostPrice = 0;
             child.Currency = 836;
-            child.Rate = 0;
+            child.Rate = 1;
             child.Count = 0;
             child.Unit = 0;
-            child.Coefficient = 0;
+            child.Coefficient = 1;
             child.BaoJiaPrice = 0;
             child.AddedValue = 0;
             child.Details = "";