public ActionResult UpdateNaturalHour(UpdateNaturalInfoViewModel args)
 {
     try
     {
         ReportFactory.Instance.log.WriteLog(OperationType.Update, Utility.GetReportNameByType(15), Utility.GetFormatDate(args.DataDate, null)); 
         return Json(ReportFactory.Instance.report15.Update(args));
     }
     catch (Exception ex)
     {
         CustomResult ret = new CustomResult();
         ret.ResultKey = 0;
         ret.ResultValue = ex.Message;
         return Json(ret);
     }
 }
        /// <summary>
        /// 批量修改
        /// </summary>
        /// <param name="args"></param>
        /// <returns></returns>
        public CustomResult Update(UpdateNaturalInfoViewModel args)
        {
            CustomResult pReturnValue = new CustomResult();
            pReturnValue.ResultKey = (byte)EResult.Fail;
            pReturnValue.ResultValue = TipInfo.UpdateFaile;
            if (args.UpdateData == null)
            {
                pReturnValue.ResultKey = (byte)EResult.Succeed;
                pReturnValue.ResultValue = TipInfo.DataNull;
                return pReturnValue;
            }
            if (args.StationType != 15)
            {
                args.StationType = 1;
            }
            using (DataSubmittedEntities db = new DataSubmittedEntities())
            {
                var pReportData = db.RP_NatSta.Where(s => s.CalcuTime == args.DataDate && s.StaType == args.StationType).ToList();
                using (TransactionScope transaction = new TransactionScope())
                {
                    try
                    {
                        foreach (var item in args.UpdateData)
                        {
                            //获取查询日期当天所有已上传的数据,包括合计

                            var pDataTemp = pReportData.Where(i => i.HourPer == item.Num - 1).SingleOrDefault();
                            pDataTemp.EnNum = item.InDayTraffic;
                            pDataTemp.ExNum = item.OutDayTraffic;
                            pDataTemp.Sum = item.InDayTraffic + item.OutDayTraffic;
                            pDataTemp.Rek = item.Remark;
                            if (!string.IsNullOrEmpty(item.RunningStatus))
                            {
                                pDataTemp.RunStae = item.RunningStatus;
                            }
                            else
                            {
                                pDataTemp.RunStae = SystemConst.RunningStatus;
                            }
                            pDataTemp.UpdDate = DateTime.Now;
                            pDataTemp.State = "1";
                            if (SessionManage.GetLoginUser() != null)
                            {
                                pDataTemp.UpdBy = SessionManage.GetLoginUser().UserName;
                            }

                        }
                        db.SaveChanges();
                        transaction.Complete();
                        pReturnValue.ResultKey = (byte)EResult.Succeed;
                        pReturnValue.ResultValue = TipInfo.UpdateSuccess;
                    }
                    catch (Exception ex)
                    {
                        Common.SystemLog.GetInstance().Log.Info(TipInfo.UpdateDataRepeat, ex);
                        pReturnValue.ResultKey = (byte)EResult.Fail;
                        pReturnValue.ResultValue = TipInfo.UpdateDataRepeat;
                    }
                    return pReturnValue;
                }
            }
        }