增加因子,特性加点增加主芯截面

This commit is contained in:
2026-09-03 11:44:53 +08:00
parent f85e5baa8d
commit 5ef31cf4c2
47 changed files with 2736 additions and 549 deletions
+42 -9
View File
@@ -4643,8 +4643,18 @@ namespace GThinking.N_XLXSBJ
dberp.ExecSQL(SQL);
SQL.Clear();
SQL.Add("insert into XLXSBJDJJYZ(XLXSBJDJJYZ_BJDID, XLXSBJDJJYZ_XH, XLXSBJDJJYZ_YZZ01,XLXSBJDJJYZ_YZZ02,XLXSBJDJJYZ_YZZ03,XLXSBJDJJYZ_YZZ04,XLXSBJDJJYZ_YZZ05,XLXSBJDJJYZ_YZZ06,XLXSBJDJJYZ_YZZ07,XLXSBJDJJYZ_YZZ08,XLXSBJDJJYZ_YZZ09,XLXSBJDJJYZ_YZZ10,XLXSBJDJJYZ_YSJDZ) ");
SQL.Add("select V_XSBJJSJGB_BJDID,V_XSBJJSJGB_BJDXH,isnull(XLXSJGBYZZ0_YZZ01,0),isnull(XLXSJGBYZZ0_YZZ02,0),isnull(XLXSJGBYZZ0_YZZ03,0),isnull(XLXSJGBYZZ0_YZZ04,0),isnull(XLXSJGBYZZ0_YZZ05,0),isnull(XLXSJGBYZZ0_YZZ06,0),isnull(XLXSJGBYZZ0_YZZ07,0),isnull(XLXSJGBYZZ0_YZZ08,0),isnull(XLXSJGBYZZ0_YZZ09,0),isnull(XLXSJGBYZZ0_YZZ10,0),V_XSBJJSJGB_JGBYSJDZ ");
string sYZZFields_1 = "";
for (int i = 1; i <= 20; i++)
{
sYZZFields_1 += "XLXSBJDJJYZ_YZZ" + i.ToString().PadLeft(2, '0') + (i < 20 ? "," : "");
}
SQL.Add("insert into XLXSBJDJJYZ(XLXSBJDJJYZ_BJDID, XLXSBJDJJYZ_XH, " + sYZZFields_1 + ",XLXSBJDJJYZ_YSJDZ) ");
string sYZZFields_2 = "";
for (int i = 1; i <= 20; i++)
{
sYZZFields_2 += "isnull(XLXSJGBYZZ0_YZZ" + i.ToString().PadLeft(2, '0') + ",0)" + (i < 20 ? "," : "");
}
SQL.Add("select V_XSBJJSJGB_BJDID,V_XSBJJSJGB_BJDXH," + sYZZFields_2 + ",V_XSBJJSJGB_JGBYSJDZ ");
SQL.Add(" from V_XSBJJSJGB");
SQL.Add(" left join XLXSJGBYZZ0 on XLXSJGBYZZ0_JGBID=:pJGBID and XLXSJGBYZZ0_XH=V_XSBJJSJGB_SYJGBXH");
SQL.Add(" where V_XSBJJSJGB_ID=:pID and V_XSBJJSJGB_BJDID=:pBJDID ");
@@ -4692,10 +4702,20 @@ namespace GThinking.N_XLXSBJ
SQL.Clear();
SQL.Add(" merge into V_XSBJJSJGB tar ");
SQL.Add(" using ( ");
SQL.Add("select BJDID,BJDXH," + sJDSQL + " as JDYZZ," + sKDSQL + " as KDYZZ," + sJJSQL + " as JJYZZ," + sSXSQL + " as SXYZZ,XLXSBJDJJYZ_YZZ01,XLXSBJDJJYZ_YZZ02,XLXSBJDJJYZ_YZZ03,XLXSBJDJJYZ_YZZ04,XLXSBJDJJYZ_YZZ05,XLXSBJDJJYZ_YZZ06,XLXSBJDJJYZ_YZZ07,XLXSBJDJJYZ_YZZ08,XLXSBJDJJYZ_YZZ09,XLXSBJDJJYZ_YZZ10 ");
string sYZZFields_3 = "";
for (int i = 1; i <= 20; i++)
{
sYZZFields_3 += "XLXSBJDJJYZ_YZZ" + i.ToString().PadLeft(2, '0') + (i < 20 ? "," : "");
}
SQL.Add("select BJDID,BJDXH," + sJDSQL + " as JDYZZ," + sKDSQL + " as KDYZZ," + sJJSQL + " as JJYZZ," + sSXSQL + " as SXYZZ," + sYZZFields_3 + " ");
SQL.Add(" from ");
SQL.Add("(");
SQL.Add(" select XLXSBJDJJYZ_BJDID as BJDID,XLXSBJDJJYZ_XH as BJDXH,XLXSBJDJJYZ_YZZ01,XLXSBJDJJYZ_YZZ02,XLXSBJDJJYZ_YZZ03,XLXSBJDJJYZ_YZZ04,XLXSBJDJJYZ_YZZ05,XLXSBJDJJYZ_YZZ06,XLXSBJDJJYZ_YZZ07,XLXSBJDJJYZ_YZZ08,XLXSBJDJJYZ_YZZ09,XLXSBJDJJYZ_YZZ10,");
string sYZZFields_4 = "";
for (int i = 1; i <= 20; i++)
{
sYZZFields_4 += "XLXSBJDJJYZ_YZZ" + i.ToString().PadLeft(2, '0') + (i < 20 ? "," : "");
}
SQL.Add(" select XLXSBJDJJYZ_BJDID as BJDID,XLXSBJDJJYZ_XH as BJDXH," + sYZZFields_4 + ",");
SQL.Add(" (");
SQL.Add(string.Format("XLXSBJDJJYZ_YZZ{0}", dsJGBYZ.Tables[0].Rows[0]["XLXSJGBYZ_YZID"].ToString().Trim().Replace("JZ", "")));
@@ -4925,10 +4945,20 @@ namespace GThinking.N_XLXSBJ
//价格表调价因素3,直接使用价格表调价因子值
if (!sJGBIDS.Equals(""))
{
SQL.Clear();
SQL.Add("insert into XLXSBJDJJYZ(XLXSBJDJJYZ_BJDID, XLXSBJDJJYZ_XH, XLXSBJDJJYZ_YZZ01,XLXSBJDJJYZ_YZZ02,XLXSBJDJJYZ_YZZ03,XLXSBJDJJYZ_YZZ04,XLXSBJDJJYZ_YZZ05,XLXSBJDJJYZ_YZZ06,XLXSBJDJJYZ_YZZ07,XLXSBJDJJYZ_YZZ08,XLXSBJDJJYZ_YZZ09,XLXSBJDJJYZ_YZZ10,XLXSBJDJJYZ_YSJDZ) ");
SQL.Add("select V_XSBJJSJGB_BJDID,V_XSBJJSJGB_BJDXH,isnull(XLXSJGBYZZ0_YZZ01,0),isnull(XLXSJGBYZZ0_YZZ02,0),isnull(XLXSJGBYZZ0_YZZ03,0),isnull(XLXSJGBYZZ0_YZZ04,0),isnull(XLXSJGBYZZ0_YZZ05,0),isnull(XLXSJGBYZZ0_YZZ06,0),isnull(XLXSJGBYZZ0_YZZ07,0),isnull(XLXSJGBYZZ0_YZZ08,0),isnull(XLXSJGBYZZ0_YZZ09,0),isnull(XLXSJGBYZZ0_YZZ10,0),V_XSBJJSJGB_JGBYSJDZ ");
string sYZZFields_5 = "";
for (int i = 1; i <= 20; i++)
{
sYZZFields_5 += "XLXSBJDJJYZ_YZZ" + i.ToString().PadLeft(2, '0') + (i < 20 ? "," : "");
}
SQL.Add("insert into XLXSBJDJJYZ(XLXSBJDJJYZ_BJDID, XLXSBJDJJYZ_XH, " + sYZZFields_5 + ",XLXSBJDJJYZ_YSJDZ) ");
string sYZZFields_6 = "";
for (int i = 1; i <= 20; i++)
{
sYZZFields_6 += "isnull(XLXSJGBYZZ0_YZZ" + i.ToString().PadLeft(2, '0') + ",0)" + (i < 20 ? "," : "");
}
SQL.Add("select V_XSBJJSJGB_BJDID,V_XSBJJSJGB_BJDXH," + sYZZFields_6 + ",V_XSBJJSJGB_JGBYSJDZ ");
SQL.Add(" from V_XSBJJSJGB");
SQL.Add(" left join XLXSJGBYZZ0 on XLXSJGBYZZ0_JGBID=:pJGBID3 and XLXSJGBYZZ0_XH=V_XSBJJSJGB_SYJGBXH");
SQL.Add(" where V_XSBJJSJGB_ID=:pID and V_XSBJJSJGB_BJDID=:pBJDID and V_XSBJJSJGB_SYJGBID=:pJGBID1");
@@ -5529,7 +5559,7 @@ namespace GThinking.N_XLXSBJ
SQL.Add(" and V_XSBJJSJGB_WGCPBZ<>'Y' and V_XSBJJSJGB_JGFBZ<>'Y' ");
SQL.Add(" and XLXSTZYZ_MXBH='JZJ' and XLXSTZYZ_YZID=:pYZID");
SQL.Add(" and XLXSTZYZ_TJYS='A' and XLXSJGBYZZA_JGBID=XLXSTZYZ_JGBID and XLXSJGBYZZA_YZID=XLXSTZYZ_YZID ");
SQL.Add(" and XLXSCPML_CPMLIDS like '%'||rtrim(case when A.XLXSBJTJXHML_CPMLID is null then B.XLXSBJTJXHML_CPMLID else A.XLXSBJTJXHML_CPMLID end)||'%' and XLXSJGBYZZA_XLGGID=convert(char,XLDTJMZHB_DTJM1) ");
SQL.Add(" and XLXSCPML_CPMLIDS like '%'||rtrim(case when A.XLXSBJTJXHML_CPMLID is null then B.XLXSBJTJXHML_CPMLID else A.XLXSBJTJXHML_CPMLID end)||'%' and CONVERT(float,XLXSJGBYZZA_XLGGID)=XLDTJMZHB_DTJM1 ");
SQL.Add(" ) sor ");
SQL.Add(" on( ");
SQL.Add(" XLXSBJDJJYZ_BJDID=:pBJDID and XLXSBJDJJYZ_XH=BJDXH ");
@@ -5604,7 +5634,10 @@ namespace GThinking.N_XLXSBJ
SQL.Add(" select V_XSBJJSJGB_BJDID as BJDID,V_XSBJJSJGB_BJDXH as BJDXH");
SQL.Add(string.Format(",ISNULL(SUM(XLXSJGBYZZC_YZZ) ,0) as YZZ{0}", sTJYZ[i].Trim().Replace("JZ", "")));
SQL.Add(" from V_XSBJJSJGB ");
SQL.Add(" LEFT JOIN XLXSBJCPYS ON XLXSBJCPYS_XLJBXHID=V_XSBJJSJGB_XLXHID and XLXSBJCPYS_DYDJID=V_XSBJJSJGB_DYDJID ");
SQL.Add(" left join XLXHB on XLXHB_XLXHID=V_XSBJJSJGB_XLXHID ");
SQL.Add(" left join XLGGB on XLGGB_XLGGID = REPLACE(V_XSBJJSJGB_XLGGID , '*','¡Á') and XLGGB_XLGGJDGZ = isnull(XLXHB_XLGGJDGZ,'0') ");
SQL.Add(" left join XLDTJMZHB on XLDTJMZHB_DTJMZHID=XLGGB_DTJMZHID ");
SQL.Add(" LEFT JOIN XLXSBJCPYS ON XLXSBJCPYS_XLJBXHID=V_XSBJJSJGB_XLXHID and XLXSBJCPYS_DYDJID=V_XSBJJSJGB_DYDJID and XLDTJMZHB_DTJM1=CONVERT(float,XLXSBJCPYS_XLYSID) ");
SQL.Add(" ,XLXSTZYZ,XLXSJGBYZZC ");
SQL.Add(" where V_XSBJJSJGB_ID=:pID ");
SQL.Add(" and V_XSBJJSJGB_BJDID=:pBJDID");