public JObject enterQtsb() { JObject re_jo = new JObject(); string str = System.IO.File.ReadAllText(Server.MapPath("enterQtsb.json")); re_jo = JsonConvert.DeserializeObject <JObject>(str); JArray qtsbList = (JArray)re_jo["qtsbList"]; JObject qtsbList_1 = (JObject)qtsbList[1]; GTXResult resultq = GTXMethod.GetGuiZhouYSBQC(); if (resultq.IsSuccess) { List <GDTXGuiZhouUserYSBQC> ysbqclist = JsonConvert.DeserializeObject <List <GDTXGuiZhouUserYSBQC> >(resultq.Data.ToString()); if (ysbqclist.Count > 0) { foreach (GDTXGuiZhouUserYSBQC item in ysbqclist) { if (item.BDDM == "YHSSB") { qtsbList_1["skssqQ"] = item.SKSSQQ; qtsbList_1["skssqZ"] = item.SKSSQZ; } } } } return(re_jo); }
public JObject xInitData() { JObject re_jo = new JObject(); string str = System.IO.File.ReadAllText(Server.MapPath("xInitData.json")); re_jo = JsonConvert.DeserializeObject <JObject>(str); string id = ""; string bsrq = ""; string rqQ = ""; string rqZ = ""; GTXResult resultq = GTXMethod.GetGuiZhouYSBQC(); if (resultq.IsSuccess) { List <GDTXGuiZhouUserYSBQC> ysbqclist = JsonConvert.DeserializeObject <List <GDTXGuiZhouUserYSBQC> >(resultq.Data.ToString()); if (ysbqclist.Count > 0) { foreach (GDTXGuiZhouUserYSBQC item in ysbqclist) { if (item.BDDM == this.BDDM) { id = item.Id.ToString(); bsrq = item.HappenDate; rqQ = item.SKSSQQ; rqZ = item.SKSSQZ; } } } } JObject re_jo_body = new JObject(); re_jo_body = JsonConvert.DeserializeObject <JObject>(re_jo["body"].ToString()); GTXResult gr = GTXMethod.GetUserReportData(id, this.BDDM); if (gr.IsSuccess) { JArray jarr = new JArray(); jarr = JsonConvert.DeserializeObject <JArray>(gr.Data.ToString()); if (jarr.Count > 0) { byte[] bytes = Convert.FromBase64String(jarr[0]["dataValue"].ToString().Replace(" ", "+")); string dataValue = Encoding.Default.GetString(bytes); re_jo_body = JsonConvert.DeserializeObject <JObject>(dataValue); } } re_jo_body["qcs"]["bsrq"] = new JValue(bsrq); re_jo_body["ZlbssldjNsrxxVO"]["ssqq"] = new JValue(rqQ); re_jo_body["ZlbssldjNsrxxVO"]["ssqz"] = new JValue(rqZ); re_jo["body"] = re_jo_body; JObject nsrxx_jo = GTXMethod.getNsrxx((JObject)re_jo["body"]["qcs"]["djNsrxx"]); re_jo["body"]["qcs"]["djNsrxx"] = nsrxx_jo; return(re_jo); }
public JObject refreshSbqc(string type, string uuid) { JObject re_jo = new JObject(); string re_str = ""; if (type == "oneRefresh") { re_str = System.IO.File.ReadAllText(Server.MapPath(type + ".json")); re_jo = JsonConvert.DeserializeObject <JObject>(re_str); GTXResult resultq = GTXMethod.GetGuiZhouYSBQC(); if (resultq.IsSuccess) { List <GDTXGuiZhouUserYSBQC> ysbqclist = JsonConvert.DeserializeObject <List <GDTXGuiZhouUserYSBQC> >(resultq.Data.ToString()); if (ysbqclist.Count > 0) { foreach (GDTXGuiZhouUserYSBQC item in ysbqclist) { if (item.Id.ToString() == uuid && item.SBZT == "已申报") { re_jo["code"] = "0"; re_jo.Add("sbrq", item.HappenDate); break; } } } } } else { re_jo = getSbqc(); } return(re_jo); }
public string mainSettingForCWBBYDY(string str) { JObject re_jo = new JObject(); JValue re_jv = new JValue(""); re_jv = JsonConvert.DeserializeObject <JValue>(str); re_jo = JsonConvert.DeserializeObject <JObject>(re_jv.ToString()); JObject re_jo_body = JsonConvert.DeserializeObject <JObject>(re_jo["body"].ToString()); GTXResult resultq = GTXMethod.GetGuiZhouYSBQC(); if (resultq.IsSuccess) { List <GDTXGuiZhouUserYSBQC> ysbqclist = JsonConvert.DeserializeObject <List <GDTXGuiZhouUserYSBQC> >(resultq.Data.ToString()); if (ysbqclist.Count > 0) { foreach (GDTXGuiZhouUserYSBQC item in ysbqclist) { if (item.BDDM == "cwbb_qy_kjzz_ybqy") { re_jo_body["cwbbbsjcsz"]["sssqq"] = item.SKSSQQ; re_jo_body["cwbbbsjcsz"]["sssqz"] = item.SKSSQZ; } } } } re_jo["body"] = new JValue(JsonConvert.SerializeObject(re_jo_body)); str = JsonConvert.SerializeObject(new JValue(JsonConvert.SerializeObject(re_jo))); return(str); }
public JObject xTempSave() { JObject re_jo = new JObject(); string str = System.IO.File.ReadAllText(Server.MapPath("xTempSave.json")); re_jo = JsonConvert.DeserializeObject <JObject>(str); string inputData = HttpUtility.UrlDecode(Request.Form["formData"], Encoding.GetEncoding("utf-8")); JObject input_jo = JsonConvert.DeserializeObject <JObject>(inputData); string id = ""; GTXResult resultq = GTXMethod.GetGuiZhouYSBQC(); if (resultq.IsSuccess) { List <GDTXGuiZhouUserYSBQC> ysbqclist = JsonConvert.DeserializeObject <List <GDTXGuiZhouUserYSBQC> >(resultq.Data.ToString()); if (ysbqclist.Count > 0) { foreach (GDTXGuiZhouUserYSBQC item in ysbqclist) { if (item.ZSXM == "印花税") { id = item.Id.ToString(); } } } } List <GTXNameValue> nameList = new List <GTXNameValue>(); GTXNameValue nv = new GTXNameValue(); nv.key = "data"; byte[] bytes = Encoding.Default.GetBytes(JsonConvert.SerializeObject(input_jo)); string _result = Convert.ToBase64String(bytes); nv.value = _result; nameList.Add(nv); GTXResult saveresult = GTXMethod.SaveUserReportData(JsonConvert.SerializeObject(nameList), id, this.BDDM); if (saveresult.IsSuccess) { decimal dec = 0; JArray ja = (JArray)input_jo["yyssbbdxxVO"]["yhssb"]["yhssbGrid"]["yhssbGridlb"]; foreach (JObject j in ja) { dec += decimal.Parse(j["bqybtse"].ToString()); } GTXMethod.UpdateSBSE(id, dec.ToString()); re_jo["returnFlag"] = "Y"; } else { re_jo["returnFlag"] = "N"; } return(re_jo); }
public string saveDataForYBNSRZZS(string ywbm) { JObject re_jo = new JObject(); string str = System.IO.File.ReadAllText(Server.MapPath("saveData.json")); Request.InputStream.Seek(0, SeekOrigin.Begin); Stream inputStream = Request.InputStream; Encoding encoding = Request.ContentEncoding; StreamReader streamReader = new StreamReader(inputStream, encoding); string inputData = streamReader.ReadToEnd(); JValue input_jv = JsonConvert.DeserializeObject <JValue>(inputData); JObject input_jo = JsonConvert.DeserializeObject <JObject>(input_jv.ToString()); string id = ""; GTXResult resultq = GTXMethod.GetGuiZhouYSBQC(); if (resultq.IsSuccess) { List <GDTXGuiZhouUserYSBQC> ysbqclist = JsonConvert.DeserializeObject <List <GDTXGuiZhouUserYSBQC> >(resultq.Data.ToString()); if (ysbqclist.Count > 0) { foreach (GDTXGuiZhouUserYSBQC item in ysbqclist) { if (item.BDDM == "YBNSRZZS") { id = item.Id.ToString(); } } } } List <GTXNameValue> nameList = new List <GTXNameValue>(); GTXNameValue nv = new GTXNameValue(); nv.key = "data"; byte[] bytes = Encoding.Default.GetBytes(JsonConvert.SerializeObject(input_jo)); string _result = Convert.ToBase64String(bytes); nv.value = _result; nameList.Add(nv); GTXResult saveresult = GTXMethod.SaveUserReportData(JsonConvert.SerializeObject(nameList), id, ywbm); if (saveresult.IsSuccess) { str = str.Replace("@@returnFlag", "Y"); } else { str = str.Replace("@@returnFlag", "N"); } return(str); }
public JObject xTempSave() { //Stream inputStream = Request.InputStream; //Encoding encoding = Request.ContentEncoding; //StreamReader streamReader = new StreamReader(inputStream, encoding); //string inputData = streamReader.ReadToEnd(); JObject re_jo = new JObject(); string str = System.IO.File.ReadAllText(Server.MapPath("xTempSave.json")); re_jo = JsonConvert.DeserializeObject <JObject>(str); string inputData = HttpUtility.UrlDecode(Request.Form["formData"], Encoding.GetEncoding("utf-8")); JObject input_jo = JsonConvert.DeserializeObject <JObject>(inputData); string id = ""; GTXResult resultq = GTXMethod.GetGuiZhouYSBQC(); if (resultq.IsSuccess) { List <GDTXGuiZhouUserYSBQC> ysbqclist = JsonConvert.DeserializeObject <List <GDTXGuiZhouUserYSBQC> >(resultq.Data.ToString()); if (ysbqclist.Count > 0) { foreach (GDTXGuiZhouUserYSBQC item in ysbqclist) { if (item.BDDM == this.BDDM) { id = item.Id.ToString(); } } } } List <GTXNameValue> nameList = new List <GTXNameValue>(); GTXNameValue nv = new GTXNameValue(); nv.key = "data"; byte[] bytes = Encoding.Default.GetBytes(JsonConvert.SerializeObject(input_jo)); string _result = Convert.ToBase64String(bytes); nv.value = _result; nameList.Add(nv); GTXResult saveresult = GTXMethod.SaveUserReportData(JsonConvert.SerializeObject(nameList), id, this.BDDM); if (saveresult.IsSuccess) { re_jo["returnFlag"] = "Y"; } else { re_jo["returnFlag"] = "N"; } return(re_jo); }
public JObject xTempSave() { JObject re_jo = new JObject(); string str = System.IO.File.ReadAllText(Server.MapPath("xTempSave.json")); re_jo = JsonConvert.DeserializeObject <JObject>(str); string inputData = HttpUtility.UrlDecode(Request.Form["formData"], Encoding.GetEncoding("utf-8")); JObject input_jo = JsonConvert.DeserializeObject <JObject>(inputData); string zspmDm = input_jo["fxmtysbbdVO"]["fxmtySbb"]["sbxxGrid"]["sbxxGridlb"][0]["zspmDm"].ToString(); string bqybtsfe = input_jo["fxmtysbbdVO"]["fxmtySbb"]["sbxxGrid"]["sbxxGridlb"][0]["bqybtsfe"].ToString(); string id = ""; GTXResult resultq = GTXMethod.GetGuiZhouYSBQC(); if (resultq.IsSuccess) { List <GDTXGuiZhouUserYSBQC> ysbqclist = JsonConvert.DeserializeObject <List <GDTXGuiZhouUserYSBQC> >(resultq.Data.ToString()); if (ysbqclist.Count > 0) { foreach (GDTXGuiZhouUserYSBQC item in ysbqclist) { if (item.BDDM == this.BDDM) { id = item.Id.ToString(); } } } } List <GTXNameValue> nameList = new List <GTXNameValue>(); GTXNameValue nv = new GTXNameValue(); nv.key = "data"; byte[] bytes = Encoding.Default.GetBytes(JsonConvert.SerializeObject(input_jo)); string _result = Convert.ToBase64String(bytes); nv.value = _result; nameList.Add(nv); GTXResult saveresult = GTXMethod.SaveUserReportData(JsonConvert.SerializeObject(nameList), id, zspmDm); if (saveresult.IsSuccess) { GTXMethod.UpdateSBSE(id, bqybtsfe); re_jo["returnFlag"] = "Y"; } else { re_jo["returnFlag"] = "N"; } return(re_jo); }
public JArray xSheets() { JArray re_j = new JArray(); string str = System.IO.File.ReadAllText(Server.MapPath("xSheets.json")); re_j = JsonConvert.DeserializeObject <JArray>(str); string id = ""; GTXResult resultq = GTXMethod.GetGuiZhouYSBQC(); if (resultq.IsSuccess) { List <GDTXGuiZhouUserYSBQC> ysbqclist = JsonConvert.DeserializeObject <List <GDTXGuiZhouUserYSBQC> >(resultq.Data.ToString()); if (ysbqclist.Count > 0) { foreach (GDTXGuiZhouUserYSBQC item in ysbqclist) { if (item.BDDM == "YBNSRZZS") { id = item.Id.ToString(); } } } } GTXResult gr = GTXMethod.GetUserReportData(id, "YBNSRZZSXBSZ"); if (gr.IsSuccess) { JArray jarr = new JArray(); jarr = JsonConvert.DeserializeObject <JArray>(gr.Data.ToString()); if (jarr.Count > 0) { byte[] bytes = Convert.FromBase64String(jarr[0]["dataValue"].ToString().Replace(" ", "+")); string dataValue = Encoding.Default.GetString(bytes); JObject data_jo = JsonConvert.DeserializeObject <JObject>(dataValue); JObject data_jo_jcxxsz = (JObject)data_jo["jcxxsz"]; for (int i = re_j.Count - 1; i >= 0; i--) { string s = data_jo_jcxxsz["" + re_j[i]["dzbdbm"] + ""].ToString(); if (s == "N") { re_j.RemoveAt(i); } } } } return(re_j); }
public string getsbzf() { string str = System.IO.File.ReadAllText(Server.MapPath("getsbzf.json")); JValue sbzf_jv = JsonConvert.DeserializeObject <JValue>(str); JObject sbzf_jo = JsonConvert.DeserializeObject <JObject>(sbzf_jv.ToString()); JArray sbzfList = (JArray)sbzf_jo["sbzfList"]; JObject sbzfList_model = (JObject)sbzfList[0]; sbzfList.RemoveAll(); GTXResult resultq = GTXMethod.GetGuiZhouYSBQC(); if (resultq.IsSuccess) { List <GDTXGuiZhouUserYSBQC> ysbqclist = JsonConvert.DeserializeObject <List <GDTXGuiZhouUserYSBQC> >(resultq.Data.ToString()); if (ysbqclist.Count > 0) { foreach (GDTXGuiZhouUserYSBQC item in ysbqclist) { if (item.SBZT == "未申报") { continue; } JObject sbzfList_item = new JObject(sbzfList_model); sbzfList_item["yzpzzlmc"] = item.TaskName; sbzfList_item["yzpzzlDm"] = item.BDDM; sbzfList_item["zsxmmc"] = item.ZSXM; sbzfList_item["sbrq"] = item.HappenDate; sbzfList_item["skssqq"] = item.SKSSQQ; sbzfList_item["skssqz"] = item.SKSSQZ; sbzfList_item["ybtse"] = item.SBSE; sbzfList.Add(sbzfList_item); } } } sbzf_jo["sbxxList"] = sbzfList; JValue re_jv = new JValue(JsonConvert.SerializeObject(sbzf_jo)); string re_str = JsonConvert.SerializeObject(re_jv); return(re_str); }
public JObject xInitData() { JObject re_jo = new JObject(); string str = System.IO.File.ReadAllText(Server.MapPath("xInitData.json")); re_jo = JsonConvert.DeserializeObject <JObject>(str); JObject re_jo_body = new JObject(); re_jo_body = JsonConvert.DeserializeObject <JObject>(re_jo["body"].ToString()); string id = ""; string tbrq = ""; string rqQ = ""; string rqZ = ""; GTXResult resultq = GTXMethod.GetGuiZhouYSBQC(); if (resultq.IsSuccess) { List <GDTXGuiZhouUserYSBQC> ysbqclist = JsonConvert.DeserializeObject <List <GDTXGuiZhouUserYSBQC> >(resultq.Data.ToString()); if (ysbqclist.Count > 0) { foreach (GDTXGuiZhouUserYSBQC item in ysbqclist) { if (item.BDDM == this.BDDM) { id = item.Id.ToString(); tbrq = item.HappenDate; rqQ = item.SKSSQQ; rqZ = item.SKSSQZ; } } } } re_jo_body["qcs"]["initData"]["nsrjbxx"]["tbrq"] = new JValue(tbrq); re_jo_body["qcs"]["initData"]["fjssbInitData"]["sssq"]["rqQ"] = new JValue(rqQ); re_jo_body["qcs"]["initData"]["fjssbInitData"]["sssq"]["rqZ"] = new JValue(rqZ); JObject nsrxx_jo = GTXMethod.getNsrxx((JObject)re_jo_body["qcs"]["initData"]["nsrjbxx"]); re_jo_body["qcs"]["initData"]["nsrjbxx"] = nsrxx_jo; GTXResult gr = GTXMethod.GetUserReportData(id, this.BDDM); if (gr.IsSuccess) { JArray jarr = new JArray(); jarr = JsonConvert.DeserializeObject <JArray>(gr.Data.ToString()); if (jarr.Count > 0) { byte[] bytes = Convert.FromBase64String(jarr[0]["dataValue"].ToString().Replace(" ", "+")); string dataValue = Encoding.Default.GetString(bytes); JObject data_jo = JsonConvert.DeserializeObject <JObject>(dataValue); JArray data_ja = (JArray)data_jo["fjsSbbdxxVO"]["fjssbb"]["sbxxGrid"]["sbxxGridlbVO"]; JArray mxxx = (JArray)re_jo_body["qcs"]["formContent"]["fjssbb"]["body"]["sbxxGrid"]["sbxxGridlbVO"]; for (int i = 0; i < data_ja.Count; i++) { mxxx[i]["zsxmMc"] = data_ja[i]["zsxmMc"]; mxxx[i]["zsxmDm"] = data_ja[i]["zsxmDm"]; mxxx[i]["zspmMc"] = data_ja[i]["zspmMc"]; mxxx[i]["zspmDm"] = data_ja[i]["zspmDm"]; mxxx[i]["ybzzs"] = data_ja[i]["ybzzs"]; mxxx[i]["zzsmdse"] = data_ja[i]["zzsmdse"]; mxxx[i]["xfs"] = data_ja[i]["xfs"]; mxxx[i]["yys"] = data_ja[i]["yys"]; mxxx[i]["hj"] = data_ja[i]["hj"]; mxxx[i]["sl1"] = data_ja[i]["sl1"]; mxxx[i]["bqybtse"] = data_ja[i]["bqybtse"]; } re_jo_body["qcs"]["formContent"]["fjssbb"]["body"]["sbxxGrid"]["sbxxGridlbVO"] = mxxx; } } re_jo["body"] = re_jo_body; return(re_jo); }
public JObject getSbqc() { JObject re_jo = new JObject(); string re_str = ""; re_str = System.IO.File.ReadAllText(Server.MapPath("enterSbqc.json")); re_jo = JsonConvert.DeserializeObject <JObject>(re_str); GTXResult resultq = GTXMethod.GetGuiZhouYSBQC(); if (resultq.IsSuccess) { List <GDTXGuiZhouUserYSBQC> ysbqclist = JsonConvert.DeserializeObject <List <GDTXGuiZhouUserYSBQC> >(resultq.Data.ToString()); if (ysbqclist.Count > 0) { foreach (GDTXGuiZhouUserYSBQC item in ysbqclist) { if (item.BDDM == "YBNSRZZS") { if (item.SBZT == "已申报") { re_jo["sbqcList"][0]["sbztDm"] = "210"; re_jo["sbqcList"][0]["sbrq"] = item.HappenDate; } re_jo["sbqcList"][0]["uuid"] = item.Id; re_jo["sbqcList"][0]["skssqQ"] = item.SKSSQQ; re_jo["sbqcList"][0]["skssqZ"] = item.SKSSQZ; re_jo["sbqcList"][0]["sbqx"] = item.SBQX; continue; } if (item.BDDM == "cwbb_qy_kjzz_ybqy") { if (item.SBZT == "已申报") { re_jo["cwbbList"][0]["bsrq"] = item.HappenDate; } re_jo["cwbbList"][0]["bsssqQ"] = item.SKSSQQ; re_jo["cwbbList"][0]["bsssqZ"] = item.SKSSQZ; re_jo["cwbbList"][0]["bsqx"] = item.SBQX; continue; } } JObject j = (JObject)re_jo.SelectToken("$.sbqcList[?(@.sbywbm == 'QYSDS_A_18YJD')]"); GDTXGuiZhouUserYSBQC ysbqc = ysbqclist.Where(a => a.BDDM.ToUpper() == j["sbywbm"].Value <string>().ToUpper()).ToList()[0]; if (ysbqc.SBZT == "已申报") { j["sbztDm"] = "210"; j["sbrq"] = ysbqc.HappenDate; } j["uuid"] = ysbqc.Id; j["skssqQ"] = ysbqc.SKSSQQ; j["skssqZ"] = ysbqc.SKSSQZ; j["sbqx"] = ysbqc.SBQX; j = (JObject)re_jo.SelectToken("$.sbqcList[?(@.sbywbm == 'LHBSFSSB')]"); ysbqc = ysbqclist.Where(a => a.BDDM.ToUpper() == "FJSSB".ToUpper()).ToList()[0]; if (ysbqc.SBZT == "已申报") { j["sbztDm"] = "210"; j["sbrq"] = ysbqc.HappenDate; } j["uuid"] = ysbqc.Id; j["skssqQ"] = ysbqc.SKSSQQ; j["skssqZ"] = ysbqc.SKSSQZ; j["sbqx"] = ysbqc.SBQX; } } return(re_jo); }
public string getsbxx() { string str = System.IO.File.ReadAllText(Server.MapPath("getsbxx.json")); JValue sbxx_jv = JsonConvert.DeserializeObject <JValue>(str); JObject sbxx_jo = JsonConvert.DeserializeObject <JObject>(sbxx_jv.ToString()); JArray sbxxList = (JArray)sbxx_jo["sbxxList"]; JObject sbxxList_model = (JObject)sbxxList[0]; sbxxList.RemoveAll(); GTXResult resultq = GTXMethod.GetGuiZhouYSBQC(); if (resultq.IsSuccess) { List <GDTXGuiZhouUserYSBQC> ysbqclist = JsonConvert.DeserializeObject <List <GDTXGuiZhouUserYSBQC> >(resultq.Data.ToString()); if (ysbqclist.Count > 0) { foreach (GDTXGuiZhouUserYSBQC item in ysbqclist) { if (item.SBZT == "未申报" || item.BDDM == "cwbb_qy_kjzz_ybqy") { continue; } else if (item.BDDM == "YHSSB") { GTXResult gr = GTXMethod.GetUserReportData(item.Id.ToString(), item.BDDM); if (gr.IsSuccess) { JArray jarr = new JArray(); jarr = JsonConvert.DeserializeObject <JArray>(gr.Data.ToString()); if (jarr.Count > 0) { byte[] bytes = Convert.FromBase64String(jarr[0]["dataValue"].ToString().Replace(" ", "+")); string dataValue = Encoding.Default.GetString(bytes); JObject data_jo = JsonConvert.DeserializeObject <JObject>(dataValue); JArray data_ja = (JArray)data_jo["yyssbbdxxVO"]["yhssb"]["yhssbGrid"]["yhssbGridlb"]; for (int i = 0; i < data_ja.Count; i++) { JObject sbxxList_item = new JObject(sbxxList_model); sbxxList_item["yzpzzlmc"] = item.TaskName; sbxxList_item["yzpzzlDm"] = item.BDDM; sbxxList_item["zsxmmc"] = item.ZSXM; sbxxList_item["sbrq"] = item.HappenDate; sbxxList_item["skssqq"] = item.SKSSQQ; sbxxList_item["skssqz"] = item.SKSSQZ; sbxxList_item["ybtse"] = data_ja[i]["bqybtse"]; sbxxList.Add(sbxxList_item); } } } } else { JObject sbxxList_item = new JObject(sbxxList_model); sbxxList_item["yzpzzlmc"] = item.TaskName; sbxxList_item["yzpzzlDm"] = item.BDDM; sbxxList_item["zsxmmc"] = item.ZSXM; sbxxList_item["sbrq"] = item.HappenDate; sbxxList_item["skssqq"] = item.SKSSQQ; sbxxList_item["skssqz"] = item.SKSSQZ; sbxxList_item["ybtse"] = item.SBSE; sbxxList.Add(sbxxList_item); } } } } sbxx_jo["sbxxList"] = sbxxList; JValue re_jv = new JValue(JsonConvert.SerializeObject(sbxx_jo)); string re_str = JsonConvert.SerializeObject(re_jv); return(re_str); }
public JObject xInitData() { JObject re_jo = new JObject(); string str = System.IO.File.ReadAllText(Server.MapPath("xInitData.json")); re_jo = JsonConvert.DeserializeObject <JObject>(str); JObject re_jo_body = new JObject(); re_jo_body = JsonConvert.DeserializeObject <JObject>(re_jo["body"].ToString()); string id = ""; string sbrq = ""; string rqQ = ""; string rqZ = ""; GTXResult resultq = GTXMethod.GetGuiZhouYSBQC(); if (resultq.IsSuccess) { List <GDTXGuiZhouUserYSBQC> ysbqclist = JsonConvert.DeserializeObject <List <GDTXGuiZhouUserYSBQC> >(resultq.Data.ToString()); if (ysbqclist.Count > 0) { foreach (GDTXGuiZhouUserYSBQC item in ysbqclist) { if (item.BDDM == "YBNSRZZS") { id = item.Id.ToString(); sbrq = item.HappenDate; rqQ = item.SKSSQQ; rqZ = item.SKSSQZ; } } } } //JObject zzsybnsrsbInitData_jo = (JObject)re_jo_body["qcs"]["initData"]["zzsybnsrsbInitData"]; string Name = System.Web.HttpContext.Current.Session["Name"].ToString(); JToken industry = JToken.Parse(System.IO.File.ReadAllText(Server.MapPath("~/industry.json"))); industry = industry.Where(a => a["name"].ToString() == Name).ToList()[0]; JObject zzsybnsrsbInitData_jo = JObject.Parse(System.IO.File.ReadAllText(Server.MapPath("zzsybnsrsbInitData." + industry["value"] + ".json"))); GTXResult gr1 = GTXMethod.GetUserReportData(id, "YBNSRZZSQCS"); if (gr1.IsSuccess) { JArray jarr = new JArray(); jarr = JsonConvert.DeserializeObject <JArray>(gr1.Data.ToString()); if (jarr.Count > 0) { byte[] bytes = Convert.FromBase64String(jarr[0]["dataValue"].ToString().Replace(" ", "+")); string dataValue = Encoding.Default.GetString(bytes); zzsybnsrsbInitData_jo.Merge(JsonConvert.DeserializeObject <JObject>(dataValue), new JsonMergeSettings { MergeArrayHandling = MergeArrayHandling.Union }); } } zzsybnsrsbInitData_jo["sbrq"] = sbrq; zzsybnsrsbInitData_jo["sssq"]["rqQ"] = rqQ; zzsybnsrsbInitData_jo["sssq"]["rqZ"] = rqZ; re_jo_body["qcs"]["initData"]["zzsybnsrsbInitData"] = zzsybnsrsbInitData_jo; GTXResult gr2 = GTXMethod.GetUserReportData(id, "YBNSRZZS"); if (gr2.IsSuccess) { JArray jarr = new JArray(); jarr = JsonConvert.DeserializeObject <JArray>(gr2.Data.ToString()); if (jarr.Count > 0) { byte[] bytes = Convert.FromBase64String(jarr[0]["dataValue"].ToString().Replace(" ", "+")); string dataValue = Encoding.Default.GetString(bytes); JObject data_jo = JsonConvert.DeserializeObject <JObject>(dataValue); re_jo_body["zzsybsbSbbdxxVO"] = data_jo["zzsybsbSbbdxxVO"]; } } JObject nsrxx_jo = GTXMethod.getNsrxx((JObject)re_jo_body["qcs"]["initData"]["nsrjbxx"]); re_jo_body["qcs"]["initData"]["nsrjbxx"] = nsrxx_jo; re_jo["body"] = re_jo_body; return(re_jo); }
public JObject xTempSave() { JObject re_jo = new JObject(); string str = System.IO.File.ReadAllText(Server.MapPath("xTempSave.json")); re_jo = JsonConvert.DeserializeObject <JObject>(str); string inputData = HttpUtility.UrlDecode(Request.Form["formData"], Encoding.GetEncoding("utf-8")); JObject input_jo = JsonConvert.DeserializeObject <JObject>(inputData); JArray fjsxxGridlb = (JArray)input_jo["zzsybsbSbbdxxVO"]["zzsfjssb"]["fjsxxGrid"]["fjsxxGridlb"]; JArray zbGridlbVO = (JArray)input_jo["zzsybsbSbbdxxVO"]["zzssyyybnsr_zb"]["zbGrid"]["zbGridlbVO"]; foreach (JObject j in fjsxxGridlb) { j["jsyj"] = zbGridlbVO[0]["ynsehj"]; decimal ynse = Math.Round(decimal.Parse(j["jsyj"].ToString()) * decimal.Parse(j["sl1"].ToString()), 2); j["ynse"] = ynse; j["ybtse"] = ynse; } string id = ""; GTXResult resultq = GTXMethod.GetGuiZhouYSBQC(); if (resultq.IsSuccess) { List <GDTXGuiZhouUserYSBQC> ysbqclist = JsonConvert.DeserializeObject <List <GDTXGuiZhouUserYSBQC> >(resultq.Data.ToString()); if (ysbqclist.Count > 0) { foreach (GDTXGuiZhouUserYSBQC item in ysbqclist) { if (item.BDDM == "YBNSRZZS") { id = item.Id.ToString(); } } } } List <GTXNameValue> nameList = new List <GTXNameValue>(); GTXNameValue nv = new GTXNameValue(); nv.key = "data"; byte[] bytes = Encoding.Default.GetBytes(JsonConvert.SerializeObject(input_jo)); string _result = Convert.ToBase64String(bytes); nv.value = _result; nameList.Add(nv); GTXResult saveresult = GTXMethod.SaveUserReportData(JsonConvert.SerializeObject(nameList), id, "YBNSRZZS"); if (saveresult.IsSuccess) { GTXMethod.UpdateSBSE(id, input_jo["zzsybsbSbbdxxVO"]["zzssyyybnsr_zb"]["zbGrid"]["zbGridlbVO"][0]["bqybtse"].ToString()); re_jo["returnFlag"] = "Y"; } else { re_jo["returnFlag"] = "N"; } return(re_jo); }
public JObject getGHJFData(JObject j) { JObject re_jo = new JObject(j); string str = System.IO.File.ReadAllText(Server.MapPath("xInitData.quarter.json")); re_jo = JsonConvert.DeserializeObject <JObject>(str); JObject re_jo_body = new JObject(); re_jo_body = JsonConvert.DeserializeObject <JObject>(re_jo["body"].ToString()); string id = ""; string tbrq = ""; string rqQ = ""; string rqZ = ""; GTXResult resultq = GTXMethod.GetGuiZhouYSBQC(); if (resultq.IsSuccess) { List <GDTXGuiZhouUserYSBQC> ysbqclist = JsonConvert.DeserializeObject <List <GDTXGuiZhouUserYSBQC> >(resultq.Data.ToString()); if (ysbqclist.Count > 0) { foreach (GDTXGuiZhouUserYSBQC item in ysbqclist) { if (item.BDDM == this.BDDM) { id = item.Id.ToString(); tbrq = item.HappenDate; rqQ = item.SKSSQQ; rqZ = item.SKSSQZ; } } } } re_jo_body["fxmtysbbdVO"]["fxmtySbb"]["sbbhead"]["sbrq1"] = tbrq; re_jo_body["fxmtysbbdVO"]["fxmtySbb"]["sbbhead"]["skssqq"] = rqQ; re_jo_body["fxmtysbbdVO"]["fxmtySbb"]["sbbhead"]["skssqz"] = rqZ; re_jo_body["qcs"]["formContent"]["sbTysb"]["body"]["sbxxGrid"]["sbxxGridlb"][0]["skssqq"] = rqQ; re_jo_body["qcs"]["formContent"]["sbTysb"]["body"]["sbxxGrid"]["sbxxGridlb"][0]["skssqz"] = rqZ; GTXResult gr1 = GTXMethod.GetCompany(); if (gr1.IsSuccess) { JObject jo = new JObject(); jo = JsonConvert.DeserializeObject <JObject>(gr1.Data.ToString()); if (jo.HasValues) { JObject data_jo = jo; re_jo_body["fxmtysbbdVO"]["fxmtySbb"]["sbbhead"]["nsrmc"] = data_jo["NSRMC"]; re_jo_body["fxmtysbbdVO"]["fxmtySbb"]["sbbhead"]["nsrsbh"] = data_jo["NSRSBH"]; } } GTXResult gr = GTXMethod.GetUserReportData(id, "399001010"); if (gr.IsSuccess) { JArray jarr = new JArray(); jarr = JsonConvert.DeserializeObject <JArray>(gr.Data.ToString()); if (jarr.Count > 0) { byte[] bytes = Convert.FromBase64String(jarr[0]["dataValue"].ToString().Replace(" ", "+")); string dataValue = Encoding.Default.GetString(bytes); JObject data_jo = JsonConvert.DeserializeObject <JObject>(dataValue); JArray data_ja = (JArray)data_jo["fxmtysbbdVO"]["fxmtySbb"]["sbxxGrid"]["sbxxGridlb"]; JArray mxxx = (JArray)re_jo_body["qcs"]["formContent"]["sbTysb"]["body"]["sbxxGrid"]["sbxxGridlb"]; for (int i = 0; i < data_ja.Count; i++) { //mxxx[i]["skssqq"] = data_ja[i]["sfkssqq"]; //mxxx[i]["skssqz"] = data_ja[i]["sfkssqz"]; mxxx[i]["ysx"] = data_ja[i]["ysx"]; mxxx[i]["kce"] = data_ja[i]["jcx"]; mxxx[i]["yssdl"] = data_ja[i]["yssdl"]; mxxx[i]["jsyj"] = data_ja[i]["jsfyj"]; mxxx[i]["sl"] = data_ja[i]["sflhdwse"]; mxxx[i]["sskcs"] = data_ja[i]["sskcs"]; mxxx[i]["ynse"] = data_ja[i]["bqynsfe"]; mxxx[i]["jmse"] = data_ja[i]["bqjmsfe"]; mxxx[i]["yjse"] = data_ja[i]["bqyjsfe"]; mxxx[i]["ysbse"] = data_ja[i]["bqybtsfe"]; } re_jo_body["qcs"]["formContent"]["sbTysb"]["body"]["sbxxGrid"]["sbxxGridlb"] = mxxx; } } re_jo["body"] = re_jo_body; return(re_jo); }