Merge branch 'master' of https://gitee.com/frane-yang/SGGL_SeDin_New
This commit is contained in:
@@ -170,7 +170,7 @@ namespace BLL
|
||||
public static List<HJGL_Pipeline> GetView_HJGL_Pipelines(HJGL_Pipeline model)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var pipelineList =( from x in hJGL_Pipelines
|
||||
var pipelineList =( from x in Funs.DB.HJGL_Pipeline
|
||||
where
|
||||
(string.IsNullOrEmpty(model.ProjectId) || x.ProjectId.Contains(model.ProjectId))
|
||||
&& (string.IsNullOrEmpty(model.UnitWorkId) || x.UnitWorkId.Contains(model.UnitWorkId))
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
using Model;
|
||||
using Aspose.Words;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
@@ -283,7 +287,64 @@ namespace BLL
|
||||
|
||||
return list;
|
||||
}
|
||||
public static Dictionary<string, object> GetFileOutValueById(string WeldingDailyId)
|
||||
{
|
||||
var value = new Dictionary<string, object>();
|
||||
string strSql = @" SELECT
|
||||
PipelineCode as '管线号',
|
||||
(case when charindex('/',WeldJointCode)>0
|
||||
then RIGHT(WeldJointCode,CHARINDEX('/',REVERSE(WeldJointCode))-1)
|
||||
else WeldJointCode end) as '焊口序号',
|
||||
WeldJointCode as '焊口号',
|
||||
BackingWelderCode as '打底焊工',
|
||||
CoverWelderCode as '盖面焊工',
|
||||
Material1Code as '材质1' ,
|
||||
Material2Code as '材质2' ,
|
||||
Dia as '外径' ,
|
||||
DNDia as 'DN公称直径',
|
||||
Thickness as '壁厚' ,
|
||||
WeldTypeCode as '焊缝类型' ,
|
||||
WeldingMethodCode as '焊接方法' ,
|
||||
WeldingWireCode as '焊丝' ,
|
||||
WeldingMode as '焊口机动化程度' ,
|
||||
WeldingRodCode as '焊条' ,
|
||||
Size as '达因'
|
||||
FROM dbo.View_HJGL_WeldJoint
|
||||
WHERE WeldingDailyId=@WeldingDailyId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@WeldingDailyId", WeldingDailyId));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
var WeldingDailyCode = (from x in Funs.DB.HJGL_WeldingDaily
|
||||
where x.WeldingDailyId == WeldingDailyId
|
||||
select x.WeldingDailyCode).FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(WeldingDailyCode))
|
||||
{
|
||||
value.Add(WeldingDailyCode, tb);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
public static Dictionary<string, object> GetFileOutValueByUnitWorkId(string UnitWorkId,string Month)
|
||||
{
|
||||
var value = new Dictionary<string, object>();
|
||||
var p = from x in Funs.DB.HJGL_WeldingDaily
|
||||
where x.UnitWorkId == UnitWorkId
|
||||
&& x.WeldingDate < Convert.ToDateTime(Month + "-01").AddMonths(1)
|
||||
&& x.WeldingDate >= Convert.ToDateTime(Month + "-01")
|
||||
orderby x.WeldingDailyCode descending
|
||||
select x;
|
||||
if (p.Count() > 0)
|
||||
{
|
||||
foreach (var item in p)
|
||||
{
|
||||
var detail = GetFileOutValueById(item.WeldingDailyId);
|
||||
value.Add(detail.Keys.First(), detail.Values.First());
|
||||
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
#region 焊接日报下拉项
|
||||
/// <summary>
|
||||
/// 焊接日报下拉项
|
||||
|
||||
Reference in New Issue
Block a user