修改绩效考核
This commit is contained in:
parent
31cf6d6508
commit
b0f60f4a58
|
@ -122,14 +122,18 @@ namespace FineUIPro.Web.CQMS.Performance
|
|||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var NowDate = Convert.ToDateTime(drpCompileDateMonth.Text.Trim());
|
||||
var Year = NowDate.Year;
|
||||
var Month = 1;
|
||||
if (NowDate.Month != 12)
|
||||
{
|
||||
Month = NowDate.Month + 1;
|
||||
}
|
||||
else {
|
||||
Year += 1;
|
||||
}
|
||||
|
||||
//获取配置
|
||||
var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == NowDate.Year.ToString() && x.SortIndex == Month);
|
||||
var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == Year.ToString() && x.SortIndex == Month);
|
||||
if (modelConfig != null)
|
||||
{
|
||||
int child3Index = 1;
|
||||
|
@ -1063,13 +1067,17 @@ namespace FineUIPro.Web.CQMS.Performance
|
|||
//循环list给每周任务、工程量、资源需求计划、本周工作任务完成情况 ,每日工作计划、完成情况赋值
|
||||
//获取周数
|
||||
var NowDate = Convert.ToDateTime(drpCompileDateMonth.Text.Trim());
|
||||
var Year = NowDate.Year;
|
||||
var Month = 1;
|
||||
if (NowDate.Month != 12)
|
||||
{
|
||||
Month = NowDate.Month + 1;
|
||||
}
|
||||
else {
|
||||
Year += 1;
|
||||
}
|
||||
|
||||
var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == NowDate.Year.ToString() && x.SortIndex == Month);
|
||||
var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == Year.ToString() && x.SortIndex == Month);
|
||||
|
||||
for (int i = 0; i < listChild1.Count; i++)
|
||||
{
|
||||
|
@ -1238,14 +1246,19 @@ namespace FineUIPro.Web.CQMS.Performance
|
|||
return;
|
||||
}
|
||||
var dates = Convert.ToDateTime(drpCompileDateMonth.Text.Trim());
|
||||
var Year = dates.Year;
|
||||
var Month = 1;
|
||||
if (dates.Month != 12)
|
||||
{
|
||||
Month = dates.Month + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
Year += 1;
|
||||
}
|
||||
|
||||
//按照日期查询是否有设置
|
||||
var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == dates.Year.ToString() && x.SortIndex == Month);
|
||||
var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == Year.ToString() && x.SortIndex == Month);
|
||||
if (modelConfig == null)
|
||||
{
|
||||
ShowNotify("当前日期未设置规则,请前往施工绩效设置页面进行操作。", MessageBoxIcon.Warning);
|
||||
|
|
|
@ -468,14 +468,18 @@ namespace FineUIPro.Web.CQMS.Performance
|
|||
#endregion
|
||||
var datesConfig = Convert.ToDateTime(drpCompileDateMonth.Text.Trim());
|
||||
var Month = 1;
|
||||
var nowYear = datesConfig.Year;
|
||||
if (datesConfig.Month != 12)
|
||||
{
|
||||
Month = datesConfig.Month + 1;
|
||||
}
|
||||
else {
|
||||
nowYear += 1;
|
||||
}
|
||||
|
||||
var Child2SortIndex = 1;
|
||||
//按照日期查询是否有设置
|
||||
var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == datesConfig.Year.ToString() && x.SortIndex == Month);
|
||||
var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == nowYear.ToString() && x.SortIndex == Month);
|
||||
if (modelConfig!=null)
|
||||
{
|
||||
//根据设置的周数插入表格CQMS_Performance_Child2
|
||||
|
|
Loading…
Reference in New Issue