|
@@ -304,7 +304,7 @@ namespace JLHHJSvr.Helper
|
|
mx.pocket_around_spring_cost_replace_formula = bednet.pocket_around_spring_formula;
|
|
mx.pocket_around_spring_cost_replace_formula = bednet.pocket_around_spring_formula;
|
|
|
|
|
|
#region wf_cmp_pocket_around_dw2 口袋弹簧单价
|
|
#region wf_cmp_pocket_around_dw2 口袋弹簧单价
|
|
- var springPocket = GetSpringPrice(bednet.pricelistid.Value, "口袋弹簧单价", mx.pocket_around_springid);
|
|
|
|
|
|
+ var springPocket = GetSpringPrice(bednet.pricelistid.Value, "口袋弹簧单价", mx.pocket_around_springid, 0, "口袋");
|
|
|
|
|
|
if (springPocket.height > 0)
|
|
if (springPocket.height > 0)
|
|
{
|
|
{
|
|
@@ -318,7 +318,8 @@ namespace JLHHJSvr.Helper
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
var rp_formula = "";
|
|
var rp_formula = "";
|
|
- mx.pocket_around_spring_cost = Calculate(mx.pocket_around_spring_cost_replace_formula, out rp_formula, "四周口袋弹簧成本").DecimalValue;
|
|
|
|
|
|
+ var mx_formula = mx.pocket_around_spring_cost_replace_formula.Replace("【弹簧重/个】", "【口袋弹簧重/个】").Replace("【弹簧重】", "【口袋弹簧重】");
|
|
|
|
+ mx.pocket_around_spring_cost = Calculate(mx_formula, out rp_formula, "四周口袋弹簧成本").DecimalValue;
|
|
mx.pocket_around_spring_cost_replace_formula = rp_formula;
|
|
mx.pocket_around_spring_cost_replace_formula = rp_formula;
|
|
bednet.pocket_around_spring_cost += mx.pocket_around_spring_cost;
|
|
bednet.pocket_around_spring_cost += mx.pocket_around_spring_cost;
|
|
AddKeyValue("四周口袋弹簧成本", bednet.pocket_around_spring_cost);
|
|
AddKeyValue("四周口袋弹簧成本", bednet.pocket_around_spring_cost);
|
|
@@ -350,11 +351,12 @@ namespace JLHHJSvr.Helper
|
|
mx.hard_around_mtrl_cost_replace_formula = bednet.hard_around_mtrl_formula;
|
|
mx.hard_around_mtrl_cost_replace_formula = bednet.hard_around_mtrl_formula;
|
|
|
|
|
|
#region wf_cmp_hard_around_dw2 四周加硬弹簧单价
|
|
#region wf_cmp_hard_around_dw2 四周加硬弹簧单价
|
|
- GetSpringPrice(bednet.pricelistid.Value, "加硬弹簧单价", mx.hard_around_springid);
|
|
|
|
|
|
+ var springHard = GetSpringPrice(bednet.pricelistid.Value, "加硬弹簧单价", mx.hard_around_springid, 0, "加硬");
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
var rp_formula = "";
|
|
var rp_formula = "";
|
|
- mx.hard_around_mtrl_cost = Calculate(mx.hard_around_mtrl_cost_replace_formula, out rp_formula, "四周加硬材料成本").DecimalValue;
|
|
|
|
|
|
+ var mx_formula = mx.hard_around_mtrl_cost_replace_formula.Replace("【弹簧重/个】", "【加硬弹簧重/个】").Replace("【弹簧重】", "【加硬弹簧重】");
|
|
|
|
+ mx.hard_around_mtrl_cost = Calculate(mx_formula, out rp_formula, "四周加硬材料成本").DecimalValue;
|
|
mx.hard_around_mtrl_cost_replace_formula = rp_formula;
|
|
mx.hard_around_mtrl_cost_replace_formula = rp_formula;
|
|
|
|
|
|
#region 获取损耗率,计算
|
|
#region 获取损耗率,计算
|
|
@@ -907,10 +909,12 @@ namespace JLHHJSvr.Helper
|
|
if (!string.IsNullOrEmpty(bednet.hard_around_weight_formula) && mx.if_hard_around > 0)
|
|
if (!string.IsNullOrEmpty(bednet.hard_around_weight_formula) && mx.if_hard_around > 0)
|
|
{
|
|
{
|
|
bednet.hard_around_weight_replace_formula = bednet.hard_around_weight_formula;
|
|
bednet.hard_around_weight_replace_formula = bednet.hard_around_weight_formula;
|
|
|
|
+
|
|
|
|
+ bednet.hard_around_weight_replace_formula = bednet.hard_around_weight_replace_formula.Replace("【弹簧重/个】", "【加硬弹簧重/个】").Replace("【弹簧重】", "【加硬弹簧重】");
|
|
|
|
|
|
bednet.hard_around_weight_qty += Calculate(bednet.hard_around_weight_replace_formula, "四周加硬重量").DecimalValue;
|
|
bednet.hard_around_weight_qty += Calculate(bednet.hard_around_weight_replace_formula, "四周加硬重量").DecimalValue;
|
|
AddKeyValue("四周加硬重量", bednet.hard_around_weight_qty);
|
|
AddKeyValue("四周加硬重量", bednet.hard_around_weight_qty);
|
|
- AddFormulaWeightKeyValue("【四周加硬重量】", bednet.hard_around_weight_formula);
|
|
|
|
|
|
+ AddFormulaWeightKeyValue("【四周加硬重量】", bednet.hard_around_weight_formula.Replace("【弹簧重/个】", "【加硬弹簧重/个】").Replace("【弹簧重】", "【加硬弹簧重】"));
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
@@ -1581,12 +1585,14 @@ namespace JLHHJSvr.Helper
|
|
#endregion 计算 下垫层 结束
|
|
#endregion 计算 下垫层 结束
|
|
}
|
|
}
|
|
|
|
|
|
- private u_spring GetSpringPrice(int pricelistid, string KeyName, int? springId, decimal line_diameter = 0)
|
|
|
|
|
|
+ private u_spring GetSpringPrice(int pricelistid, string KeyName, int? springId, decimal line_diameter = 0, string springName = "")
|
|
{
|
|
{
|
|
var spring = new u_spring() { springid = springId };
|
|
var spring = new u_spring() { springid = springId };
|
|
if (line_diameter == 0)
|
|
if (line_diameter == 0)
|
|
{
|
|
{
|
|
- DbSqlHelper.SelectOne(cmd, spring, "line_diameter,gram_weight,height,center_diameter");
|
|
|
|
|
|
+ DbSqlHelper.SelectOne(cmd, spring, "line_diameter,gram_weight,height,center_diameter");
|
|
|
|
+ AddKeyValue(springName + "弹簧重/个", spring.gram_weight / 1000);
|
|
|
|
+ AddKeyValue(springName + "弹簧重", spring.gram_weight / 1000);
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|