1
wtt
2025-06-27 99afe4aa57546afd30f59cb36089da1304d3962e
WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
@@ -7658,7 +7658,14 @@
                string sql = "select a.HSourceBillNo 流转卡号,a.HSourceBillType 流转卡类型,a.HSourceInterID 流转卡主内码,a.HSourceEntryID 流转卡子内码,b.HNumber 物料代码,b.HName 物料名称,b.HModel 规格型号,a.HDatePlanQty 计划数量,a.HSourceID,c.HName 生产资源 from Sc_ICMOBillStatus_Tmp a " +
                    "left join Gy_Material b on a.HMaterID=b.HItemID  left join Gy_Source c on a.HSourceID=c.HItemID where HSourceBillNo='" + HSourceBill + "' and a.HICMOStatus=1";
                ds = oCN.RunProcReturn(sql, "Sc_ICMOBillStatus_Tmp");
                if (ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无对应正确状态工单信息";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
@@ -7966,5 +7973,43 @@
            }
        }
        #endregion
        #region 设备点检记录PDA 保存后 查询是否有NG 调整安灯
        [Route("Sc_MESTransFerWorkBill/getGy_EquipFile_AD")]
        [HttpGet]
        public object getGy_EquipFile_AD(string HInterID, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                string sql = "select * from h_v_Gy_EquipFileMainList where hmainid='" + HInterID + "'";
                ds = oCN.RunProcReturn(sql, "h_v_Gy_EquipFileMainList");
                //添加列名
                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 ex)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询数据异常,请与管理员联系!" + ex.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}