提交代码

This commit is contained in:
2024-06-27 15:35:38 +08:00
parent d0f94051b7
commit b09d7f3f70
11 changed files with 349 additions and 34 deletions
@@ -374,10 +374,12 @@ namespace FineUIPro.Web.JDGL.Check
Model.SGGLDB db = Funs.DB;
var projectUnits = from x in db.Project_ProjectUnit
join y in db.Base_Unit on x.UnitId equals y.UnitId
where x.ProjectId == this.CurrUser.LoginProjectId select new { x.UnitId,y.UnitName};
where x.ProjectId == this.CurrUser.LoginProjectId
select new { x.UnitId, y.UnitName };
var projectUsers = from x in db.Project_ProjectUser
join y in db.Sys_User on x.UserId equals y.UserId
where x.ProjectId == this.CurrUser.LoginProjectId select new { x.UserId,y.UserName};
where x.ProjectId == this.CurrUser.LoginProjectId
select new { x.UserId, y.UserName };
DateTime month = Convert.ToDateTime(this.txtMonth.Text.Trim());
if (pds != null && ir > 0)
{
@@ -392,7 +394,7 @@ namespace FineUIPro.Web.JDGL.Check
string col5 = pds.Rows[i][5].ToString().Trim();
if (!string.IsNullOrEmpty(col0))//责任单位
{
var projectUnit = projectUnits.FirstOrDefault(x=>x.UnitName==col0);
var projectUnit = projectUnits.FirstOrDefault(x => x.UnitName == col0);
if (projectUnit != null)
{
MonthPlan.UnitId = projectUnit.UnitId;
@@ -402,11 +404,11 @@ namespace FineUIPro.Web.JDGL.Check
{
MonthPlan.NodeContent = col1;
}
if (!string.IsNullOrEmpty(col2))//计划完成时间
{
MonthPlan.PlanDate = Funs.GetNewDateTime(col2);
}
if (!string.IsNullOrEmpty(col3))//计划完成
{
@@ -424,8 +426,7 @@ namespace FineUIPro.Web.JDGL.Check
{
MonthPlan.Remark = col5;
}
int num = (from x in Funs.DB.JDGL_MonthPlan where x.Months == month && x.ProjectId == this.CurrUser.LoginProjectId select x).Count();
MonthPlan.SortIndex = num + 1;
MonthPlan.SortIndex = i + 1;
MonthPlan.MonthPlanId = SQLHelper.GetNewID(typeof(Model.JDGL_MonthPlan));
MonthPlans.Add(MonthPlan);
}
@@ -466,7 +467,7 @@ namespace FineUIPro.Web.JDGL.Check
DateTime month = Convert.ToDateTime(this.txtMonth.Text.Trim());
for (int i = 0; i < a; i++)
{
var oldMonthPlan = monthPlanLists.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.Months == month && x.UnitId == MonthPlans[i].UnitId && x.NodeContent== MonthPlans[i].NodeContent);
var oldMonthPlan = monthPlanLists.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.Months == month && x.UnitId == MonthPlans[i].UnitId && x.NodeContent == MonthPlans[i].NodeContent);
if (oldMonthPlan == null)
{
Model.JDGL_MonthPlan newMonthPlan = new Model.JDGL_MonthPlan();
@@ -479,7 +480,7 @@ namespace FineUIPro.Web.JDGL.Check
newMonthPlan.DutyPerson = MonthPlans[i].DutyPerson;
newMonthPlan.RealDate = MonthPlans[i].RealDate;
newMonthPlan.Remark = MonthPlans[i].Remark;
newMonthPlan.SortIndex= MonthPlans[i].SortIndex;
newMonthPlan.SortIndex = MonthPlans[i].SortIndex;
newMonthPlan.CompileMan = this.CurrUser.UserId;
newMonthPlan.CompileDate = DateTime.Now;
BLL.MonthPlanService.AddMonthPlan(newMonthPlan);