2026821
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using GThinking.N_MODEL.Page;
|
||||
using GThinking.N_MISPRO.Data;
|
||||
|
||||
namespace GThinking.N_XLXSBJ
|
||||
{
|
||||
[TableMap(DB = "DBERP", DbTableName = "XLJGCZBLM", Umid = 100860020, IsWorkFlow = false, UseWhr = false)]
|
||||
|
||||
public class JGCZB_TZBJCLEntity : EntityManager
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
[EntityType(Db = "DBERP", Table = "XLJGCZBLM", IsWf = false, IsWhr = false, WhrPrefix = "", IsAttach = false)]
|
||||
public class JGCZB_TZBJCL : EntityObject
|
||||
{
|
||||
public string sTZQBJCL = "";
|
||||
|
||||
//尺重表栏目名称
|
||||
public string sCZBLMMC = "";
|
||||
|
||||
public string sCZBLX = " ";
|
||||
|
||||
//已派生材料用量
|
||||
public string sCLYLPSQK = "";
|
||||
|
||||
public override TSQL SetQuerySql()
|
||||
{
|
||||
TSQL SQL = base.SetQuerySql();
|
||||
sCZBLX = sCZBLX.Trim();
|
||||
if (sCZBLMMC.Equals(""))
|
||||
{
|
||||
SQL.Add(" select XLJGCZBLM_JGCZBID,XLJGCZBML_JGCZBMC,XLJGCZBML_JGCZBBBID, XLJGCZBML_DRSJ,");
|
||||
SQL.Add(" XLJGCZBLM_CZBLMBH,XLJGCZBLM_CZBLMMC,XLJGCZBLM_HLMLX, rtrim(XLJGCZBLM_BJCLID) ||'|'|| rtrim(XLXSBJCL_BJCLMC) as XLJGCZBLM_BJCLID ");
|
||||
SQL.Add(" from XLJGCZBML,XLJGCZBLM ");
|
||||
SQL.Add(" left join XLXSBJCL on XLXSBJCL_BJCLID = XLJGCZBLM_BJCLID ");
|
||||
SQL.Add(" where XLJGCZBLM_JGCZBID=XLJGCZBML_JGCZBID ");
|
||||
SQL.Add(" and XLJGCZBML_JGCZBBBID=XLJGCZBLM_JGCZBBBID ");
|
||||
SQL.Add(" and XLJGCZBLM_BJCLID=:pBJCLID ");
|
||||
SQL.Add(" and XLJGCZBML_CZBLX = :pCZBLX ");
|
||||
if (sCLYLPSQK.Equals("Y"))
|
||||
SQL.Add(" and exists(select TOP 1 XLXSCLQD_JGCZBID from XLXSCLQD where XLXSCLQD_JGCZBID = XLJGCZBLM_JGCZBID)");
|
||||
SQL.Add(" order by XLJGCZBLM_JGCZBID,XLJGCZBLM_CZBLMBH ");
|
||||
SQL.ParamByName("pBJCLID").Value = sTZQBJCL;
|
||||
SQL.ParamByName("pCZBLX").Value = sCZBLX;
|
||||
}
|
||||
else
|
||||
{
|
||||
SQL.Add(" select XLJGCZBLM_JGCZBID,XLJGCZBML_JGCZBMC,XLJGCZBML_JGCZBBBID, XLJGCZBML_DRSJ,");
|
||||
SQL.Add(" XLJGCZBLM_CZBLMBH,XLJGCZBLM_CZBLMMC,XLJGCZBLM_HLMLX, rtrim(XLJGCZBLM_BJCLID) ||'|'|| rtrim(XLXSBJCL_BJCLMC) as XLJGCZBLM_BJCLID ");
|
||||
SQL.Add(" from XLJGCZBML,XLJGCZBLM ");
|
||||
SQL.Add(" left join XLXSBJCL on XLXSBJCL_BJCLID = XLJGCZBLM_BJCLID ");
|
||||
SQL.Add(" where XLJGCZBLM_JGCZBID=XLJGCZBML_JGCZBID ");
|
||||
SQL.Add(" and XLJGCZBML_JGCZBBBID=XLJGCZBLM_JGCZBBBID ");
|
||||
SQL.Add(" and XLJGCZBLM_ZDLMLX=4 ");
|
||||
SQL.Add(" and XLJGCZBLM_CZBLMMC = :pCZBLMMC ");
|
||||
SQL.Add(" and XLJGCZBML_CZBLX = :pCZBLX ");
|
||||
if (sCLYLPSQK.Equals("Y"))
|
||||
SQL.Add(" and exists(select TOP 1 XLXSCLQD_JGCZBID from XLXSCLQD where XLXSCLQD_JGCZBID = XLJGCZBLM_JGCZBID)");
|
||||
SQL.Add(" order by XLJGCZBLM_JGCZBID,XLJGCZBLM_CZBLMBH ");
|
||||
SQL.ParamByName("pCZBLMMC").Value = sCZBLMMC;
|
||||
SQL.ParamByName("pCZBLX").Value = sCZBLX;
|
||||
}
|
||||
|
||||
return SQL;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user