yxj
2025-11-28 5286b614c84f8f82f81772cdb32c2dc5a0d26e0f
WebAPI/Controllers/Æ·ÖʹÜÀí/¹¤Ðò¼ìÑéµ¥/QC_ProcessCheckBillController.cs
@@ -750,11 +750,7 @@
        }
        #endregion
        /// <summary>
        /// è¿”回工序检验单列表
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        #region è¿”回工序检验单列表
        [Route("QC_ProcessCheckBill/GetProcessCheckBillList")]
        [HttpGet]
        public object GetProcessCheckBillList(string sWhere, string user)
@@ -798,14 +794,10 @@
                return objJsonResult;
            }
        }
        #endregion
        #region å·¥åºæ£€éªŒå•保存
        /// <summary>
        /// æ–°å¢žå•据-保存按钮
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("QC_ProcessCheckBill/set_SaveBill")]
        [HttpPost]
        public object set_SaveBill([FromBody] JObject sMainSub)
@@ -1327,11 +1319,8 @@
        }
        #endregion       
        /// <summary>
        ///返回检验值列表
        /// </summary>
        /// <param name="sWhere"></param>
        /// <returns></returns>
        #region è¿”回检验值列表
        [Route("QC_ValueTable_ProcessCheck/getValueList")]
        [HttpGet]
        public object getValueList(Int64 HInterID, Int64 HEntryID, string user)
@@ -1371,7 +1360,8 @@
                return objJsonResult;
            }
        }
        #endregion
        #region æœ«ä»¶æ£€éªŒå•根据源单类型获取信息-源单为工序出站单
        [Route("QC_ProcessCheckBill/get_StationOutBill")]
        [HttpGet]
@@ -1528,7 +1518,7 @@
                string sql = "";
                if (oSystemParameter.ShowBill(ref sReturn))
                {
                    switch (oSystemParameter.omodel.QC_FirstPieceCheckBill_QCSchemeSource)
                    switch (oSystemParameter.omodel.QC_ProcessCheckBill_QCSchemeSource)
                    {
                        case "物料":
                            sql = "exec h_p_QC_ProcessCheck_GetICMOBillList " + "'物料','" + HICMOInterID + "','" + HICMOEntryID + "'";
@@ -1567,5 +1557,173 @@
            }
        }
        #endregion
        #region å·¥åºæ£€éªŒå•根据源单类型获取信息-源单为生产订单 é€šè¿‡å•据号带出
        [Route("QC_ProcessCheckBill/get_ICMOBill_ByBillNo")]
        [HttpGet]
        public object get_ICMOBill_ByBillNo(string HBillNo, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                string sReturn = "";
                string sql = "";
                if (oSystemParameter.ShowBill(ref sReturn))
                {
                    switch (oSystemParameter.omodel.QC_ProcessCheckBill_QCSchemeSource)
                    {
                        case "物料":
                            sql = "exec h_p_QC_ProcessCheck_GetICMOBillList_ByBillNo " + "'物料','" + HBillNo + "'";
                            break;
                        case "工序":
                            sql = "exec h_p_QC_ProcessCheck_GetICMOBillList_ByBillNo " + "'工序','" + HBillNo + "'";
                            break;
                        case "工艺路线":
                            sql = "exec h_p_QC_ProcessCheck_GetICMOBillList_ByBillNo " + "'工艺路线','" + HBillNo + "'";
                            break;
                    }
                }
                ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheck_GetICMOBillList_ByBillNo");
                //添加列名
                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列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询数据异常,请与管理员联系!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å·¥åºæ£€éªŒå•根据源单类型获取信息-源单为工序进站单
        [Route("QC_ProcessCheckBill/get_StationInBill")]
        [HttpGet]
        public object get_StationInBill(string HInterID, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                string sReturn = "";
                string sql = "";
                if (oSystemParameter.ShowBill(ref sReturn))
                {
                    switch (oSystemParameter.omodel.QC_ProcessCheckBill_QCSchemeSource)
                    {
                        case "工序":
                            sql = "exec h_p_QC_ProcessCheck_GetStationInBillList " + "'工序','" + HInterID + "'";
                            break;
                        case "物料":
                            sql = "exec h_p_QC_ProcessCheck_GetStationInBillList " + "'物料','" + HInterID + "'";
                            break;
                        case "工艺路线":
                            sql = "exec h_p_QC_ProcessCheck_GetStationInBillList " + "'工艺路线','" + HInterID + "'";
                            break;
                    }
                }
                ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheck_GetStationInBillList");
                //添加列名
                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列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询数据异常,请与管理员联系!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å·¥åºæ£€éªŒå•根据源单类型获取信息-源单为工序进站单 é€šè¿‡å•据号获取
        [Route("QC_ProcessCheckBill/get_StationInBill_ByHBillNo")]
        [HttpGet]
        public object get_StationInBill_ByHBillNo(string HBillNo, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                string sReturn = "";
                string sql = "";
                if (oSystemParameter.ShowBill(ref sReturn))
                {
                    switch (oSystemParameter.omodel.QC_ProcessCheckBill_QCSchemeSource)
                    {
                        case "工序":
                            sql = "exec h_p_QC_ProcessCheck_GetStationInBillList_ByHBillNo " + "'工序','" + HBillNo + "'";
                            break;
                        case "物料":
                            sql = "exec h_p_QC_ProcessCheck_GetStationInBillList_ByHBillNo " + "'物料','" + HBillNo + "'";
                            break;
                        case "工艺路线":
                            sql = "exec h_p_QC_ProcessCheck_GetStationInBillList_ByHBillNo " + "'工艺路线','" + HBillNo + "'";
                            break;
                    }
                }
                ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheck_GetStationInBillList_ByHBillNo");
                //添加列名
                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列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询数据异常,请与管理员联系!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}