Beispiel #1
0
        public static void WriteLog(string className, string commandName)
        {
            switch (className)
            {
            case "IncidentAcceptManage":
                HK_OperateLog.IncidentAccept_Log(commandName);
                break;

            case "HouseInspectManage_new":
                HK_OperateLog.HouseInspect_Log(commandName);
                break;

            default:
                break;
            }
        }
Beispiel #2
0
        public override void Operate(ref Transfer Trans)
        {
            try
            {
                DataTable dAttributeTable = base.XmlToDatatTable(Trans.Attribute);
                DataRow   Row             = dAttributeTable.Rows[0];

                //验证登录
                if (!new Login().isLogin(ref Trans))
                {
                    return;
                }

                if (Global_Var.LoginCorpID == "1973")
                {
                    HK_OperateLog.WriteLog(Trans.Class, Trans.Command);
                }
                switch (Trans.Command)
                {
                case "SaveHouseInspectPolling":
                    Trans.Result = SaveHouseInspectPolling(Row);
                    break;

                case "GetHouseInspectPollingList":
                    Trans.Result = GetHouseInspectPollingList(Row);
                    break;

                case "SaveHouseInspect":
                    Trans.Result = SaveHouseInspect(Row);
                    break;

                case "GetHouseInspectList":
                    Trans.Result = GetHouseInspectList(Row);
                    break;

                case "GetRoomObjectUnitList":
                    Trans.Result = GetRoomObjectUnitList(Row);
                    break;

                case "GetIncidentTypeList":
                    Trans.Result = GetIncidentTypeList(Row);
                    break;

                case "GetUnitFilingList":
                    Trans.Result = GetUnitFilingList(Row);
                    break;

                case "GetRoomList":
                    Trans.Result = GetRoomList(Row);
                    break;

                case "GetUnqualifiedTypeList":
                    Trans.Result = GetUnqualifiedTypeList(Row);
                    break;

                default:
                    Trans.Result = new ApiResult(false, "接口不存在").toJson();
                    break;
                }
            }
            catch (Exception ex)
            {
                GetLog().Error(ex.Message + Environment.CommandLine + ex.StackTrace);
                Trans.Result = new ApiResult(false, "接口抛出了一个异常").toJson();
            }
        }