|
|
@ -2074,8 +2074,6 @@ public partial class CommonServices : BaseServices<RootEntityTkey<int>>, ICommon |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case "F_TrainPlan_Temporary": |
|
|
|
case "F_TrainPlan_Temporary": |
|
|
|
case "F_UshioTrainPlan_Temporary": |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sql = $@"SELECT A.RoleId, B.RoleNo, B.RoleName
|
|
|
|
sql = $@"SELECT A.RoleId, B.RoleNo, B.RoleName
|
|
|
|
FROM Ghrs_UserRole A LEFT JOIN Ghrs_Role B ON A.RoleId = B.RoleId |
|
|
|
FROM Ghrs_UserRole A LEFT JOIN Ghrs_Role B ON A.RoleId = B.RoleId |
|
|
|
WHERE A.UserID = {App.User.ID} |
|
|
|
WHERE A.UserID = {App.User.ID} |
|
|
@ -2098,7 +2096,6 @@ public partial class CommonServices : BaseServices<RootEntityTkey<int>>, ICommon |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "F_TrainPlan_WaitConfirm": |
|
|
|
case "F_TrainPlan_WaitConfirm": |
|
|
|
case "F_UshioTrainPlan_WaitConfirm": |
|
|
|
|
|
|
|
result.JM_PageControlT1.Toolbar.Insert(0, new Toolbar() |
|
|
|
result.JM_PageControlT1.Toolbar.Insert(0, new Toolbar() |
|
|
|
{ |
|
|
|
{ |
|
|
|
display = true, |
|
|
|
display = true, |
|
|
@ -2118,6 +2115,121 @@ public partial class CommonServices : BaseServices<RootEntityTkey<int>>, ICommon |
|
|
|
position = "left" |
|
|
|
position = "left" |
|
|
|
}); |
|
|
|
}); |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case "F_UshioTrainPlan_Wait": |
|
|
|
|
|
|
|
case "F_UshioTrainPlan_Active": |
|
|
|
|
|
|
|
case "F_UshioTrainPlan_Disable": |
|
|
|
|
|
|
|
case "F_UshioTrainPlan_Temporary": |
|
|
|
|
|
|
|
case "F_UshioTrainPlan_WaitConfirm": |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
config = await Db.Queryable<Ghrh_Config>().Where(x => x.ConfigCode == "ESS_Recruit_Year_Human_Start_Month").FirstAsync(); |
|
|
|
|
|
|
|
startMonth = config != null ? config.ConfigValue.ObjToInt() : 1; |
|
|
|
|
|
|
|
months = new List<string>(); |
|
|
|
|
|
|
|
numbers = new(); |
|
|
|
|
|
|
|
for (int i = 1; i <= 12; i++) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (i < 10) |
|
|
|
|
|
|
|
months.Add("0" + i); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
months.Add(i.ObjToString()); |
|
|
|
|
|
|
|
numbers.Add(i); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
curentYear = DateTime.Now.Year; |
|
|
|
|
|
|
|
curentMonth = DateTime.Now.Month; |
|
|
|
|
|
|
|
// 指定要打头的数字 |
|
|
|
|
|
|
|
startNumber = startMonth; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (curentMonth < startMonth) |
|
|
|
|
|
|
|
curentYear--; |
|
|
|
|
|
|
|
// 创建一个新的列表用于存储重新排序后的结果 |
|
|
|
|
|
|
|
reorderedNumbers = new(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sort = result.JM_TableColumnT1.TableColumn.Where(x => x.field == "M1").SingleOrDefault()?.SortNo ?? 5; |
|
|
|
|
|
|
|
name1 = await QueryLangValue("F_ResumeMaintenance_0216", "预算编制数"); |
|
|
|
|
|
|
|
result.JM_TableColumnT1.TableColumn?.ForEach(x => |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (months.Where(o => o == x.label).Any()) |
|
|
|
|
|
|
|
x.GroupName = name1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (x.field == "Year") |
|
|
|
|
|
|
|
x.searchColumnDefaultValue = curentYear; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 找到指定数字的索引 |
|
|
|
|
|
|
|
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) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
result.JM_TableColumnT1.TableColumn?.ForEach(x => |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (x.label.ObjToInt() == num) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
x.SortNo = sort; |
|
|
|
|
|
|
|
x.label = curentYear + "-" + x.label; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
if (num == 12) |
|
|
|
|
|
|
|
curentYear++; |
|
|
|
|
|
|
|
sort++; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
result.JM_TableColumnT1.TableColumn = result.JM_TableColumnT1.TableColumn.OrderBy(x => x.SortNo).ToList(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (param.menuName == "F_UshioTrainPlan_WaitConfirm") |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result.JM_PageControlT1.Toolbar.Insert(0, new Toolbar() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
display = true, |
|
|
|
|
|
|
|
fnKey = "TBDDoReject", |
|
|
|
|
|
|
|
fnTitle = await QueryLangValue("F_Training_Demand_ToConfirm_Reject", param.langId, "拒绝"), |
|
|
|
|
|
|
|
fnType = "table", |
|
|
|
|
|
|
|
icon = "ess-icon-reject", |
|
|
|
|
|
|
|
position = "left" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
result.JM_PageControlT1.Toolbar.Insert(0, new Toolbar() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
display = true, |
|
|
|
|
|
|
|
fnKey = "TBDDoAgree", |
|
|
|
|
|
|
|
fnTitle = await QueryLangValue("F_Training_Demand_ToConfirm_Agree", param.langId, "同意"), |
|
|
|
|
|
|
|
fnType = "table", |
|
|
|
|
|
|
|
icon = "ess-icon-approval", |
|
|
|
|
|
|
|
position = "left" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (param.menuName == "F_UshioTrainPlan_Temporary") |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
sql = $@"SELECT A.RoleId, B.RoleNo, B.RoleName
|
|
|
|
|
|
|
|
FROM Ghrs_UserRole A LEFT JOIN Ghrs_Role B ON A.RoleId = B.RoleId |
|
|
|
|
|
|
|
WHERE A.UserID = {App.User.ID} |
|
|
|
|
|
|
|
AND A.IsEnable = 1 |
|
|
|
|
|
|
|
AND B.IsEnable = 1 |
|
|
|
|
|
|
|
AND B.RoleNo = 'F_TrainPlanTransferToConfirmed'";
|
|
|
|
|
|
|
|
toolbarRoles = DbAccess.QueryList<ToolbarRole>(sql); |
|
|
|
|
|
|
|
if (toolbarRoles != null && toolbarRoles.Any()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
index = result.JM_PageControlT1.Toolbar.FindIndex(x => x.fnKey == "NewYN"); |
|
|
|
|
|
|
|
result.JM_PageControlT1.Toolbar.Insert(index + 1, new Toolbar() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
display = true, |
|
|
|
|
|
|
|
fnKey = "TBDToConfirm", |
|
|
|
|
|
|
|
fnTitle = await QueryLangValue("F_ManReqMaintenTemporary_TransferToConfirmed", param.langId, "转入待确认"), |
|
|
|
|
|
|
|
fnType = "table", |
|
|
|
|
|
|
|
icon = "ghr-icon-user-wait", |
|
|
|
|
|
|
|
position = "left" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#endregion |
|
|
|
#endregion |
|
|
|