|
@@ -51,6 +51,7 @@ namespace JLHHJSvr.Excutor
|
|
|
,u_mattress_interface_qd.bj_pzname
|
|
|
,u_mattress_interface_qd.bj_pzname_mx
|
|
|
,u_mattress_interface_qd.bj_pzname_mx_mx
|
|
|
+ ,u_mattress_interface_qd.wip_type
|
|
|
,u_mattress_interface_qd.mtrlid
|
|
|
,u_mattress_interface_qd.erp_mtrlid
|
|
|
,u_mattress_interface_qd.useqty
|
|
@@ -68,7 +69,7 @@ namespace JLHHJSvr.Excutor
|
|
|
,u_mattress_interface_qd.sh_rate
|
|
|
FROM u_mattress_interface_qd
|
|
|
LEFT JOIN u_mtrl_price ON u_mtrl_price.mtrlid = u_mattress_interface_qd.mtrlid";
|
|
|
- var outputFields = "mattressid,printid,itemname,bj_pzname,bj_pzname_mx,bj_pzname_mx_mx,mtrlid,erp_mtrlid,useqty,dscrp,mtrlname,actual_useqty,qd_actual_size,qd_pfgroupqty,wrkgrpid,wrkgrpid2,ss_rate,ls_rate,sh_rate,wrkgrpcode1,wrkgrpcode2";
|
|
|
+ var outputFields = "mattressid,printid,itemname,bj_pzname,bj_pzname_mx,bj_pzname_mx_mx,wip_type,mtrlid,erp_mtrlid,useqty,dscrp,mtrlname,actual_useqty,qd_actual_size,qd_pfgroupqty,wrkgrpid,wrkgrpid2,ss_rate,ls_rate,sh_rate,wrkgrpcode1,wrkgrpcode2";
|
|
|
DbSqlHelper.SelectJoin(cmd, selectStr, "mattressid = @mattressid", new Dictionary<string, object>() { { "@mattressid", mattressid } }, "printid", outputFields, 0, 0, mattress_interface_qd_list);
|
|
|
|
|
|
|
|
@@ -99,22 +100,12 @@ namespace JLHHJSvr.Excutor
|
|
|
prdPfs = new List<u_PrdPF>()
|
|
|
};
|
|
|
|
|
|
- // 自动归类半成品-20250604
|
|
|
- var qdMxClass = new Dictionary<string, string[]>
|
|
|
- {
|
|
|
- { "裥面", new string[] {"补充物料-裥棉面线"} },
|
|
|
- { "裥底", new string[] {"补充物料-裥棉底线" } },
|
|
|
- { "大侧", new string[] {"拉手刺绣及其他工艺-拉手刺绣", "拉手刺绣及其他工艺-拉手无纺布", "拉手刺绣及其他工艺-侧刺绣做法", "辅料-打印小标1", "辅料-打印小标2", "辅料-打印小标3", "辅料-织唛1", "辅料-防火线2", "车位说明-车位说明", "补充物料-车位面线", "补充物料-车位底线" } },
|
|
|
- };
|
|
|
-
|
|
|
var bcpNames = new Dictionary<string, string> { };
|
|
|
- var bcpPfGroup = new Dictionary<string, string> { };
|
|
|
foreach (var mx in mattress_interface_qd_list)
|
|
|
{
|
|
|
- if (!string.IsNullOrEmpty(mx.bj_pzname_mx_mx) && mx.bj_pzname_mx_mx.Contains(" + ") && !bcpNames.ContainsKey(mx.itemname))
|
|
|
+ if (!string.IsNullOrEmpty(mx.wip_type) && !string.IsNullOrEmpty(mx.bj_pzname_mx_mx) && mx.bj_pzname_mx_mx.Contains(" + ") && !bcpNames.ContainsKey(mx.wip_type))
|
|
|
{
|
|
|
- bcpNames.Add(mx.itemname, mx.bj_pzname_mx_mx);
|
|
|
- bcpPfGroup.Add(mx.itemname, mx.itemname + '-' + mx.bj_pzname);
|
|
|
+ bcpNames.Add(mx.wip_type, mx.bj_pzname_mx_mx);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -124,50 +115,23 @@ namespace JLHHJSvr.Excutor
|
|
|
|
|
|
var ls_temp_pfgroup = mx.itemname + '-' + mx.bj_pzname;
|
|
|
var ll_cnt_temp = 0;
|
|
|
-
|
|
|
- var _dscrp = mx.bj_pzname_mx_mx;
|
|
|
- var _pfgroup = ls_temp_pfgroup;
|
|
|
- #region 自动归类半成品
|
|
|
- string searchValue = mx.itemname + "-" + mx.bj_pzname;
|
|
|
- bool found = false;
|
|
|
-
|
|
|
- foreach (var qdMx in qdMxClass)
|
|
|
- {
|
|
|
- foreach (string item in qdMx.Value)
|
|
|
- {
|
|
|
- if (item == searchValue)
|
|
|
- {
|
|
|
- found = true;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (found)
|
|
|
- {
|
|
|
- var dscrpStr = bcpNames[qdMx.Key];
|
|
|
- var pfgroupStr = bcpPfGroup[qdMx.Key];
|
|
|
-
|
|
|
- if (!string.IsNullOrEmpty(dscrpStr))
|
|
|
- {
|
|
|
- _dscrp = dscrpStr;
|
|
|
- _pfgroup = pfgroupStr;
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
for (var j = 0; j < i - 1; j++)
|
|
|
{
|
|
|
- if (_pfgroup == mattress_interface_qd_list[j].itemname + '-' + mattress_interface_qd_list[j].bj_pzname)
|
|
|
+ if (ls_temp_pfgroup == mattress_interface_qd_list[j].itemname + '-' + mattress_interface_qd_list[j].bj_pzname)
|
|
|
{
|
|
|
ll_cnt_temp++;
|
|
|
}
|
|
|
}
|
|
|
if (ll_cnt_temp > 0)
|
|
|
{
|
|
|
- _pfgroup = ls_temp_pfgroup + (ll_cnt_temp).ToString();
|
|
|
+ ls_temp_pfgroup = ls_temp_pfgroup + (ll_cnt_temp).ToString();
|
|
|
+ }
|
|
|
+
|
|
|
+ var _dscrp = mx.bj_pzname_mx_mx;
|
|
|
+ if (!string.IsNullOrEmpty(mx.wip_type) && !string.IsNullOrEmpty(bcpNames[mx.wip_type]))
|
|
|
+ {
|
|
|
+ _dscrp = bcpNames[mx.wip_type];
|
|
|
}
|
|
|
- #endregion
|
|
|
|
|
|
string ls_azcode = i.ToString("D3");
|
|
|
|
|
@@ -175,7 +139,7 @@ namespace JLHHJSvr.Excutor
|
|
|
{
|
|
|
mtrlid = mattress.erp_mtrlid.Value,
|
|
|
pfcode = pfcode,
|
|
|
- pfgroup = _pfgroup,
|
|
|
+ pfgroup = ls_temp_pfgroup,
|
|
|
SonMtrlid = mx.erp_mtrlid,
|
|
|
wrkgrpid = mx.wrkgrpid,
|
|
|
wrkgrpcode1 = mx.wrkgrpcode1,
|
|
@@ -190,6 +154,7 @@ namespace JLHHJSvr.Excutor
|
|
|
promode = mx.ss_rate.ToString(),
|
|
|
SonLoss = mx.sh_rate,
|
|
|
SonDECLosS = 0,
|
|
|
+ wip_type = mx.wip_type
|
|
|
};
|
|
|
l1Req.prdPfs.Add(prdpf);
|
|
|
i++;
|