This commit is contained in:
2026-09-04 15:17:19 +08:00
parent 5ef31cf4c2
commit 20e88479b1
12 changed files with 160 additions and 16 deletions
+96 -6
View File
@@ -8784,6 +8784,14 @@ namespace GThinking.N_XLXSBJ
sJSJGS = sJSJGS.Replace(" ", "").Replace("×", "*");//Replace("100", "100.00")是因为数据库计算时1/100的结果是0需转换为1/100.00结果才是0.01,此处直接计算无需处理
int indexXSML = 0;
int indexFJSX = 0;
int indexGJ = 0;
int indexDF = 0;
int indexQTSH = 0;
int indexFXYL = 0;
int indexZJF = 0;
int indexPTF = 0;
int indexZZSCB = 0;
string[] strJJYZZ = sUpdJJYZList.ToString().Trim().Split('|');
for (int i = 1; i <= strJJYZZ.Length; i++)
{
@@ -8906,12 +8914,27 @@ namespace GThinking.N_XLXSBJ
for (int i = 1; i <= strJJYZZ.Length; i++)
{
if (GetYZXXByYZID("JZ" + i.ToString().PadLeft(2, '0')).XLXSTZYZ_YZMC == "工价")
indexGJ = i;
if (GetYZXXByYZID("JZ" + i.ToString().PadLeft(2, '0')).XLXSTZYZ_YZMC == "生产电费")
indexDF = i;
if (GetYZXXByYZID("JZ" + i.ToString().PadLeft(2, '0')).XLXSTZYZ_YZMC == "其他损耗")
indexQTSH = i;
if (GetYZXXByYZID("JZ" + i.ToString().PadLeft(2, '0')).XLXSTZYZ_YZMC == "风险余量")
indexFXYL = i;
if (GetYZXXByYZID("JZ" + i.ToString().PadLeft(2, '0')).XLXSTZYZ_YZMC == "增值税成本")
indexZZSCB = i;
if (GetYZXXByYZID("JZ" + i.ToString().PadLeft(2, '0')).XLXSTZYZ_YZMC == "折旧费")
{
double dSHL = CMISproConvert.StrToFloat(strJJYZZ[i - 1]);
double dQTSH = dJSJ * dSHL / 100.0;
strJJYZZ[i - 1] = dQTSH.ToString();
indexZJF = i;
}
if (GetYZXXByYZID("JZ" + i.ToString().PadLeft(2, '0')).XLXSTZYZ_YZMC == "配套费")
@@ -8920,6 +8943,8 @@ namespace GThinking.N_XLXSBJ
double dQTSH = dJSJ * dSHL / 100.0;
strJJYZZ[i - 1] = dQTSH.ToString();
indexPTF = i;
}
if (GetYZXXByYZID("JZ" + i.ToString().PadLeft(2, '0')).XLXSTZYZ_YZMC == "销售毛利")
{
@@ -8928,6 +8953,21 @@ namespace GThinking.N_XLXSBJ
double dQTSH = dJSJ * dSHL / 100.0;
strJJYZZ[i - 1] = dQTSH.ToString();
}
if (GetYZXXByYZID("JZ" + i.ToString().PadLeft(2, '0')).XLXSTZYZ_YZMC == "认证费")
{
double dRZF = CMISproConvert.StrToFloat(strJJYZZ[i - 1]);
double dQTSH = dJSJ * dRZF / 100.0;
strJJYZZ[i - 1] = dQTSH.ToString();
}
}
if (indexZZSCB > 0 && indexPTF > 0 && indexZJF > 0 && indexFXYL > 0 && indexQTSH > 0 && indexDF > 0 && indexGJ > 0)
{
double ZZSCB = (CMISproConvert.StrToFloat(strJJYZZ[indexPTF - 1]) + CMISproConvert.StrToFloat(strJJYZZ[indexZJF - 1]) + CMISproConvert.StrToFloat(strJJYZZ[indexFXYL - 1]) + CMISproConvert.StrToFloat(strJJYZZ[indexQTSH - 1])
+ (CMISproConvert.StrToFloat(strJJYZZ[indexDF - 1]) + CMISproConvert.StrToFloat(strJJYZZ[indexGJ - 1])*10000 / 81.2655989526499 / 71.3980341706337)) * CMISproConvert.StrToFloat(strJJYZZ[indexZZSCB - 1]);
strJJYZZ[indexZZSCB - 1] = ZZSCB.ToString();
}
for (int i = 0; i < strJJYZZ.Length; i++)
@@ -9426,7 +9466,14 @@ namespace GThinking.N_XLXSBJ
{
int indexXSML = 0;
int indexFJSX = 0;
for (int i = 1; i <= 10; i++)
int indexGJ = 0;
int indexDF = 0;
int indexQTSH = 0;
int indexFXYL = 0;
int indexZJF = 0;
int indexPTF = 0;
int indexZZSCB = 0;
for (int i = 1; i <= 20; i++)
{
if (GetYZXXByYZID("JZ" + i.ToString().PadLeft(2, '0')).XLXSTZYZ_YZMC == "其他损耗")
{
@@ -9528,6 +9575,8 @@ namespace GThinking.N_XLXSBJ
indexXSML = i;
if (GetYZXXByYZID("JZ" + i.ToString().PadLeft(2, '0')).XLXSTZYZ_YZMC == "附加属性")
indexFJSX = i;
}
if (indexXSML > 0 && indexFJSX > 0)
@@ -9611,11 +9660,25 @@ namespace GThinking.N_XLXSBJ
}
}
for (int i = 1; i <= 10; i++)
for (int i = 1; i <= 20; i++)
{
if (GetYZXXByYZID("JZ" + i.ToString().PadLeft(2, '0')).XLXSTZYZ_YZMC == "工价")
indexGJ = i;
if (GetYZXXByYZID("JZ" + i.ToString().PadLeft(2, '0')).XLXSTZYZ_YZMC == "生产电费")
indexDF = i;
if (GetYZXXByYZID("JZ" + i.ToString().PadLeft(2, '0')).XLXSTZYZ_YZMC == "其他损耗")
indexQTSH = i;
if (GetYZXXByYZID("JZ" + i.ToString().PadLeft(2, '0')).XLXSTZYZ_YZMC == "风险余量")
indexFXYL = i;
if (GetYZXXByYZID("JZ" + i.ToString().PadLeft(2, '0')).XLXSTZYZ_YZMC == "增值税成本")
indexZZSCB = i;
if (GetYZXXByYZID("JZ" + i.ToString().PadLeft(2, '0')).XLXSTZYZ_YZMC == "折旧费")
{
indexZJF = i;
SQL.Clear();
SQL.Add("merge into XLXSBJDJJYZ tar ");
SQL.Add("using ( select XLXSBJDMX_BJDID,XLXSBJDMX_XH,XLXSBJDMX_CJ from XLXSBJDMX ");
@@ -9631,7 +9694,7 @@ namespace GThinking.N_XLXSBJ
if (GetYZXXByYZID("JZ" + i.ToString().PadLeft(2, '0')).XLXSTZYZ_YZMC == "配套费")
{
indexPTF = i;
SQL.Clear();
SQL.Add("merge into XLXSBJDJJYZ tar ");
SQL.Add("using ( select XLXSBJDMX_BJDID,XLXSBJDMX_XH,XLXSBJDMX_CJ from XLXSBJDMX ");
@@ -9647,7 +9710,7 @@ namespace GThinking.N_XLXSBJ
if (GetYZXXByYZID("JZ" + i.ToString().PadLeft(2, '0')).XLXSTZYZ_YZMC == "销售毛利")
{
SQL.Clear();
SQL.Add("merge into XLXSBJDJJYZ tar ");
SQL.Add("using ( select XLXSBJDMX_BJDID,XLXSBJDMX_XH,XLXSBJDMX_CJ from XLXSBJDMX ");
@@ -9660,7 +9723,34 @@ namespace GThinking.N_XLXSBJ
dberp.ExecSQL(SQL);
}
if (GetYZXXByYZID("JZ" + i.ToString().PadLeft(2, '0')).XLXSTZYZ_YZMC == "认证费")
{
SQL.Clear();
SQL.Add("merge into XLXSBJDJJYZ tar ");
SQL.Add("using ( select XLXSBJDMX_BJDID,XLXSBJDMX_XH,XLXSBJDMX_CJ from XLXSBJDMX ");
SQL.Add(" where XLXSBJDMX_BJDID=:pBJDID ");
SQL.Add(" and exists(select 1 from V_XSBJJSJGB where V_XSBJJSJGB_ID=:pID and V_XSBJJSJGB_BJDID=:pBJDID and V_XSBJJSJGB_WGCPBZ<>'Y' and V_XSBJJSJGB_JGFBZ<>'Y' and V_XSBJJSJGB_BJDID=XLXSBJDMX_BJDID and V_XSBJJSJGB_BJDXH=XLXSBJDMX_XH ) ");
SQL.Add(" )sor on(XLXSBJDMX_BJDID=XLXSBJDJJYZ_BJDID and XLXSBJDMX_XH=XLXSBJDJJYZ_XH) ");
SQL.Add(" when matched then update set XLXSBJDJJYZ_YZZ" + i.ToString().PadLeft(2, '0') + "= XLXSBJDJJYZ_YZZ" + i.ToString().PadLeft(2, '0') + "*XLXSBJDMX_CJ/100.0 ");
SQL.ParamByName("pBJDID").Value = sBJDID.Trim();
SQL.ParamByName("pID").Value = VnewID;
dberp.ExecSQL(SQL);
}
}
if (indexZZSCB > 0 && indexPTF > 0 && indexZJF > 0 && indexFXYL > 0 && indexQTSH > 0 && indexDF > 0 && indexGJ > 0)
{
SQL.Clear();
SQL.Add(string.Format("update XLXSBJDJJYZ set XLXSBJDJJYZ_YZZ{0}=XLXSBJDJJYZ_YZZ{0}*(XLXSBJDJJYZ_YZZ{1}+(XLXSBJDJJYZ_YZZ{2}* 10000 / 81.2655989526499 / 71.3980341706337)+XLXSBJDJJYZ_YZZ{3}+XLXSBJDJJYZ_YZZ{4}+XLXSBJDJJYZ_YZZ{5}+XLXSBJDJJYZ_YZZ{6}) where XLXSBJDJJYZ_BJDID=:pBJDID ", indexZZSCB.ToString().PadLeft(2, '0'), indexDF.ToString().PadLeft(2, '0'), indexGJ.ToString().PadLeft(2, '0'), indexZJF.ToString().PadLeft(2, '0'), indexPTF.ToString().PadLeft(2, '0'), indexQTSH.ToString().PadLeft(2, '0'), indexFXYL.ToString().PadLeft(2, '0')));
SQL.Add(" and exists(select 1 from V_XSBJJSJGB where V_XSBJJSJGB_ID=:pID and V_XSBJJSJGB_BJDID=:pBJDID and V_XSBJJSJGB_WGCPBZ<>'Y' and V_XSBJJSJGB_JGFBZ<>'Y' and V_XSBJJSJGB_BJDID=XLXSBJDJJYZ_BJDID and V_XSBJJSJGB_BJDXH=XLXSBJDJJYZ_XH ) ");
SQL.ParamByName("pBJDID").Value = sBJDID.Trim();
SQL.ParamByName("pID").Value = VnewID;
dberp.ExecSQL(SQL);
}
}
}
@@ -10724,7 +10814,7 @@ namespace GThinking.N_XLXSBJ
#endregion
}
Dictionary<string, string> dicJGBFGQCPYZ = XLBJDInfo.GetJGBFGQCPYZ(sJGEJGBID);
for (int j = 1; j <= 10; j++)
for (int j = 1; j <= 20; j++)
{
if (!dicJGBYZZ.ContainsKey("JZ" + j.ToString().PadLeft(2, '0')))
{