Example #1
0
        public IActionResult view_10104()
        {
            qc = set.getUserYSBQC(set.BDDM.YbnsrZzs);
            JToken        reportData = set.getUserYSBQCReportData(qc.Id, qc.BDDM);
            YbnsrzzsModel model      = new YbnsrzzsModel();

            model.reportData = reportData;
            model.GDTXDate   = set.getGDTXDate(set.BDDM.YbnsrZzs);
            model.Nsrxx      = set.getNsrxx();
            return(View(model));
        }
Example #2
0
        public System.Web.Mvc.ActionResult view_20101()
        {
            qc = set.getUserYSBQC(set.BDDM.Fjs);
            JToken   reportData = set.getUserYSBQCReportData(qc.Id, qc.BDDM);
            Nsrxx    xx         = set.getNsrxx();
            GDTXDate gd         = set.getGDTXDate(qc.BDDM);
            FjsModel model      = new FjsModel {
                SBZT = set.SBZT.WTX, Nsrxx = xx, GDTXDate = gd
            };
            List <FjsData> listFjsData = new List <FjsData>();

            if (reportData.HasValues)
            {
                model.SBZT = set.SBZT.DSB;
                for (int i = 0; i < 3; i++)
                {
                    IEnumerable <JToken> datas = reportData.SelectToken("[0].data").Where(a => a["idx"] != null && int.Parse(a["idx"].ToString()) == i);
                    JObject jo = new JObject();
                    jo.Add("index", i.ToString());
                    foreach (JObject item in datas)
                    {
                        jo.Add(item["name"].ToString().Split('.')[1], item["value"]);
                    }
                    FjsData fjsData = JsonConvert.DeserializeObject <FjsData>(JsonConvert.SerializeObject(jo));
                    listFjsData.Add(fjsData);
                }
            }
            else
            {
                listFjsData = new List <FjsData> {
                    new FjsData(0), new FjsData(1), new FjsData(2)
                };
            }
            model.FjsData = listFjsData;
            return(View("view_20101", model));
        }