Ejemplo n.º 1
0
        /// <summary>
        /// 获取案件文件
        /// </summary>
        /// <returns></returns>
        private void GetFile()
        {
            string wjlj = HttpUtility.UrlDecode(HttpUtility.UrlDecode(Request["wjlj"].Trim()));
            string wjmc = HttpUtility.UrlDecode(HttpUtility.UrlDecode(Request["wjmc"].Trim()));

            if (string.IsNullOrEmpty(wjlj) || string.IsNullOrEmpty(wjmc))
            {
                Response.Write("访问参数错误");
            }
            else
            {
                EDRS.BLL.XY_DZJZ_XTPZ   bll   = new EDRS.BLL.XY_DZJZ_XTPZ(this.Request);
                EDRS.Model.XY_DZJZ_XTPZ model = bll.GetModel((int)EnumConfig.卷宗文件下载地址);
                if (model != null)
                {
                    IceServicePrx isp = new IceServicePrx();

                    string msg = "";

                    byte[] bytes = new byte[] { };

                    if (isp.DownFile(model.CONFIGVALUE, wjlj, wjmc, "", ref bytes, ref msg))
                    {
                        string showType = ConfigHelper.GetConfigString("FileShowType");
                        if (showType == "1")
                        {
                            Response.Write("<img style=\"max-width:100%;\" alt=\"\" src=\"data:image/jpeg;base64," + Convert.ToBase64String(bytes) + "\" />");
                        }
                        else
                        {
                            byte[] info = DataEncryption.Decryption(bytes);

                            //MemoryStream ms = new MemoryStream(bytes);  //把那个byte[]数组传进去,然后
                            //File.WriteAllBytes(Server.MapPath("/") + "ddd.pdf", bytes);
                            //FileStream fs = new FileStream(Server.MapPath("/")+"ccc.pdf",FileMode.Append, FileAccess.Write);
                            //ms.WriteTo(fs);
                            //ms.Close();
                            //fs.Close();

                            Response.ContentType = "application/pdf";
                            Response.AddHeader("content-disposition", "filename=pdf");
                            Response.AddHeader("content-length", info.Length.ToString());
                            Response.BinaryWrite(info);
                        }
                    }
                    else
                    {
                        Response.Write(msg);
                    }
                }
                else
                {
                    Response.Write("请先配置" + EnumConfig.卷宗文件下载地址);
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 根据系统配置的配置编号获取对应的配置信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public EDRS.Model.XY_DZJZ_XTPZ GetConfigById(EnumConfig econfig)
        {
            string where = string.Empty;

            object[] values = new object[1];

            where     = " and CONFIGID=:CONFIGID and SYSTEMMARK=1";
            values[0] = (int)econfig;


            EDRS.BLL.XY_DZJZ_XTPZ bll = new EDRS.BLL.XY_DZJZ_XTPZ(this.Request);

            List <EDRS.Model.XY_DZJZ_XTPZ> modelList = bll.GetModelList(where, values);

            if (modelList != null && modelList.Count > 0)
            {
                return(modelList[0]);
            }
            return(null);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 打印
        /// </summary>
        /// <returns></returns>
        private string PrintFileByXh()
        {
            //申请序号
            string xh = Request.Form.Get("xh");
            //选择文件文件序号WJLJ
            string param = Request.Form.Get("param");

            if (string.IsNullOrEmpty(xh) || string.IsNullOrEmpty(param))
            {
                return(ReturnString.JsonToString(Prompt.error, "打印未获取到参数", null));
            }
            string[] paramArr = param.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);

            if (paramArr.Length == 0)
            {
                return(ReturnString.JsonToString(Prompt.error, "请选择需要打印的文件页", null));
            }
            else
            {
                //设置文件是需要打印的
                List <EDRS.Model.YX_DZJZ_WJSQDYJL> listModel = new List <EDRS.Model.YX_DZJZ_WJSQDYJL>();
                EDRS.Model.YX_DZJZ_WJSQDYJL        model     = null;
                string[] arr = null;
                //循环构造集合
                for (int i = 0; i < paramArr.Length; i++)
                {
                    arr = paramArr[i].Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                    if (arr.Length == 2)
                    {
                        model      = new EDRS.Model.YX_DZJZ_WJSQDYJL();
                        model.WJXH = paramArr[1];
                        // model.WJLJ = arr[0];
                        model.XH     = xh;
                        model.SFXYDY = "Y";
                        listModel.Add(model);
                    }
                }
                EDRS.BLL.YX_DZJZ_WJSQDY bll = new EDRS.BLL.YX_DZJZ_WJSQDY(Request);
                if (bll.UpdateListJl(listModel))
                {
                    #region 获取打印参数
                    EDRS.BLL.XY_DZJZ_XTPZ   xtpzbll = new EDRS.BLL.XY_DZJZ_XTPZ(Request);
                    EDRS.Model.XY_DZJZ_XTPZ xtpz    = xtpzbll.GetConfigById(EnumConfig.卷宗文件上传地址);
                    string linkType = string.Empty; //链接类型
                    string callBack = string.Empty; //路由链接模式地址
                    object obj      = xtpzbll.GetConfigById(EnumConfig.连接类型);
                    if (obj != null)
                    {
                        linkType = ((EDRS.Model.XY_DZJZ_XTPZ)obj).CONFIGVALUE;
                    }
                    object obj2 = xtpzbll.GetConfigById(EnumConfig.路由映射地址);
                    if (obj2 != null && obj2 != DBNull.Value)
                    {
                        callBack = ((EDRS.Model.XY_DZJZ_XTPZ)obj2).CONFIGVALUE;
                    }
                    string strstring = xtpz.CONFIGVALUE + "@" + linkType + "@" + callBack + "@" + xh + "@3";
                    #endregion

                    OperateLog.AddLog(OperateLog.LogType.阅卷Web, "打印律师申请文件页成功", UserInfo, UserRole, this.Request);

                    return(ReturnString.JsonToString(Prompt.win, DESEncrypt.Encrypt(strstring), null));
                }
                OperateLog.AddLog(OperateLog.LogType.阅卷Web, "打印律师申请文件页失败", UserInfo, UserRole, this.Request);

                return(ReturnString.JsonToString(Prompt.error, "打印失败", null));
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 获取案件文件
        /// </summary>
        /// <returns></returns>
        private void GetFile()
        {
            string wjlj = "";
            string wjmc = "";


            //  string dwbm = HttpUtility.UrlDecode(HttpUtility.UrlDecode(Request["DWBM"].Trim()));
            //string bh = HttpUtility.UrlDecode(HttpUtility.UrlDecode(Request["BH"].Trim()));
            string jzbh    = HttpUtility.UrlDecode(HttpUtility.UrlDecode(Request["JZBH"].Trim()));
            string jzwjybh = HttpUtility.UrlDecode(HttpUtility.UrlDecode(Request["JZWJYBH"].Trim()));

            EDRS.BLL.YX_DZJZ_JZMLWJ bll = new EDRS.BLL.YX_DZJZ_JZMLWJ(HttpContext.Current.Request);
            DataSet ds = bll.GetList(" and JZBH=:JZBH and WJXH=:WJXH", new object[] { jzbh, jzwjybh });

            //判断是否查询出现异常
            if (ds != null && ds.Tables.Count > 0)
            {
                //判断查询没有数据
                if (ds.Tables[0].Rows.Count > 0)
                {
                    wjlj = ds.Tables[0].Rows[0]["WJLJ"].ToString();
                    wjmc = ds.Tables[0].Rows[0]["WJMC"].ToString();
                }
            }

            if (string.IsNullOrEmpty(wjlj) || string.IsNullOrEmpty(wjmc))
            {
                Response.Write("访问参数错误");
            }
            else
            {
                EDRS.BLL.XY_DZJZ_XTPZ   bllto = new EDRS.BLL.XY_DZJZ_XTPZ(this.Request);
                EDRS.Model.XY_DZJZ_XTPZ model = bllto.GetModel((int)EnumConfig.卷宗文件下载地址);
                if (model != null)
                {
                    IceServicePrx isp   = new IceServicePrx();
                    string        msg   = "";
                    byte[]        bytes = new byte[] { };
                    if (isp.DownFile(model.CONFIGVALUE, wjlj, wjmc, "", ref bytes, ref msg))
                    {
                        string showType = ConfigHelper.GetConfigString("FileShowType");
                        if (showType == "1")
                        {
                            Response.Write("<img style=\"max-width:100%;\" alt=\"\" src=\"data:image/jpeg;base64," + Convert.ToBase64String(bytes) + "\" />");
                        }
                        else
                        {
                            byte[] info = DataEncryption.Decryption(bytes);
                            Response.ContentType = "application/pdf";
                            Response.AddHeader("content-disposition", "filename=pdf");
                            Response.AddHeader("content-length", info.Length.ToString());
                            Response.BinaryWrite(info);
                        }
                    }
                    else
                    {
                        Response.Write(msg);
                    }
                }
                else
                {
                    Response.Write("请先配置" + EnumConfig.卷宗文件下载地址);
                }
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 获取案件文件
        /// </summary>
        /// <returns></returns>
        private string GetFile()
        {
            string param = Request.Form["param"];

            if (string.IsNullOrEmpty(param))
            {
                return(ReturnString.JsonToString(Prompt.error, "打印未获取到参数", null));
            }

            string[] paramArr = param.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);

            if (paramArr.Length == 0)
            {
                return(ReturnString.JsonToString(Prompt.error, "访问参数错误", null));
            }
            else
            {
                EDRS.BLL.XY_DZJZ_XTPZ   bll   = new EDRS.BLL.XY_DZJZ_XTPZ(this.Request);
                EDRS.Model.XY_DZJZ_XTPZ model = bll.GetModel((int)EnumConfig.卷宗文件下载地址);
                if (model != null)
                {
                    IceServicePrx isp = new IceServicePrx();

                    string msg = "";

                    byte[] bytes = new byte[] { };

                    List <byte[]> pdflist = new List <byte[]>();

                    byte[] info = null;

                    string[] paramIds = null;


                    for (int i = 0; i < paramArr.Length; i++)
                    {
                        paramIds = paramArr[i].Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                        if (isp.DownFile(model.CONFIGVALUE, paramIds[0], paramIds[1], "", ref bytes, ref msg))
                        {
                            info = DataEncryption.Decryption(bytes);
                            pdflist.Add(info);
                        }
                        if (!string.IsNullOrEmpty(msg))
                        {
                            return(ReturnString.JsonToString(Prompt.error, StringPlus.String2Json(msg), null));
                        }
                    }
                    string fileName  = DateTime.Now.ToString("yyyyMMddHHmmssfff");
                    string fileParnt = string.Format("/PrintPdfFiles/{0}.pdf", fileName);
                    byte[] d         = MergePDFFiles(pdflist, fileParnt);
                    //Response.ContentType = "application/pdf";
                    //Response.AddHeader("content-disposition", "filename=pdf");
                    //Response.AddHeader("content-length", d.Length.ToString());
                    //Response.BinaryWrite(d);
                    return(ReturnString.JsonToString(Prompt.win, fileName, null));
                }
                else
                {
                    return(ReturnString.JsonToString(Prompt.error, "请先配置" + EnumConfig.卷宗文件下载地址, null));
                }
            }
        }