YL
2021-09-03 e6392974c2936259b330aa0dfe277751b4e23896
nothing
3个文件已修改
52 ■■■■ 已修改文件
Pub_Class/CustomerCls/ClsXt_SystemParameter.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Class/CustomerCls/ClsXt_SystemParameter.cs
@@ -634,9 +634,9 @@
                        omodel.MES_StationOutBill_QtyCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
                    }
                    //出战单判断本道工序是否做首件检验 
                    if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "MES_StationOutBill_ProcessCheckCtl")
                    if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "MES_StationOutBill_FirstCheckOut")
                    {
                        omodel.MES_StationOutBill_ProcessCheckCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
                        omodel.MES_StationOutBill_FirstCheckOut = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
                    }
                    //=====不良评审单
Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs
@@ -169,9 +169,11 @@
        public string MES_StationInBill_QtyCtl;                 //进站数量不能大于上道出站汇总合格数
        public string MES_StationInBill_OneCtl;                 //一张流转卡只允许一次进站
        public string MES_StationInBill_FirstCheckOut;          //必须首件检验通过才能保存单据
        public string MES_StationInBill_ProcessCheckCtl;        //进站单当前工序的上道工序是否做工序检验
        //出站单
        public string MES_StationOutBill_QtyCtl;                //出站数量不能大于本道进站汇总数
        public string MES_StationOutBill_ProcessCheckOut;          //必须工序检验通过才能保存单据
        public string MES_StationOutBill_FirstCheckOut;       //出战单判断本道工序是否做首件检验
        //不良品评审单
        public string QC_NoPassProdCheckBill_QtyCtl;            //不良品数不能大于出站单报废数量
        //委外发出 
WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs
@@ -1079,29 +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 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