yusijie
2024-05-11 ed9be22bcfc71a626a3dd21b9397881c6698c6dd
首件检验单添加源单(流转卡)
2个文件已修改
58 ■■■■■ 已修改文件
WebAPI/Controllers/品质管理/首件检验单/QC_FirstPieceCheckBillController.cs 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Service/LuBaoSevice.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/Æ·ÖʹÜÀí/Ê×¼þ¼ìÑéµ¥/QC_FirstPieceCheckBillController.cs
@@ -1056,6 +1056,62 @@
        }
        #endregion
        #region é¦–件检验单根据源单类型获取信息-源单为工序流转卡
        [Route("QC_FirstPieceCheckBill/get_ProcessExchangeBill")]
        [HttpGet]
        public object get_ProcessExchangeBill(string HInterID, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                string sReturn = "";
                string sql = "";
                if (oSystemParameter.ShowBill(ref sReturn))
                {
                    switch (oSystemParameter.omodel.QC_FirstPieceCheckBill_QCSchemeSource)
                    {
                        case "工序":
                            sql = "exec h_p_QC_FirstPiece_GetProcessExchangeBillList " + "'工序','" + HInterID + "'";
                            break;
                        case "物料":
                            sql = "exec h_p_QC_FirstPiece_GetProcessExchangeBillList " + "'物料','" + HInterID + "'";
                            break;
                        case "工艺路线":
                            sql = "exec h_p_QC_FirstPiece_GetProcessExchangeBillList " + "'工艺路线','" + HInterID + "'";
                            break;
                    }
                }
                ds = oCN.RunProcReturn(sql, "h_p_QC_FirstPiece_GetProcessExchangeBillList");
                //添加列名
                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 é¦–件检验单根据源单类型获取信息-源单为生产状态临时表(3722)
        /// <summary>
        ///参数:string sql。
WebAPI/Service/LuBaoSevice.cs
@@ -326,7 +326,7 @@
        public static DataSet GetGy_UserProcessDb(string HID)
        {
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Gy_UserProcess  where HItemID= " + HID + " ", "h_v_Gy_UserProcess");
            var dataSet = oCN.RunProcReturn("select * from h_v_Gy_InspectBasis_Edit  where HItemID= " + HID + " ", "h_v_Gy_InspectBasis_Edit");
            return dataSet;
        }