修改施工日志
This commit is contained in:
@@ -646,6 +646,7 @@
|
||||
<Compile Include="PZHGL\InformationProject\ConstructionLogManagementService.cs" />
|
||||
<Compile Include="PZHGL\InformationProject\ConstructionLogPersonService.cs" />
|
||||
<Compile Include="PZHGL\InformationProject\ConstructionLogProblemService.cs" />
|
||||
<Compile Include="PZHGL\InformationProject\ConstructionLogRecordService.cs" />
|
||||
<Compile Include="PZHGL\InformationProject\ConstructionLogService.cs" />
|
||||
<Compile Include="PZHGL\InformationProject\ConstructionPlanApproveService.cs" />
|
||||
<Compile Include="PZHGL\InformationProject\ConstructionPlanService.cs" />
|
||||
|
||||
@@ -21,6 +21,22 @@ namespace BLL
|
||||
return Funs.DB.Base_SpecialEquipment.FirstOrDefault(e => e.SpecialEquipmentId == specialEquipmentId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取机具设备名称
|
||||
/// </summary>
|
||||
/// <param name="specialEquipmentId"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetSpecialEquipmentNameById(string specialEquipmentId)
|
||||
{
|
||||
string name = string.Empty;
|
||||
var q= Funs.DB.Base_SpecialEquipment.FirstOrDefault(e => e.SpecialEquipmentId == specialEquipmentId);
|
||||
if (q != null)
|
||||
{
|
||||
name = q.SpecialEquipmentName;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加机具设备
|
||||
/// </summary>
|
||||
@@ -87,6 +103,17 @@ namespace BLL
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取机具设备列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Base_SpecialEquipment> GetAllSpecialEquipmentList()
|
||||
{
|
||||
return (from x in Funs.DB.Base_SpecialEquipment
|
||||
orderby x.SpecialEquipmentCode
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设备下拉框
|
||||
/// </summary>
|
||||
@@ -105,6 +132,24 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设备下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="isSpecial">项目id</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitAllSpecialEquipmentDropDownList(DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "SpecialEquipmentId";
|
||||
dropName.DataTextField = "SpecialEquipmentName";
|
||||
dropName.DataSource = GetAllSpecialEquipmentList();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取机具设备列表
|
||||
/// </summary>
|
||||
|
||||
@@ -146,21 +146,23 @@ namespace BLL
|
||||
/// <param name="managerRuleApprove">实体验收审批实体</param>
|
||||
public static void AddSpotCheckApprove(Model.Check_SpotCheckApprove approve)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.Check_SpotCheckApprove));
|
||||
Model.Check_SpotCheckApprove newApprove = new Model.Check_SpotCheckApprove();
|
||||
newApprove.SpotCheckApproveId = newKeyID;
|
||||
newApprove.SpotCheckCode = approve.SpotCheckCode;
|
||||
newApprove.ApproveMan = approve.ApproveMan;
|
||||
newApprove.ApproveDate = approve.ApproveDate;
|
||||
newApprove.ApproveIdea = approve.ApproveIdea;
|
||||
newApprove.IsAgree = approve.IsAgree;
|
||||
newApprove.ApproveType = approve.ApproveType;
|
||||
newApprove.SpotCheckDetailId = approve.SpotCheckDetailId;
|
||||
newApprove.Sign = approve.Sign;
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.Check_SpotCheckApprove));
|
||||
Model.Check_SpotCheckApprove newApprove = new Model.Check_SpotCheckApprove();
|
||||
newApprove.SpotCheckApproveId = newKeyID;
|
||||
newApprove.SpotCheckCode = approve.SpotCheckCode;
|
||||
newApprove.ApproveMan = approve.ApproveMan;
|
||||
newApprove.ApproveDate = approve.ApproveDate;
|
||||
newApprove.ApproveIdea = approve.ApproveIdea;
|
||||
newApprove.IsAgree = approve.IsAgree;
|
||||
newApprove.ApproveType = approve.ApproveType;
|
||||
newApprove.SpotCheckDetailId = approve.SpotCheckDetailId;
|
||||
newApprove.Sign = approve.Sign;
|
||||
|
||||
db.Check_SpotCheckApprove.InsertOnSubmit(newApprove);
|
||||
db.SubmitChanges();
|
||||
db.Check_SpotCheckApprove.InsertOnSubmit(newApprove);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
public static string AddSpotCheckApproveForApi(Model.Check_SpotCheckApprove approve)
|
||||
{
|
||||
@@ -193,16 +195,18 @@ namespace BLL
|
||||
/// <param name="managerRuleApprove">实体验收审批实体</param>
|
||||
public static void UpdateSpotCheckApprove(Model.Check_SpotCheckApprove approve)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Check_SpotCheckApprove newApprove = db.Check_SpotCheckApprove.First(e => e.SpotCheckApproveId == approve.SpotCheckApproveId && e.ApproveDate == null);
|
||||
newApprove.SpotCheckCode = approve.SpotCheckCode;
|
||||
newApprove.ApproveMan = approve.ApproveMan;
|
||||
newApprove.ApproveDate = approve.ApproveDate;
|
||||
newApprove.ApproveIdea = approve.ApproveIdea;
|
||||
newApprove.IsAgree = approve.IsAgree;
|
||||
newApprove.ApproveType = approve.ApproveType;
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Check_SpotCheckApprove newApprove = db.Check_SpotCheckApprove.First(e => e.SpotCheckApproveId == approve.SpotCheckApproveId && e.ApproveDate == null);
|
||||
newApprove.SpotCheckCode = approve.SpotCheckCode;
|
||||
newApprove.ApproveMan = approve.ApproveMan;
|
||||
newApprove.ApproveDate = approve.ApproveDate;
|
||||
newApprove.ApproveIdea = approve.ApproveIdea;
|
||||
newApprove.IsAgree = approve.IsAgree;
|
||||
newApprove.ApproveType = approve.ApproveType;
|
||||
|
||||
db.SubmitChanges();
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -79,6 +79,38 @@ namespace BLL
|
||||
return Funs.DB.WBS_WorkPackageInit.FirstOrDefault(x => x.WorkPackageCode == workPackageCode);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据分部分项编号获取分部分项信息
|
||||
/// </summary>
|
||||
/// <param name="workPackageCode"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetWorkPackageCodeByPackageContent(string packageContent)
|
||||
{
|
||||
string workPackageCode = string.Empty;
|
||||
var q= Funs.DB.WBS_WorkPackageInit.FirstOrDefault(x => x.PackageContent == packageContent);
|
||||
if (q != null)
|
||||
{
|
||||
workPackageCode = q.WorkPackageCode;
|
||||
}
|
||||
return workPackageCode;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据分部分项编号获取分部分项信息
|
||||
/// </summary>
|
||||
/// <param name="workPackageCode"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetPackageContentByWorkPackageCode(string workPackageCode)
|
||||
{
|
||||
string packageContent = string.Empty;
|
||||
var q = Funs.DB.WBS_WorkPackageInit.FirstOrDefault(x => x.WorkPackageCode == workPackageCode);
|
||||
if (q != null)
|
||||
{
|
||||
packageContent = q.PackageContent;
|
||||
}
|
||||
return packageContent;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据分部分项编号获取子级分部分项信息集合
|
||||
/// </summary>
|
||||
@@ -88,5 +120,23 @@ namespace BLL
|
||||
{
|
||||
return (from x in Funs.DB.WBS_WorkPackageInit where x.SuperWorkPack == workPackageCode select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 样板类型下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "PackageContent";
|
||||
dropName.DataTextField = "PackageContent";
|
||||
dropName.DataSource = from x in Funs.DB.WBS_WorkPackageInit where x.SuperWorkPack == null orderby x.ProjectType, x.WorkPackageCode select x;
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -788,7 +788,21 @@ namespace BLL
|
||||
IQueryable<Model.WBS_WorkPackage> workPackages = from x in db.WBS_WorkPackage where x.ProjectId == projectId select x;
|
||||
IQueryable<Model.WBS_UnitWork> unitWorks = from x in db.WBS_UnitWork where x.ProjectId == projectId select x;
|
||||
IQueryable<Model.View_WBS_WorkPackageDetail> getDetails = from x in db.View_WBS_WorkPackageDetail where x.ProjectId == projectId select x;
|
||||
//获取符合时间范围的所有项
|
||||
List<Model.View_WBS> getWBSs = (from x in db.View_WBS where x.ProjectId == projectId select x).ToList();
|
||||
List<Model.View_WBS> list = getWBSs.Where(x => x.PlanEndDate > startTime && x.PlanEndDate <= endTime).ToList();
|
||||
List<Model.View_WBS> newLists = new List<Model.View_WBS>();
|
||||
foreach (var item in list)
|
||||
{
|
||||
var supItem = getWBSs.FirstOrDefault(x => x.Id == item.SupId);
|
||||
if (supItem != null)
|
||||
{
|
||||
newLists.Add(item);
|
||||
newLists.Add(supItem);
|
||||
AddSupItem(supItem, getWBSs, newLists);
|
||||
}
|
||||
}
|
||||
List<string> ids = newLists.Select(x => x.Id).ToList();
|
||||
List<Model.View_WBS> WBSList = new List<Model.View_WBS>();
|
||||
DateTime startDate, endDate, startMonth, endMonth;
|
||||
List<DateTime> months = new List<DateTime>();
|
||||
@@ -844,11 +858,11 @@ namespace BLL
|
||||
newList.Add(item);
|
||||
if (string.IsNullOrEmpty(IsOut))
|
||||
{
|
||||
AddDetail2(newList, getWBSs.ToList(), item.Id, a.ToString(), startTime, endTime);
|
||||
AddDetail2(newList, getWBSs.ToList(), item.Id, a.ToString(), startTime, endTime, ids);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddDetail2(newList, getWBSs.ToList(), item.Id, a.ToString(), string.Empty, startTime, endTime);
|
||||
AddDetail2(newList, getWBSs.ToList(), item.Id, a.ToString(), string.Empty, startTime, endTime, ids);
|
||||
}
|
||||
a++;
|
||||
}
|
||||
@@ -990,29 +1004,40 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
|
||||
private static void AddDetail2(List<Model.View_WBS> newList, List<Model.View_WBS> oldList, string id, string preCode, DateTime startTime, DateTime endTime)
|
||||
private static void AddSupItem(Model.View_WBS item, List<Model.View_WBS> getWBSs, List<Model.View_WBS> newLists)
|
||||
{
|
||||
var items = oldList.Where(x => x.SupId == id && x.PlanEndDate > startTime && x.PlanEndDate <= endTime).OrderBy(x => x.Code);
|
||||
var supItem = getWBSs.FirstOrDefault(x => x.Id == item.SupId);
|
||||
if (supItem != null)
|
||||
{
|
||||
newLists.Add(item);
|
||||
newLists.Add(supItem);
|
||||
AddSupItem(supItem, getWBSs, newLists);
|
||||
}
|
||||
}
|
||||
|
||||
private static void AddDetail2(List<Model.View_WBS> newList, List<Model.View_WBS> oldList, string id, string preCode, DateTime startTime, DateTime endTime,List<string> ids)
|
||||
{
|
||||
var items = oldList.Where(x => x.SupId == id && ((x.PlanEndDate > startTime && x.PlanEndDate <= endTime) || ids.Contains(x.Id))).OrderBy(x => x.Code);
|
||||
int b = 1;
|
||||
foreach (var item in items)
|
||||
{
|
||||
item.Code = preCode + "." + b.ToString();
|
||||
newList.Add(item);
|
||||
AddDetail2(newList, oldList, item.Id, item.Code, startTime, endTime);
|
||||
AddDetail2(newList, oldList, item.Id, item.Code, startTime, endTime, ids);
|
||||
b++;
|
||||
}
|
||||
}
|
||||
|
||||
private static void AddDetail2(List<Model.View_WBS> newList, List<Model.View_WBS> oldList, string id, string preCode, string prefix, DateTime startTime, DateTime endTime)
|
||||
private static void AddDetail2(List<Model.View_WBS> newList, List<Model.View_WBS> oldList, string id, string preCode, string prefix, DateTime startTime, DateTime endTime, List<string> ids)
|
||||
{
|
||||
var items = oldList.Where(x => x.SupId == id && x.PlanEndDate > startTime && x.PlanEndDate <= endTime).OrderBy(x => x.Code);
|
||||
var items = oldList.Where(x => x.SupId == id && ((x.PlanEndDate > startTime && x.PlanEndDate <= endTime) || ids.Contains(x.Id))).OrderBy(x => x.Code);
|
||||
int b = 1;
|
||||
foreach (var item in items)
|
||||
{
|
||||
item.Code = preCode + "." + b.ToString();
|
||||
item.Name = prefix + "...." + item.Name;
|
||||
newList.Add(item);
|
||||
AddDetail2(newList, oldList, item.Id, item.Code, prefix + "....", startTime, endTime);
|
||||
AddDetail2(newList, oldList, item.Id, item.Code, prefix + "....", startTime, endTime, ids);
|
||||
b++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -367,6 +367,31 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static string WorkPost_Checker = "595999E9-75A8-4064-9BD1-9EE02F236297";
|
||||
|
||||
/// <summary>
|
||||
/// 瓦工岗位Id
|
||||
/// </summary>
|
||||
public static string WorkPost_BricklayerId = "668CB91E-F067-42E6-95ED-FFF1BCCE4576";
|
||||
|
||||
/// <summary>
|
||||
/// 钢筋工岗位Id
|
||||
/// </summary>
|
||||
public static string WorkPost_SteelFixerId = "48280AA2-62D6-4105-AAA7-C38471F44DA9";
|
||||
|
||||
/// <summary>
|
||||
/// 木工岗位Id
|
||||
/// </summary>
|
||||
public static string WorkPost_CarpentryId = "FA155A27-E5E5-44DF-8CC3-05404F572DB8";
|
||||
|
||||
/// <summary>
|
||||
/// 混凝土工岗位Id
|
||||
/// </summary>
|
||||
public static string WorkPost_ConcreteWorkerId = "65F02FD8-6C67-402E-9588-4DAB038A697A";
|
||||
|
||||
/// <summary>
|
||||
/// 架子工岗位Id
|
||||
/// </summary>
|
||||
public static string WorkPost_ScaffolderId = "1331D109-6435-4709-9A35-65AEC7B3F06F";
|
||||
|
||||
#endregion
|
||||
|
||||
#region 系统环境设置常量
|
||||
@@ -4522,9 +4547,14 @@ namespace BLL
|
||||
public const string ConstructionReportMenuId = "0DAFF358-EA16-44B2-8E4B-E15E40EFAAD0";
|
||||
|
||||
/// <summary>
|
||||
/// 项目级施工日志
|
||||
/// 个人施工日志
|
||||
/// </summary>
|
||||
public const string ConstructionLogMenuId = "4CB03F8B-C967-4082-ADF1-08776FE40E21";
|
||||
public const string ConstructionLogMenuId = "0383A4A1-1565-4F11-BAF3-2B84CB621796";
|
||||
|
||||
/// <summary>
|
||||
/// 项目施工日志
|
||||
/// </summary>
|
||||
public const string ProjectConstructionLogMenuId = "D3F67A7B-2FC4-468A-98BB-5F3DF2F193C4";
|
||||
|
||||
/// <summary>
|
||||
/// 项目级施工日志
|
||||
|
||||
@@ -1418,6 +1418,53 @@ namespace BLL
|
||||
IRestResponse response = client.Execute(request);
|
||||
return response.Content;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据星期几返回值
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string GetWeekDay(string value)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(value))
|
||||
{
|
||||
if (value == "Sunday")
|
||||
{
|
||||
return "日";
|
||||
}
|
||||
else if (value == "Monday")
|
||||
{
|
||||
return "一";
|
||||
}
|
||||
else if (value == "Tuesday")
|
||||
{
|
||||
return "二";
|
||||
}
|
||||
else if (value == "Wednesday")
|
||||
{
|
||||
return "三";
|
||||
}
|
||||
else if (value == "Thursday")
|
||||
{
|
||||
return "四";
|
||||
}
|
||||
else if (value == "Friday")
|
||||
{
|
||||
return "五";
|
||||
}
|
||||
else if (value == "Saturday")
|
||||
{
|
||||
return "六";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,12 +31,8 @@ namespace BLL
|
||||
newConstructionLogMachine.ConstructionLogMachineId = constructionLogMachine.ConstructionLogMachineId;
|
||||
newConstructionLogMachine.ConstructionLogId = constructionLogMachine.ConstructionLogId;
|
||||
newConstructionLogMachine.UnitWorkId = constructionLogMachine.UnitWorkId;
|
||||
newConstructionLogMachine.WJNum = constructionLogMachine.WJNum;
|
||||
newConstructionLogMachine.DCNum = constructionLogMachine.DCNum;
|
||||
newConstructionLogMachine.DZJNum = constructionLogMachine.DZJNum;
|
||||
newConstructionLogMachine.GCNum = constructionLogMachine.GCNum;
|
||||
newConstructionLogMachine.BCNum = constructionLogMachine.BCNum;
|
||||
newConstructionLogMachine.BengCNum = constructionLogMachine.BengCNum;
|
||||
newConstructionLogMachine.MachineId = constructionLogMachine.MachineId;
|
||||
newConstructionLogMachine.Num = constructionLogMachine.Num;
|
||||
|
||||
db.ZHGL_ConstructionLogMachine.InsertOnSubmit(newConstructionLogMachine);
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace BLL
|
||||
public static List<Model.ZHGL_ConstructionLogManagement> GetConstructionLogManagementsByConstructionLogId(string ConstructionLogId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
return (from x in db.ZHGL_ConstructionLogManagement where x.ConstructionLogId == ConstructionLogId select x).ToList();
|
||||
return (from x in db.ZHGL_ConstructionLogManagement where x.ConstructionLogId == ConstructionLogId orderby x.UnitWorkId select x).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,12 +31,8 @@ namespace BLL
|
||||
newConstructionLogPerson.ConstructionLogPersonId = constructionLogPerson.ConstructionLogPersonId;
|
||||
newConstructionLogPerson.ConstructionLogId = constructionLogPerson.ConstructionLogId;
|
||||
newConstructionLogPerson.UnitWorkId = constructionLogPerson.UnitWorkId;
|
||||
newConstructionLogPerson.WGNum = constructionLogPerson.WGNum;
|
||||
newConstructionLogPerson.GJGNum = constructionLogPerson.GJGNum;
|
||||
newConstructionLogPerson.MGNum = constructionLogPerson.MGNum;
|
||||
newConstructionLogPerson.HNTGNum = constructionLogPerson.HNTGNum;
|
||||
newConstructionLogPerson.HGNum = constructionLogPerson.HGNum;
|
||||
newConstructionLogPerson.JZGNum = constructionLogPerson.JZGNum;
|
||||
newConstructionLogPerson.WorkPostId = constructionLogPerson.WorkPostId;
|
||||
newConstructionLogPerson.Num = constructionLogPerson.Num;
|
||||
|
||||
db.ZHGL_ConstructionLogPerson.InsertOnSubmit(newConstructionLogPerson);
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -1,13 +1,68 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class ConstructionLogProblemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 获取施工日志需要协调解决的问题明细列表
|
||||
/// </summary>
|
||||
/// <param name="satartRowIndex"></param>
|
||||
/// <param name="maximumRows"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.ZHGL_ConstructionLogProblem> getListData(string ConstructionLogId)
|
||||
{
|
||||
return (from x in db.ZHGL_ConstructionLogProblem
|
||||
where x.ConstructionLogId == ConstructionLogId
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加施工日志需要协调解决的问题明细
|
||||
/// </summary>
|
||||
/// <param name="managerRuleApprove">施工日志需要协调解决的问题明细实体</param>
|
||||
public static void AddConstructionLogProblem(Model.ZHGL_ConstructionLogProblem constructionLogProblem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.ZHGL_ConstructionLogProblem newConstructionLogProblem = new Model.ZHGL_ConstructionLogProblem();
|
||||
newConstructionLogProblem.ConstructionLogProblemId = constructionLogProblem.ConstructionLogProblemId;
|
||||
newConstructionLogProblem.ConstructionLogId = constructionLogProblem.ConstructionLogId;
|
||||
newConstructionLogProblem.UnitWorkId = constructionLogProblem.UnitWorkId;
|
||||
newConstructionLogProblem.MainProblem = constructionLogProblem.MainProblem;
|
||||
newConstructionLogProblem.HandlingMeasures = constructionLogProblem.HandlingMeasures;
|
||||
newConstructionLogProblem.WorkPackageId = constructionLogProblem.WorkPackageId;
|
||||
newConstructionLogProblem.ImportanceLevel = constructionLogProblem.ImportanceLevel;
|
||||
|
||||
db.ZHGL_ConstructionLogProblem.InsertOnSubmit(newConstructionLogProblem);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报id删除对应的所有施工日志需要协调解决的问题明细
|
||||
/// </summary>
|
||||
/// <param name="ConstructionLogId">施工日志需要协调解决的问题明细编号</param>
|
||||
public static void DeleteConstructionLogProblemsByConstructionLogId(string ConstructionLogId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = (from x in db.ZHGL_ConstructionLogProblem where x.ConstructionLogId == ConstructionLogId select x).ToList();
|
||||
if (q.Count() > 0)
|
||||
{
|
||||
db.ZHGL_ConstructionLogProblem.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报id获取对应的所有施工日志需要协调解决的问题明细
|
||||
/// </summary>
|
||||
/// <param name="ConstructionLogId">施工日志需要协调解决的问题明细编号</param>
|
||||
public static List<Model.ZHGL_ConstructionLogProblem> GetConstructionLogProblemsByConstructionLogId(string ConstructionLogId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
return (from x in db.ZHGL_ConstructionLogProblem where x.ConstructionLogId == ConstructionLogId orderby x.UnitWorkId select x).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class ConstructionLogRecordService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 获取施工日志施工经理相关记录明细列表
|
||||
/// </summary>
|
||||
/// <param name="satartRowIndex"></param>
|
||||
/// <param name="maximumRows"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.ZHGL_ConstructionLogRecord> getListData(string ConstructionLogId)
|
||||
{
|
||||
return (from x in db.ZHGL_ConstructionLogRecord
|
||||
where x.ConstructionLogId == ConstructionLogId
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加施工日志作业人员明细
|
||||
/// </summary>
|
||||
/// <param name="managerRuleApprove">施工日志作业人员明细实体</param>
|
||||
public static void AddConstructionLogRecord(Model.ZHGL_ConstructionLogRecord constructionLogRecord)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.ZHGL_ConstructionLogRecord newConstructionLogRecord = new Model.ZHGL_ConstructionLogRecord();
|
||||
newConstructionLogRecord.ConstructionLogRecordId = constructionLogRecord.ConstructionLogRecordId;
|
||||
newConstructionLogRecord.ConstructionLogId = constructionLogRecord.ConstructionLogId;
|
||||
newConstructionLogRecord.Record = constructionLogRecord.Record;
|
||||
newConstructionLogRecord.Remark = constructionLogRecord.Remark;
|
||||
|
||||
db.ZHGL_ConstructionLogRecord.InsertOnSubmit(newConstructionLogRecord);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报id删除对应的所有施工日志作业人员明细
|
||||
/// </summary>
|
||||
/// <param name="ConstructionLogId">施工日志作业人员明细编号</param>
|
||||
public static void DeleteConstructionLogRecordsByConstructionLogId(string ConstructionLogId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = (from x in db.ZHGL_ConstructionLogRecord where x.ConstructionLogId == ConstructionLogId select x).ToList();
|
||||
if (q.Count() > 0)
|
||||
{
|
||||
db.ZHGL_ConstructionLogRecord.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报id获取对应的所有施工日志作业人员明细
|
||||
/// </summary>
|
||||
/// <param name="ConstructionLogId">施工日志作业人员明细编号</param>
|
||||
public static List<Model.ZHGL_ConstructionLogRecord> GetConstructionLogRecordsByConstructionLogId(string ConstructionLogId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
return (from x in db.ZHGL_ConstructionLogRecord where x.ConstructionLogId == ConstructionLogId select x).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -50,9 +50,9 @@ namespace BLL
|
||||
Professional = ConstructionLog.Professional,
|
||||
CompileMan = ConstructionLog.CompileMan,
|
||||
CompileDate = ConstructionLog.CompileDate,
|
||||
State= ConstructionLog.State,
|
||||
Remark= ConstructionLog.Remark,
|
||||
HSETodaySummary= ConstructionLog.HSETodaySummary,
|
||||
State = ConstructionLog.State,
|
||||
Remark = ConstructionLog.Remark,
|
||||
HSETodaySummary = ConstructionLog.HSETodaySummary,
|
||||
HSETodaySummaryRemark = ConstructionLog.HSETodaySummaryRemark,
|
||||
HSETomorrowPlan = ConstructionLog.HSETomorrowPlan,
|
||||
HSETomorrowPlanRemark = ConstructionLog.HSETomorrowPlanRemark,
|
||||
@@ -60,6 +60,9 @@ namespace BLL
|
||||
CQMSTodaySummaryRemark = ConstructionLog.CQMSTodaySummaryRemark,
|
||||
CQMSTomorrowPlan = ConstructionLog.CQMSTomorrowPlan,
|
||||
CQMSTomorrowPlanRemark = ConstructionLog.CQMSTomorrowPlanRemark,
|
||||
FileCode = ConstructionLog.FileCode,
|
||||
WorkPostId = ConstructionLog.WorkPostId,
|
||||
MachineId = ConstructionLog.MachineId,
|
||||
};
|
||||
db.ZHGL_ConstructionLog.InsertOnSubmit(newConstructionLog);
|
||||
db.SubmitChanges();
|
||||
@@ -75,6 +78,7 @@ namespace BLL
|
||||
Model.ZHGL_ConstructionLog newConstructionLog = db.ZHGL_ConstructionLog.FirstOrDefault(e => e.ConstructionLogId == ConstructionLog.ConstructionLogId);
|
||||
if (newConstructionLog != null)
|
||||
{
|
||||
newConstructionLog.FileCode = ConstructionLog.FileCode;
|
||||
newConstructionLog.Weather = ConstructionLog.Weather;
|
||||
newConstructionLog.Temperature = ConstructionLog.Temperature;
|
||||
newConstructionLog.ContractNo = ConstructionLog.ContractNo;
|
||||
@@ -90,6 +94,8 @@ namespace BLL
|
||||
newConstructionLog.CQMSTodaySummaryRemark = ConstructionLog.CQMSTodaySummaryRemark;
|
||||
newConstructionLog.CQMSTomorrowPlan = ConstructionLog.CQMSTomorrowPlan;
|
||||
newConstructionLog.CQMSTomorrowPlanRemark = ConstructionLog.CQMSTomorrowPlanRemark;
|
||||
newConstructionLog.WorkPostId = ConstructionLog.WorkPostId;
|
||||
newConstructionLog.MachineId = ConstructionLog.MachineId;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -841,6 +841,8 @@ namespace BLL
|
||||
newPerson.RelativeTel = person.RelativeTel;
|
||||
newPerson.MultiProject = person.MultiProject;
|
||||
newPerson.HomePageType = person.HomePageType;
|
||||
newPerson.LogWorkPostId = person.LogWorkPostId;
|
||||
newPerson.LogMachineId = person.LogMachineId;
|
||||
|
||||
newPerson.IsCardNoOK = IDCardValid.CheckIDCard(person.IdentityCard);
|
||||
if (string.IsNullOrEmpty(person.QRCodeAttachUrl))
|
||||
|
||||
@@ -30,6 +30,8 @@ namespace BLL
|
||||
newUnitWork.NDEUnit = UnitWork.NDEUnit;
|
||||
newUnitWork.Costs = UnitWork.Costs;
|
||||
newUnitWork.MainItemAndDesignProfessionalIds = UnitWork.MainItemAndDesignProfessionalIds;
|
||||
newUnitWork.ContractId = UnitWork.ContractId;
|
||||
newUnitWork.MainItemCode = UnitWork.MainItemCode;
|
||||
db.WBS_UnitWork.InsertOnSubmit(newUnitWork);
|
||||
db.SubmitChanges();
|
||||
GetWeights(UnitWork.ProjectId);
|
||||
@@ -64,6 +66,8 @@ namespace BLL
|
||||
newUnitWork.RealEndDate = UnitWork.RealEndDate;
|
||||
newUnitWork.PlanCost = UnitWork.PlanCost;
|
||||
newUnitWork.JDWeights = UnitWork.JDWeights;
|
||||
newUnitWork.ContractId = UnitWork.ContractId;
|
||||
newUnitWork.MainItemCode = UnitWork.MainItemCode;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
GetWeights(UnitWork.ProjectId);
|
||||
@@ -273,6 +277,21 @@ namespace BLL
|
||||
return item;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取单位工程名称项
|
||||
/// </summary>
|
||||
/// <param name="projectId">项目Id</param>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] GetUnitWorkListByContract(string projectId, List<string> contracts)
|
||||
{
|
||||
List<Model.WBS_UnitWork> q = (from x in Funs.DB.WBS_UnitWork where x.ProjectId == projectId && x.SuperUnitWork == null && contracts.Contains(x.ContractId) orderby x.UnitWorkCode select x).ToList();
|
||||
ListItem[] item = new ListItem[q.Count()];
|
||||
for (int i = 0; i < q.Count(); i++)
|
||||
{
|
||||
item[i] = new ListItem((q[i].UnitWorkCode + "-" + q[i].UnitWorkName + GetProjectType(q[i].ProjectType)) ?? "", q[i].UnitWorkId.ToString());
|
||||
}
|
||||
return item;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取安装工程单位工程名称项
|
||||
/// </summary>
|
||||
/// <param name="projectId">项目Id</param>
|
||||
@@ -358,6 +377,22 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 单位工程表下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitContractUnitWorkDownList(FineUIPro.DropDownList dropName, string projectId, List<string> contracts, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "Value";
|
||||
dropName.DataTextField = "Text";
|
||||
dropName.DataSource = BLL.UnitWorkService.GetUnitWorkListByContract(projectId, contracts);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 安装工程单位工程表下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
|
||||
Reference in New Issue
Block a user