public JObject saveQYSDS_JM_YJ_A_Public(JObject DATA, string SBBZL_DM) { JObject re_json = new JObject(); string id = ""; GDTXGuangXiUserYSBQC ysbqc = GTXMethod.GetYSBQCByBDDM(BDDM); id = ysbqc.Id.ToString(); List <GTXNameValue> nameList = new List <GTXNameValue>(); GTXNameValue nv = new GTXNameValue(); nv.key = "data"; byte[] bytes = System.Text.Encoding.Default.GetBytes(JsonConvert.SerializeObject(DATA)); string _result = Convert.ToBase64String(bytes); nv.value = _result; nameList.Add(nv); GTXResult saveresult = GTXMethod.SaveUserReportData(JsonConvert.SerializeObject(nameList), id, SBBZL_DM); if (saveresult.IsSuccess) { re_json["code"] = "1"; re_json["msg"] = "操作成功"; } else { re_json["code"] = "-1"; re_json["msg"] = "操作失败"; } return(re_json); }
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 JObject saveSB_YHS(string data) { JObject re_json = new JObject(); string id = ""; GTXResult resultq = GTXMethod.GetGuangXiYSBQC(); if (resultq.IsSuccess) { List <GDTXGuangXiUserYSBQC> ysbqclist = JsonConvert.DeserializeObject <List <GDTXGuangXiUserYSBQC> >(resultq.Data.ToString()); if (ysbqclist.Count > 0) { foreach (GDTXGuangXiUserYSBQC item in ysbqclist) { if (item.BDDM == "YHSSB") { id = item.Id.ToString(); } } } } List <GTXNameValue> nameList = new List <GTXNameValue>(); GTXNameValue nv = new GTXNameValue(); nv.key = "data"; byte[] bytes = Encoding.Default.GetBytes(JsonConvert.SerializeObject(data)); string _result = Convert.ToBase64String(bytes); nv.value = _result; nameList.Add(nv); GTXResult saveresult = GTXMethod.SaveUserReportData(JsonConvert.SerializeObject(nameList), id, ""); if (saveresult.IsSuccess) { string str = System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("YHSSB.json")); re_json = JsonConvert.DeserializeObject <JObject>(str); GTXResult upresult = GTXMethod.UpdateYSBQC(id, "已申报"); } else { re_json["code"] = "-1"; re_json["msg"] = "操作失败"; } return(re_json); }
public JObject saveSB_FJS_ZB_Public(JObject DATA, string SBBZL_DM) { JObject return_j = new JObject(); string id = ""; GTXResult resultq = GTXMethod.GetGuangXiYSBQC(); if (resultq.IsSuccess) { List <GDTXGuangXiUserYSBQC> ysbqclist = JsonConvert.DeserializeObject <List <GDTXGuangXiUserYSBQC> >(resultq.Data.ToString()); if (ysbqclist.Count > 0) { foreach (GDTXGuangXiUserYSBQC item in ysbqclist) { if (item.BDDM == "FJSSB") { id = item.Id.ToString(); } } } } List <GTXNameValue> nameList = new List <GTXNameValue>(); GTXNameValue nv = new GTXNameValue(); nv.key = SBBZL_DM; byte[] bytes = Encoding.Default.GetBytes(JsonConvert.SerializeObject(DATA)); string _result = Convert.ToBase64String(bytes); nv.value = _result; nameList.Add(nv); GTXResult saveresult = GTXMethod.SaveUserReportData(JsonConvert.SerializeObject(nameList), id, ""); if (saveresult.IsSuccess) { return_j["code"] = "1"; return_j["msg"] = "操作成功"; } else { return_j["code"] = "-1"; return_j["msg"] = "操作失败"; } return(return_j); }
public JObject saveYsqbw(string ywbm) { JObject re_json = new JObject(); string inputData = HttpUtility.UrlDecode(Request.Form["saveData"], Encoding.GetEncoding("utf-8")); JObject input_jo = JsonConvert.DeserializeObject <JObject>(inputData); GDTXGuiZhouUserYSBQC item = GTXMethod.GetYSBQCByBDDM(ywbm); 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), item.Id.ToString(), item.BDDM); if (saveresult.IsSuccess) { string sbse = GTXMethod.getSbseFromJSON(item.BDDM, input_jo); if (sbse != "") { GTXMethod.UpdateSBSE(item.Id.ToString(), sbse); } re_json["returnFlag"] = "Y"; re_json["viewOrDownload"] = "view"; } else { re_json["returnFlag"] = "N"; re_json["viewOrDownload"] = "view"; } return(re_json); }
public JObject xTempSave() { JObject re_json = new JObject(); string str = System.IO.File.ReadAllText(Server.MapPath("xTempSave.json")); re_json = JsonConvert.DeserializeObject <JObject>(str); string inputData = HttpUtility.UrlDecode(Request.Form["formData"], Encoding.GetEncoding("utf-8")); JObject input_jo = JsonConvert.DeserializeObject <JObject>(inputData); GDTXGuiZhouUserYSBQC item = GTXMethod.GetYSBQCByBDDM(this.BDDM); 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), item.Id.ToString(), this.BDDM); if (saveresult.IsSuccess) { GTXMethod.UpdateSBSE(item.Id.ToString(), input_jo.SelectToken("ht.qysdsczzsyjdSbbdxxVO.A200000Ywbd.sbbxxForm.ybtsdseLj").Value <string>()); re_json["returnFlag"] = "Y"; } else { re_json["returnFlag"] = "N"; } return(re_json); }
public void ProcessRequest(HttpContext context) { string reportCode = ""; string userYsbqcId = ""; string sbwjs = ""; string ynse = ""; string taskname = ""; context.Response.ContentType = "application/json"; HttpRequest request = context.Request; StreamReader reader = new StreamReader(request.InputStream); string json = reader.ReadToEnd(); JObject jo = JObject.Parse(json); userYsbqcId = jo["id"].ToString().Replace("\"", ""); GTXResult result = GTXMethod.GetHeBeiYSBQC(); if (result.IsSuccess) { List <GDTXHeBeiUserYSBQC> ysbqclist = JsonConvert.DeserializeObject <List <GDTXHeBeiUserYSBQC> >(result.Data.ToString()); if (ysbqclist.Count > 0) { foreach (GDTXHeBeiUserYSBQC item in ysbqclist) { if (item.Id == Int32.Parse(userYsbqcId)) { taskname = item.TaskName; break; } } } } if (taskname != "小企业会计准则-财务报表-季报") { sbwjs = jo["sbwjs"].ToString().Replace("[", "").Replace("]", "").Replace("\\", "").Replace("\"{", "{").Replace("}\"", "}"); var jo1 = sbwjs.Split('}'); var jo3 = jo1[0].Replace("\\\"", "\"") + "}"; JObject jo2 = JObject.Parse(jo3); string bbxml = jo2["bbxml"].ToString().Replace("\"", ""); ynse = GTXMethod.getYnse(taskname, bbxml); GTXResult sresult = GTXMethod.UpdateSBSE(userYsbqcId, ynse); } List <GTXNameValue> nameList = new List <GTXNameValue>(); GTXNameValue nv = new GTXNameValue(); nv.key = "data"; byte[] bytes = Encoding.Default.GetBytes(json); string _result = Convert.ToBase64String(bytes); nv.value = _result; nameList.Add(nv); GTXResult saveresult = GTXMethod.SaveUserReportData(JsonConvert.SerializeObject(nameList), userYsbqcId, reportCode); JObject retApp = new JObject(); try { GTXResult upresult = GTXMethod.UpdateYSBQC(userYsbqcId, "已申报"); retApp.Add("msg", "已申报完成!"); retApp.Add("code", "0000"); }catch (Exception ex) { } context.Response.ContentType = "application/json;charset=UTF-8"; context.Response.Write(JsonConvert.SerializeObject(retApp)); }
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); }