瀏覽代碼

修改部分代码

yuanrf 1 年之前
父節點
當前提交
6e7e3eaabf

+ 11 - 8
OASystem/OASystem.Api/Controllers/BusinessController.cs

@@ -720,21 +720,24 @@ Where c.ConfListId = {0}", ConfId);
         [HttpPost]
         public IActionResult ChineseToEnFn(ChineseToEn dto)
         {
-            var jw = JsonView(false);
-            if (string.IsNullOrWhiteSpace(dto.Text))
+            var jw = JsonView(false, "请输入中文!");
+            if (dto.originalText.Count == 0)
             {
                 return Ok(jw);
             }
 
-            List<string> val = new List<string>();
-            val = dto.Text.GetTotalPingYin();
-
-            if (dto.isUp)
+            List<string> values = new List<string>();
+            foreach (var item in dto.originalText)
             {
-                val = val.Select(x => x.ToUpper()).ToList();
+                var val = item.GetTotalPingYin();
+                if (dto.isUp)
+                {
+                    val = val.Select(x => x.ToUpper()).ToList();
+                }
+                values.Add(val.Count > 0 ? val[0]: "暂无该拼音!");
             }
 
-            jw = JsonView(true, "转换成功!", val);
+            jw = JsonView(true, "转换成功!", values);
 
             return Ok(jw);
         }

+ 1 - 1
OASystem/OASystem.Domain/Dtos/System/ChineseToEnDto.cs

@@ -8,7 +8,7 @@ namespace OASystem.Domain.Dtos.System
 {
     public class ChineseToEn
     {
-        public string Text { get; set; }
+        public List<string> originalText { get; set; }
         public bool isUp { get; set; }
     }
 }

+ 5 - 1
OASystem/OASystem.Infrastructure/Repositories/Groups/DelegationInfoRepository.cs

@@ -311,7 +311,11 @@ namespace OASystem.Infrastructure.Repositories.Groups
                             TourClientListInfoArr.Add(param);
                         }
 
-                        GroupProcessOperationDtoParam.TourClientListInfos = TourClientListInfoArr; 
+                        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) : "";
+
                         result.Data = GroupProcessOperationDtoParam;
                     }