chenhaozhe
2026-03-11 7cc9010c7656af5da6321b62699efbe5b8e503e0
WebAPI/Controllers/Æ·ÖʹÜÀí/Ѳ¼ìµ¥/QC_PatrolProcCheckOtherBillController.cs
@@ -173,7 +173,22 @@
            var _value = sMainSub["sMainSub"].ToString();
            string msg1 = _value.ToString();
            //保存单据
            return objJsonResult = AddBillMain(msg1);
            objJsonResult = AddBillMain(msg1);
            JObject resultJObj = JObject.FromObject(objJsonResult);
            if (oSystemParameter.ShowBill(ref DBUtility.ClsPub.sErrInfo))
            {
                if (oSystemParameter.omodel.WMS_CampanyName == "华舟")
                {
                    resultJObj["NotShowTips"] = true;
                }
                else
                {
                    resultJObj["NotShowTips"] = false;
                }
            }
            return resultJObj;
        }
        public json AddBillMain(string msg1)
@@ -246,8 +261,38 @@
                BillNew.omodel.HTakeSampleCheckBillID = ClsPub.isLong(mainList[0].HTakeSampleCheckBillID);
                BillNew.omodel.HTakeSampleCheckBillNo = ClsPub.isStrNull(mainList[0].HTakeSampleCheckBillNo);
                BillNew.omodel.HCheckQty = ClsPub.isLong(mainList[0].HCheckQty);
                oSystemParameter.ShowBill(ref DBUtility.ClsPub.sErrInfo);
                if (oSystemParameter.omodel.QC_PatrolProcCheckOtherBill_FirstCheckCtl == "Y")
                {
                    // åˆ¤æ–­æ˜¯å¦å…è®¸ æœªé¦–检合格前巡检
                    DataSet ds = oCN.RunProcReturn($@"select top 1 * from QC_FirstPieceCheckBillMain
                            where HMainSourceBillType = '{BillNew.omodel.HMainSourceBillType}' and HMainSourceBillNo = '{BillNew.omodel.HMainSourceBillNo}'
                    order by HDate desc", "QC_FirstPieceCheckBillMain");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "检验首件检验失败,该单据没有做对印的首检单";
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HLastResult"].ToString() == "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "首件检失败,首件检检验结果为不合格,不允许下推单据";
                        return objJsonResult;
                    }
                }
                List<Model.ClsQC_PatrolProcCheckOtherBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_PatrolProcCheckOtherBillSub>>(msg3);
                BillNew.DetailColl = new List<Model.ClsQC_PatrolProcCheckOtherBillSub>();
                for (int i = 0; i < subList.ToArray().Length; i++)
                {
                    if (i >= 0)//HQty
@@ -356,7 +401,8 @@
                                LogService.Write("执行消息推送..." + HInterID);
                                // è§¦å‘消息推送
                                new Sc_MESTransFerWorkBillController().AuditOA_WorkLinkBill(HInterID, 0, user);
                                Service.GeTuiService.PubishSingle(HInterID);
                            }
                        }
                    }