提交代码

This commit is contained in:
2024-05-14 09:03:31 +08:00
parent c57b03d665
commit 3c73800853
26 changed files with 3821 additions and 542 deletions
+1
View File
@@ -587,6 +587,7 @@
<Compile Include="JDGL\Check\QuantityListService.cs" />
<Compile Include="JDGL\Check\SteelStructureCompletionService.cs" />
<Compile Include="JDGL\Check\UndergroundPipeCompletionService.cs" />
<Compile Include="JDGL\Check\WeekPlanService.cs" />
<Compile Include="JDGL\WBSCompleteAndReal\WBSReportService.cs" />
<Compile Include="JDGL\WBS\CnProfessionInitService.cs" />
<Compile Include="JDGL\WBS\CnProfessionService.cs" />
+1 -1
View File
@@ -47,7 +47,7 @@ namespace BLL
{
try
{
var getDataList = (from x in Funs.DB.Sys_DataExchange where x.IsUpdate == false select x).Take(100).ToList();
var getDataList = (from x in Funs.DB.Sys_DataExchange where x.IsUpdate == false select x).Take(500).ToList();
if (getDataList.Count() > 0)
{
var getDataList0 = getDataList.Where(x => x.MessageText.Contains("\"Type\":0")).ToList();
+10 -1
View File
@@ -3152,6 +3152,10 @@ namespace BLL
/// </summary>
public const string MonthPlanTemplateUrl = "File\\Excel\\DataIn\\月度计划情况导入模板.xls";
/// <summary>
/// 周进度计划导入模版文件原始的虚拟路径
/// </summary>
public const string WeekPlanTemplateUrl = "File\\Excel\\DataIn\\周进度计划导入模板.xls";
/// <summary>
/// 仪表索引
/// </summary>
public const string InstrumentUrl = "File\\Excel\\TestRun\\仪表索引模板.xlsx";
@@ -5767,10 +5771,15 @@ namespace BLL
public const string RectificationMeasureMenuId = "0629BAB1-DB1C-42CE-A333-49F3813617D7";
/// <summary>
/// 工程量完成情况
/// 月度计划情况
/// </summary>
public const string MonthPlanMenuId = "94287B92-7E96-4B90-BC6F-DAF30AE3B314";
/// <summary>
/// 周进度计划
/// </summary>
public const string WeekPlanMenuId = "56A54B4B-BBA3-4249-9FFC-3A60DAC79059";
/// <summary>
/// 进度完成情况
/// </summary>
+122
View File
@@ -0,0 +1,122 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
/// <summary>
/// 周计划情况
/// </summary>
public class WeekPlanService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据主键获取周计划情况
/// </summary>
/// <param name="WeekPlanId"></param>
/// <returns></returns>
public static Model.JDGL_WeekPlan GetWeekPlanById(string WeekPlanId)
{
return Funs.DB.JDGL_WeekPlan.FirstOrDefault(e => e.WeekPlanId == WeekPlanId);
}
/// <summary>
/// 根据主键获取周计划情况
/// </summary>
/// <param name="WeekPlanId"></param>
/// <returns></returns>
public static List<Model.JDGL_WeekPlan> GetWeekPlansByWeeks(string projectId, string weekNo)
{
return (from x in Funs.DB.JDGL_WeekPlan where x.ProjectId == projectId && x.WeekNo == weekNo select x).ToList();
}
/// <summary>
/// 添加周计划情况
/// </summary>
/// <param name="WeekPlan"></param>
public static void AddWeekPlan(Model.JDGL_WeekPlan WeekPlan)
{
Model.SGGLDB db = Funs.DB;
Model.JDGL_WeekPlan newWeekPlan = new Model.JDGL_WeekPlan
{
WeekPlanId = WeekPlan.WeekPlanId,
ProjectId = WeekPlan.ProjectId,
WeekNo = WeekPlan.WeekNo,
StartDate = WeekPlan.StartDate,
EndDate = WeekPlan.EndDate,
UnitWork = WeekPlan.UnitWork,
Major = WeekPlan.Major,
WorkContent = WeekPlan.WorkContent,
UnitId = WeekPlan.UnitId,
DutyPerson = WeekPlan.DutyPerson,
PlanDate = WeekPlan.PlanDate,
IsOK = WeekPlan.IsOK,
Remark = WeekPlan.Remark,
CompileMan = WeekPlan.CompileMan,
CompileDate = WeekPlan.CompileDate,
SortIndex = WeekPlan.SortIndex,
};
db.JDGL_WeekPlan.InsertOnSubmit(newWeekPlan);
db.SubmitChanges();
}
/// <summary>
/// 修改周计划情况
/// </summary>
/// <param name="WeekPlan"></param>
public static void UpdateWeekPlan(Model.JDGL_WeekPlan WeekPlan)
{
Model.SGGLDB db = Funs.DB;
Model.JDGL_WeekPlan newWeekPlan = db.JDGL_WeekPlan.FirstOrDefault(e => e.WeekPlanId == WeekPlan.WeekPlanId);
if (newWeekPlan != null)
{
newWeekPlan.UnitWork = WeekPlan.UnitWork;
newWeekPlan.Major = WeekPlan.Major;
newWeekPlan.WorkContent = WeekPlan.WorkContent;
newWeekPlan.UnitId = WeekPlan.UnitId;
newWeekPlan.DutyPerson = WeekPlan.DutyPerson;
newWeekPlan.PlanDate = WeekPlan.PlanDate;
newWeekPlan.IsOK = WeekPlan.IsOK;
newWeekPlan.Remark = WeekPlan.Remark;
newWeekPlan.CompileMan = WeekPlan.CompileMan;
newWeekPlan.CompileDate = WeekPlan.CompileDate;
newWeekPlan.SortIndex = WeekPlan.SortIndex;
db.SubmitChanges();
}
}
/// <summary>
/// 根据主键删除周计划情况
/// </summary>
/// <param name="WeekPlanId"></param>
public static void DeleteWeekPlanByWeekPlanId(string WeekPlanId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.JDGL_WeekPlan where x.WeekPlanId == WeekPlanId select x).FirstOrDefault();
if (q != null)
{
db.JDGL_WeekPlan.DeleteOnSubmit(q);
db.SubmitChanges();
}
}
/// <summary>
/// 根据主键删除周计划情况
/// </summary>
/// <param name="WeekPlanId"></param>
public static void DeleteAllWeekPlan(string projectId, string weekNo)
{
Model.SGGLDB db = Funs.DB;
var q = from x in db.JDGL_WeekPlan where x.ProjectId == projectId && x.WeekNo == weekNo select x;
if (q != null)
{
db.JDGL_WeekPlan.DeleteAllOnSubmit(q);
db.SubmitChanges();
}
}
}
}