feat(hjgl): 完善管线预制与焊接业务
同步管线组件、材料和焊口关联数据,优化预制组件打印及焊接相关查询,减少业务台账与实际关联信息不一致。
This commit is contained in:
@@ -24,14 +24,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
HJGL_PipelineComponentService.InitMainItemDownList(drpState, true);
|
||||
HJGL_PipelineComponentService.InitMainItemDownProductionStateList(drpProductionState, true);
|
||||
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x.FlowingSection).Distinct().ToList();
|
||||
this.drpFlowingSection.DataTextField = "Value";
|
||||
this.drpFlowingSection.DataValueField = "Value";
|
||||
this.drpFlowingSection.DataSource = pipeline;
|
||||
this.drpFlowingSection.DataBind();
|
||||
Funs.FineUIPleaseSelect(drpFlowingSection);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,7 +290,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
if (tvControlItem.SelectedNode == null) return;
|
||||
string strSql = @" SELECT distinct com.PipelineComponentId,com.PipelineComponentCode,com.BoxNumber,com.Remark,
|
||||
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,
|
||||
com.State,com.ProductionState,pipe.PlanStartDate,pipe.FlowingSection,com.DrawingName,com.ReceiveDate,
|
||||
person.PersonName
|
||||
FROM HJGL_Pipeline_Component com
|
||||
LEFT JOIN HJGL_Pipeline pipe ON pipe.PipelineId =com.PipelineId
|
||||
@@ -352,11 +344,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
listStr.Add(new SqlParameter("@ProductionState", drpProductionState.SelectedValue.ToString()));
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.SelectedValue != Const._Null)
|
||||
{
|
||||
strSql += " AND pipe.FlowingSection =@FlowingSection";
|
||||
listStr.Add(new SqlParameter("@FlowingSection", drpFlowingSection.SelectedValue.ToString()));
|
||||
}
|
||||
// 过滤组件编号值为"裕-量"的行
|
||||
strSql += " AND com.PipelineComponentCode != @ExcludeYuliang";
|
||||
listStr.Add(new SqlParameter("@ExcludeYuliang", "裕-量"));
|
||||
@@ -448,7 +435,7 @@ if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请查看组件是否上传二维码!", MessageBoxIcon.Question);
|
||||
ShowNotify("未找到可打印的组件!", MessageBoxIcon.Question);
|
||||
return false;
|
||||
}
|
||||
BLL.FastReportService.AddFastreportTable(tb);
|
||||
@@ -459,7 +446,11 @@ if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.
|
||||
if (File.Exists(rootPath + initTemplatePath))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("打印模板不存在!", MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -549,24 +540,11 @@ if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.
|
||||
|
||||
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
||||
{
|
||||
if (e.CommandName == "PreviewQRCode")
|
||||
if (e.CommandName == "cmd_print")
|
||||
{
|
||||
var ID = e.RowID;
|
||||
var q = HJGL_PipelineComponentService.GetPipelineComponentById(ID);
|
||||
string path = "";
|
||||
if (!string.IsNullOrEmpty(q.QRCode))
|
||||
{
|
||||
path = BLL.CreateQRCodeService.CreateCode_Simple(q.QRCode, ID);
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
{
|
||||
string filepath = Funs.SGGLUrl + path.Replace("\\", "//");
|
||||
|
||||
ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script type='text/javascript'>window.open('" + filepath + "');</script>");
|
||||
|
||||
}
|
||||
}
|
||||
string[] pipelineComponentIds = { e.RowID };
|
||||
Print(pipelineComponentIds);
|
||||
}
|
||||
|
||||
}
|
||||
protected void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -603,22 +581,6 @@ if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 搜索
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
public string ConvertImageUrlByImage(object str, object id)
|
||||
{
|
||||
string path = string.Empty;
|
||||
if (!string.IsNullOrEmpty(str.ToString()))
|
||||
{
|
||||
path = BLL.CreateQRCodeService.CreateCode_Simple(str.ToString(), id.ToString());
|
||||
path = HttpUtility.HtmlDecode(BLL.UploadAttachmentService.ShowImage("../../", path));
|
||||
|
||||
}
|
||||
return path;
|
||||
}
|
||||
public string ConvertState(object state)
|
||||
{
|
||||
string StateName = string.Empty;
|
||||
@@ -650,12 +612,6 @@ if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.
|
||||
|
||||
return StateName;
|
||||
}
|
||||
protected void btnImportQRCode_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("PrePipelineQRCodeIn.aspx?", "导入 - ")));
|
||||
|
||||
}
|
||||
|
||||
protected void btnImportComponentJoint_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("PrePipelineComponentJointIn.aspx?", "导入 - ")));
|
||||
|
||||
Reference in New Issue
Block a user