chenhaozhe
2026-02-27 82e5ca26ff07346e93e704852bfe7e80f8ba0f84
WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs
@@ -767,11 +767,11 @@
            try
            {
                DLL.ClsSc_MESBeginWorkBill oBill = new DLL.ClsSc_MESBeginWorkBill();
                List<Models.ClsSc_MESBeginWorkBillMain> lsmain = new List<Models.ClsSc_MESBeginWorkBillMain>();
                List<ClsSc_MESBeginWorkBillMain> lsmain = new List<ClsSc_MESBeginWorkBillMain>();
                msg2 = msg2.Replace("\\", "");
                msg2 = msg2.Replace("\n", "");  //\n
                lsmain = oListModels.getObjectByJson_Gy_MESBeginWorkFrom(msg2);
                foreach (Models.ClsSc_MESBeginWorkBillMain oItem in lsmain)
                foreach (ClsSc_MESBeginWorkBillMain oItem in lsmain)
                {
                    if (refSav == "Add")
                    {
@@ -856,10 +856,10 @@
                msg3 = msg3.Substring(1, msg3.Length - 2);
                msg3 = msg3.Replace("\\", "");
                msg3 = msg3.Replace("\n", "");  //\n
                List<Models.ClsSc_MESBeginWorkBillSub_RelationBill> ls = new List<Models.ClsSc_MESBeginWorkBillSub_RelationBill>();
                List<ClsSc_MESBeginWorkBillSub_RelationBill> ls = new List<ClsSc_MESBeginWorkBillSub_RelationBill>();
                ls = oListModels.getObjectByJson_Sc_MESBeginWorkBillSub_RelationBill(msg3);
                int i = 0;
                foreach (Models.ClsSc_MESBeginWorkBillSub_RelationBill oItemSub in ls)
                foreach (ClsSc_MESBeginWorkBillSub_RelationBill oItemSub in ls)
                {
                    i++;
                    oItemSub.HEntryID = i;
@@ -1038,14 +1038,14 @@
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "工单暂未处理,可以操作!";
                    objJsonResult.Message = "工单已处理,不允许操作!";
                    objJsonResult.data = null;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "工单已处理,不允许操作!";
                    objJsonResult.Message = "工单未处理,允许操作!";
                    objJsonResult.data = null;
                }
@@ -1710,6 +1710,7 @@
                }
                oCN.BeginTran();
                DataSet ds2 = null;
                //保存
                //保存完毕后处理
                bool bResult = false;
@@ -1745,8 +1746,29 @@
                    }
                }
                string sReturn = "";
                if (oSystemParameter.ShowBill(ref sReturn) == true)
                {
                    if (oSystemParameter.omodel.WMS_CampanyName == "华舟")
                    {
                        LogService.Write("自动生成工作联系单...");
                        //自动生成工作联系单
                        ds2 = oCN.RunProcReturn("exec h_p_OA_WorkLinkBill_Create " + ds.Tables[0].Rows[0]["HInterID"].ToString() + "," + 3772, "h_p_OA_WorkLinkBill_Create");
                    }
                }
                oCN.Commit();
                if (ds2 != null && ds2.Tables[0].Rows.Count > 0)
                {
                    int HInterID = int.Parse(ds2.Tables[0].Rows[0]["NewHInterID"].ToString());
                    LogService.Write("执行消息推送..." + HInterID);
                    // 触发消息推送
                    Service.GeTuiService.PubishSingle(HInterID);
                }
                if (bResult)
                {