Beispiel #1
0
        /// <summary>
        /// 获取审核申请
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public AuditViewModel NoAuthticationGetAuditResult(NoAuthticationGetAuditResult request)
        {
            var            _year      = System.DateTime.Now.Year;
            AuditViewModel _auditview = new AuditViewModel();

            if (request.adcd != adcd)
            {
                throw new Exception("操作账号异常");
            }
            if (request.year.Value != _year)
            {
                throw new Exception("年份时间异常,申报年份仅限本年度");
            }
            using (var db = DbFactory.Open())
            {
                var builder = db.From <Model.Audit.Audit>();
                builder.LeftJoin <Model.Audit.Audit, AuditDetails>((x, y) => x.ID == y.AuditID);
                builder.Where(x => x.Year == request.year && x.TownADCD == request.adcd);
                builder.OrderByDescending <AuditDetails>(w => w.AuditTime);
                _auditview = db.Single <AuditViewModel>(builder);
                if (_auditview != null)
                {
                    _auditview.statusname = PublicClass.GetAudit(_auditview.Status, "");
                }
            }
            return(_auditview);
        }
 public AuditViewModel GET(NoAuthticationGetAuditResult request)
 {
     return(NoAuthticationAuditManager.NoAuthticationGetAuditResult(request));
 }