|
@@ -994,12 +994,14 @@ namespace JLHHJSvr.Helper
|
|
|
|
|
|
// 计算拼侧数量
|
|
// 计算拼侧数量
|
|
int pinceCnt = costAmounts.Values.Count(value => value > 0);
|
|
int pinceCnt = costAmounts.Values.Count(value => value > 0);
|
|
|
|
+ AddKeyValue("拼侧数量", pinceCnt);
|
|
|
|
|
|
// 判断是否有大侧
|
|
// 判断是否有大侧
|
|
bool hasBigSide = mianliaoList.Any(row => new[] { 7, 8, 9, 10 }.Contains(row.formulakind.Value) && row.mtrlid.Value > 0);
|
|
bool hasBigSide = mianliaoList.Any(row => new[] { 7, 8, 9, 10 }.Contains(row.formulakind.Value) && row.mtrlid.Value > 0);
|
|
|
|
+ AddKeyValue("大侧数量", Convert.ToInt32(hasBigSide));
|
|
|
|
|
|
string field = pinceCnt > 3 || (hasBigSide && (pinceCnt == 2 || pinceCnt == 3)) ? "num_3" : hasBigSide ? "num_1" : pinceCnt == 2 || pinceCnt == 3 ? "num_2" : string.Empty;
|
|
string field = pinceCnt > 3 || (hasBigSide && (pinceCnt == 2 || pinceCnt == 3)) ? "num_3" : hasBigSide ? "num_1" : pinceCnt == 2 || pinceCnt == 3 ? "num_2" : string.Empty;
|
|
-
|
|
|
|
|
|
+
|
|
// 查找点数
|
|
// 查找点数
|
|
mattress.profitrate_point = GetWorkmanshipRate(mattress, field, "工艺点数");
|
|
mattress.profitrate_point = GetWorkmanshipRate(mattress, field, "工艺点数");
|
|
AddKeyValue("工艺点数", mattress.profitrate_point);
|
|
AddKeyValue("工艺点数", mattress.profitrate_point);
|
|
@@ -1034,6 +1036,8 @@ namespace JLHHJSvr.Helper
|
|
|
|
|
|
// 根据款式类型判断查询的字段
|
|
// 根据款式类型判断查询的字段
|
|
string field = butaoJd ? "num_4" : (butaoFz ? "num_5" : "");
|
|
string field = butaoJd ? "num_4" : (butaoFz ? "num_5" : "");
|
|
|
|
+ AddKeyValue("内布套简单款", Convert.ToInt32(butaoJd));
|
|
|
|
+ AddKeyValue("内布套复杂款", Convert.ToInt32(butaoFz));
|
|
|
|
|
|
// 查找点数
|
|
// 查找点数
|
|
//var workmanship = new u_workmanship_add() { deptid = mattress.deptid, mattresstypeid = mattress.mattresstypeid, workmanshipname = field };
|
|
//var workmanship = new u_workmanship_add() { deptid = mattress.deptid, mattresstypeid = mattress.mattresstypeid, workmanshipname = field };
|
|
@@ -1056,6 +1060,7 @@ namespace JLHHJSvr.Helper
|
|
|
|
|
|
// 根据款式类型判断查询的字段
|
|
// 根据款式类型判断查询的字段
|
|
string field = cnt == 1 ? "num_6" : (cnt > 1 ? "num_7" : "");
|
|
string field = cnt == 1 ? "num_6" : (cnt > 1 ? "num_7" : "");
|
|
|
|
+ AddKeyValue("拆装数量", cnt);
|
|
|
|
|
|
// 查找点数
|
|
// 查找点数
|
|
mattress.chaizhuang_point = GetWorkmanshipRate(mattress, field, "拆装点数");
|
|
mattress.chaizhuang_point = GetWorkmanshipRate(mattress, field, "拆装点数");
|
|
@@ -1098,13 +1103,13 @@ namespace JLHHJSvr.Helper
|
|
{
|
|
{
|
|
if (reader.Read())
|
|
if (reader.Read())
|
|
{
|
|
{
|
|
- rate = reader[field] == null ? 0 : Convert.ToDecimal(reader[field]);
|
|
|
|
|
|
+ rate = reader["rate"] == null ? 0 : Convert.ToDecimal(reader["rate"]);
|
|
|
|
|
|
var _formula = Convert.ToString(reader["formula"]);
|
|
var _formula = Convert.ToString(reader["formula"]);
|
|
if (!string.IsNullOrEmpty(_formula))
|
|
if (!string.IsNullOrEmpty(_formula))
|
|
{
|
|
{
|
|
AddKeyValue(label, rate);
|
|
AddKeyValue(label, rate);
|
|
- rate = Calculate(mattress.hrcost_replace_formula, label).DecimalValue;
|
|
|
|
|
|
+ rate = Calculate(_formula, label).DecimalValue;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|