chen_yjin 4 tygodni temu
rodzic
commit
6d821709e7

+ 1 - 0
JLHHJSvr/Com/Model/erp_prdpf.cs

@@ -75,6 +75,7 @@ namespace JLHHJSvr.Com.Model
         /// 核价清单2的领料工组
         /// </summary>
         public string wrkgrpcode2 { get; set; }
+        public string wip_name { get; set; }
         public string wip_type { get; set; }
         #endregion
     }

+ 19 - 11
JLHHJSvr/Excutor/CreatPrdPfExcutor.cs

@@ -104,23 +104,25 @@ namespace JLHHJSvr.Excutor
                     };
 
                     var bcpNames = new Dictionary<string, string> { };
+                    var bcpDscrp = new Dictionary<string, string> { };
                     foreach (var mx in mattress_interface_qd_list)
                     {
                         if (!string.IsNullOrEmpty(mx.wip_type) && !string.IsNullOrEmpty(mx.bj_pzname_mx_mx) && mx.bj_pzname_mx_mx.Contains(" + ") && !bcpNames.ContainsKey(mx.wip_type))
                         {
-                            var _dscrp = mx.bj_pzname_mx_mx;
-                            var interfaceL = interfaceList.Where(o => _dscrp == o.bj_namemx).ToList();
+                            var _name = mx.bj_pzname_mx_mx;
+                            var interfaceL = interfaceList.Where(o => _name == o.bj_namemx).ToList();
                             if (interfaceL.Count > 0)
                             {
-                                _dscrp = interfaceL[0].bj_namemx;
-                                if (!string.IsNullOrEmpty(interfaceL[0].actual_size)) _dscrp += " + " + interfaceL[0].actual_size;
-                                if (!string.IsNullOrEmpty(interfaceL[0].sb_craft)) _dscrp += " + " + interfaceL[0].sb_craft;
-                                if (!string.IsNullOrEmpty(interfaceL[0].actual_size_sb)) _dscrp += " + " + interfaceL[0].actual_size_sb;
-                                if (interfaceL[0].ss_rate != null && interfaceL[0].ss_rate > 0) _dscrp += " + " + interfaceL[0].ss_rate;
-                                if (interfaceL[0].ls_rate != null && interfaceL[0].ls_rate > 0) _dscrp += " + " + interfaceL[0].ls_rate;
+                                _name = interfaceL[0].bj_namemx;
+                                if (!string.IsNullOrEmpty(interfaceL[0].actual_size)) _name += " + " + interfaceL[0].actual_size;
+                                if (!string.IsNullOrEmpty(interfaceL[0].sb_craft)) _name += " + " + interfaceL[0].sb_craft;
+                                if (!string.IsNullOrEmpty(interfaceL[0].actual_size_sb)) _name += " + " + interfaceL[0].actual_size_sb;
+                                if (interfaceL[0].ss_rate != null && interfaceL[0].ss_rate > 0) _name += " + " + interfaceL[0].ss_rate;
+                                if (interfaceL[0].ls_rate != null && interfaceL[0].ls_rate > 0) _name += " + " + interfaceL[0].ls_rate;
                             }
 
-                            bcpNames.Add(mx.wip_type, _dscrp);
+                            bcpNames.Add(mx.wip_type, _name);
+                            bcpDscrp.Add(mx.wip_type, mx.bj_pzname_mx_mx);
                         }
                     }
 
@@ -142,10 +144,15 @@ namespace JLHHJSvr.Excutor
                             ls_temp_pfgroup = ls_temp_pfgroup + (ll_cnt_temp).ToString();
                         }
 
-                        var _dscrp = mx.bj_pzname_mx_mx;
+                        var _name = mx.bj_pzname_mx_mx;
                         if (!string.IsNullOrEmpty(mx.wip_type) && !string.IsNullOrEmpty(bcpNames[mx.wip_type]))
                         {
-                            _dscrp = bcpNames[mx.wip_type];
+                            _name = bcpNames[mx.wip_type];
+                        }
+                        var _dscrp = mx.bj_pzname_mx_mx;
+                        if (!string.IsNullOrEmpty(mx.wip_type) && !string.IsNullOrEmpty(bcpDscrp[mx.wip_type]))
+                        {
+                            _dscrp = bcpDscrp[mx.wip_type];
                         }
 
                         string ls_azcode = i.ToString("D3");
@@ -169,6 +176,7 @@ namespace JLHHJSvr.Excutor
                             promode = mx.ss_rate.ToString(),
                             SonLoss = mx.sh_rate,
                             SonDECLosS = 0,
+                            wip_name = _name,
                             wip_type = mx.wip_type
                         };
                         l1Req.prdPfs.Add(prdpf);