WebAPI/Controllers/Æ·ÖʹÜÀí/¹¤Ðò¼ìÑéµ¥/QC_ProcessCheckBillController.cs
@@ -744,18 +744,55 @@
        {
            try
            {
                if (HInterID == 0 || HBillType.Equals(""))
                List<object> columnNameList = new List<object>();
                string sReturn = "";
                string sql = "";
                if (oSystemParameter.ShowBill(ref sReturn))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "参数不全,获取源单信息失败!HInterID:" + HInterID + ";HEntryID:" + HEntryID + ";HBillType:" + HBillType + ";";
                    objJsonResult.data = null;
                    return objJsonResult;
                    switch (oSystemParameter.omodel.QC_ProcessCheckBill_QCSchemeSource)
                    {
                        case "工序":
                            sql = "exec h_p_QC_GetInfoByICMOStatusBill " + "'工序'," + HInterID + "," + HEntryID + "," + HBillType;
                            break;
                        case "物料":
                            sql = "exec h_p_QC_GetInfoByICMOStatusBill " + "'物料'," + HInterID  + "," + HEntryID + "," + HBillType;
                            break;
                        case "工艺路线":
                            sql = "exec h_p_QC_GetInfoByICMOStatusBill " + "'工艺路线'," + HInterID + "," + HEntryID + "," + HBillType;
                            break;
                    }
                }
                ds = oCN.RunProcReturn(sql, "h_p_QC_GetInfoByICMOStatusBill");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                }
                else
                {
                    ds = oCN.RunProcReturn("exec h_p_QC_GetInfoByICMOStatusBill " + HInterID + "," + HEntryID + "," + HBillType, "h_p_QC_GetInfoByICMOStatusBill");
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                    }
                }
                //if (HInterID == 0 || HBillType.Equals(""))
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "参数不全,获取源单信息失败!HInterID:" + HInterID + ";HEntryID:" + HEntryID + ";HBillType:" + HBillType + ";";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                //else
                //{
                //    ds = oCN.RunProcReturn("exec h_p_QC_GetInfoByICMOStatusBill " + HInterID + "," + HEntryID + "," + HBillType, "h_p_QC_GetInfoByICMOStatusBill");
                //}
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
@@ -770,6 +807,7 @@
                    objJsonResult.count = 1;
                    objJsonResult.Message = "返回记录成功!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }