using System;
using System.Collections.Generic;
using System.Web;
using System.Text;
using bizFacade;
using System.Data;
//using SystemFramework;
namespace MesWebFun_base
{
    public partial class MesWebFun_base
    {
        public string ProcessRequest(string cmd,string opName/*,string engineID*/)
        {
            string responseText = "";
            switch (cmd)
            {
                //托盘信息
                case "MobySelect":
                    responseText = MobySelect(opName);
                    break;
                //操作图片
                case "PictureShow":
                    responseText = PictureShow(opName);
                    break;
                //物料信息
                case "MaterialList":
                    responseText = MaterialList(opName);
                    break;
                //操作指南
                case "ProcessList":
                    responseText = ProcessList(opName);
                    break;
                case "ShaftPosition":
                    responseText = ShaftPotion_Select(opName);
                    break;
                //选择订单_增加订单号
                //case "InsertOrderNum":
                //    responseText = InsertOrderNum(,opName);
                //    break;
                //选择订单_增加发动机型号
                //case "InsertEngineNum":
                //    responseText = InsertEngineNum(opName,,);
                //    break;
                //订单完工_选择机型
                case "Orderenginetypeselect":
                    responseText = Orderenginetypeselect();
                    break;
                //物料拉动_确认接受
                //case "AffirmReceive":
                //    responseText = AffirmReceive(opName,);
                //    break;
                case "ShowTimelyQuality":
                    responseText = Quality_Select(opName);
                    break;
                //case "MesloadingSelect":
                //    responseText = MesloadingSelect(opName);
                //    break;
                //工步属性
                case "StepProperty":
                    responseText = StepProperty(opName);
                    break;
                //订单信息
                case "OrderFormList":
                    responseText = OrderFormList(opName);
                    break;
                //查询单号
                case "MaterialPush_ListNumer":
                    responseText = MaterialPush_ListNumer(opName);
                    break;
                //根据单号查询详细信息
                //case "MaterialPush_Details":
                //    responseText = MaterialPush_Details(opName);
                //    break;
                case "QualityDataButton_bgColor_Select":
                    responseText = QualityDataButton_bgColor_Select(opName);
                    break;
                //查询具体ando类型明细
                case "InitComboboxAndoDetail":
                    responseText = InitComboboxAndoDetail();
                    break;//InitMaterailAndo
                case "InitMaterailAndo":
                    responseText = InitMaterailAndo(opName);
                    break;
                //case "InitMaterailAndoCount":
                //    responseText = InitMaterailAndoCount(opName);
                //    break;
                //物料ando_呼叫
                //case "submitAndoMaterialCall":
                //    responseText = submitAndoMaterialCall(opName);
                //    break;
                //ando界面_物料ando_更新物料安东table
                //case "updataAndoMaterialTabel":
                //    responseText = updataAndoMaterialTabel(opName);
                //    break;
                //ando界面_质量ando_更新质量安东table
                //case "updataAndoQualityTabel":
                //    responseText = updataAndoQualityTabel(opName);
                //    break;
                ////ando界面_物料ando_物料ando复位
                //case "submitAndoMaterialReset":
                //    responseText = submitAndoMaterialReset(opName);
                //    break;
                ////ando界面_复位
                //case "submitAndoQualityReset":
                //    responseText = submitAndoQualityReset(opName);
                //    break;
                //////////////////////设备管理
                case "LoadMachineType": //初始化设备维护类型
                    responseText = LoadMachineType(opName);
                    break;
                //case "ShowMaintainData":
                //    responseText = ShowMaintainData(opName);
                //    break;
                //case "ShowMaintainPic":
                //    responseText = ShowMaintainPic(opName);
                //    break;
                //case "equipmentmanagementSubmit":
                //    responseText = equipmentmanagementSubmit(opName);
                //    break;//equipmentmanagementSubmit
                /////////////////////////质量查询
                //case "QualityDataSelect":
                //    responseText = QualityDataSelect(opName);
                //    break;
                //弹窗消息
                case "ShowWindowNotice":
                    responseText = ShowWindowNotice(opName);
                    break;
                //消息滚动
                case "ShowLEDNotice":
                    responseText = ShowLEDNotice(opName);
                    break;
                case "GetOrderForm"://获取生产订单
                    responseText = GetOrderForm(opName);
                    break;
                case "GetEngineType"://获取发动机型号
                    responseText = GetEngineType(opName);
                    break;
                case "ShowOpNameMessage"://显示工位名称、操作工编号
                    responseText = ShowOpNameMessage(opName);
                    break;
                case "WebLoginIn"://系统初始化时，复位一些信息
                    responseText = WebLoginIn(opName);
                    break;
                case "MaterialCheckPosition"://物料检测指导
                    responseText = MaterialCheckPosition(opName);
                    break;
                //case "functionButtonConfirmOk"://合格放行
                //    responseText = functionButtonConfirmOk(opName);
                //    break;
                ////物料追溯数据查询
                //case "MaterialDataSelect":
                //    responseText = MaterialDataSelect(opName);
                //    break;
                //case "MaterialSelect"://电子看板_装配零件_查询
                //    responseText = MaterialSelect(opName);
                //    break;
                //case "MaterialManualUpdateBetch"://手动修改批次信息以及生产厂家
                //    responseText = MaterialManualUpdateBetch(opName);
                //    break;
                //case "Insert_OnlineOutline"://将在线,离线,屏蔽更新到数据库中
                //    responseText = Insert_OnlineOutline(opName);
                //    break;
                case "Init_OnlineOutline"://功能按钮 - 从数据库中初始化在线 / 离线 / 屏蔽的combobox
                    responseText = Init_OnlineOutline(opName);
                    break;
                case "InitOpNameOuputCount"://初始化节拍数据
                    responseText = InitOpNameOuputCount(opName);
                    break;
                //case "Insert_ConfirmOk"://电子看板_发动机号_合格放行_记录_增加
                //    responseText = Insert_ConfirmOk(opName);
                //    break;
                case "OrderFormList_OrderComplete"://订单完工，上线数量大于计划数量，界面提示
                    responseText = OrderFormList_OrderComplete(opName);
                    break;
                case "GetLoginUrl":
                    responseText = GetLoginOutUrl();
                    break;
                //case "SetRepaireNum":
                //    responseText = Insert_RepiareNum(opName);
                //    break;
                case "GetRepaireNum":
                    responseText = GetRepaireNum(opName);
                    break;
                case "Init_TreeData"://返修上线
                    responseText = Init_TreeData(opName);
                    break;
                //case "Quality_Select_Repair"://返修上线选择质量数据
                //    responseText = Quality_Select_Repair(opName, engineID);
                //    break;
                //case "Insert_selectTreeData"://返修上线-将选择的根节点数据更新到数据库中
                //    responseText = Insert_selectTreeData(opName);
                //    break;
                case "QualityDataButton_bgColor_alert_Select":
                    responseText = QualityDataButton_bgColor_alert_Select(opName);
                    break;
                ////物料追溯数据查询_根据发动机号 20170319
                //case "MaterialDataSelect_F_EnergineID":
                //    responseText = MaterialDataSelect_F_EnergineID(opName);
                //    break;             
                case "GetPdfSrc":
                    responseText = GetPdfSrc(opName); //获取操作指南的PDF路径
                    break;
                default:
                    string[] sArray = cmd.Split('_');
                    string Funtype = sArray[0];
                    if (Funtype == "AMES")
                    {                        
                       responseText = MesWebFun_MateriallPull.MesWebFun_MateriallPull.MateriallFuctionRequstBase(cmd, opName);
                    }
                    else
                    {
                        responseText = MesWebFun.MesWebFun_Special.SpecialFuctionRequstBase(cmd, opName);
                    }
                    break;
            }
            return responseText;
        }


        public bool IsReusable
        {
            get
            {
                return false;
            }
        }



    }
}