施工人力
This commit is contained in:
+1
-1
@@ -609,6 +609,7 @@
|
||||
<Compile Include="JDGL\Check\UndergroundPipeCompletionService.cs" />
|
||||
<Compile Include="JDGL\Check\WeekItemService.cs" />
|
||||
<Compile Include="JDGL\Check\WeekPlanService.cs" />
|
||||
<Compile Include="JDGL\SGManPower\ManPowerPlanService.cs" />
|
||||
<Compile Include="JDGL\WBSCompleteAndReal\WBSReportService.cs" />
|
||||
<Compile Include="JDGL\WBS\CnProfessionInitService.cs" />
|
||||
<Compile Include="JDGL\WBS\CnProfessionService.cs" />
|
||||
@@ -1311,7 +1312,6 @@
|
||||
<Version>5.0.0</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
@@ -3310,6 +3310,9 @@ namespace BLL
|
||||
/// 月度计划情况导入模版文件原始的虚拟路径
|
||||
/// </summary>
|
||||
public const string MonthPlanTemplateUrl = "File\\Excel\\DataIn\\月度计划情况导入模板.xls";
|
||||
/// 施工人力计划导入模版文件原始的虚拟路径
|
||||
/// </summary>
|
||||
public const string SGManPowerTemplateUrl = "File\\Excel\\DataIn\\施工人力计划导入模板.xls";
|
||||
/// <summary>
|
||||
/// 周进度计划导入模版文件原始的虚拟路径
|
||||
/// </summary>
|
||||
@@ -6043,6 +6046,10 @@ namespace BLL
|
||||
/// 月进度计划
|
||||
/// </summary>
|
||||
public const string MonthPlanMenuId = "94287B92-7E96-4B90-BC6F-DAF30AE3B314";
|
||||
/// <summary>
|
||||
/// 施工人力计划
|
||||
/// </summary>
|
||||
public const string SGManPowerMenuId = "D87CD627-A18C-4C5D-962D-424E582F2379";
|
||||
|
||||
/// <summary>
|
||||
/// 周进度计划
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class ManPowerPlanService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取施工人力计划情况
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.JDGL_SGManPower GetSGManPowerById(string Id)
|
||||
{
|
||||
return Funs.DB.JDGL_SGManPower.FirstOrDefault(x => x.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加施工人力计划
|
||||
/// </summary>
|
||||
/// <param name="SGManPower"></param>
|
||||
public static void AddSGManPower(Model.JDGL_SGManPower SGManPower)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.JDGL_SGManPower newSGManPower = new Model.JDGL_SGManPower
|
||||
{
|
||||
Id = SGManPower.Id,
|
||||
ProjectId = SGManPower.ProjectId,
|
||||
UnitId = SGManPower.UnitId,
|
||||
UnitWorkId = SGManPower.UnitWorkId,
|
||||
WorkPostId = SGManPower.WorkPostId,
|
||||
Version = SGManPower.Version,
|
||||
Quantity = SGManPower.Quantity,
|
||||
PlanDate = SGManPower.PlanDate,
|
||||
CompileMan = SGManPower.CompileMan,
|
||||
CompileTime = SGManPower.CompileTime,
|
||||
Remarks = SGManPower.Remarks,
|
||||
};
|
||||
db.JDGL_SGManPower.InsertOnSubmit(newSGManPower);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改施工人力计划
|
||||
/// </summary>
|
||||
/// <param name="SGManPower"></param>
|
||||
public static void UpdateSGManPower(Model.JDGL_SGManPower SGManPower)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.JDGL_SGManPower newSGManPower =
|
||||
db.JDGL_SGManPower.FirstOrDefault(x => x.Id == SGManPower.Id);
|
||||
if (newSGManPower != null)
|
||||
{
|
||||
newSGManPower.UnitId = SGManPower.UnitId;
|
||||
newSGManPower.UnitWorkId = SGManPower.UnitWorkId;
|
||||
newSGManPower.WorkPostId = SGManPower.WorkPostId;
|
||||
newSGManPower.Version = SGManPower.Version;
|
||||
newSGManPower.Quantity = SGManPower.Quantity;
|
||||
newSGManPower.PlanDate = SGManPower.PlanDate;
|
||||
newSGManPower.CompileMan = SGManPower.CompileMan;
|
||||
newSGManPower.CompileTime = SGManPower.CompileTime;
|
||||
newSGManPower.Remarks = SGManPower.Remarks;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除施工人力计划
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteSGManPowerById(string Id)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = (from x in db.JDGL_SGManPower where x.Id == Id select x).FirstOrDefault();
|
||||
if (q != null)
|
||||
{
|
||||
db.JDGL_SGManPower.DeleteOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目获取工力计划版本
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
public static List<string> getGroupVersion(string projectId)
|
||||
{
|
||||
var versions = Funs.DB.JDGL_SGManPower
|
||||
.Where(x => x.ProjectId == projectId)
|
||||
.GroupBy(x => x.Version)
|
||||
.Select(g => g.Key)
|
||||
.OrderByDescending(v => v)
|
||||
.ToList();
|
||||
|
||||
return versions;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user