chenhaozhe
9 天以前 ad877b5a14f90dca73adc74a45e2eac447622b84
WebAPI/Controllers/Æ·ÖʹÜÀí/Ѳ¼ìµ¥/QC_PatrolProcCheckOtherBillController.cs
@@ -261,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