2023-11-08

This commit is contained in:
李鹏飞 2023-11-08 17:26:59 +08:00
parent 1b7463957c
commit 11357590c9
19 changed files with 389 additions and 135 deletions

View File

@ -0,0 +1,61 @@
alter table dbo.HJGL_Pipeline_Component
add IsPrint BIT
go
exec sp_addextendedproperty 'MS_Description', N'ÊÇ·ñ´òÓ¡', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_Pipeline_Component',
'COLUMN', 'IsPrint'
go
alter view dbo.View_HJGL_WeldingTask as
SELECT T.WeldTaskId,
T.WeldJointId,
T.CoverWelderId,
T.BackingWelderId,
cov.WelderCode AS CoverWelderCode,
back.WelderCode AS BackingWelderCode,
case when jot.JointAttribute is not null then jot.JointAttribute else T.JointAttribute end as JointAttribute,
T.WeldingMode,
T.ProjectId,
T.UnitWorkId,
T.UnitId,
T.TaskDate,
T.Tabler,
T.TableDate,
jot.WeldJointCode,
jot.Dia,
jot.DNDia,
jot.Thickness,
jot.Size,
jot.WeldingLocationId,
CASE WHEN jot.WeldingDailyId IS NULL THEN '·ñ' ELSE 'ÊÇ' END AS IsWelding,
P.PipelineCode,
p.PipelineId,
B.WeldTypeCode,
M.WeldingMethodCode,
L.WeldingLocationCode,
t.CanWelderCode,
t.CanWelderId,
rod.ConsumablesName AS WeldingRodCode,
T.CanWeldingRodName,
T.CanWeldingWireName,
wire.ConsumablesName AS WeldingWireCode,
jot.WeldingDailyId,
p.PipeArea,
(case
when charindex('/', jot.WeldJointCode) > 0
then RIGHT(jot.WeldJointCode, CHARINDEX('/', REVERSE(jot.WeldJointCode)) - 1)
else jot.WeldJointCode end) as WeldJointNum
from HJGL_WeldTask T
left join HJGL_WeldJoint jot on T.WeldJointId = jot.WeldJointId
LEFT JOIN dbo.SitePerson_Person cov ON cov.PersonId = t.CoverWelderId and cov.ProjectId = t.ProjectId
LEFT JOIN dbo.SitePerson_Person back ON back.PersonId = t.BackingWelderId and back.ProjectId = t.ProjectId
LEFT join HJGL_Pipeline P on jot.PipelineId = P.PipelineId
left join Base_WeldType B on jot.WeldTypeId = B.WeldTypeId
LEFT join Base_WeldingMethod M on jot.WeldingMethodId = M.WeldingMethodId
left join Base_WeldingLocation L on jot.WeldingLocationId = L.WeldingLocationId
LEFT JOIN Base_Consumables AS wire ON wire.ConsumablesId = jot.WeldingWire
LEFT JOIN Base_Consumables AS rod ON rod.ConsumablesId = jot.WeldingRod
go

View File

@ -1,8 +1,11 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web.UI.WebControls;
using Model;
using NPOI.SS.Formula.Functions;
namespace BLL
{
@ -12,16 +15,21 @@ namespace BLL
/// 未验收
/// </summary>
public static int state_0 = 0;
/// <summary>
/// 已验收
/// </summary>
public static int state_1 = 1;
/// <summary>
/// 已装箱
/// </summary>
public static int state_2 = 2;
/// <summary>
/// 获取状态名称
/// </summary>
/// <returns></returns>
public static ListItem[] GetState()
{
ListItem[] list = new ListItem[3];
@ -30,6 +38,10 @@ namespace BLL
list[2] = new ListItem("已出库", state_2.ToString());
return list;
}
/// <summary>
/// 生产状态
/// </summary>
/// <returns></returns>
public static ListItem[] GetProductionState()
{
ListItem[] list = new ListItem[3];
@ -61,6 +73,81 @@ namespace BLL
{
return Funs.DB.HJGL_Pipeline_Component.FirstOrDefault(e => e.PipeLineMatId == pipeLineMatId);
}
/// <summary>
/// 获取打印实体
/// </summary>
/// <param name="PipelineComponentId"></param>
/// <param name="PipelineId"></param>
/// <param name="IsCheckPrint"></param>
/// <returns></returns>
public static IEnumerable<PipelineComponentPrintDto> GetPrintModelByPipelineComponentIds(
string[] PipelineComponentId, string[] PipelineId, bool IsCheckPrint)
{
var db = Funs.DB;
var query =
from com in db.HJGL_Pipeline_Component
join mat in db.HJGL_PipeLineMat on com.PipeLineMatId equals mat.PipeLineMatId into matJoin
from mat in matJoin.DefaultIfEmpty()
join pipe in db.HJGL_Pipeline on com.PipelineId equals pipe.PipelineId into pipeJoin
from pipe in pipeJoin.DefaultIfEmpty()
join punit in db.Base_Unit on com.PreUnit equals punit.UnitId into punitJoin
from punit in punitJoin.DefaultIfEmpty()
join aunit in db.Base_Unit on com.AssembleUnit equals aunit.UnitId into aunitJoin
from aunit in aunitJoin.DefaultIfEmpty()
join unitwork in db.WBS_UnitWork on pipe.UnitWorkId equals unitwork.UnitWorkId into unitworkJoin
from unitwork in unitworkJoin.DefaultIfEmpty()
join mater in db.Base_Material on pipe.MaterialId equals mater.MaterialId into materJoin
from mater in materJoin.DefaultIfEmpty()
where com.QRCode != ""
orderby com.PipelineComponentCode,com.PipelineId
select new PipelineComponentPrintDto
{
PipelineComponentId = com.PipelineComponentId,
PipelineComponentCode = com.PipelineComponentCode,
BoxNumber = com.BoxNumber,
UnitWorkName = unitwork.UnitWorkName,
PipelineId = com.PipelineId,
PreUnit = punit.UnitName,
AssembleUnit = aunit.UnitName,
PrefabricatedComponents = mat.PrefabricatedComponents,
QRCode = com.QRCode,
State = com.State,
PlanStartDate = string.Format("yyyy-MM-dd", pipe.PlanStartDate),
PipelineCode = pipe.PipelineCode,
FlowingSection = pipe.FlowingSection,
QRCode2 = "PrePipeline$" + com.PipelineComponentId,
MaterialCode = mater.MaterialCode,
IsPrint = com.IsPrint
};
var result = query.ToList();
if (PipelineComponentId!=null &&PipelineComponentId.Length > 0)
{
result = result.Where(x => PipelineComponentId.Contains(x.PipelineComponentId.ToString())).ToList();
}
if (PipelineId != null && PipelineId.Length > 0)
{
result = result.Where(x => PipelineId.Contains(x.PipelineId.ToString())).ToList();
}
if (IsCheckPrint != null & IsCheckPrint ==true)
{
result = result.Where(x => x.IsPrint==false||x.IsPrint==null).ToList();
}
return result;
}
/// <summary>
/// 判断管线组件Code是否存在
/// </summary>
@ -119,6 +206,7 @@ namespace BLL
model.DrawingName = model_mat.PrefabricatedComponents.Substring(0, model_mat.PrefabricatedComponents.LastIndexOf('-')).Replace("\"", "");
model.State = state_0;
model.ProductionState = 0;
model.IsPrint = false;
AddPipelineComponent(model);
}
@ -133,6 +221,7 @@ namespace BLL
{
Model.SGGLDB db = Funs.DB;
Model.HJGL_Pipeline_Component newPipeline = new Model.HJGL_Pipeline_Component();
pipeline.IsPrint ??= false;
newPipeline.PipelineComponentId = pipeline.PipelineComponentId;
newPipeline.PipelineId = pipeline.PipelineId;
newPipeline.PreUnit = pipeline.PreUnit;
@ -150,6 +239,7 @@ namespace BLL
newPipeline.ReceiveMan= pipeline.ReceiveMan;
newPipeline.ReceiveDate= pipeline.ReceiveDate;
newPipeline.ProductionState= pipeline.ProductionState;
newPipeline.IsPrint= pipeline.IsPrint;
db.HJGL_Pipeline_Component.InsertOnSubmit(newPipeline);
db.SubmitChanges();
}
@ -180,10 +270,15 @@ namespace BLL
newPipeline.ReceiveMan = pipeline.ReceiveMan;
newPipeline.ReceiveDate = pipeline.ReceiveDate;
newPipeline.ProductionState = pipeline.ProductionState;
newPipeline.IsPrint=pipeline.IsPrint;
db.SubmitChanges();
}
}
/// <summary>
/// 修改出库状态
/// </summary>
/// <param name="pipelineComponentId"></param>
/// <param name="BoxNumber"></param>
public static void UpdateOutState(string pipelineComponentId,string BoxNumber)
{
var q=GetPipelineComponentById(pipelineComponentId);
@ -196,6 +291,24 @@ namespace BLL
}
}
/// <summary>
/// 修改打印状态
/// </summary>
/// <param name="PipelineComponentId"></param>
public static void UpdateIsPrint(string[] PipelineComponentId)
{
var componentsToUpdate = Funs.DB.HJGL_Pipeline_Component
.Where(c => PipelineComponentId.Contains(c.PipelineComponentId));
foreach (var component in componentsToUpdate)
{
component.IsPrint = true;
}
Funs.DB.SubmitChanges();
}
/// <summary>
/// 修改生产状态
/// </summary>
@ -345,4 +458,26 @@ namespace BLL
}
}
}
public class PipelineComponentPrintDto
{
public string PipelineComponentId { get; set; }
public string PipelineComponentCode { get; set; }
public string BoxNumber { get; set; }
public string UnitWorkName { get; set; }
public string PipelineId { get; set; }
public string PreUnit { get; set; }
public string AssembleUnit { get; set; }
public string PrefabricatedComponents { get; set; }
public string QRCode { get; set; }
public int? State { get; set; }
public string PlanStartDate { get; set; }
public string PipelineCode { get; set; }
public string FlowingSection { get; set; }
public string QRCode2 { get; set; }
public string MaterialCode { get; set; }
public bool? IsPrint { get; set; }
}
}

View File

@ -168,7 +168,6 @@ namespace BLL
return Funs.DB.PHTGL_ContractTrack.FirstOrDefault(x => x.Id == id);
}
public static void AddPHTGL_ContractTrack(PHTGL_ContractTrack newtable)
{
var table = new PHTGL_ContractTrack
@ -209,7 +208,14 @@ namespace BLL
PhtglContracttrackprogressService.CreateTemplateByContractTrackId(newtable.Id);
}
public static void AddBulkPHTGL_ContractTrack(List<PHTGL_ContractTrack> list)
{
Model.SGGLDB db = Funs.DB;
db.PHTGL_ContractTrack.InsertAllOnSubmit(list);
db.SubmitChanges();
}
public static void UpdatePHTGL_ContractTrack(PHTGL_ContractTrack newtable)
@ -352,12 +358,12 @@ namespace BLL
{
var responeData = new ResponeData();
List<PHTGL_ContractTrackDtoIn> rows;
List<PHTGL_ContractTrack> goingAddList =new List<PHTGL_ContractTrack>();
var sheetNames = MiniExcel.GetSheetNames(path);
foreach (var sheet in sheetNames) ////多sheet导入
{
try
{
rows = MiniExcel.Query<PHTGL_ContractTrackDtoIn>(path, sheetName: sheet,startCell:"A2").ToList();
}
catch (Exception ex)
@ -388,16 +394,16 @@ namespace BLL
ContractId = contractid,
ProjectId = projectid,
};
var resultModel = GetPHTGL_ContractTrackByModle(phtglContractTrack);
var resultModel = GetFirstPHTGL_ContractTrackByModle(phtglContractTrack);
item.ContractNum = ContractService.GetContractById(contractid)?.ContractNum;
if (!string.IsNullOrEmpty(item.ProjectCode) && !item.ProjectCode.Contains("-"))
{
item.ProjectCode = item.MainItemCode + "-" + item.ProjectCode;
}
if (resultModel.Any())
if (resultModel!=null)
{
item.Id = resultModel[0].Id;
item.Id = resultModel.Id;
UpdatePHTGL_ContractTrack(item);
}
else

View File

@ -17,8 +17,7 @@ namespace BLL
/// </summary>
public static int Count { get; set; }
public static List<PHTGL_ContractTrackProgress> GetPHTGL_ContractTrackProgressByModle(
PHTGL_ContractTrackProgress table)
public static IQueryable<PHTGL_ContractTrackProgress> GetPHTGL_ContractTrackProgressByModle( PHTGL_ContractTrackProgress table)
{
var q = from x in Funs.DB.PHTGL_ContractTrackProgress
where
@ -31,10 +30,23 @@ namespace BLL
orderby x.Date
select x
;
return q.ToList();
return q;
}
public static PHTGL_ContractTrackProgress GetFirstOrDefaultByModle(PHTGL_ContractTrackProgress table)
{
var q = (from x in Funs.DB.PHTGL_ContractTrackProgress
where
(string.IsNullOrEmpty(table.ContractTrackProgressId) ||
x.ContractTrackProgressId.Contains(table.ContractTrackProgressId)) &&
(string.IsNullOrEmpty(table.ContractTrackId) ||
x.ContractTrackId.Contains(table.ContractTrackId)) &&
(string.IsNullOrEmpty(table.Date) ||
x.Date.Contains(table.Date))
orderby x.Date
select x).FirstOrDefault()
;
return q;
}
/// <summary>
/// 获取分页列表
/// </summary>
@ -46,7 +58,7 @@ namespace BLL
var q = GetPHTGL_ContractTrackProgressByModle(table);
Count = q.Count();
if (Count == 0) return null;
q = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize).ToList();
q = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize);
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
return from x in q
select new

View File

@ -246,7 +246,7 @@ namespace BLL
var pUnit = Funs.DB.Project_ProjectUnit.FirstOrDefault(e => e.ProjectId == ProjectId && e.UnitId == PersonEntity.UnitId);
if (pUnit != null)
{
if (pUnit.UnitType == Const.ProjectUnitType_1 )
if (pUnit.UnitType == Const.ProjectUnitType_1 || pUnit.UnitType == Const.ProjectUnitType_2)
{
result = true;
}

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="09/07/2023 14:49:06" ReportInfo.CreatorVersion="2017.1.16.0">
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="11/08/2023 17:16:01" ReportInfo.CreatorVersion="2017.1.16.0">
<ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
@ -99,24 +99,8 @@ namespace FastReport
}
</ScriptText>
<Dictionary>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRErYIg5yNvgeNsahpuMCq5a"/>
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
<Column Name="PrefabricatedComponents" DataType="System.String" PropName="CH_TrustCode"/>
<Column Name="PlanStartDate" DataType="System.String" PropName="CH_TrustMan"/>
<Column Name="PreUnit" DataType="System.String" PropName="CH_SlopeType"/>
<Column Name="QRCode" DataType="System.String" PropName="CH_WeldMethod"/>
<Column Name="PipelineComponentId" DataType="System.String"/>
<Column Name="PipelineComponentCode" DataType="System.String"/>
<Column Name="BoxNumber" DataType="System.String"/>
<Column Name="PipelineId" DataType="System.String"/>
<Column Name="AssembleUnit" DataType="System.String"/>
<Column Name="State" DataType="System.String"/>
<Column Name="PipelineCode" DataType="System.String"/>
<Column Name="QRCode2" DataType="System.String" PropName="Column"/>
<Column Name="UnitWorkName" DataType="System.Char" PropName="Column"/>
<Column Name="FlowingSection" DataType="System.String" PropName="Column"/>
<Column Name="MaterialCode" DataType="System.String"/>
</TableDataSource>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRFkUU1z9ezk97FBAaKX0CT9"/>
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true"/>
<TableDataSource Name="Data" ReferenceName="Data.Data" DataType="System.Int32" Enabled="true">
<Column Name="CH_TrustID" DataType="System.String"/>
<Column Name="ISO_IsoNo" DataType="System.Int32" PropName="Column" Calculated="true" Expression=""/>

View File

@ -131,6 +131,7 @@
<asp:Label ID="lbProductionState" runat="server" Text='<%# ConvertProductionState(Eval("ProductionState"))%>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderCheckField Width="100px" ColumnID="IsPrint" DataField="IsPrint" HeaderText="是否已打印" EnableColumnEdit="False" />
<f:RenderField Width="200px" ColumnID="FlowingSection" DataField="FlowingSection" SortField="FlowingSection"
FieldType="String" HeaderText="流水段"
HeaderTextAlign="Center"

View File

@ -236,7 +236,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
private void BindGrid()
{
string strSql = @" SELECT distinct com.PipelineComponentId,com.PipelineComponentCode,com.BoxNumber,
com.PipelineId, punit.UnitName AS PreUnit,aunit.UnitName AS AssembleUnit,
com.PipelineId, punit.UnitName AS PreUnit,aunit.UnitName AS AssembleUnit,com.IsPrint,
com.QRCode,com.State,com.ProductionState,pipe.PlanStartDate,pipe.FlowingSection,com.DrawingName,com.ReceiveDate,
person.PersonName
FROM HJGL_Pipeline_Component com
@ -355,58 +355,24 @@ namespace FineUIPro.Web.HJGL.PreDesign
}
protected void btnPrint_Click(object sender, EventArgs e)
{
Print(tvControlItem.SelectedNodeID, Grid1.SelectedRowIDArray);
Print(Grid1.SelectedRowIDArray);
HJGL_PipelineComponentService.UpdateIsPrint(Grid1.SelectedRowIDArray); //打印后修改打印状态
}
private void Print(string PipelineId ,string[] PipelineComponentId)
{
var db = Funs.DB;
private void Print(string[] PipelineComponentId)
{
BLL.FastReportService.ResetData();
var query =
from com in db.HJGL_Pipeline_Component
join mat in db.HJGL_PipeLineMat on com.PipeLineMatId equals mat.PipeLineMatId into matJoin
from mat in matJoin.DefaultIfEmpty()
join pipe in db.HJGL_Pipeline on com.PipelineId equals pipe.PipelineId into pipeJoin
from pipe in pipeJoin.DefaultIfEmpty()
join punit in db.Base_Unit on com.PreUnit equals punit.UnitId into punitJoin
from punit in punitJoin.DefaultIfEmpty()
join aunit in db.Base_Unit on com.AssembleUnit equals aunit.UnitId into aunitJoin
from aunit in aunitJoin.DefaultIfEmpty()
join unitwork in db.WBS_UnitWork on pipe.UnitWorkId equals unitwork.UnitWorkId into unitworkJoin
from unitwork in unitworkJoin.DefaultIfEmpty()
join mater in db.Base_Material on pipe.MaterialId equals mater.MaterialId into materJoin
from mater in materJoin.DefaultIfEmpty()
where com.QRCode != "" & com.PipelineId == PipelineId
orderby com.PipelineComponentCode
select new
{
com.PipelineComponentId,
com.PipelineComponentCode,
com.BoxNumber,
UnitWorkName = unitwork.UnitWorkName,
com.PipelineId,
PreUnit = punit.UnitName,
AssembleUnit = aunit.UnitName,
mat.PrefabricatedComponents,
com.QRCode,
com.State,
PlanStartDate = string.Format("yyyy-MM-dd", pipe.PlanStartDate),
pipe.PipelineCode,
pipe.FlowingSection,
QRCode2 = "PrePipeline$" + com.PipelineComponentId,
mater.MaterialCode
};
var result = query.ToList();
if (PipelineComponentId.Length>0)
{
result = result.Where(x => PipelineComponentId.Contains(x.PipelineComponentId)).ToList();
}
var result = HJGL_PipelineComponentService.GetPrintModelByPipelineComponentIds(PipelineComponentId, null, false);
var tb = LINQToDataTable(result);
if (tb != null)
if (tb != null && tb.Rows.Count > 0)
{
tb.TableName = "Table1";
}
else
{
ShowNotify("请查看组件是否上传二维码!", MessageBoxIcon.Question);
return;
}
BLL.FastReportService.AddFastreportTable(tb);
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
@ -416,40 +382,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
}
/*string strSql = @" SELECT com.PipelineComponentId,com.PipelineComponentCode,com.BoxNumber,unitwork.UnitWorkName,
com.PipelineId, punit.UnitName AS PreUnit,aunit.UnitName AS AssembleUnit,mat.PrefabricatedComponents,
com.QRCode,com.State,CONVERT(varchar(100), pipe.PlanStartDate, 23) as PlanStartDate,pipe.PipelineCode,pipe.FlowingSection,
('PrePipeline$'+com.PipelineComponentId )as QRCode2,mater.*
FROM HJGL_Pipeline_Component com
LEFT JOIN HJGL_PipeLineMat mat ON mat.PipeLineMatId=com.PipeLineMatId
LEFT JOIN HJGL_Pipeline pipe ON pipe.PipelineId =com.PipelineId
LEFT JOIN dbo.Base_Unit punit ON punit.UnitId=com.PreUnit
LEFT JOIN dbo.Base_Unit aunit ON aunit.UnitId=com.AssembleUnit
LEFT JOIN dbo.WBS_UnitWork unitwork on pipe.UnitWorkId=unitwork.UnitWorkId
LEFT JOIN dbo.Base_Material AS mater ON mater.MaterialId=pipe.MaterialId
WHERE com.QRCode!=''";
List<SqlParameter> listStr = new List<SqlParameter> { };
strSql += " AND com.PipelineId =@PipelineId";
listStr.Add(new SqlParameter("@PipelineId", PipelineId));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
if (tb != null)
{
tb.TableName = "Table1";
}
BLL.FastReportService.AddFastreportTable(tb);
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
initTemplatePath = "File\\Fastreport\\组件打印.frx";
if (File.Exists(rootPath + initTemplatePath))
{
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
}*/
}
}
/// <summary>

View File

@ -73,8 +73,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
pipeline.AssembleUnit = this.drpAssembleUnit.SelectedValue;
}
pipeline.BoxNumber = this.txtBoxNumber.Text.Trim();
pipeline.PipelineId = hdPipelineId.Text;
pipeline.PipelineId = hdPipelineId.Text;
BLL.HJGL_PipelineComponentService.AddPipelineComponent(pipeline);
}
}

View File

@ -68,7 +68,8 @@
<f:Button runat="server" ID="btnSearch" Icon="SystemSearch" ToolTip="查询" Text="查询" OnClick="btnSearch_Click">
</f:Button>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnPrint" runat="server" Icon="Printer" EnableAjax="false" Text="预制组件打印" ToolTip="预制组件打印" OnClick="btnPrint_Click"></f:Button>
<f:DatePicker ID="txtTaskDate" Label="计划焊接日期" runat="server"
DateFormatString="yyyy-MM-dd" LabelAlign="Left" LabelWidth="110px" Hidden="true">
</f:DatePicker>
@ -214,6 +215,11 @@
EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
IsModal="true" Width="1300px" Height="650px" OnClose="Window1_Close">
</f:Window>
<f:Window ID="Window2" Title="打印" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
IsModal="true" Width="1010px" Height="660px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuAdd" EnablePostBack="true" runat="server" Text="新增" Hidden="true" Icon="Add" OnClick="btnMenuAdd_Click">
</f:MenuButton>

View File

@ -3,6 +3,7 @@ using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Web.UI.WebControls;
@ -1115,5 +1116,55 @@ namespace FineUIPro.Web.HJGL.WeldingManage
this.BindGrid(GetWeldingTaskList);
}
}
protected void btnPrint_Click(object sender, EventArgs e)
{
DateTime? taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID.Split('|')[1]);
if (taskTime != null)
{
var pipelines = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNode.ParentNode.NodeID, Convert.ToDateTime(taskTime)).Select(x=>x.PipelineId).Distinct().ToList();
if (pipelines.Any())
{
BLL.FastReportService.ResetData();
var result = HJGL_PipelineComponentService.GetPrintModelByPipelineComponentIds(null, pipelines.ToArray(),true);
var PipelineComponentIds = result.Select(x => x.PipelineComponentId).ToArray();
var tb = LINQToDataTable(result);
if (tb != null && tb.Rows.Count>0)
{
tb.TableName = "Table1";
}
else
{
ShowNotify("该管线已打印完成", MessageBoxIcon.Question);
return;
}
BLL.FastReportService.AddFastreportTable(tb);
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
initTemplatePath = "File\\Fastreport\\组件打印.frx";
if (File.Exists(rootPath + initTemplatePath))
{
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
HJGL_PipelineComponentService.UpdateIsPrint(PipelineComponentIds);
}
}
else
{
ShowNotify("无关联管线", MessageBoxIcon.Question);
}
}
else
{
ShowNotify("请选择任务单",MessageBoxIcon.Question);
}
}
}
}

View File

@ -176,6 +176,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// </remarks>
protected global::FineUIPro.Button btnSearch;
/// <summary>
/// btnPrint 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnPrint;
/// <summary>
/// txtTaskDate 控件。
/// </summary>
@ -284,6 +293,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Window2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window2;
/// <summary>
/// Menu1 控件。
/// </summary>

View File

@ -126,7 +126,7 @@
<f:TextBox ID="TextBox8" runat="server" Required="true"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField Width="150px" ColumnID="ProjectDescription" DataField="ProjectDescription" SortField="ProjectDescription" EnableColumnEdit="False"
<f:RenderField Width="300px" ColumnID="ProjectDescription" DataField="ProjectDescription" SortField="ProjectDescription" EnableColumnEdit="False"
FieldType="String" HeaderText="项目特征描述" TextAlign="Center" HeaderTextAlign="Center">
<Editor>
<f:TextBox ID="TextBox9" runat="server" Required="true"></f:TextBox>
@ -162,13 +162,13 @@
<f:TextBox ID="TextBox14" runat="server" Required="true"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField Width="150px" ColumnID="CalculationRule" DataField="CalculationRule" SortField="CalculationRule" EnableColumnEdit="False" Hidden="True"
<f:RenderField Width="300px" ColumnID="CalculationRule" DataField="CalculationRule" SortField="CalculationRule" EnableColumnEdit="False" Hidden="True"
FieldType="String" HeaderText="计算规则" TextAlign="Center" HeaderTextAlign="Center">
<Editor>
<f:TextBox ID="TextBox15" runat="server" Required="true"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField Width="150px" ColumnID="WorkContent" DataField="WorkContent" SortField="WorkContent" EnableColumnEdit="False" Hidden="True"
<f:RenderField Width="300px" ColumnID="WorkContent" DataField="WorkContent" SortField="WorkContent" EnableColumnEdit="False" Hidden="True"
FieldType="String" HeaderText="工作内容" TextAlign="Center" HeaderTextAlign="Center">
<Editor>
<f:TextBox ID="TextBox16" runat="server" Required="true"></f:TextBox>
@ -237,9 +237,9 @@
</ItemTemplate>
</f:TemplateField>
</Columns>
<%-- <Listeners>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>--%>
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>

View File

@ -349,7 +349,8 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.PHTGL_ContractTrackComparisonMenuId);
if (buttonList.Count > 0)
{
if (buttonList.Contains(BLL.Const.BtnModify))
{
this.btnMenuEdit.Hidden = false;

View File

@ -138,7 +138,7 @@
<f:TextBox ID="TextBox8" runat="server" Required="true"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField Width="150px" ColumnID="ProjectDescription" DataField="ProjectDescription" SortField="ProjectDescription"
<f:RenderField Width="300px" ColumnID="ProjectDescription" DataField="ProjectDescription" SortField="ProjectDescription"
FieldType="String" HeaderText="项目特征描述" TextAlign="Center" HeaderTextAlign="Center">
<Editor>
<f:TextBox ID="TextBox9" runat="server" Required="true"></f:TextBox>
@ -174,13 +174,13 @@
<f:TextBox ID="TextBox14" runat="server" Required="true"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField Width="150px" ColumnID="CalculationRule" DataField="CalculationRule" SortField="CalculationRule"
<f:RenderField Width="300px" ColumnID="CalculationRule" DataField="CalculationRule" SortField="CalculationRule"
FieldType="String" HeaderText="计算规则" TextAlign="Center" HeaderTextAlign="Center">
<Editor>
<f:TextBox ID="TextBox15" runat="server" Required="true"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField Width="150px" ColumnID="WorkContent" DataField="WorkContent" SortField="WorkContent"
<f:RenderField Width="300px" ColumnID="WorkContent" DataField="WorkContent" SortField="WorkContent"
FieldType="String" HeaderText="工作内容" TextAlign="Center" HeaderTextAlign="Center">
<Editor>
<f:TextBox ID="TextBox16" runat="server" Required="true"></f:TextBox>

View File

@ -39,9 +39,9 @@
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="合同执行跟踪表" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true"
ClicksToEdit="1" DataIDField="Id" AllowSorting="true" SortField="Id"
SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true"
SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowColumnLocking="true"
AllowPaging="True" IsDatabasePaging="true" PageSize="300" OnPageIndexChange="Grid1_PageIndexChange" OnRowDataBound="Grid1_OnRowDataBound"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableRowClickEvent="True">
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableRowClickEvent="True" >
<Toolbars>
<f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="Right">

View File

@ -36,10 +36,12 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
list[1] = new ListItem("主项名称", "MainItemName");
list[2] = new ListItem("专业工程名称", "MajorName");
list[3] = new ListItem("专业代码", "MajorCode");
list[4] = new ListItem("分部工程", "SubProject");
list[5] = new ListItem("分项工程", "SubItemProject");
list[6] = new ListItem("项目编码", "ProjectCode");
list[7] = new ListItem("项目名称", "ProjectName");
//list[4] = new ListItem("分部工程", "SubProject");
//list[5] = new ListItem("子分部工程", "SubItemProject");
list[4] = new ListItem("项目编码", "ProjectCode");
list[5] = new ListItem("项目名称", "ProjectName");
list[6] = new ListItem("项目特征描述", "ProjectDescription");
list[7] = new ListItem("计量单位", "UnitOfMeasurement");
foreach (var item in list)
{
@ -49,6 +51,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
bf.HeaderText = item.Text;
bf.HeaderTextAlign = TextAlign.Center;
bf.TextAlign = TextAlign.Center;
bf.Locked = true;
Grid1.Columns.Add(bf);
GridTable.Columns.Add(item.Value);
}
@ -306,10 +309,12 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
row["MainItemName"] = item.MainItemName;
row["MajorName"] = item.MajorName;
row["MajorCode"] = item.MajorCode;
row["SubProject"] = item.SubProject;
row["SubItemProject"] = item.SubItemProject;
//row["SubProject"] = item.SubProject;
//row["SubItemProject"] = item.SubItemProject;
row["ProjectCode"] = item.ProjectCode;
row["ProjectName"] = item.ProjectName;
row["ProjectDescription"] = item.ProjectDescription;
row["UnitOfMeasurement"] = item.UnitOfMeasurement;
Model.PHTGL_ContractTrackProgress qContractTrackProgress = new Model.PHTGL_ContractTrackProgress();
qContractTrackProgress.ContractTrackId = item.Id;

View File

@ -127,7 +127,7 @@
<f:TextBox ID="TextBox8" runat="server" Required="true"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField Width="150px" ColumnID="ProjectDescription" DataField="ProjectDescription" SortField="ProjectDescription" EnableColumnEdit="False"
<f:RenderField Width="300px" ColumnID="ProjectDescription" DataField="ProjectDescription" SortField="ProjectDescription" EnableColumnEdit="False"
FieldType="String" HeaderText="项目特征描述" TextAlign="Center" HeaderTextAlign="Center">
<Editor>
<f:TextBox ID="TextBox9" runat="server" Required="true"></f:TextBox>

View File

@ -94622,6 +94622,8 @@ namespace Model
private System.Nullable<int> _ProductionState;
private System.Nullable<bool> _IsPrint;
private EntityRef<HJGL_Pipeline> _HJGL_Pipeline;
#region
@ -94662,6 +94664,8 @@ namespace Model
partial void OnReceiveDateChanged();
partial void OnProductionStateChanging(System.Nullable<int> value);
partial void OnProductionStateChanged();
partial void OnIsPrintChanging(System.Nullable<bool> value);
partial void OnIsPrintChanged();
#endregion
public HJGL_Pipeline_Component()
@ -95014,6 +95018,26 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsPrint", DbType="Bit")]
public System.Nullable<bool> IsPrint
{
get
{
return this._IsPrint;
}
set
{
if ((this._IsPrint != value))
{
this.OnIsPrintChanging(value);
this.SendPropertyChanging();
this._IsPrint = value;
this.SendPropertyChanged("IsPrint");
this.OnIsPrintChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HJGL_Pipeline_Component_HJGL_Pipeline", Storage="_HJGL_Pipeline", ThisKey="PipelineId", OtherKey="PipelineId", IsForeignKey=true)]
public HJGL_Pipeline HJGL_Pipeline
{
@ -272332,6 +272356,8 @@ namespace Model
private string _PipelineCode;
private string _PipelineId;
private string _WeldTypeCode;
private string _WeldingMethodCode;
@ -272712,6 +272738,22 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineId", DbType="NVarChar(50)")]
public string PipelineId
{
get
{
return this._PipelineId;
}
set
{
if ((this._PipelineId != value))
{
this._PipelineId = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldTypeCode", DbType="NVarChar(50)")]
public string WeldTypeCode
{