仲国强
2021-09-09 1b2b74209abc2aae0c32d7838e12664dfdbf28a4
WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs
@@ -909,16 +909,17 @@
        [HttpGet]
        public object MESProductAuditProcessReportList(int HSourceID,int HSourceInterID,int HSourceEntryID,string HSourceBillNo, int HICMOInterID,int HICMOEntryID, int HInterID, int IsAudit, string CurUserName)
        {
            string ModRightNameCheck = "Sc_ICMOReportBill_Check";
            string ModRightNameCheck = "MES_ProcExchReport_Check";
            DBUtility.ClsPub.CurUserName = CurUserName;
            try
            {
                string StrMessage = "";
                //审核权限
                if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName))
                if (!WebClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName,ref  StrMessage))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "审核失败!无权限!";
                    objJsonResult.Message = StrMessage;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -1078,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