YL
2021-09-03 e6392974c2936259b330aa0dfe277751b4e23896
WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs
File was renamed from WebAPI/Controllers/Éú²ú¹ÜÀí/Sc_MESBeginWorkBillController.cs
@@ -1079,6 +1079,29 @@
            ListModels oListModels = new ListModels();
            try
            {
                //系统参数 ç”Ÿæˆç”Ÿäº§æ±‡æŠ¥å•前判断是否首检
                //string sReturn = "";
                //if (oSystemParameter.ShowBill(ref sReturn) == true)
                //{
                //    if (oSystemParameter.omodel.Sc_ICMOReportBill_FirstCheckOut == "Y") //系统参数   å¿…须首件检验通过才能保存单据
                //    {
                //        //系统参数审核,则根据生产订单号,关联首检检验单中源单号查找检验单数据,判断单据状态是否合格
                //        ds = oCN.RunProcReturn("select *   from QC_FirstPieceCheckBillMain where HICMOInterID='" + HICMOInterID + "' and HICMOEntryID='" + HICMOEntryID + "'", "QC_FirstPieceCheckBillMain");
                //        if (ds.Tables[0].Rows.Count > 0) //有首检检验单
                //        {
                //            int rows = ds.Tables[0].AsEnumerable().Where(item => item["HLastResult"].ToString().Equals("True")).Count(); //判断当前数据(一条或多条)中最终判定是否有合格
                //            if (rows <= 0)
                //            {
                //                objJsonResult.code = "0";
                //                objJsonResult.count = 0;
                //                objJsonResult.Message = "当前工单首检检验判定不合格,无法生成汇报单!";
                //                objJsonResult.data = null;
                //                return objJsonResult;
                //            }
                //        }
                //    }
                //}
                string sHSourceType = HSourceBillType;
                string  BillType = "3711";  //单据类型 (生产汇报单)
                //得到mainid