zrg
6 天以前 8065474885065d2ac85096c4ffbe59436939be40
WebAPI/Controllers/Æ·ÖʹÜÀí/Ѳ¼ìµ¥/QC_PatrolProcCheckOtherBillController.cs
@@ -261,32 +261,7 @@
                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>();
@@ -359,7 +334,7 @@
                {
                    string sAutoCheck = oSystemParameter.GetSingleSystemParameter("QC_ProcessCheckBill_AutoCheck", ref DBUtility.ClsPub.sExeReturnInfo);
                    objJsonResult.Verify = sAutoCheck;
                    bResult = BillNew.AddBill(ref ClsPub.sExeReturnInfo);
                    bResult = BillNew.AddBill(ref ClsPub.sExeReturnInfo);
                }
                else
                {
@@ -393,7 +368,7 @@
                        if (oSystemParameter.omodel.WMS_CampanyName == "华舟")
                        {
                            //自动生成工作联系单
                            var ds2 = oCN.RunProcReturn("exec h_p_OA_WorkLinkBill_Create " + BillOld.omodel.HInterID + "," + 7507, "h_p_OA_WorkLinkBill_Create");
                            var ds2 = oCN.RunProcReturn("exec h_p_OA_WorkLinkBill_Create " + BillNew.omodel.HInterID + "," + 7507, "h_p_OA_WorkLinkBill_Create");
                            if (ds2 != null && ds2.Tables[0].Rows.Count > 0)
                            {