private static void WriteFPMX(XmlTextWriter writer, FPDetail fpxx) { writer.WriteStartElement("JK_FWSKKP_FPMX"); foreach (GoodsInfo info in fpxx.GoodsList) { writer.WriteStartElement("JK_FWSKKP_FPMX_MXXX"); writer.WriteElementString("JK_FWSKKP_MXXX_SPMC", info.Name); writer.WriteElementString("JK_FWSKKP_MXXX_GGXH", info.SpecMark); writer.WriteElementString("JK_FWSKKP_MXXX_JLDW", info.Unit); string str = info.Num.ToString(); if (string.IsNullOrEmpty(info.Num)) { str = ""; } writer.WriteElementString("JK_FWSKKP_MXXX_SL", str); string str2 = info.Price.ToString(); if (string.IsNullOrEmpty(info.Price)) { str2 = ""; } writer.WriteElementString("JK_FWSKKP_MXXX_DJ", str2); writer.WriteElementString("JK_FWSKKP_MXXX_JE", XmlConvert.ToString(info.Amount)); writer.WriteElementString("JK_FWSKKP_MXXX_SE", XmlConvert.ToString(info.Tax)); writer.WriteEndElement(); } writer.WriteEndElement(); }
public List <FPDetail> GetFPDetailListByFPZL(int ssyf, string taxCode, string fpzl) { List <FPDetail> list = new List <FPDetail>(); Dictionary <string, object> dictionary = new Dictionary <string, object>(); dictionary.Add("XFSH", taxCode); dictionary.Add("SSYF", ssyf); dictionary.Add("FPZL", fpzl); try { foreach (object obj2 in this.baseDAO.querySQL("aisino.fwkp.bsgl.selectXxfpByMonthFPZL", dictionary)) { FPDetail item = this.CreateFPMainInfo(obj2); if (!string.IsNullOrEmpty(item.SIGN) && !string.IsNullOrEmpty(item.YYSBZ)) { list.Add(item); } } } catch (BaseException exception) { ExceptionHandler.HandleError(exception); this.loger.Error(exception.get_UserMessage() + exception.Message, exception); } catch (Exception exception2) { this.loger.Error(exception2.Message, exception2); } return(list); }
public List <FPDetail> GetFPDetailList(DateTime startDate, DateTime endDate) { List <FPDetail> list = new List <FPDetail>(); try { Dictionary <string, object> dictionary = new Dictionary <string, object>(); DateTime time = Convert.ToDateTime(endDate.AddDays(1.0).ToShortDateString()); dictionary.Add("QSRQ", startDate); dictionary.Add("ZZRQ", time); foreach (object obj2 in this.baseDAO.querySQL("aisino.fwkp.bsgl.selectXxfpByDate", dictionary)) { FPDetail item = this.CreateFPMainInfo(obj2); list.Add(item); } } catch (BaseException exception) { ExceptionHandler.HandleError(exception); this.loger.Error(exception.get_UserMessage() + exception.Message, exception); } catch (Exception exception2) { this.loger.Error(exception2.Message, exception2); } return(list); }
private static void WriteFPBTXX(XmlTextWriter writer, FPDetail fpxx) { writer.WriteStartElement("JK_FWSKKP_FPXX_BTXX"); writer.WriteElementString("JK_FWSKKP_FPXX_FPZL", XmlConvert.ToString((int)fpxx.FPType)); writer.WriteElementString("JK_FWSKKP_FPXX_FPDM", fpxx.FPDM); writer.WriteElementString("JK_FWSKKP_FPXX_FPHM", XmlConvert.ToString(fpxx.FPHM)); writer.WriteElementString("JK_FWSKKP_FPXX_KPRQ", fpxx.KPRQ.ToString("yyyyMMdd")); writer.WriteElementString("JK_FWSKKP_FPXX_GFSBH", fpxx.GFSH); writer.WriteElementString("JK_FWSKKP_FPXX_GFMC", fpxx.GFMC); writer.WriteElementString("JK_FWSKKP_FPXX_GFDZDH", fpxx.GFDZDH); writer.WriteElementString("JK_FWSKKP_FPXX_GFYHZH", fpxx.GFYHZH); writer.WriteElementString("JK_FWSKKP_FPXX_HJJE", XmlConvert.ToString(fpxx.HJJE)); writer.WriteElementString("JK_FWSKKP_FPXX_HJSE", XmlConvert.ToString(fpxx.HJSE)); writer.WriteElementString("JK_FWSKKP_FPXX_SL", XmlConvert.ToString(fpxx.SLV)); writer.WriteElementString("JK_FWSKKP_FPXX_ZFBZ", fpxx.ZFBZ ? "1" : "0"); writer.WriteElementString("JK_FWSKKP_FPXX_KPR", fpxx.KPR); writer.WriteElementString("JK_FWSKKP_FPXX_XFSBH", fpxx.XFSH); writer.WriteElementString("JK_FWSKKP_FPXX_XFMC", fpxx.XFMC); writer.WriteElementString("JK_FWSKKP_FPXX_XFDZDH", fpxx.XFDZDH); writer.WriteElementString("JK_FWSKKP_FPXX_XFYHZH", fpxx.XFYHZH); writer.WriteElementString("JK_FWSKKP_FPXX_BZ", fpxx.BZ); writer.WriteEndElement(); }
private FPDetail CreateFPMainInfo(object item) { FPDetail detail = new FPDetail(); Dictionary <string, object> dictionary = item as Dictionary <string, object>; if (dictionary != null) { try { detail.BMBBBH = dictionary["BMBBBH"].ToString(); detail.FPType = (FPType)Enum.Parse(typeof(FPType), dictionary["FPZL"].ToString(), true); detail.FPDM = dictionary["FPDM"].ToString(); detail.FPHM = this.ConvertToLong(dictionary["FPHM"]); detail.KPRQ = this.ConvertToDateTime(dictionary["KPRQ"]); detail.GFSH = dictionary["GFSH"].ToString(); detail.GFMC = dictionary["GFMC"].ToString(); detail.GFDZDH = dictionary["GFDZDH"].ToString(); detail.GFYHZH = dictionary["GFYHZH"].ToString(); detail.XFSH = dictionary["XFSH"].ToString(); detail.XFMC = dictionary["XFMC"].ToString(); detail.XFDZDH = dictionary["XFDZDH"].ToString(); detail.XFYHZH = dictionary["XFYHZH"].ToString(); detail.HJJE = this.ConvertToDecimal(dictionary["HJJE"]); if (string.IsNullOrEmpty(dictionary["SLV"].ToString())) { detail.SLV = 99.01f; } else { detail.SLV = this.ConvertToFloat(dictionary["SLV"]); } detail.HJSE = this.ConvertToDecimal(dictionary["HJSE"]); detail.HXM = dictionary["HXM"].ToString(); detail.ZFBZ = this.ConvertToBool(dictionary["ZFBZ"]); detail.KPR = dictionary["KPR"].ToString(); detail.BZ = dictionary["BZ"].ToString(); detail.YYSBZ = dictionary["YYSBZ"].ToString(); detail.QDBZ = this.ConvertToBool(dictionary["QDBZ"]); detail.CM = dictionary["CM"].ToString(); detail.TYDH = dictionary["TYDH"].ToString(); detail.SCCJMC = dictionary["SCCJMC"].ToString(); detail.XFDZ = dictionary["XFDZ"].ToString(); detail.KHYHMC = dictionary["KHYHMC"].ToString(); detail.QYD = dictionary["QYD"].ToString(); detail.ZHD = dictionary["ZHD"].ToString(); detail.XHD = dictionary["XHD"].ToString(); detail.JQBH = dictionary["JQBH"].ToString(); detail.YYZZH = dictionary["YYZZH"].ToString(); detail.MW = dictionary["MW"].ToString(); detail.YSHWXX = dictionary["YSHWXX"].ToString(); detail.HYBM = dictionary["HYBM"].ToString(); detail.SKR = dictionary["SKR"].ToString(); detail.FHR = dictionary["FHR"].ToString(); detail.XSBM = dictionary["XSBM"].ToString(); detail.XFDH = dictionary["XFDH"].ToString(); detail.KHYHZH = dictionary["KHYHZH"].ToString(); detail.MDD = dictionary["MDD"].ToString(); detail.JYM = dictionary["JYM"].ToString(); detail.SIGN = dictionary["SIGN"].ToString(); detail.ZFRQ = this.ConvertToDateTime(dictionary["ZFRQ"]); detail.WSPZHM = dictionary["WSPZHM"].ToString(); detail.HZTZDH = dictionary["HZTZDH"].ToString(); detail.LZDMHM = dictionary["LZDMHM"].ToString(); detail.XSDJBH = dictionary["XSDJBH"].ToString(); detail.SPBM = dictionary["ZYSPMC"].ToString(); string str2 = dictionary["SPSM_BM"].ToString(); if (str2.IndexOf("#%") > -1) { detail.QYZBM = str2.Substring(0, str2.IndexOf("#%")); detail.ZZSTSGL = str2.Substring(str2.IndexOf("#%") + 2); } else { detail.QYZBM = detail.ZZSTSGL = ""; } str2 = dictionary["SKR"].ToString(); if (str2.IndexOf("#%") > -1) { detail.SFYH = str2.Substring(0, str2.IndexOf("#%")); detail.LSLBS = str2.Substring(str2.IndexOf("#%") + 2); return(detail); } detail.SFYH = detail.LSLBS = ""; } catch (Exception exception) { this.loger.Error(exception.Message, exception); throw exception; } } return(detail); }