コード例 #1
0
ファイル: CardModule.cs プロジェクト: jiaozhanjing/Trace
        /// <summary>
        /// 获取进场动物检疫证号
        /// </summary>
        /// <param name="_"></param>
        /// <returns></returns>
        public string DeleteCardInfo(dynamic _)
        {
            var recdata = this.GetResquetData <CardInfoListBase>();

            try
            {
                bool flag = DataValidation(recdata.Date, recdata.Random, recdata.Staffid);
                if (!flag)
                {
                    return(this.WriteValidationLog("CardModule", recdata.Mac));
                }
                //判断令牌是否过期
                bool flag2 = TokenValidation(recdata.SessionId, recdata.Token);
                if (!flag2)
                {
                    return(this.SendTokenValidation());
                }

                PDACardInfoBusiness bl = new PDACardInfoBusiness();

                OrderCardInfo EnterInfos = bl.DeleteCardInfo(recdata.data.rqDeleteCardInfos);

                // WriteInfoLog("CardModule", recdata.data.userName, recdata.Mac, "获取动物检疫证号成功!" + Json.ToJson(recdata));
                if (EnterInfos != null)
                {
                    return(this.SendData <OrderCardInfo>(EnterInfos, "删除成功!", ResponseType.Success));
                }
                else
                {
                    return(this.WriteExceptionLog("CardModule", "删除分销凭证", recdata.Mac, "删除分销凭证异常!" + Json.ToJson(recdata), "删除分销凭证异常!"));
                }
                // return this.SendData("删除分销凭证成功!", ResponseType.Success);
            }
            catch (Exception ex)
            {
                return(this.WriteExceptionLog("CardModule", "删除分销凭证", recdata.Mac, "删除分销凭证异常:" + Json.ToJson(recdata) + "[异常信息:" + ex.Message + "]", "删除分销凭证异常:" + ex.Message));
            }
        }