|
|
@@ -186,7 +186,7 @@ namespace OASystem.API.Controllers
|
|
|
/// <param name="taskAssignmentRep"></param>
|
|
|
/// <param name="airTicketResRep"></param>
|
|
|
/// <param name="decreasePaymentsRep"></param>
|
|
|
- /// <param name="InvitationOfficialActivitiesRep"></param>
|
|
|
+ /// <param name="invitationOfficialActivitiesRep"></param>
|
|
|
/// <param name="delegationEnDataRep"></param>
|
|
|
/// <param name="enterExitCostRep"></param>
|
|
|
/// <param name="delegationVisaRep"></param>
|
|
|
@@ -222,6 +222,7 @@ namespace OASystem.API.Controllers
|
|
|
/// <param name="processOverviewRep"></param>
|
|
|
/// <param name="groupSearchService"></param>
|
|
|
/// <param name="deepSeekService"></param>
|
|
|
+ /// <param name="doubaoService"></param>
|
|
|
public GroupsController(
|
|
|
ILogger<GroupsController> logger,
|
|
|
ITextFileLogger eec_textLogger,
|
|
|
@@ -289,7 +290,7 @@ namespace OASystem.API.Controllers
|
|
|
System.IO.Directory.CreateDirectory(path);//不存在就创建文件夹
|
|
|
}
|
|
|
_decreasePaymentsRep = decreasePaymentsRep;
|
|
|
- _InvitationOfficialActivitiesRep = InvitationOfficialActivitiesRep;
|
|
|
+ _InvitationOfficialActivitiesRep = invitationOfficialActivitiesRep;
|
|
|
_delegationEnDataRep = delegationEnDataRep;
|
|
|
_enterExitCostRep = enterExitCostRep;
|
|
|
_delegationVisaRep = delegationVisaRep;
|
|
|
@@ -12138,6 +12139,9 @@ FROM
|
|
|
#endregion
|
|
|
|
|
|
#region 机票费用录入
|
|
|
+
|
|
|
+ #region 机票费用录入 - 旧版
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 机票录入当前登录人可操作团组
|
|
|
/// </summary>
|
|
|
@@ -13220,6 +13224,9 @@ FROM
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
#region 机票费用录入 - 2026版
|
|
|
|
|
|
/// <summary>
|
|
|
@@ -16558,64 +16565,71 @@ FROM
|
|
|
return Ok(JsonView(false, data.Msg));
|
|
|
}
|
|
|
|
|
|
- //生成默认文件pdf并且通知人员
|
|
|
- var fileView = await GeneralMethod.EnterExitCostDownload(new EnterExitCostDownloadDto()
|
|
|
- {
|
|
|
- DiId = dto.DiId,
|
|
|
- ExportType = 1,
|
|
|
- SubTypeId = 1005
|
|
|
- }, "pdf");
|
|
|
|
|
|
- //发送通知
|
|
|
- string fileUrl = (string)fileView.Data.GetType().GetProperty("Url").GetValue(fileView.Data, null);
|
|
|
- int sign = (int)data.Data.GetType().GetProperty("sign").GetValue(data.Data, null);
|
|
|
- string md5Sign = GeneralMethod.Encrypt($"{sign}&fileName={fileUrl}");
|
|
|
- string url = string.Format("http://oa.pan-american-intl.com:4399/#/Sankunginfo?sign={0}&fileName={1}", sign, fileUrl);
|
|
|
- await AppNoticeLibrary.SendUserMsg_GroupShare_ToGM(dto.DiId, new List<string>() { "208", "233", "21" }, dto.UserId, url);
|
|
|
- //汇率信息记录
|
|
|
- await GeneralMethod.RateRecordSave(dto.UserId, sign, "出入境费用");
|
|
|
+ #region 异步 通知、日志记录等后续操作
|
|
|
|
|
|
- var checkCurrencys = await _enterExitCostRep.GetCheckCurrencies(dto.DiId);
|
|
|
- //汇率验证、反推
|
|
|
- (bool isSendMsg, string msgContent, List<CurrencyInfo> liveRates) = await GeneralMethod.EnterExitCostCheckRate(dto.DiId, checkCurrencys);
|
|
|
- if (isSendMsg)
|
|
|
+ _ = Task.Run(async () =>
|
|
|
{
|
|
|
- //消息推送
|
|
|
- await AppNoticeLibrary.SendUserMsg_GroupShare_ToFin(dto.DiId, dto.UserId, msgContent);
|
|
|
- }
|
|
|
+ // 生成默认文件pdf并且通知人员
|
|
|
+ var fileView = await GeneralMethod.EnterExitCostDownload(new EnterExitCostDownloadDto()
|
|
|
+ {
|
|
|
+ DiId = dto.DiId,
|
|
|
+ ExportType = 1,
|
|
|
+ SubTypeId = 1005
|
|
|
+ }, "pdf");
|
|
|
|
|
|
- #region 日志汇率记录
|
|
|
+ // 发送通知
|
|
|
+ string fileUrl = (string)fileView.Data.GetType().GetProperty("Url").GetValue(fileView.Data, null);
|
|
|
+ int sign = (int)data.Data.GetType().GetProperty("sign").GetValue(data.Data, null);
|
|
|
+ string md5Sign = GeneralMethod.Encrypt($"{sign}&fileName={fileUrl}");
|
|
|
+ string url = string.Format("http://oa.pan-american-intl.com:4399/#/Sankunginfo?sign={0}&fileName={1}", sign, fileUrl);
|
|
|
+ await AppNoticeLibrary.SendUserMsg_GroupShare_ToGM(dto.DiId, new List<string>() { "208", "233", "21" }, dto.UserId, url);
|
|
|
+ // 汇率信息记录
|
|
|
+ await GeneralMethod.RateRecordSave(dto.UserId, sign, "出入境费用");
|
|
|
|
|
|
- //按照已使用币种记录
|
|
|
- if (checkCurrencys != null && checkCurrencys.Count > 0)
|
|
|
- {
|
|
|
- rateRecords = rateRecords.Where(x => checkCurrencys.Select(x1 => x1.CurrencyName).ToList().Contains(x.CurrencyName)).ToList();
|
|
|
+ var checkCurrencys = await _enterExitCostRep.GetCheckCurrencies(dto.DiId);
|
|
|
+ // 汇率验证、反推
|
|
|
+ (bool isSendMsg, string msgContent, List<CurrencyInfo> liveRates) = await GeneralMethod.EnterExitCostCheckRate(dto.DiId, checkCurrencys);
|
|
|
+ if (isSendMsg)
|
|
|
+ {
|
|
|
+ //消息推送
|
|
|
+ await AppNoticeLibrary.SendUserMsg_GroupShare_ToFin(dto.DiId, dto.UserId, msgContent);
|
|
|
+ }
|
|
|
|
|
|
- //汇率记录中加入实时汇率
|
|
|
- if (liveRates != null && liveRates.Count > 0)
|
|
|
+ #region 日志汇率记录
|
|
|
+
|
|
|
+ //按照已使用币种记录
|
|
|
+ if (checkCurrencys != null && checkCurrencys.Count > 0)
|
|
|
{
|
|
|
- foreach (var item in rateRecords)
|
|
|
+ rateRecords = rateRecords.Where(x => checkCurrencys.Select(x1 => x1.CurrencyName).ToList().Contains(x.CurrencyName)).ToList();
|
|
|
+
|
|
|
+ //汇率记录中加入实时汇率
|
|
|
+ if (liveRates != null && liveRates.Count > 0)
|
|
|
{
|
|
|
- item.CurrLiveRate = liveRates.Where(x => x.CurrencyName.Equals(item.CurrencyName)).FirstOrDefault()?.Rate ?? 0.00M;
|
|
|
+ foreach (var item in rateRecords)
|
|
|
+ {
|
|
|
+ item.CurrLiveRate = liveRates.Where(x => x.CurrencyName.Equals(item.CurrencyName)).FirstOrDefault()?.Rate ?? 0.00M;
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- var teamName = await _sqlSugar.Queryable<Grp_DelegationInfo>().Where(x => x.Id == dto.DiId && x.IsDel == 0).Select(x => x.TeamName).FirstAsync();
|
|
|
- var operationName = await _sqlSugar.Queryable<Sys_Users>().Where(x => x.Id == dto.UserId && x.IsDel == 0).Select(x => x.CnName).FirstAsync();
|
|
|
+ var teamName = await _sqlSugar.Queryable<Grp_DelegationInfo>().Where(x => x.Id == dto.DiId && x.IsDel == 0).Select(x => x.TeamName).FirstAsync();
|
|
|
+ var operationName = await _sqlSugar.Queryable<Sys_Users>().Where(x => x.Id == dto.UserId && x.IsDel == 0).Select(x => x.CnName).FirstAsync();
|
|
|
|
|
|
- var logContent = new StringBuilder();
|
|
|
- foreach (var item in rateRecords)
|
|
|
- {
|
|
|
+ var logContent = new StringBuilder();
|
|
|
+ foreach (var item in rateRecords)
|
|
|
+ {
|
|
|
+ var blRate = (item.CurrLiveRate * 1.0350M).TruncDecimals(4);
|
|
|
|
|
|
- var blRate = (item.CurrLiveRate * 1.0350M).TruncDecimals(4);
|
|
|
+ string msg = $">- {item.CurrencyName}汇率:(页面保存前){item.UpdatePreRate:#0.0000}/(页面保存){item.UpdateBreRate:#0.0000}/实时汇率(已上浮1.0350):{blRate:#0.0000}【注:原接口输出汇率为:{item.CurrLiveRate:#0.0000}】";
|
|
|
|
|
|
- string msg = $">- {item.CurrencyName}汇率:(页面保存前){item.UpdatePreRate:#0.0000}/(页面保存){item.UpdateBreRate:#0.0000}/实时汇率(已上浮1.0350):{blRate:#0.0000}【注:原接口输出汇率为:{item.CurrLiveRate:#0.0000}】";
|
|
|
+ logContent.AppendLine(msg);
|
|
|
+ }
|
|
|
|
|
|
- logContent.AppendLine(msg);
|
|
|
+ _eec_textLogger.LogInformation("团组:【{teamName}({groupId})】 操作人:【{operationName}】 操作时间:【{operationTime}】\r\n{logContent}", teamName, dto.DiId, operationName, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), logContent.ToString());
|
|
|
}
|
|
|
+ #endregion
|
|
|
+ });
|
|
|
|
|
|
- _eec_textLogger.LogInformation("团组:【{teamName}({groupId})】 操作人:【{operationName}】 操作时间:【{operationTime}】\r\n{logContent}", teamName, dto.DiId, operationName, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), logContent.ToString());
|
|
|
- }
|
|
|
#endregion
|
|
|
|
|
|
return Ok(JsonView(true, data.Msg, data.Data));
|
|
|
@@ -16669,10 +16683,13 @@ FROM
|
|
|
1 明细表 --> 1005(默认明细表) 1006(因公出国(境)经费测算明细表) 1007(四川省商务厅出国经费财政先行审核表)
|
|
|
2 表格 --> 1008(派员单位出(境)任务和预算审批意见表) 1009(省级单位出(境)经费报销单)
|
|
|
3 团组成员名单 1 团组成员名单", ""));
|
|
|
+
|
|
|
+ var _DelegationInfo = _sqlSugar.Queryable<Grp_DelegationInfo>().Where(it => it.IsDel == 0 && it.Id == dto.DiId).First();
|
|
|
+ if (_DelegationInfo == null) return Ok(JsonView(400, "团组信息为空", ""));
|
|
|
|
|
|
var _EnterExitCosts = _sqlSugar.Queryable<Grp_EnterExitCost>().Where(it => it.IsDel == 0 && it.DiId == dto.DiId).OrderByDescending(x => x.CreateTime).First();
|
|
|
var _DayAndCosts = _sqlSugar.Queryable<Grp_DayAndCost>().Where(it => it.IsDel == 0 && it.DiId == dto.DiId).ToList();
|
|
|
- if (_EnterExitCosts == null) return Ok(JsonView(400, "该团组未填写出入境费用;", ""));
|
|
|
+ if (_EnterExitCosts == null) return Ok(JsonView(400, "该团组未填写出入境费用", ""));
|
|
|
|
|
|
var currencyInit = _sqlSugar.Queryable<Sys_SetData>().Where(x => x.IsDel == 0 && x.STid == 66).ToList();
|
|
|
var enterExitCostCurrencys = (List<CurrencyInfo>?)CommonFun.GetCurrencyChinaToList(_EnterExitCosts.CurrencyRemark);
|
|
|
@@ -16718,13 +16735,7 @@ FROM
|
|
|
}
|
|
|
|
|
|
var _CurrDatas = _sqlSugar.Queryable<Sys_SetData>().Where(it => it.IsDel == 0 && it.STid == 66).ToList();
|
|
|
- var _DelegationInfo = _sqlSugar.Queryable<Grp_DelegationInfo>().Where(it => it.IsDel == 0 && it.Id == dto.DiId).First();
|
|
|
-
|
|
|
- if (_DelegationInfo == null)
|
|
|
- {
|
|
|
- return Ok(JsonView(400, "团组信息为空!", ""));
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
var DeleClientList = _sqlSugar.Queryable<Grp_TourClientList>()
|
|
|
.LeftJoin<Crm_DeleClient>((tcl, dc) => tcl.ClientId == dc.Id && dc.IsDel == 0)
|
|
|
.LeftJoin<Crm_CustomerCompany>((tcl, dc, cc) => dc.CrmCompanyId == cc.Id && dc.IsDel == 0)
|
|
|
@@ -34294,20 +34305,18 @@ AirHotelPrice
|
|
|
new SeedMessages { Role = KimiRole.system, Content = "你是 Kimi,由 Moonshot AI 提供的人工智能助手,你更擅长中文和英文的对话。你会为用户提供安全,有帮助,准确的回答。同时,你会拒绝一切涉及恐怖主义,种族歧视,黄色暴力等问题的回答。Moonshot AI 为专有名词,不可翻译成其他语言。" },
|
|
|
//new SeedMessages { Role = KimiRole.user, Content = "根据文件内容 ,按照“姓、名、姓名拼音、性别、单位、职务、出生日期”的json格式来排列整理(性别和出生日期通过身份证来识别 , 当识别到性别为男时值给0女给1 未识别到性别的情况下值给-1,出生日期按照yyyy-MM-dd来整理(若出生日期没有值则为‘-’),文件存在拼音的情况读取对应的拼音不存在则设置拼音为中文名字全拼),只输出JSON数组数据 从'['开始 到']'结尾 ,不要除JSON数据外的任何文字以及符号" }
|
|
|
new SeedMessages { Role = KimiRole.user, Content =
|
|
|
- @" 严格按照以下规则处理上传的文件内容,只输出纯JSON数组,不要输出任何其他文字、解释、标记或符号:
|
|
|
+ @" 从图片提取人员信息,输出纯JSON数组,不要任何其他文字。
|
|
|
|
|
|
- 输出格式:
|
|
|
- [{""姓"":"""",""名"":"""",""姓名拼音"":"""",""性别"":0,""单位"":"""",""职务"":"""",""出生日期"":""yyyy-MM-dd""}]
|
|
|
+格式:[{""姓"":"""",""名"":"""",""姓名拼音"":"""",""性别"":0,""单位"":"""",""职务"":"""",""出生日期"":""yyyy-MM-dd""}]
|
|
|
|
|
|
- 规则:
|
|
|
- 1. 姓、名:从姓名中拆分(中文姓名姓在前名在后)
|
|
|
- 2. 姓名拼音:文件中存在则使用,不存在则生成中文全拼(小写)
|
|
|
- 3. 性别:通过身份证第17位判断,奇数为男→0,偶数为女→1,无法识别→-1
|
|
|
- 4. 出生日期:从身份证第7-14位提取,格式yyyy-MM-dd,无身份证则填""-""
|
|
|
- 5. 单位、职务:按文件实际内容填写
|
|
|
+规则:
|
|
|
+- 姓:首字;复姓取前两字(欧阳/司马/上官等)
|
|
|
+- 拼音:大写,姓/名用/隔开,名多字空格分隔,ü→v。例:张三→ZHANG/SAN,欧阳明→OU/YANG MING
|
|
|
+- 性别:男0女1,无则-1
|
|
|
+- 出生日期:年月补01,无则""-""
|
|
|
+- 单位职务:机构名称为单位,职位为职务,仅有其一另一填""-""
|
|
|
|
|
|
- 严格要求:输出必须以[开头,以]结尾,不要```json标记,不要任何解释文字。
|
|
|
- "
|
|
|
+要求:以[开头]结尾,无标记无解释,合法JSON。 "
|
|
|
}
|
|
|
};
|
|
|
|