|
|
@@ -1817,8 +1817,11 @@ namespace OASystem.API.Controllers
|
|
|
Grp_VisaInfo visaInfo = _VisaInfos.Where(s => s.Id == entity.CId).FirstOrDefault();
|
|
|
if (visaInfo != null)
|
|
|
{
|
|
|
- _detail.PriceNameContent = getClientNameStr(clientNameList, visaInfo.VisaClient);
|
|
|
- _detail.PriceMsgContent = $"签证描述:{visaInfo.VisaDescription}<br/> 备注:{visaInfo.Remark}";
|
|
|
+ string visaName = getClientNameStr1(clientNameList, visaInfo.VisaClient);
|
|
|
+
|
|
|
+
|
|
|
+ _detail.PriceNameContent = visaInfo.VisaDescription ;
|
|
|
+ _detail.PriceMsgContent = $"签证描述:{visaName}<br/> 备注:{visaInfo.Remark}";
|
|
|
}
|
|
|
|
|
|
break;
|
|
|
@@ -2428,6 +2431,34 @@ namespace OASystem.API.Controllers
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ private string getClientNameStr1(List<SimplClientInfo> list, string origin)
|
|
|
+ {
|
|
|
+ string result = origin;
|
|
|
+
|
|
|
+ if (Regex.Match(origin, @"\d+,?").Value.Length > 0)
|
|
|
+ {
|
|
|
+ string[] temparr = origin.Split(',');
|
|
|
+ result = "";
|
|
|
+ foreach (var item in temparr)
|
|
|
+ {
|
|
|
+ int tempId;
|
|
|
+ bool success = int.TryParse(item, out tempId);
|
|
|
+ if (success)
|
|
|
+ {
|
|
|
+ SimplClientInfo tempInfo = list.FirstOrDefault(s => s.Id == tempId);
|
|
|
+ if (tempInfo != null)
|
|
|
+ {
|
|
|
+ result += string.Format(@"{0}{1}、", tempInfo.LastName, tempInfo.FirstName);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (result.Length > 0) result = result.Substring(0, result.Length - 1);
|
|
|
+
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 机票费用录入,删除
|
|
|
/// </summary>
|
|
|
@@ -11228,6 +11259,57 @@ ORDER by gctggrc.id DESC
|
|
|
List<Res_PositionEnglishComparison> listPEC = _setDataRep.Query<Res_PositionEnglishComparison>(s => s.IsDel == 0).ToList();
|
|
|
List<Res_CompanyEnglishComparison> listCEC = _setDataRep.Query<Res_CompanyEnglishComparison>(s => s.IsDel == 0).ToList();
|
|
|
|
|
|
+ List<string> transArrayStr = new List<string>();
|
|
|
+ string transStrRes1 = "";
|
|
|
+ for (int i = 0; i < DcList.Count; i++)
|
|
|
+ {
|
|
|
+ var dc = DcList[i];
|
|
|
+
|
|
|
+ if (dc.CompanyFullName.Equals("暂无")) dc.CompanyFullName = "-";
|
|
|
+ if (dc.Job.Equals("暂无")) dc.Job = "-";
|
|
|
+
|
|
|
+ string str1 = $"{i}&{dc.CompanyFullName}&{dc.Job}";
|
|
|
+ if (DcList.Count - 1 == i) transStrRes1 += str1;
|
|
|
+ else transStrRes1 += $"{str1}|";
|
|
|
+
|
|
|
+ }
|
|
|
+ string transStrRes = "0 & Provincial Health & Health Commission Deputy Director | 1 & Provincial People's Hospital & Provincial People's Hospital Chief Accountant | 2 & Secretary of the Party Committee of the Affiliated Hospital of North Sichuan Medical College & North Sichuan Medical College | 3 & Provincial Health Commission Planning & Provincial Health Commission Planning and Information Division Director | 4 &-& Deputy Director | 5 & Provincial Health Commission population and Family Division & Provincial Health Commission population and Family Division Director";
|
|
|
+
|
|
|
+ if (transStrRes1.Length > 0 )
|
|
|
+ {
|
|
|
+ //transStrRes = await _juHeApi.GetTextTranslateAsync(transStrRes1);
|
|
|
+ }
|
|
|
+ //0、 Deputy Director of the Provincial Health and Health Commission | 1、 Chief Accountant of the provincial People's Hospital | 2、 Secretary of the Party Committee of the Affiliated Hospital of North Sichuan Medical College | 3、 Director of the Planning and Information Department of the Provincial Health and Health Commission | 4、 Deputy Director | 5、 Director of the population and Family Department of the Provincial Health and Health Commission | 3、 Secretary of the Party Committee of the Affiliated Hospital of North Sichuan Medical College | 4、 Deputy Director of the Planning and Information Department of the Provincial Health and Health Commission | 4、 Deputy Director of the population and Family Department of the Provincial Health and Health Commission | 5、 Director of the population and Family Department of the Provincial Health and Health Commission
|
|
|
+ //await _juHeApi.GetTextTranslateAsync(DcList[i].CompanyFullName.ToString().Trim()) ?? "";
|
|
|
+ //List<string> transArray = new List<string> { };
|
|
|
+ List<TranslateInfo> transArray = new List<TranslateInfo>();
|
|
|
+
|
|
|
+ if (transStrRes.Contains("|"))
|
|
|
+ {
|
|
|
+ string[] transArray1 = transStrRes.Split('|');
|
|
|
+ if (transArray1.Length > 0)
|
|
|
+ {
|
|
|
+ foreach (var item in transArray1)
|
|
|
+ {
|
|
|
+ if (item.Contains("&"))
|
|
|
+ {
|
|
|
+ string[] transArray2 = item.Split('&');
|
|
|
+ int index = 0;
|
|
|
+ string companyName = "", job = "";
|
|
|
+
|
|
|
+ if (transArray2.Length > 0)
|
|
|
+ {
|
|
|
+ bool success = int.TryParse(transArray2[0].Trim(), out index);
|
|
|
+ if (1 < transArray2.Length) companyName = transArray2[1];
|
|
|
+ if (2 < transArray2.Length) job = transArray2[2];
|
|
|
+ }
|
|
|
+
|
|
|
+ transArray.Add(new TranslateInfo { Index = index, CompanyName = companyName, Job = job });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//循环赋值
|
|
|
for (int i = 0; i < DcList.Count; i++)
|
|
|
{
|
|
|
@@ -11253,56 +11335,48 @@ ORDER by gctggrc.id DESC
|
|
|
|
|
|
DateTime birthDt;
|
|
|
bool b_birth = DateTime.TryParse(DcList[i].BirthDay, out birthDt);
|
|
|
- string birthday = b_birth ? birthDt.ToString("yyyy-MM-dd") : "";
|
|
|
+ string birthday = b_birth ? birthDt.ToString("yyyy-MM-dd") : " ";
|
|
|
builder.MoveToCell(0, i + 1, 2, 0);
|
|
|
builder.Write(birthday);
|
|
|
|
|
|
- string company = "";
|
|
|
- try
|
|
|
+ string company = string.Empty,job = string.Empty;
|
|
|
+ var dcTransInfo = transArray.FirstOrDefault(s => s.Index == i);
|
|
|
+ if (dcTransInfo != null)
|
|
|
{
|
|
|
- if (!string.IsNullOrEmpty(DcList[i].CompanyFullName))
|
|
|
- {
|
|
|
- //查询对照表
|
|
|
- Res_CompanyEnglishComparison tempCec = listCEC.FirstOrDefault(s => s.zhName.Contains(DcList[i].CompanyFullName.ToString().Trim()));
|
|
|
- if (tempCec != null)
|
|
|
- {
|
|
|
- company = tempCec.enName;
|
|
|
- }
|
|
|
- //翻译
|
|
|
- else
|
|
|
- {
|
|
|
- company = await YouDaoApiTools.GetOCR_ReTrans(DcList[i].CompanyFullName.ToString().Trim());
|
|
|
- }
|
|
|
- }
|
|
|
+ company = dcTransInfo.CompanyName;
|
|
|
+ job = dcTransInfo.Job;
|
|
|
}
|
|
|
- catch (Exception)
|
|
|
+
|
|
|
+ if (!string.IsNullOrEmpty(DcList[i].CompanyFullName))
|
|
|
{
|
|
|
+ //查询对照表
|
|
|
+ Res_CompanyEnglishComparison tempCec = listCEC.FirstOrDefault(s => s.zhName.Contains(DcList[i].CompanyFullName.ToString().Trim()));
|
|
|
+ if (tempCec != null)
|
|
|
+ {
|
|
|
+ company = tempCec.enName;
|
|
|
+ }
|
|
|
+ //翻译
|
|
|
+ else
|
|
|
+ {
|
|
|
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
builder.MoveToCell(0, i + 1, 3, 0);
|
|
|
builder.Write(company);
|
|
|
|
|
|
- string job = "";
|
|
|
- try
|
|
|
+ if (!string.IsNullOrEmpty(DcList[i].Job.ToString()))
|
|
|
{
|
|
|
- if (!string.IsNullOrEmpty(DcList[i].Job.ToString()))
|
|
|
+ //查询对照表
|
|
|
+ Res_PositionEnglishComparison tempPec = listPEC.FirstOrDefault(s => s.zhName == DcList[i].Job.ToString().Trim());
|
|
|
+ if (tempPec != null)
|
|
|
+ {
|
|
|
+ job = tempPec.enName;
|
|
|
+ }
|
|
|
+ //翻译
|
|
|
+ else
|
|
|
{
|
|
|
- //查询对照表
|
|
|
- Res_PositionEnglishComparison tempPec = listPEC.FirstOrDefault(s => s.zhName == DcList[i].Job.ToString().Trim());
|
|
|
- if (tempPec != null)
|
|
|
- {
|
|
|
- job = tempPec.enName;
|
|
|
- }
|
|
|
- //翻译
|
|
|
- else
|
|
|
- {
|
|
|
- job = await YouDaoApiTools.GetOCR_ReTrans(DcList[i].Job.ToString().Trim());
|
|
|
- }
|
|
|
}
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
- {
|
|
|
-
|
|
|
}
|
|
|
builder.MoveToCell(0, i + 1, 4, 0);
|
|
|
builder.Write(job);
|
|
|
@@ -11323,6 +11397,13 @@ ORDER by gctggrc.id DESC
|
|
|
return Ok(JsonView(true, "操作成功!", Url));
|
|
|
}
|
|
|
|
|
|
+ private class TranslateInfo
|
|
|
+ {
|
|
|
+ public int Index { get; set; }
|
|
|
+ public string CompanyName { get; set; }
|
|
|
+ public string Job { get; set; }
|
|
|
+ }
|
|
|
+
|
|
|
#endregion
|
|
|
|
|
|
#region 团组倒推表
|