diff --git a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs index b7e701c0..f8a57a79 100644 --- a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs +++ b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs @@ -158,7 +158,7 @@ public class Ghrh_ResumeController : BaseController>> QueryCompanyInfo(string companySpecCode, int langId) { - return await _service.QueryCompanyInfo(companySpecCode); + return await _service.QueryCompanyInfo(companySpecCode, langId); } #endregion diff --git a/Tiobon.Core.Api/Tiobon.Core.Model.xml b/Tiobon.Core.Api/Tiobon.Core.Model.xml index ec001a99..8bdb9f81 100644 --- a/Tiobon.Core.Api/Tiobon.Core.Model.xml +++ b/Tiobon.Core.Api/Tiobon.Core.Model.xml @@ -10455,6 +10455,11 @@ 预留字段12 + + + 申请单ID + + Ghrm_MessageText (Dto.Base) @@ -23916,6 +23921,11 @@ 预留字段12 + + + 申请单ID + + Ghrm_MessageText (Model) diff --git a/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs b/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs index 670b7b10..fd0eaeb5 100644 --- a/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs +++ b/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs @@ -25,7 +25,7 @@ public interface IGhrh_ResumeServices : IBaseServices> CheckIsExist(EditGhrh_ResumeInput input); - Task>> QueryCompanyInfo(string companySpecCode); + Task>> QueryCompanyInfo(string companySpecCode, int langId); Task> Query(long id, int langId); diff --git a/Tiobon.Core.Model/Base/Ghrh/Ghrh_YearHumanSettings.Dto.Base.cs b/Tiobon.Core.Model/Base/Ghrh/Ghrh_YearHumanSettings.Dto.Base.cs index 9174fb03..02ab66c5 100644 --- a/Tiobon.Core.Model/Base/Ghrh/Ghrh_YearHumanSettings.Dto.Base.cs +++ b/Tiobon.Core.Model/Base/Ghrh/Ghrh_YearHumanSettings.Dto.Base.cs @@ -334,4 +334,9 @@ public class Ghrh_YearHumanSettingsBase /// 预留字段12 /// public int? ReverseI2 { get; set; } + + /// + /// 申请单ID + /// + public long? OrderId { get; set; } } diff --git a/Tiobon.Core.Model/Insert/Ghrh/Ghrh_YearHumanApplyOrder.Dto.InsertInput.cs b/Tiobon.Core.Model/Insert/Ghrh/Ghrh_YearHumanApplyOrder.Dto.InsertInput.cs index 691a6cd6..b7237cbb 100644 --- a/Tiobon.Core.Model/Insert/Ghrh/Ghrh_YearHumanApplyOrder.Dto.InsertInput.cs +++ b/Tiobon.Core.Model/Insert/Ghrh/Ghrh_YearHumanApplyOrder.Dto.InsertInput.cs @@ -29,5 +29,5 @@ public class InsertGhrh_YearHumanApplyOrderInput : Ghrh_YearHumanApplyOrderBase /// public int StartMonth { get; set; } - public List Items = new List(); + public List Items = new List(); } diff --git a/Tiobon.Core.Model/Models/Ghrh/Ghrh_YearHumanSettings.cs b/Tiobon.Core.Model/Models/Ghrh/Ghrh_YearHumanSettings.cs index de04def7..185241e0 100644 --- a/Tiobon.Core.Model/Models/Ghrh/Ghrh_YearHumanSettings.cs +++ b/Tiobon.Core.Model/Models/Ghrh/Ghrh_YearHumanSettings.cs @@ -335,4 +335,9 @@ public class Ghrh_YearHumanSettings : BasePoco /// 预留字段12 /// public int? ReverseI2 { get; set; } + + /// + /// 申请单ID + /// + public long? OrderId { get; set; } } diff --git a/Tiobon.Core.Model/ViewModels/Menu.cs b/Tiobon.Core.Model/ViewModels/Menu.cs index fc527bfb..c6ef302d 100644 --- a/Tiobon.Core.Model/ViewModels/Menu.cs +++ b/Tiobon.Core.Model/ViewModels/Menu.cs @@ -256,6 +256,8 @@ public class FlowTableColumn public bool @required { get; set; } public bool multipleSelect { get; set; } public int rowNum { get; set; } + + public string GroupName { get; set; } } public class FlowCommitParam { diff --git a/Tiobon.Core.Services/CommonServices.cs b/Tiobon.Core.Services/CommonServices.cs index 2ea00459..eddb52cf 100644 --- a/Tiobon.Core.Services/CommonServices.cs +++ b/Tiobon.Core.Services/CommonServices.cs @@ -3222,13 +3222,79 @@ public partial class CommonServices : BaseServices>, ICommon { var config = await Db.Queryable().Where(x => x.ConfigCode == "ESS_Recruit_Year_Human_Start_Month").FirstAsync(); - var StartMonth = config != null ? config.ConfigValue.ObjToInt() : 1; + var startMonth = config != null ? config.ConfigValue.ObjToInt() : 1; + + var data1 = new InsertGhrh_YearHumanApplyOrderInput() { - StartMonth = StartMonth, + StartMonth = startMonth, }; - data1.Items.Add(new InsertGhrh_YearHumanSettingsInput() { }); - flowReturn.DT_TableDataT1 = data1; + + #region 处理起始月 + var months = new List(); + List numbers = new(); + for (int i = 1; i <= 12; i++) + { + if (i < 10) + months.Add("0" + i); + else + months.Add(i.ObjToString()); + numbers.Add(i); + } + var curentYear = DateTime.Now.Year; + var curentMonth = DateTime.Now.Month; + // 指定要打头的数字 + int startNumber = startMonth; + + + if (curentMonth < startMonth) + curentYear = -1; + + data1.Year = curentYear; + var sort = flowReturn.JM_TableColumnT1.TableColumn.Where(x => x.field == "M1").SingleOrDefault()?.rowNum ?? 5; + // 创建一个新的列表用于存储重新排序后的结果 + List reorderedNumbers = new(); + flowReturn.JM_TableColumnT1.TableColumn?.ForEach(x => + { + if (months.Where(o => o == x.label).Any()) + x.GroupName = "预算编制数"; + + }); + + // 找到指定数字的索引 + int index1 = numbers.IndexOf(startNumber); + if (index1 != -1) + { + // 从指定数字开始,按照循环顺序添加数字 + for (int i = 0; i < numbers.Count; i++) + { + int currentIndex = (index1 + i) % numbers.Count; + reorderedNumbers.Add(numbers[currentIndex]); + } + + foreach (var num in reorderedNumbers) + { + flowReturn.JM_TableColumnT1.TableColumn?.ForEach(x => + { + if (x.label.ObjToInt() == num) + { + x.rowNum = sort; + x.label = curentYear + "-" + x.label; + } + }); + if (num == 12) + curentYear++; + sort++; + } + } + flowReturn.JM_TableColumnT1.TableColumn = flowReturn.JM_TableColumnT1.TableColumn.OrderBy(x => x.rowNum).ToList(); + #endregion + data1.Items.Add(new Ghrh_YearHumanSettings() { }); + var list = new List + { + data1 + }; + flowReturn.DT_TableDataT1 = list; } break; case "F_ESS_RecruitManpowerRequestApply": @@ -3435,15 +3501,28 @@ public partial class CommonServices : BaseServices>, ICommon #region 写入数据,并判断是否有错误 string json = param.jsonParam.ToString(); - var dict = JsonHelper.JsonToObj(json); - id = await Db.Insertable(dict).ExecuteReturnSnowflakeIdAsync(); + var dict = JsonHelper.JsonToObj(json); + var dict1 = JsonHelper.JsonToObj(json); + dict1.ApplicantId = GetStaffId(); + dict1.ApplicantTime = DateTime.Now; + id = await Db.Insertable(dict1).ExecuteReturnSnowflakeIdAsync(); - sql = $"SELECT ISNULL(MAX(id)+1,1) FROM Ghrh_YearHumanSettings WHERE Id !='{id}'"; + sql = $"SELECT ISNULL(MAX(id)+1,1) FROM Ghrh_YearHumanApplyOrder WHERE Id !='{id}'"; var id1 = await Db.Ado.GetLongAsync(sql); - sql = $"UPDATE Ghrh_YearHumanSettings SET Id={id1} WHERE Id ='{id}'"; + sql = $"UPDATE Ghrh_YearHumanApplyOrder SET Id={id1} WHERE Id ='{id}'"; await Db.Ado.ExecuteCommandAsync(sql); id = id1; + + dict.Items.ForEach(x => + { + x.OrderId = id; + x.WorkState = 0; + x.Year = dict1.Year; + x.Id = SnowFlakeSingle.Instance.NextId(); + }); + await Db.Insertable(dict.Items).ExecuteCommandAsync(); + #endregion break; diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs index 2ee5ec51..f4ffc662 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs @@ -747,12 +747,16 @@ ORDER BY A.SortNo ASC"; #endregion #region 查询简历公司新增 - public async Task>> QueryCompanyInfo(string companySpecCode) + public async Task>> QueryCompanyInfo(string companySpecCode, int langId) { var url = await Db.Ado.GetStringAsync("SELECT LogoUrl FROM Ghrs_LoginPageSetting"); + var companyName = await Db.Ado.GetStringAsync("select top 1 CompanyName from Ghro_Company"); + + if (langId != 1) + companyName = await Db.Ado.GetStringAsync("select top 1 CompanyEname from Ghro_Company"); Dictionary dict = new Dictionary() { - { "CompanyName", AppSettings.app(new string[] { "Resume", "CompanyName" }) }, + { "CompanyName", companyName}, { "LoginDesc", AppSettings.app(new string[] { "Resume", "LoginDesc" }) }, { "LoginTitle", AppSettings.app(new string[] { "Resume", "LoginTitle" }) }, { "StaffName", "姓名" }, @@ -1114,8 +1118,12 @@ END"; #endregion #region Guide + var companyName = await Db.Ado.GetStringAsync("select top 1 CompanyName from Ghro_Company"); + + if (langId != 1) + companyName = await Db.Ado.GetStringAsync("select top 1 CompanyEname from Ghro_Company"); Guide.Title = "应聘信息登记表填写说明"; - Guide.CompanyName = "乔邦 Tiobon"; + Guide.CompanyName = companyName; Guide.GuideText = @"

亲爱的小伙伴:

        感谢你对公司的认可。

 

@@ -1776,7 +1784,7 @@ END"; for (int i = 0; i < records.Count; i++) { - await SendMessage([records[i].StaffId.Value], "面试提醒", $"您有个简历待面试,面试时间:{body.Time},请及时查看!", "/M_ESS_Recruit/F_ESS_Candidate"); + await SendMessage([records[i].StaffId.Value], "面试提醒", $"您有个简历待面试,面试时间:{body.Time},请及时查看!", "/M_ESS_Recruit/F_ESS_Interview"); } diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeTemplateServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeTemplateServices.cs index a9a7d79a..d447622d 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeTemplateServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeTemplateServices.cs @@ -1128,6 +1128,8 @@ END"; a.CanModifyBySelf, a.CanEssDisplay, a.QueryCondition, + a.MapTableName, + a.MapColumnName, a.multipleSelect, isnull ((SELECT UserName FROM Ghrs_User kk diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_YearHumanSettingsServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_YearHumanSettingsServices.cs index 72f3fc14..d3ae91a9 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_YearHumanSettingsServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_YearHumanSettingsServices.cs @@ -17,7 +17,7 @@ public class Ghrh_YearHumanSettingsServices : BaseServices> QueryFilterPage(QueryBody filter, string condition, bool? IsEnable = true) { - var result = await base.QueryFilterPage(filter, condition, IsEnable); + var result = await base.QueryFilterPage(filter, "WorkState = 1", IsEnable); var entitys = result.result.DT_TableDataT1; int? year = null; if (filter.jsonParam != null) @@ -79,6 +79,22 @@ public class Ghrh_YearHumanSettingsServices : BaseServices + { + data.M1_F = data.M1 + (data.M1_A ?? 0); + data.M2_F = data.M2 + (data.M2_A ?? 0); + data.M3_F = data.M3 + (data.M3_A ?? 0); + data.M4_F = data.M4 + (data.M4_A ?? 0); + data.M5_F = data.M5 + (data.M5_A ?? 0); + data.M6_F = data.M6 + (data.M6_A ?? 0); + data.M7_F = data.M7 + (data.M7_A ?? 0); + data.M8_F = data.M8 + (data.M8_A ?? 0); + data.M9_F = data.M9 + (data.M9_A ?? 0); + data.M10_F = data.M10 + (data.M10_A ?? 0); + data.M11_F = data.M11 + (data.M11_A ?? 0); + data.M12_F = data.M12 + (data.M12_A ?? 0); + }); + result.result.DT_TableDataT1 = entitys; ModuleParam param = new ModuleParam() { @@ -94,7 +110,7 @@ public class Ghrh_YearHumanSettingsServices : BaseServices { - int month = x.field.Replace("M", null).ObjToInt(); + int month = x.field.Replace("M", null).Replace("F", null).ObjToInt(); if (x.GroupName == "预算编制数") x.label = year + "-" + x.field.Replace("M", null); if (month == 12) diff --git a/Tiobon.Core/Tiobon.Core.Model.xml b/Tiobon.Core/Tiobon.Core.Model.xml index ec001a99..8bdb9f81 100644 --- a/Tiobon.Core/Tiobon.Core.Model.xml +++ b/Tiobon.Core/Tiobon.Core.Model.xml @@ -10455,6 +10455,11 @@ 预留字段12
+ + + 申请单ID + + Ghrm_MessageText (Dto.Base) @@ -23916,6 +23921,11 @@ 预留字段12 + + + 申请单ID + + Ghrm_MessageText (Model)