|
@@ -131,7 +131,7 @@ namespace JLHHJSvr.Helper
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public List<u_mattress_interface> GetMattressInterfaceList(int mattressid)
|
|
|
+ public List<u_mattress_interface> GetMattressInterfaceList(int mattressid, int? configuretype)
|
|
|
{
|
|
|
var interfaceList = new List<u_mattress_interface>();
|
|
|
var selectStr = @"SELECT mattressid
|
|
@@ -151,10 +151,12 @@ namespace JLHHJSvr.Helper
|
|
|
|
|
|
if(interfaceList.Count <= 0)
|
|
|
{
|
|
|
- interfaceList = RefreshMattressInterfaceList(mattressid);
|
|
|
+ interfaceList = RefreshMattressInterfaceList(mattressid, configuretype);
|
|
|
+ } else
|
|
|
+ {
|
|
|
+ MattressInterfaceFindERPPz(mattressid, interfaceList);
|
|
|
}
|
|
|
|
|
|
- MattressInterfaceFindERPPz(mattressid, interfaceList);
|
|
|
|
|
|
return interfaceList;
|
|
|
}
|
|
@@ -203,14 +205,14 @@ namespace JLHHJSvr.Helper
|
|
|
/// </summary>
|
|
|
/// <param name="mattressid"></param>
|
|
|
/// <returns></returns>
|
|
|
- public List<u_mattress_interface> RefreshMattressInterfaceList(int mattressid)
|
|
|
+ public List<u_mattress_interface> RefreshMattressInterfaceList(int mattressid, int? configcodetype = 0)
|
|
|
{
|
|
|
var interfaceList = new List<u_mattress_interface>();
|
|
|
|
|
|
// 导入配置
|
|
|
ImportMattressInterfaceList(mattressid, interfaceList);
|
|
|
|
|
|
- MattressInterfaceFindERPPz(mattressid, interfaceList);
|
|
|
+ MattressInterfaceFindERPPz(mattressid, interfaceList, configcodetype);
|
|
|
|
|
|
return interfaceList;
|
|
|
}
|
|
@@ -318,11 +320,16 @@ namespace JLHHJSvr.Helper
|
|
|
}
|
|
|
#endregion
|
|
|
}
|
|
|
- public void MattressInterfaceFindERPPz(int mattressid, List<u_mattress_interface> interfaceList)
|
|
|
+ public void MattressInterfaceFindERPPz(int mattressid, List<u_mattress_interface> interfaceList, int? configcodetype = 0)
|
|
|
{
|
|
|
var mattress = new u_mattress() { mattressid = mattressid };
|
|
|
DbSqlHelper.SelectOne(cmd, mattress, "erp_configcodetype");
|
|
|
|
|
|
+ if (configcodetype != 0)
|
|
|
+ {
|
|
|
+ mattress.erp_configcodetype = configcodetype;
|
|
|
+ }
|
|
|
+
|
|
|
MattressInterfaceFindERPPz(mattress, interfaceList);
|
|
|
}
|
|
|
public void MattressInterfaceFindERPPz(u_mattress mattress,List<u_mattress_interface> interfaceList)
|
|
@@ -930,6 +937,7 @@ namespace JLHHJSvr.Helper
|
|
|
var extraSet = new HashSet<string>(new string[] { "采购小标", "打印小标", "合格证", "吊标", "斜标", "正标", "织唛", "织唛斜标", "客供标" });
|
|
|
var specialSet = new HashSet<string>(new string[] { "打钮钮扣", "气钮" });
|
|
|
|
|
|
+ var index = 0;
|
|
|
foreach (var mx in fuliaoList)
|
|
|
{
|
|
|
if (mx.mtrlid > 0)
|
|
@@ -948,20 +956,22 @@ namespace JLHHJSvr.Helper
|
|
|
{
|
|
|
for (int i = 1; i <= cnt; i++)
|
|
|
{
|
|
|
+ index++;
|
|
|
// 添加辅料接口
|
|
|
- interfaceList.Add(InserMattressInterfacePz("辅料", $"{mx.mtrlname}{i}", 1, new string[] { "" }));
|
|
|
+ interfaceList.Add(InserMattressInterfacePz("辅料", $"{mx.mtrlname}{index}", 1, new string[] { "" }));
|
|
|
// 如果是额外的辅料,添加位置接口
|
|
|
if (extraSet.Contains(mx.mtrlname))
|
|
|
{
|
|
|
- interfaceList.Add(InserMattressInterfacePz("辅料", $"{mx.mtrlname}{i}位置", 0, new string[] { "" }));
|
|
|
+ interfaceList.Add(InserMattressInterfacePz("辅料", $"{mx.mtrlname}{index}位置", 0, new string[] { "" }));
|
|
|
}
|
|
|
}
|
|
|
}else if(mx.formulakind == 15 && !nameSet.Contains(mx.mtrlname))
|
|
|
{
|
|
|
for (int i = 1; i <= cnt; i++)
|
|
|
{
|
|
|
- interfaceList.Add(InserMattressInterfacePz("辅料", $"{mx.mtrlname}{i}", 1, new string[] { "" }));
|
|
|
- interfaceList.Add(InserMattressInterfacePz("辅料", $"{mx.mtrlname}{i}位置", 0, new string[] { "" }));
|
|
|
+ index++;
|
|
|
+ interfaceList.Add(InserMattressInterfacePz("辅料", $"{mx.mtrlname}{index}", 1, new string[] { "" }));
|
|
|
+ interfaceList.Add(InserMattressInterfacePz("辅料", $"{mx.mtrlname}{index}位置", 0, new string[] { "" }));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -989,11 +999,11 @@ namespace JLHHJSvr.Helper
|
|
|
|
|
|
var countDict = new Dictionary<int, int>
|
|
|
{
|
|
|
- {16, 0}
|
|
|
+ {16, 1}
|
|
|
};
|
|
|
|
|
|
// 外观
|
|
|
- interfaceList.Add(InserMattressInterfacePz("包装", "包装方式", 1, new string[] { Enum.GetName(typeof(PackType), mattress.packtype) }));
|
|
|
+ interfaceList.Add(InserMattressInterfacePz("床垫", "包装方式", 1, new string[] { Enum.GetName(typeof(PackType), mattress.packtype) }));
|
|
|
|
|
|
foreach (var mx in bzList)
|
|
|
{
|
|
@@ -1043,6 +1053,7 @@ namespace JLHHJSvr.Helper
|
|
|
{"底裥绵",new string[] { "内布套-底层裥棉", "内布套-底层裥棉裥棉图案" } },
|
|
|
{"普通大侧",new string[] { "内布套-大侧裥棉", "内布套-大侧裥棉裥棉图案" } }
|
|
|
};
|
|
|
+ var mianList = new string[2] { "面裥绵", "底裥绵" };
|
|
|
|
|
|
foreach (var item in powerDict)
|
|
|
{
|
|
@@ -1058,7 +1069,7 @@ namespace JLHHJSvr.Helper
|
|
|
sb.Append(name2);
|
|
|
}
|
|
|
|
|
|
- if (sb.Length > 0)
|
|
|
+ if (sb.Length > 0 || mianList.Contains(item.Key))
|
|
|
{
|
|
|
interfaceList.Add(InserMattressInterfacePz("内布套", chastrDict[item.Key][0], 2, name_arr));
|
|
|
interfaceList.Add(InserMattressInterfacePz("内布套", chastrDict[item.Key][1], 1, new string[] { "" }));
|
|
@@ -1078,10 +1089,12 @@ namespace JLHHJSvr.Helper
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ var butaostring = new string[] { };
|
|
|
if (mattress.if_n_butao == 1)
|
|
|
{
|
|
|
- interfaceList.Add(InserMattressInterfacePz("内布套", "内布套做法说明", 1, new string[] { $"内布套面层向大侧覆盖{mattress.s_cover_qty.Value.ToString("#,##0.0#")}CM、内布套大侧向底层覆盖{mattress.z_cover_qty.Value.ToString("#,##0.0#")}CM、内布套底层向大侧覆盖{mattress.x_cover_qty.Value.ToString("#,##0.0#")}CM" }));
|
|
|
+ butaostring = new string[] { $"内布套面层向大侧覆盖{mattress.s_cover_qty.Value.ToString("#,##0.0#")}CM、内布套大侧向底层覆盖{mattress.z_cover_qty.Value.ToString("#,##0.0#")}CM、内布套底层向大侧覆盖{mattress.x_cover_qty.Value.ToString("#,##0.0#")}CM" };
|
|
|
}
|
|
|
+ interfaceList.Add(InserMattressInterfacePz("内布套", "内布套做法说明", 1, butaostring));
|
|
|
}
|
|
|
#endregion
|
|
|
|