|
|
|
@ -473,6 +473,10 @@ namespace FactorySystemBll
|
|
|
|
{
|
|
|
|
{
|
|
|
|
viewList = db.Queryable<TFS_ViewMaterial>().Where(s => s.FTeamID == teamworkId && s.FTeamType == 1).ToList();
|
|
|
|
viewList = db.Queryable<TFS_ViewMaterial>().Where(s => s.FTeamID == teamworkId && s.FTeamType == 1).ToList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (teamworkType == 3)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
viewList = db.Queryable<TFS_ViewMaterial>().Where(s => s.FHalfMaterialTeamID == teamworkId).ToList();
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
viewList = db.Queryable<TFS_ViewMaterial>().Where(s => s.FMdfMaterialTeamID == teamworkId && s.FTeamType == 1).ToList();
|
|
|
|
viewList = db.Queryable<TFS_ViewMaterial>().Where(s => s.FMdfMaterialTeamID == teamworkId && s.FTeamType == 1).ToList();
|
|
|
|
@ -618,6 +622,11 @@ namespace FactorySystemBll
|
|
|
|
string whereSql = string.Format(" Where FTeamType=1 And FMdfMaterialTeamID={0}", teamworkId);
|
|
|
|
string whereSql = string.Format(" Where FTeamType=1 And FMdfMaterialTeamID={0}", teamworkId);
|
|
|
|
strSql = strSql + whereSql;
|
|
|
|
strSql = strSql + whereSql;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else if ("3".Equals(teamworkType))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
string whereSql = string.Format(" Where FHalfMaterialTeamID={0}", teamworkId);
|
|
|
|
|
|
|
|
strSql = strSql + whereSql;
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
string whereSql = string.Format(" Where FTeamType=1 And FTeamID={0}", teamworkId);
|
|
|
|
string whereSql = string.Format(" Where FTeamType=1 And FTeamID={0}", teamworkId);
|
|
|
|
@ -631,8 +640,9 @@ namespace FactorySystemBll
|
|
|
|
public DataTable GetViewMaterial(string FID)
|
|
|
|
public DataTable GetViewMaterial(string FID)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
SqlSugarClient db = AppSettingsHelper.GetSqlSugar();
|
|
|
|
SqlSugarClient db = AppSettingsHelper.GetSqlSugar();
|
|
|
|
string strSql = string.Format(@"
|
|
|
|
string strSql = string.Format(@"
|
|
|
|
SELECT
|
|
|
|
|
|
|
|
|
|
|
|
SELECT
|
|
|
|
isnull( FTypeName1, '' ) AS '一级分类',
|
|
|
|
isnull( FTypeName1, '' ) AS '一级分类',
|
|
|
|
isnull( FTypeName2, '' ) AS '二级分类',
|
|
|
|
isnull( FTypeName2, '' ) AS '二级分类',
|
|
|
|
isnull( FK3Code, '' ) AS 'K3系统代码',
|
|
|
|
isnull( FK3Code, '' ) AS 'K3系统代码',
|
|
|
|
@ -781,24 +791,25 @@ namespace FactorySystemBll
|
|
|
|
SELECT
|
|
|
|
SELECT
|
|
|
|
isnull( b.FName, '' ) AS 'FTypeName1',
|
|
|
|
isnull( b.FName, '' ) AS 'FTypeName1',
|
|
|
|
isnull( c.FName, '' ) AS 'FTypeName2',
|
|
|
|
isnull( c.FName, '' ) AS 'FTypeName2',
|
|
|
|
isnull( FSAPCode, '' ) AS 'FCode',
|
|
|
|
isnull( e.FSAPCode, '' ) AS 'FCode',
|
|
|
|
isnull( FSAPDescription, '' ) AS 'FName',
|
|
|
|
isnull( e.FSAPDescription, '' ) AS 'FName',
|
|
|
|
isnull( FBaseMaterialDesc, '' ) AS 'FDesc',
|
|
|
|
isnull( FBaseMaterialDesc, '' ) AS 'FDesc',
|
|
|
|
isnull( FBaseMaterialDesc, '' ) AS 'FVersionCode',
|
|
|
|
isnull( FBaseMaterialDesc, '' ) AS 'FVersionCode',
|
|
|
|
isnull( FBaseMaterialDesc, '' ) AS 'FFactoryCode',
|
|
|
|
isnull( FBaseMaterialDesc, '' ) AS 'FFactoryCode',
|
|
|
|
isnull( FBaseMaterialDesc, '' ) AS 'FSupplyCode',
|
|
|
|
isnull( FBaseMaterialDesc, '' ) AS 'FSupplyCode',
|
|
|
|
isnull( FBaseMaterialGroup, '' ) AS 'FGroupCode',
|
|
|
|
isnull( FBaseMaterialGroup, '' ) AS 'FGroupCode',
|
|
|
|
isnull( FBaseWeightUnit, '' ) AS 'FBaseUnit',
|
|
|
|
isnull( FBaseWeightUnit, '' ) AS 'FBaseUnit',
|
|
|
|
isnull( FCraftExplain, '' ) AS 'FCraftDesc',
|
|
|
|
isnull( e.FCraftExplain, '' ) AS 'FCraftDesc',
|
|
|
|
d.FName AS 'FtypeName',
|
|
|
|
|
|
|
|
a.*
|
|
|
|
a.*
|
|
|
|
FROM
|
|
|
|
FROM
|
|
|
|
TFS_MaterialInfo AS a
|
|
|
|
TFS_MaterialInfo AS a
|
|
|
|
LEFT JOIN TFS_MaterialType AS d ON a.FType=d.FID
|
|
|
|
LEFT JOIN TFS_Material AS e ON a.FDataID=e.FID
|
|
|
|
LEFT JOIN TFS_MaterialType AS b ON a.FTypeID1= b.FID
|
|
|
|
LEFT JOIN TFS_MaterialType AS d ON a.FType=d.FID
|
|
|
|
LEFT JOIN TFS_MaterialType AS C ON a.FTypeID2= b.FID
|
|
|
|
LEFT JOIN TFS_MaterialType AS b ON e.FTypeID1= b.FID
|
|
|
|
WHERE
|
|
|
|
LEFT JOIN TFS_MaterialType AS C ON e.FTypeID2= c.FID
|
|
|
|
FDataId = {0})a;", FID);
|
|
|
|
WHERE a.FDataID in ({0})
|
|
|
|
|
|
|
|
)a;
|
|
|
|
|
|
|
|
", FID);
|
|
|
|
|
|
|
|
|
|
|
|
DataTable data = db.Ado.GetDataTable(strSql);
|
|
|
|
DataTable data = db.Ado.GetDataTable(strSql);
|
|
|
|
return data;
|
|
|
|
return data;
|
|
|
|
|