20250804 排产计划修改

This commit is contained in:
2025-08-04 10:44:32 +08:00
parent 32c935b3c2
commit 98a8c1ebb4
11 changed files with 576 additions and 217 deletions
@@ -26,7 +26,7 @@ namespace BLL
public static Model.HJGL_ProductionSchedulingPlan GetProductionSchedulingPlan(string loginProjectId, string flowingSection, string unitWorkId, string material, string caliber)
{
return Funs.DB.HJGL_ProductionSchedulingPlan.FirstOrDefault(e => e.ProjectId == loginProjectId && e.FlowNum == flowingSection && e.PipelineId == unitWorkId && e.Caliber == caliber);
return Funs.DB.HJGL_ProductionSchedulingPlan.FirstOrDefault(e => e.ProjectId == loginProjectId && e.FlowNum == flowingSection && e.PipelineId == unitWorkId && e.Material == material && e.Caliber == caliber);
}
/// <summary>
@@ -85,6 +85,8 @@ namespace BLL
newPlan.CompletedCount = plan.CompletedCount;
newPlan.CompletedRate = plan.CompletedRate;
newPlan.TotalCompletedRate = plan.TotalCompletedRate;
newPlan.OnDayCompleteDyne = plan.OnDayCompleteDyne;
newPlan.NextDayCompleteDyne = plan.NextDayCompleteDyne;
try
{
db.SubmitChanges(System.Data.Linq.ConflictMode.ContinueOnConflict);
+107 -9
View File
@@ -485,13 +485,13 @@ namespace BLL
if (!string.IsNullOrEmpty(model.WeldJointCode))
baseQuery = baseQuery.Where(x => x.WeldJointCode.Contains(model.WeldJointCode));
return baseQuery.ToList() ;
return baseQuery.ToList();
}
public static (List<Model.View_HJGL_WeldJoint> Data, int Total)GetDataBymodel(Model.View_HJGL_WeldJoint model, int pageIndex = 0, int pageSize = 20)
public static (List<Model.View_HJGL_WeldJoint> Data, int Total) GetDataBymodel(Model.View_HJGL_WeldJoint model, int pageIndex = 0, int pageSize = 20)
{
// 阶段一:构建基础查询
var baseQuery = Funs.DB.View_HJGL_WeldJoint.AsQueryable();
// 阶段二:构建动态查询条件
if (!string.IsNullOrEmpty(model.ProjectId))
baseQuery = baseQuery.Where(x => x.ProjectId == model.ProjectId);
@@ -500,16 +500,16 @@ namespace BLL
if (!string.IsNullOrEmpty(model.PipelineId))
baseQuery = baseQuery.Where(x => x.PipelineId == model.PipelineId);
if (!string.IsNullOrEmpty(model.PipelineCode))
baseQuery = baseQuery.Where(x => x.PipelineCode .Contains(model.PipelineCode));
baseQuery = baseQuery.Where(x => x.PipelineCode.Contains(model.PipelineCode));
if (!string.IsNullOrEmpty(model.WeldJointCode))
baseQuery = baseQuery.Where(x => x.WeldJointCode.Contains( model.WeldJointCode));
baseQuery = baseQuery.Where(x => x.WeldJointCode.Contains(model.WeldJointCode));
// 阶段三:排序与分页控制(索引优化关键)
var orderedQuery = baseQuery.OrderBy(x=>x.PipelineId).ThenBy(x => x.WeldJointCode);
var orderedQuery = baseQuery.OrderBy(x => x.PipelineId).ThenBy(x => x.WeldJointCode);
// 阶段四:分页执行(数据库层面分页)
var pagedData = orderedQuery
.Skip((pageIndex ) * pageSize)
.Skip((pageIndex) * pageSize)
.Take(pageSize)
.ToList();
@@ -542,7 +542,7 @@ namespace BLL
var pagedData = orderedQuery
.Skip((pageIndex) * pageSize)
.Take(pageSize)
.ToList();
.ToList();
return pagedData;
}
@@ -629,5 +629,103 @@ namespace BLL
return result;
}
/// <summary>
/// 根据单位工程、流水号、材质、口径获取达因数
/// </summary>
/// <param name="projectId"></param>
/// <param name="unitWorkId">单位工程</param>
/// <param name="flowingSection">流水段</param>
/// <param name="steelType">材质</param>
/// <param name="caliber">口径</param>
/// <param name="type">1-总达因,2-完成总达因</param>
/// <returns></returns>
public static decimal? GetSizeSum(string projectId, string unitWorkId, string flowingSection, string steelType, string caliber,string type)
{
Model.SGGLDB db = Funs.DB;
decimal? sizeSum = 0;
int c = 0;
if (!string.IsNullOrEmpty(caliber))
{
c = Convert.ToInt32(caliber.Substring(1, caliber.Length - 1));
var weldjoints = (from x in db.HJGL_WeldJoint
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
join z in db.Base_Material on y.MaterialId equals z.MaterialId
where x.ProjectId == projectId && y.UnitWorkId == unitWorkId && y.FlowingSection == flowingSection && z.SteelType == steelType
&& y.PipeArea == "1" && x.JointAttribute == "预制口"
//&& Convert.ToInt32(x.DNDia.Substring(2, x.DNDia.Length - 2)) < c
select x);
foreach (var item in weldjoints)
{
int s = Convert.ToInt32(item.DNDia.Substring(2, item.DNDia.Length - 2));
if (caliber.Substring(0, 1) == "<" && s < c)
{
if (type == "1")
{
sizeSum += item.Size;
}
else
{
if (!string.IsNullOrEmpty(item.WeldingDailyId))
{
sizeSum += item.Size;
}
}
}
else if (caliber.Substring(0, 1) == "≥" && s >= c)
{
if (type == "1")
{
sizeSum += item.Size;
}
else
{
if (!string.IsNullOrEmpty(item.WeldingDailyId))
{
sizeSum += item.Size;
}
}
}
}
}
return sizeSum;
}
/// <summary>
/// 根据单位工程、流水段获取总达因
/// </summary>
/// <param name="projectId">项目id</param>
/// <param name="unitWorkId">单位工程</param>
/// <param name="flowingSection">流水段</param>
/// <param name="type">1-总达因,2-完成总达因</param>
/// <returns></returns>
public static decimal? GetSizeSumByUnitWorkIdAndFlowingSection(string projectId, string unitWorkId, string flowingSection,string type)
{
Model.SGGLDB db = Funs.DB;
decimal? sizeSum = 0;
if (type == "1")
{
sizeSum = (from x in db.HJGL_WeldJoint
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
join z in db.Base_Material on y.MaterialId equals z.MaterialId
where x.ProjectId == projectId && y.UnitWorkId == unitWorkId && y.FlowingSection == flowingSection
&& y.PipeArea == "1" && x.JointAttribute == "预制口"
select x.Size).Sum();
}
else
{
sizeSum = (from x in db.HJGL_WeldJoint
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
join z in db.Base_Material on y.MaterialId equals z.MaterialId
where x.ProjectId == projectId && y.UnitWorkId == unitWorkId && y.FlowingSection == flowingSection
&& y.PipeArea == "1" && x.JointAttribute == "预制口"
&& x.WeldingDailyId != "" && x.WeldingDailyId != null
select x.Size).Sum();
}
return sizeSum;
}
}
}
@@ -12,52 +12,52 @@
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<items>
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="300px" Title="WBS目录"
ShowBorder="true" Layout="VBox" ShowHeader="true" AutoScroll="true" BodyPadding="5px"
IconFont="ArrowCircleLeft">
<toolbars>
<Toolbars>
<f:Toolbar runat="server" ToolbarAlign="Right">
<items>
<Items>
<f:NumberBox ID="txtSize" runat="server" Label="口径" Width="180px" LabelWidth="60px" LabelAlign="Right" NoDecimal="true" NoNegative="true"></f:NumberBox>
<f:Button ID="btnStatics" runat="server" Text="统计" Icon="ChartPie" OnClick="btnStatics_Click"></f:Button>
<f:HiddenField runat="server" ID="hdUnitWorkId"></f:HiddenField>
<f:ToolbarFill runat="server"></f:ToolbarFill>
</items>
</Items>
</f:Toolbar>
</toolbars>
<items>
</Toolbars>
<Items>
<f:Tree ID="tvControlItem" ShowHeader="false" Height="560px" Title="单位工程"
OnNodeCommand="tvControlItem_NodeCommand" runat="server" ShowBorder="false" EnableCollapse="true"
EnableSingleClickExpand="false" AutoLeafIdentification="true" OnNodeExpand="tvControlItem_TreeNodeExpanded"
EnableTextSelection="true">
</f:Tree>
</items>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="排产计划"
TitleToolTip="排产计划" AutoScroll="true">
<toolbars>
<Toolbars>
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Left">
<items>
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnSave" runat="server" OnClick="btnSave_Click" Text="保存" Icon="SystemSave"></f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出"
Icon="TableGo" EnableAjax="false" EnablePostBack="true">
</f:Button>
</items>
</Items>
</f:Toolbar>
</toolbars>
<items>
</Toolbars>
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="排产计划" ForceFit="false"
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="ProductionSchedulingPlanId" AllowCellEditing="true"
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="1" DataIDField="ProductionSchedulingPlanId"
AllowSorting="true" SortField="FlowNum" SortDirection="ASC" OnSort="Grid1_Sort"
EnableCollapse="false" runat="server" BoxFlex="1" DataKeyNames="ProductionSchedulingPlanId" AllowCellEditing="true"
EnableColumnLines="true" ClicksToEdit="1" DataIDField="ProductionSchedulingPlanId"
AllowSorting="true" SortField="FlowNum,Material,Caliber" SortDirection="ASC" OnSort="Grid1_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
EnableTextSelection="True">
<columns>
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号"
Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
<f:RenderField HeaderText="流水段号" ColumnID="FlowNum"
@@ -81,71 +81,84 @@
Width="90px">
</f:RenderField>
<f:RenderField HeaderText="总达因" ColumnID="TotalDyne"
DataField="TotalDyne" SortField="TotalDyne" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
Width="90px">
DataField="TotalDyne" SortField="TotalDyne" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="90px">
</f:RenderField>
<f:RenderField HeaderText="总优先级" ColumnID="TotalPriority"
DataField="TotalPriority" SortField="TotalPriority" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="100px">
<editor>
<Editor>
<f:TextBox ID="txtTotalPriority" runat="server"></f:TextBox>
</editor>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="优先级总达因" ColumnID="PriorityTotalDyne"
DataField="PriorityTotalDyne" SortField="PriorityTotalDyne" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
Width="120px">
<editor>
<Editor>
<f:NumberBox ID="txtPriorityTotalDyne" runat="server"></f:NumberBox>
</editor>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="计划开始时间" ColumnID="PlanStartDate"
DataField="PlanStartDate" SortField="PlanStartDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderTextAlign="Center" TextAlign="Left"
Width="120px">
<editor>
<Editor>
<f:DatePicker ID="txtPlanStartDate" runat="server"></f:DatePicker>
</editor>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="计划结束时间" ColumnID="PlanEndDate"
DataField="PlanEndDate" SortField="PlanEndDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderTextAlign="Center" TextAlign="Left"
Width="120px">
<editor>
<Editor>
<f:DatePicker ID="txtPlanEndDate" runat="server"></f:DatePicker>
</editor>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="天数" ColumnID="Days"
DataField="Days" SortField="Days" FieldType="Int" HeaderTextAlign="Center" TextAlign="Left"
Width="90px">
<editor>
<f:NumberBox ID="txtDays" runat="server" NoDecimal="true" NoNegative="true"></f:NumberBox>
</editor>
<%--<Editor>
<f:NumberBox ID="txtDays" runat="server" NoDecimal="true" NoNegative="true" ></f:NumberBox>
</Editor>--%>
</f:RenderField>
<f:RenderField HeaderText="平均每天工作量" ColumnID="AvgDailyWorkload"
DataField="AvgDailyWorkload" SortField="AvgDailyWorkload" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
Width="120px">
<editor>
DataField="AvgDailyWorkload" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
Width="140px">
<Editor>
<f:NumberBox ID="txtAvgDailyWorkload" runat="server" NoNegative="true"></f:NumberBox>
</editor>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="已完成量" ColumnID="CompletedCount"
DataField="CompletedCount" SortField="CompletedCount" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
<f:RenderField HeaderText="当日已完成量" ColumnID="OnDayCompleteDyne"
DataField="OnDayCompleteDyne" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
Width="120px">
<Editor>
<f:NumberBox ID="NumberBox1" runat="server" NoNegative="true"></f:NumberBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="次日应完成量" ColumnID="NextDayCompleteDyne"
DataField="NextDayCompleteDyne" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
Width="120px">
<Editor>
<f:NumberBox ID="NumberBox2" runat="server" NoNegative="true"></f:NumberBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="累计已完成量" ColumnID="CompletedCount"
DataField="CompletedCount" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="130px">
</f:RenderField>
<f:RenderField HeaderText="已完成百分比" ColumnID="CompletedRate"
DataField="CompletedRate" SortField="CompletedRate" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="120px">
DataField="CompletedRate" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="130px">
</f:RenderField>
<f:RenderField HeaderText="已完成百分比汇总" ColumnID="TotalCompletedRate"
DataField="TotalCompletedRate" SortField="TotalCompletedRate" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="120px">
DataField="TotalCompletedRate" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="150px">
</f:RenderField>
</columns>
<listeners>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</listeners>
<listeners>
<f:Listener Event="dataload" Handler="onGridDataLoad" />
</listeners>
<pageitems>
<f:Listener Event="afteredit" Handler="onGridAfterEdit" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
@@ -158,11 +171,11 @@
<f:ListItem Text="25" Value="25" />
<f:ListItem Text="所有行" Value="10000" />
</f:DropDownList>
</pageitems>
</PageItems>
</f:Grid>
</items>
</Items>
</f:Panel>
</items>
</Items>
</f:Panel>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true" Icon="Delete"
@@ -183,7 +196,37 @@
}
function onGridDataLoad(event) {
this.mergeColumns(['FlowNum', 'MainItemName', 'Material', 'TotalDyne']);
this.mergeColumns(['FlowNum', 'Material', 'TotalDyne', 'TotalCompletedRate']);
}
//自动计算天数、平均每天工作量
function onGridAfterEdit(event, value, params) {
var me = this, columnId = params.columnId, rowId = params.rowId;
if (columnId === 'PlanStartDate' || columnId === 'PlanEndDate' || columnId == 'TotalDyne' || columnId == 'OnDayCompleteDyne') {
const startDate = Date.parse(me.getCellValue(rowId, 'PlanStartDate'));//计划开始时间
const endDate = Date.parse(me.getCellValue(rowId, 'PlanEndDate'));//计划结束时间
var totalDia = me.getCellValue(rowId, 'TotalDyne');//总达因
var onDayCompleteDyne = me.getCellValue(rowId, 'OnDayCompleteDyne');//当日已完成量
if (startDate > endDate) {
alert("计划开始时间不能大于计划结束时间");
return;
}
// 计算时间差(毫秒)
const timeDifference = endDate - startDate;
// 将时间差转换为天数
const daysDifference = timeDifference / (1000 * 60 * 60 * 24);
//平均每天工作量=总达因/天数
const avgDailyWorkload = totalDia / (daysDifference + 1);
//次日应完成量=平均每天完成量-已完成量+平均每天完成量
if (onDayCompleteDyne != "") {
var nextDayCompleteDyne = avgDailyWorkload - onDayCompleteDyne + avgDailyWorkload;
}
me.updateCellValue(rowId, 'Days', daysDifference + 1);//天数
me.updateCellValue(rowId, 'AvgDailyWorkload', avgDailyWorkload);//平均每天工作量
me.updateCellValue(rowId, 'NextDayCompleteDyne', nextDayCompleteDyne);//次日应完成量
}
}
</script>
</body>
@@ -255,22 +255,43 @@ namespace FineUIPro.Web.HJGL.PreDesign
BLL.ProductionSchedulingPlanService.DeleteProductionSchedulingPlanByUnitWorkIdAndFlowNum(this.CurrUser.LoginProjectId,this.tvControlItem.SelectedNode.ParentNode.Text, this.tvControlItem.SelectedNode.Text);
for (int i = 0; i < tb.Rows.Count; i++)
{
var plan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlan(this.CurrUser.LoginProjectId, tb.Rows[i]["FlowingSection"].ToString(), tb.Rows[i]["UnitWorkId"].ToString(), tb.Rows[i]["Material"].ToString(), tb.Rows[i]["Caliber"].ToString());
string unitWorkId = tb.Rows[i]["UnitWorkId"].ToString();//单位工程
string flowingSection = tb.Rows[i]["FlowingSection"].ToString();//流水号
string steelType = tb.Rows[i]["SteelType"].ToString();//材质Value
string material = tb.Rows[i]["Material"].ToString();//材质Text
string caliber = tb.Rows[i]["Caliber"].ToString();//寸径
var plan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlan(this.CurrUser.LoginProjectId, flowingSection, unitWorkId, material, caliber);
if (plan == null)
{
Model.HJGL_ProductionSchedulingPlan newPlan = new HJGL_ProductionSchedulingPlan();
newPlan.ProductionSchedulingPlanId = SQLHelper.GetNewID(typeof(Model.HJGL_ProductionSchedulingPlan));
newPlan.ProjectId = this.CurrUser.LoginProjectId;
newPlan.PipelineId = tb.Rows[i]["UnitWorkId"].ToString();//装置ID
newPlan.FlowNum = tb.Rows[i]["FlowingSection"].ToString();
newPlan.PipelineId = unitWorkId;
newPlan.FlowNum = flowingSection;
newPlan.MainItemName = tb.Rows[i]["UnitWorkName"].ToString();
newPlan.Material = tb.Rows[i]["Material"].ToString();
newPlan.Caliber = tb.Rows[i]["Caliber"].ToString();
newPlan.Dain = Funs.GetNewDecimalOrZero(tb.Rows[i]["Dia"].ToString());
newPlan.TotalDyne = Funs.GetNewDecimalOrZero(tb.Rows[i]["TotalDia"].ToString());
newPlan.CompletedCount = Funs.GetNewIntOrZero(tb.Rows[i]["cTotalCount"].ToString());
newPlan.CompletedRate = Funs.GetNewDecimalOrZero(tb.Rows[i]["rate"].ToString());
newPlan.TotalCompletedRate = Funs.GetNewDecimalOrZero(tb.Rows[i]["Srate"].ToString());
newPlan.Material = material;
newPlan.Caliber = caliber;
newPlan.Dain = BLL.WeldJointService.GetSizeSum(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, steelType, caliber,"1");
newPlan.TotalDyne = BLL.WeldJointService.GetSizeSumByUnitWorkIdAndFlowingSection(this.CurrUser.LoginProjectId, unitWorkId, flowingSection,"1");
newPlan.CompletedCount = BLL.WeldJointService.GetSizeSum(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, steelType, caliber, "2");
if (newPlan.Dain > 0)
{
newPlan.CompletedRate = (newPlan.CompletedCount / newPlan.Dain) * 100;
}
else
{
newPlan.CompletedRate = 0;
}
if (newPlan.TotalDyne > 0)
{
decimal? completeDinSum = BLL.WeldJointService.GetSizeSumByUnitWorkIdAndFlowingSection(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, "2");
newPlan.TotalCompletedRate = (completeDinSum / newPlan.TotalDyne) * 100;
}
else
{
newPlan.TotalCompletedRate = 0;
}
BLL.ProductionSchedulingPlanService.AddProductionSchedulingPlan(newPlan);
}
}
@@ -299,22 +320,43 @@ namespace FineUIPro.Web.HJGL.PreDesign
BLL.ProductionSchedulingPlanService.DeleteProductionSchedulingPlanByUnitWork(this.CurrUser.LoginProjectId, this.tvControlItem.SelectedNode.Text);
for (int i = 0; i < tb.Rows.Count; i++)
{
var plan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlan(this.CurrUser.LoginProjectId, tb.Rows[i]["FlowingSection"].ToString(), tb.Rows[i]["UnitWorkId"].ToString(), tb.Rows[i]["Material"].ToString(), tb.Rows[i]["Caliber"].ToString());
string unitWorkId = tb.Rows[i]["UnitWorkId"].ToString();//单位工程
string flowingSection = tb.Rows[i]["FlowingSection"].ToString();//流水号
string steelType = tb.Rows[i]["SteelType"].ToString();//材质Value
string material = tb.Rows[i]["Material"].ToString();//材质Text
string caliber = tb.Rows[i]["Caliber"].ToString();//寸径
var plan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlan(this.CurrUser.LoginProjectId, flowingSection, unitWorkId, material, caliber);
if (plan == null)
{
Model.HJGL_ProductionSchedulingPlan newPlan = new HJGL_ProductionSchedulingPlan();
newPlan.ProductionSchedulingPlanId = SQLHelper.GetNewID(typeof(Model.HJGL_ProductionSchedulingPlan));
newPlan.ProjectId = this.CurrUser.LoginProjectId;
newPlan.PipelineId = tb.Rows[i]["UnitWorkId"].ToString();//装置ID
newPlan.FlowNum = tb.Rows[i]["FlowingSection"].ToString();
newPlan.PipelineId = unitWorkId;
newPlan.FlowNum = flowingSection;
newPlan.MainItemName = tb.Rows[i]["UnitWorkName"].ToString();
newPlan.Material = tb.Rows[i]["Material"].ToString();
newPlan.Caliber = tb.Rows[i]["Caliber"].ToString();
newPlan.Dain = Funs.GetNewDecimalOrZero(tb.Rows[i]["Dia"].ToString());
newPlan.TotalDyne = Funs.GetNewDecimalOrZero(tb.Rows[i]["TotalDia"].ToString());
newPlan.CompletedCount = Funs.GetNewIntOrZero(tb.Rows[i]["cTotalCount"].ToString());
newPlan.CompletedRate = Funs.GetNewDecimalOrZero(tb.Rows[i]["rate"].ToString());
newPlan.TotalCompletedRate = Funs.GetNewDecimalOrZero(tb.Rows[i]["Srate"].ToString());
newPlan.Material = material;
newPlan.Caliber = caliber;
newPlan.Dain = BLL.WeldJointService.GetSizeSum(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, steelType, caliber, "1");
newPlan.TotalDyne = BLL.WeldJointService.GetSizeSumByUnitWorkIdAndFlowingSection(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, "1");
newPlan.CompletedCount = BLL.WeldJointService.GetSizeSum(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, steelType, caliber, "2");
if (newPlan.Dain > 0)
{
newPlan.CompletedRate = (newPlan.CompletedCount / newPlan.Dain) * 100;
}
else
{
newPlan.CompletedRate = 0;
}
if (newPlan.TotalDyne > 0)
{
decimal? completeDinSum = BLL.WeldJointService.GetSizeSumByUnitWorkIdAndFlowingSection(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, "2");
newPlan.TotalCompletedRate = (completeDinSum / newPlan.TotalDyne) * 100;
}
else
{
newPlan.TotalCompletedRate = 0;
}
BLL.ProductionSchedulingPlanService.AddProductionSchedulingPlan(newPlan);
}
}
@@ -393,7 +435,9 @@ namespace FineUIPro.Web.HJGL.PreDesign
w.ProjectType,
p.CompletedCount,
p.CompletedRate,
p.TotalCompletedRate
p.TotalCompletedRate,
p.OnDayCompleteDyne,
p.NextDayCompleteDyne
FROM HJGL_ProductionSchedulingPlan p
left join WBS_UnitWork w on w.UnitWorkId=p.PipelineId
WHERE 1=1 ";
@@ -518,6 +562,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
newPlan.PlanEndDate = Funs.GetNewDateTime(values.Value<string>("PlanEndDate"));
newPlan.Days = Funs.GetNewInt(values.Value<string>("Days"));
newPlan.AvgDailyWorkload = Funs.GetNewDecimal(values.Value<string>("AvgDailyWorkload"));
newPlan.OnDayCompleteDyne = Funs.GetNewDecimal(values.Value<string>("OnDayCompleteDyne"));
newPlan.NextDayCompleteDyne = Funs.GetNewDecimal(values.Value<string>("NextDayCompleteDyne"));
newPlan.CompletedCount = Funs.GetNewInt(values.Value<string>("CompletedCount"));
newPlan.CompletedRate = Funs.GetNewDecimal(values.Value<string>("CompletedRate"));
newPlan.TotalCompletedRate = Funs.GetNewDecimal(values.Value<string>("TotalCompletedRate"));
BLL.ProductionSchedulingPlanService.UpdateProductionSchedulingPlan(newPlan);
}
}
@@ -546,9 +595,9 @@ namespace FineUIPro.Web.HJGL.PreDesign
}
else if (tvControlItem.SelectedNode.CommandName == "流水段")
{
lists = lists.Where(x => x.FlowNum == this.tvControlItem.SelectedNode.Text);
lists = lists.Where(x => x.MainItemName == this.tvControlItem.SelectedNode.ParentNode.Text && x.FlowNum == this.tvControlItem.SelectedNode.Text);
}
lists = lists.OrderBy(x => x.Caliber).OrderBy(x => x.Material).OrderBy(x => x.FlowNum).OrderBy(x => x.MainItemName);
if (lists != null)
{
newUrl = uploadfilepath.Replace("排产计划导出模板", "排产计划-" + this.tvControlItem.SelectedNode.Text + "-" + DateTime.Now.ToString("yyyyMMdd"));
@@ -636,13 +685,21 @@ namespace FineUIPro.Web.HJGL.PreDesign
cell = row.CreateCell(12);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.CompletedCount.HasValue ? item.CompletedCount.ToString() : "");//已完成量
cell.SetCellValue(item.OnDayCompleteDyne.HasValue ? item.OnDayCompleteDyne.ToString() : "");//当日已完成量
cell = row.CreateCell(13);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.NextDayCompleteDyne.HasValue ? item.NextDayCompleteDyne.ToString() : "");//次日应完成量
cell = row.CreateCell(14);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.CompletedCount.HasValue ? item.CompletedCount.ToString() : "");//累计已完成量
cell = row.CreateCell(15);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.CompletedRate.HasValue ? item.CompletedRate.ToString() : "");//已完成百分比
cell = row.CreateCell(14);
cell = row.CreateCell(16);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.TotalCompletedRate.HasValue ? item.TotalCompletedRate.ToString() : "");//已完成百分比汇总
@@ -7,13 +7,11 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.PreDesign
{
public partial class ProductionSchedulingPlan
{
namespace FineUIPro.Web.HJGL.PreDesign {
public partial class ProductionSchedulingPlan {
/// <summary>
/// form1 控件。
/// </summary>
@@ -22,7 +20,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -31,7 +29,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@@ -40,7 +38,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
@@ -49,7 +47,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// txtSize 控件。
/// </summary>
@@ -58,7 +56,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtSize;
/// <summary>
/// btnStatics 控件。
/// </summary>
@@ -67,7 +65,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnStatics;
/// <summary>
/// hdUnitWorkId 控件。
/// </summary>
@@ -76,7 +74,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdUnitWorkId;
/// <summary>
/// tvControlItem 控件。
/// </summary>
@@ -85,7 +83,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree tvControlItem;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
@@ -94,7 +92,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Toolbar3 控件。
/// </summary>
@@ -103,7 +101,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar3;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@@ -112,7 +110,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnSave 控件。
/// </summary>
@@ -121,7 +119,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnOut 控件。
/// </summary>
@@ -130,7 +128,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnOut;
/// <summary>
/// Grid1 控件。
/// </summary>
@@ -139,7 +137,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// txtTotalPriority 控件。
/// </summary>
@@ -148,7 +146,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTotalPriority;
/// <summary>
/// txtPriorityTotalDyne 控件。
/// </summary>
@@ -157,7 +155,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtPriorityTotalDyne;
/// <summary>
/// txtPlanStartDate 控件。
/// </summary>
@@ -166,7 +164,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtPlanStartDate;
/// <summary>
/// txtPlanEndDate 控件。
/// </summary>
@@ -175,16 +173,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtPlanEndDate;
/// <summary>
/// txtDays 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtDays;
/// <summary>
/// txtAvgDailyWorkload 控件。
/// </summary>
@@ -193,7 +182,25 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtAvgDailyWorkload;
/// <summary>
/// NumberBox1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox NumberBox1;
/// <summary>
/// NumberBox2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox NumberBox2;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
@@ -202,7 +209,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@@ -211,7 +218,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
@@ -220,7 +227,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Menu1 控件。
/// </summary>
@@ -229,7 +236,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
@@ -364,7 +364,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
{
if (this.tvControlItem.SelectedNode.CommandName == "TestPackage")
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.AItemEndCheckMenuId, Const.BtnAdd))
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.AItemEndCheckMenuId, Const.BtnSave))
{
string url = "ItemEndCheckEdit.aspx?PTP_ID={0}";
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format(url, tvControlItem.SelectedNodeID, "操作 - ")));
@@ -332,7 +332,11 @@ namespace FineUIPro.Web.HJGL.TestPackage
var pipeline = db.HJGL_Pipeline.FirstOrDefault(x => x.PipelineId == pipelineItem.PipelineId);
var totalJoint = from x in db.HJGL_WeldJoint
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
where y.UnitWorkId == pipeline.UnitWorkId && y.DetectionRateId == pipeline.DetectionRateId && y.DetectionType.Contains(pipeline.DetectionType)
join z in db.PTP_PipelineList on y.PipelineId equals z.PipelineId
//where y.UnitWorkId == pipeline.UnitWorkId
where z.PTP_ID == this.PTP_ID
&& y.DetectionRateId == pipeline.DetectionRateId
&& y.DetectionType.Contains(pipeline.DetectionType)
select x;
string rateStr = string.Empty;
var rate = Funs.DB.Base_DetectionRate.FirstOrDefault(x => x.DetectionRateId == pipeline.DetectionRateId);
@@ -340,7 +344,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
{
rateStr = rate.DetectionRateValue + "%";
}
this.lab12.Label = "本单位工程检测比例为" + rateStr + "的管线未焊接焊口数";
this.lab12.Label = "本试压包检测比例为" + rateStr + "的管线未焊接焊口数";
int totalJointNum = totalJoint.Count(); //总焊口
int totalWeldingJointNum = totalJoint.Count(x => x.WeldingDailyId != null); //已焊总焊口
int notCloseBatch = (from x in db.HJGL_Batch_PointBatch
@@ -534,9 +538,9 @@ namespace FineUIPro.Web.HJGL.TestPackage
string isnoHot = BLL.TestPackageEditService.IsExistNoHotHardItem(this.PTP_ID);
if (string.IsNullOrEmpty(isnoHot))
{
string inspectionIsoRate = BLL.TestPackageEditService.InspectionIsoRate(this.PTP_ID);
if (string.IsNullOrEmpty(inspectionIsoRate))
{
//string inspectionIsoRate = BLL.TestPackageEditService.InspectionIsoRate(this.PTP_ID);
//if (string.IsNullOrEmpty(inspectionIsoRate))
//{
updateTestPackage.Check1 = drpInstallationSpecification.SelectedValue;
updateTestPackage.Check2 = drpPressureTest.SelectedValue;
updateTestPackage.Check3 = drpWorkRecord.SelectedValue;
@@ -555,12 +559,12 @@ namespace FineUIPro.Web.HJGL.TestPackage
this.InitTreeMenu();
this.BindGrid();
ShowNotify("保存成功!", MessageBoxIcon.Success);
}
else
{
Alert.ShowInTop(inspectionIsoRate, MessageBoxIcon.Warning);
return;
}
//}
//else
//{
// Alert.ShowInTop(inspectionIsoRate, MessageBoxIcon.Warning);
// return;
//}
}
else
{
+53 -74
View File
@@ -34075,8 +34075,6 @@ namespace Model
private EntitySet<ProjectSupervision_CheckTeam> _ProjectSupervision_CheckTeam;
private EntitySet<PTP_TestPackage> _PTP_TestPackage;
private EntitySet<QualityAudit_EquipmentQuality> _QualityAudit_EquipmentQuality;
private EntitySet<QualityAudit_GeneralEquipmentQuality> _QualityAudit_GeneralEquipmentQuality;
@@ -34283,7 +34281,6 @@ namespace Model
this._ProjectData_TeamGroup = new EntitySet<ProjectData_TeamGroup>(new Action<ProjectData_TeamGroup>(this.attach_ProjectData_TeamGroup), new Action<ProjectData_TeamGroup>(this.detach_ProjectData_TeamGroup));
this._ProjectSupervision_CheckNotice = new EntitySet<ProjectSupervision_CheckNotice>(new Action<ProjectSupervision_CheckNotice>(this.attach_ProjectSupervision_CheckNotice), new Action<ProjectSupervision_CheckNotice>(this.detach_ProjectSupervision_CheckNotice));
this._ProjectSupervision_CheckTeam = new EntitySet<ProjectSupervision_CheckTeam>(new Action<ProjectSupervision_CheckTeam>(this.attach_ProjectSupervision_CheckTeam), new Action<ProjectSupervision_CheckTeam>(this.detach_ProjectSupervision_CheckTeam));
this._PTP_TestPackage = new EntitySet<PTP_TestPackage>(new Action<PTP_TestPackage>(this.attach_PTP_TestPackage), new Action<PTP_TestPackage>(this.detach_PTP_TestPackage));
this._QualityAudit_EquipmentQuality = new EntitySet<QualityAudit_EquipmentQuality>(new Action<QualityAudit_EquipmentQuality>(this.attach_QualityAudit_EquipmentQuality), new Action<QualityAudit_EquipmentQuality>(this.detach_QualityAudit_EquipmentQuality));
this._QualityAudit_GeneralEquipmentQuality = new EntitySet<QualityAudit_GeneralEquipmentQuality>(new Action<QualityAudit_GeneralEquipmentQuality>(this.attach_QualityAudit_GeneralEquipmentQuality), new Action<QualityAudit_GeneralEquipmentQuality>(this.detach_QualityAudit_GeneralEquipmentQuality));
this._QualityAudit_SubUnitQuality = new EntitySet<QualityAudit_SubUnitQuality>(new Action<QualityAudit_SubUnitQuality>(this.attach_QualityAudit_SubUnitQuality), new Action<QualityAudit_SubUnitQuality>(this.detach_QualityAudit_SubUnitQuality));
@@ -36142,19 +36139,6 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_PTP_TestPackage_Base_Unit", Storage="_PTP_TestPackage", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")]
public EntitySet<PTP_TestPackage> PTP_TestPackage
{
get
{
return this._PTP_TestPackage;
}
set
{
this._PTP_TestPackage.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_QualityAudit_EquipmentQuality_Base_Unit", Storage="_QualityAudit_EquipmentQuality", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")]
public EntitySet<QualityAudit_EquipmentQuality> QualityAudit_EquipmentQuality
{
@@ -37722,18 +37706,6 @@ namespace Model
entity.Base_Unit = null;
}
private void attach_PTP_TestPackage(PTP_TestPackage entity)
{
this.SendPropertyChanging();
entity.Base_Unit = this;
}
private void detach_PTP_TestPackage(PTP_TestPackage entity)
{
this.SendPropertyChanging();
entity.Base_Unit = null;
}
private void attach_QualityAudit_EquipmentQuality(QualityAudit_EquipmentQuality entity)
{
this.SendPropertyChanging();
@@ -102375,12 +102347,16 @@ namespace Model
private System.Nullable<decimal> _AvgDailyWorkload;
private System.Nullable<int> _CompletedCount;
private System.Nullable<decimal> _CompletedCount;
private System.Nullable<decimal> _CompletedRate;
private System.Nullable<decimal> _TotalCompletedRate;
private System.Nullable<decimal> _OnDayCompleteDyne;
private System.Nullable<decimal> _NextDayCompleteDyne;
private EntityRef<Base_Project> _Base_Project;
private EntityRef<WBS_UnitWork> _WBS_UnitWork;
@@ -102419,12 +102395,16 @@ namespace Model
partial void OnDaysChanged();
partial void OnAvgDailyWorkloadChanging(System.Nullable<decimal> value);
partial void OnAvgDailyWorkloadChanged();
partial void OnCompletedCountChanging(System.Nullable<int> value);
partial void OnCompletedCountChanging(System.Nullable<decimal> value);
partial void OnCompletedCountChanged();
partial void OnCompletedRateChanging(System.Nullable<decimal> value);
partial void OnCompletedRateChanged();
partial void OnTotalCompletedRateChanging(System.Nullable<decimal> value);
partial void OnTotalCompletedRateChanged();
partial void OnOnDayCompleteDyneChanging(System.Nullable<decimal> value);
partial void OnOnDayCompleteDyneChanged();
partial void OnNextDayCompleteDyneChanging(System.Nullable<decimal> value);
partial void OnNextDayCompleteDyneChanged();
#endregion
public HJGL_ProductionSchedulingPlan()
@@ -102742,8 +102722,8 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompletedCount", DbType="Int")]
public System.Nullable<int> CompletedCount
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompletedCount", DbType="Decimal(18,2)")]
public System.Nullable<decimal> CompletedCount
{
get
{
@@ -102802,6 +102782,46 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OnDayCompleteDyne", DbType="Decimal(18,2)")]
public System.Nullable<decimal> OnDayCompleteDyne
{
get
{
return this._OnDayCompleteDyne;
}
set
{
if ((this._OnDayCompleteDyne != value))
{
this.OnOnDayCompleteDyneChanging(value);
this.SendPropertyChanging();
this._OnDayCompleteDyne = value;
this.SendPropertyChanged("OnDayCompleteDyne");
this.OnOnDayCompleteDyneChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NextDayCompleteDyne", DbType="Decimal(18,2)")]
public System.Nullable<decimal> NextDayCompleteDyne
{
get
{
return this._NextDayCompleteDyne;
}
set
{
if ((this._NextDayCompleteDyne != value))
{
this.OnNextDayCompleteDyneChanging(value);
this.SendPropertyChanging();
this._NextDayCompleteDyne = value;
this.SendPropertyChanged("NextDayCompleteDyne");
this.OnNextDayCompleteDyneChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HJGL_ProductionSchedulingPlan_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
public Base_Project Base_Project
{
@@ -218363,8 +218383,6 @@ namespace Model
private EntityRef<Base_Project> _Base_Project;
private EntityRef<Base_Unit> _Base_Unit;
private EntityRef<WBS_UnitWork> _WBS_UnitWork;
#region
@@ -218444,7 +218462,6 @@ namespace Model
this._PTP_ItemEndCheckList = new EntitySet<PTP_ItemEndCheckList>(new Action<PTP_ItemEndCheckList>(this.attach_PTP_ItemEndCheckList), new Action<PTP_ItemEndCheckList>(this.detach_PTP_ItemEndCheckList));
this._PTP_PipelineList = new EntitySet<PTP_PipelineList>(new Action<PTP_PipelineList>(this.attach_PTP_PipelineList), new Action<PTP_PipelineList>(this.detach_PTP_PipelineList));
this._Base_Project = default(EntityRef<Base_Project>);
this._Base_Unit = default(EntityRef<Base_Unit>);
this._WBS_UnitWork = default(EntityRef<WBS_UnitWork>);
OnCreated();
}
@@ -218469,7 +218486,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(500)")]
public string UnitId
{
get
@@ -218480,10 +218497,6 @@ namespace Model
{
if ((this._UnitId != value))
{
if (this._Base_Unit.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnUnitIdChanging(value);
this.SendPropertyChanging();
this._UnitId = value;
@@ -219181,40 +219194,6 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_PTP_TestPackage_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)]
public Base_Unit Base_Unit
{
get
{
return this._Base_Unit.Entity;
}
set
{
Base_Unit previousValue = this._Base_Unit.Entity;
if (((previousValue != value)
|| (this._Base_Unit.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Base_Unit.Entity = null;
previousValue.PTP_TestPackage.Remove(this);
}
this._Base_Unit.Entity = value;
if ((value != null))
{
value.PTP_TestPackage.Add(this);
this._UnitId = value.UnitId;
}
else
{
this._UnitId = default(string);
}
this.SendPropertyChanged("Base_Unit");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_PTP_TestPackage_WBS_UnitWork", Storage="_WBS_UnitWork", ThisKey="UnitWorkId", OtherKey="UnitWorkId", IsForeignKey=true)]
public WBS_UnitWork WBS_UnitWork
{