|
@@ -3059,9 +3059,28 @@ namespace JLHHJSvr.Helper
|
|
|
_child.mattress_length = child.mattress_length;
|
|
|
_child.mattress_height = child.mattress_height;
|
|
|
_child.DynamicFields = child.DynamicFields;
|
|
|
- _child.mxList = GetMattressMxMtrl(child.mattressid);
|
|
|
- _child.extraList = GetMattressMxExtra(child.mattressid, 1);
|
|
|
- _child.extraCostList = GetMattressMxExtra(child.mattressid, 2);
|
|
|
+ _child.mxList = mattress.mxList?.Select(mx =>
|
|
|
+ {
|
|
|
+ var mxClone = ObjectHelper.DeepCopy(mx);
|
|
|
+ mxClone.mattressid = 0;
|
|
|
+ mxClone.mattressmxid = 0;
|
|
|
+ return mxClone;
|
|
|
+ }).ToList();
|
|
|
+ _child.extraList = mattress.extraList?.Select(mx =>
|
|
|
+ {
|
|
|
+ var mxClone = ObjectHelper.DeepCopy(mx);
|
|
|
+ mxClone.mattressid = 0;
|
|
|
+ mxClone.mattressmxid = 0;
|
|
|
+ return mxClone;
|
|
|
+ }).ToList();
|
|
|
+ _child.extraCostList = mattress.extraCostList?.Select(mx =>
|
|
|
+ {
|
|
|
+ var mxClone = ObjectHelper.DeepCopy(mx);
|
|
|
+ mxClone.mattressid = 0;
|
|
|
+ mxClone.mattressmxid = 0;
|
|
|
+ return mxClone;
|
|
|
+ }).ToList();
|
|
|
+
|
|
|
subspecsList.Add(_child);
|
|
|
}
|
|
|
|
|
@@ -3104,8 +3123,20 @@ namespace JLHHJSvr.Helper
|
|
|
mxClone.mattressmxid = 0;
|
|
|
return mxClone;
|
|
|
}).ToList();
|
|
|
- clone.extraList = new List<u_mattress_mx_extra>();
|
|
|
- clone.extraCostList = new List<u_mattress_mx_extra>();
|
|
|
+ clone.extraList = parent.extraList?.Select(mx =>
|
|
|
+ {
|
|
|
+ var mxClone = ObjectHelper.DeepCopy(mx);
|
|
|
+ mxClone.mattressid = 0;
|
|
|
+ mxClone.mattressmxid = 0;
|
|
|
+ return mxClone;
|
|
|
+ }).ToList();
|
|
|
+ clone.extraCostList = parent.extraCostList?.Select(mx =>
|
|
|
+ {
|
|
|
+ var mxClone = ObjectHelper.DeepCopy(mx);
|
|
|
+ mxClone.mattressid = 0;
|
|
|
+ mxClone.mattressmxid = 0;
|
|
|
+ return mxClone;
|
|
|
+ }).ToList();
|
|
|
|
|
|
return clone;
|
|
|
}
|