public IActionResult view_20101() { qc = set.getUserYSBQC(set.BDDM.Fjs); JToken reportData = set.getUserYSBQCReportData(qc.Id, qc.BDDM); FjsModel model = new FjsModel { SBZT = set.SBZT.WTX }; 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)); }
public JObject list_declarationQuery() { JObject re_json = new JObject(); JArray list = new JArray(); int count = 0; string str = System.IO.File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + "/wsbs/sb/taxSelect/declarationInfo/list_declarationQuery.json"); re_json = JsonConvert.DeserializeObject <JObject>(str); List <GDTXUserYSBQC> listQC = set.getYsbUserYSBQC(); foreach (GDTXUserYSBQC qc in listQC) { JObject jo = new JObject(); JToken reportData = set.getUserYSBQCReportData(qc.Id, qc.BDDM); jo["zsxmmc"] = qc.ZSXM; jo["sbqx"] = qc.SBQX; jo["skssqq"] = qc.SKSSQQ; jo["skssqz"] = qc.SKSSQZ; jo["sbrq"] = qc.HappenDate; jo["pzxh"] = null; jo["sbsxDm1"] = null; jo["sbsxmc"] = "准期申报"; jo["nssbrq"] = null; if (qc.BDDM == set.BDDM.YbnsrZzs) { var query = from d in reportData from dd in d["data"] where dd["name"].ToString() == "wbsbzzsybnsrzb.ybbys" select dd; string ysxssr = query.FirstOrDefault()["value"].ToString(); string ynse = query.Where(a => a["idx"].ToString() == "23").FirstOrDefault()["value"].ToString(); string ybtse = query.Where(a => a["idx"].ToString() == "33").FirstOrDefault()["value"].ToString(); jo["ysxssr"] = ysxssr; jo["ynse"] = ynse; jo["ybtse"] = ybtse; jo["zspmmc"] = "商业(17%、16%、13%)"; list.Add(jo); count++; } else if (qc.BDDM == set.BDDM.Fjs) { var query = from d in reportData.SelectToken("[0].data") where d["name"].ToString() == "wbdssbfjsfjssbb.hj" select d; string ysxssr = query.FirstOrDefault()["value"].ToString(); query = from d in reportData.SelectToken("[0].data") where d["name"].ToString() == "common.bqynsfehj" select d; string ynse = query.FirstOrDefault()["value"].ToString(); query = from d in reportData.SelectToken("[0].data") where d["name"].ToString() == "common.bqybtsehj" select d; string ybtse = query.FirstOrDefault()["value"].ToString(); jo["ysxssr"] = ysxssr; jo["ynse"] = ynse; jo["ybtse"] = ybtse; jo["zspmmc"] = "市区(增值税附征)"; list.Add(jo); count++; } else if (qc.BDDM == set.BDDM.Yhs) { var query = from d in reportData where d["trs"] != null select d["trs"]; foreach (JObject q in query.FirstOrDefault()) { JObject joYhs = new JObject(jo); joYhs["ysxssr"] = q.SelectToken("tds.jsje.value"); joYhs["ynse"] = q.SelectToken("tds.bqynse.value"); joYhs["ybtse"] = q.SelectToken("tds.bqybtse.value"); joYhs["zspmmc"] = set.getYhsZspmMc(q.SelectToken("tds.zspmDm.value").ToString()); list.Add(joYhs); count++; } } else if (qc.BDDM == set.BDDM.Qysds) { var query = from d in reportData from dd in d["data"] where dd["name"].ToString() == "wbsbqysdsa2018a200000.lrzelj" select dd; string ysxssr = query.FirstOrDefault()["value"].ToString(); query = from d in reportData from dd in d["data"] where dd["name"].ToString() == "wbsbqysdsa2018a200000.ynsdselj" select dd; string ynse = query.FirstOrDefault()["value"].ToString(); query = from d in reportData from dd in d["data"] where dd["name"].ToString() == "wbsbqysdsa2018a200000.ybtsdselj" select dd; string ybtse = query.FirstOrDefault()["value"].ToString(); jo["ysxssr"] = ysxssr; jo["ynse"] = ynse; jo["ybtse"] = ybtse; jo["zspmmc"] = "企业所得税月季度A表"; list.Add(jo); count++; } } re_json["list"] = list; re_json["dto"]["count"] = count; return(re_json); }