Ejemplo n.º 1
0
        /// <summary>
        /// 手动报送
        /// </summary>
        /// <returns></returns>
        private string SetBs()
        {
            string AJBH = Request.Form["AJBH"];
            string WSBH = Request.Form["WSBH"];
            string ZZZT = Request.Form["ZZZT"];
            string Str  = "";

            if (string.IsNullOrEmpty(AJBH) || string.IsNullOrEmpty(WSBH) || ZZZT != "6")
            {
                return("{\"Stat\":1,\"Msg\":\"报送通知失败,手动报送只能针对报送失败的案件。\",\"Data\":\"\"}");
            }
            try
            {
                string bmsahs = GetText();
                if (bmsahs.IndexOf(WSBH) > -1)
                {
                    Str = "{\"Stat\":1,\"Msg\":\"报送通知失败,上一次报送通知尚未处理,请不要重复通知\",\"Data\":\"\"}";
                    OperateLog.AddLog(OperateLog.LogType.卷宗OCR及打包状态, "接收到报送通知失败:上一次报送通知尚未处理,不重复接收。[案件编号=" + AJBH + ",文书编号=" + WSBH + "]", "|" + AJBH + "|" + WSBH, null, null, this.Context.Request);
                }
                else
                {
                    if (!string.IsNullOrEmpty(bmsahs))
                    {
                        bmsahs += ",";
                    }
                    bmsahs += WSBH;
                    //验证
                    EDRS.BLL.YX_DZJZ_JZJBXX bll = new YX_DZJZ_JZJBXX(this.Context.Request);
                    DataSet ds = bll.GetList(" AND WSBH=:WSBH", new object[] { WSBH });
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        Str = "{\"Stat\":1,\"Msg\":\"报送通知失败,无对应案件信息\",\"Data\":\"\"}";

                        OperateLog.AddLog(OperateLog.LogType.卷宗OCR及打包状态, "不接收的案件报送通知:不存在对应文书编号的案件。[案件编号=" + AJBH + ",文书编号=" + WSBH + "]", "|" + AJBH + "|" + WSBH, null, null, this.Context.Request);
                    }
                    else
                    {
                        string jzbh = ds.Tables[0].Rows[0]["JZBH"].ToString();
                        EDRS.Model.YX_DZJZ_JZJBXX jz = bll.GetModel(jzbh);
                        if (jz == null)
                        {
                            Str = "{\"Stat\":1,\"Msg\":\"报送通知失败,无对应案件信息\",\"Data\":\"\"}";
                            OperateLog.AddLog(OperateLog.LogType.卷宗OCR及打包状态, "不接收的案件报送通知:不存在对应文书编号的案件。[案件编号=" + AJBH + ",文书编号=" + WSBH + "]", "|" + AJBH + "|" + WSBH, null, null, this.Context.Request);
                        }
                        else
                        {
                            //审核通过或已上报允许报送
                            //if (jz.ZZZT == "4" || jz.ZZZT == "5")
                            //{
                            SaveText(bmsahs);
                            Str = "{\"Stat\":0,\"Msg\":\"报送通知成功\"}";
                            OperateLog.AddLog(OperateLog.LogType.卷宗OCR及打包状态, "接收到报送通知成功:[案件编号=" + AJBH + ",文书编号=" + WSBH + "]", "|" + AJBH + "|" + WSBH, null, null, this.Context.Request);

                            //}
                            //else
                            //{
                            //    Str = "{\"Stat\":1,\"Msg\":\"报送通知失败,当前报送案件尚未审核通过\",\"Data\":\"\"}";
                            //    OperateLog.AddLog(OperateLog.LogType.卷宗OCR及打包状态, "接收到报送通知成功:[案件编号=" + AJBH + ",文书编号=" + WSBH + "]", "|" + AJBH + "|" + WSBH, null, null, this.Context.Request);

                            //}
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Str = "{\"Stat\":1,\"Msg\":\"接收报送通知失败:错误信息请查看系统日志!\",\"Data\":\"\"}";
                OperateLog.AddLog(OperateLog.LogType.卷宗OCR及打包状态, "接收到报送通知失败:处理报送数据时发生系统错误,详情查看日志。[案件编号=" + AJBH + ",文书编号=" + WSBH + "]", "|" + AJBH + "|" + WSBH, null, null, this.Context.Request);
                EDRS.Common.LogHelper.LogError(this.Context.Request, "Exception", ex.Message, "public void SetBs(string AJBH, string WSBH)", "WebUI.MakeCheck", "");
            }
            return(Str);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 修改配置数据
        /// </summary>
        /// <returns></returns>
        private string UpData()
        {
            string ids = Request.Form["bmsah"];

            string[] id = ids.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
            ids = "";
            for (int i = 0; i < id.Length; i++)
            {
                ids += "'" + id[i].Trim() + "'";
                if (i < id.Length - 1)
                {
                    ids += ",";
                }
            }
            if (string.IsNullOrEmpty(ids))
            {
                return(ReturnString.JsonToString(Prompt.error, "未找到需要修改信息", null));
            }

            YX_DZJZ_JZJBXX bll = new YX_DZJZ_JZJBXX(this.Request);


            if (bll.UpdateByZZZTList(ids, UserInfo.MC, DateTime.Now, UserInfo.GH, Request.Form.Get("type"), Request.Form.Get("txt_pz")))
            {
                //数据日志
                OperateLog.AddLog(OperateLog.LogType.案件卷宗制作Web, "操作成功", "", UserInfo, UserRole, this.Request);
                foreach (string key in ids.Split(','))
                {
                    string bmsah = key.Replace("'", "");
                    EDRS.Model.YX_DZJZ_JZJBXX model = bll.GetModel(bmsah);
                    if (model != null && (model.ZZZT == "4" || model.ZZZT == "3"))
                    {
                        try
                        {
                            WebReference.jzfk _interface = new WebReference.jzfk();
                            string            status     = model.ZZZT == "4" ? "1" : "0";
                            string            result     = _interface.updateStatus(model.AJBH, model.WSBH, status);
                            string            msg        = "通知审核状态记录:" + result + "|本地状态:" + model.ZZZT + "|AJBH:" + model.AJBH + "|WSBH:" + model.WSBH + "|" + status;
                            try
                            {
                                string       NoticeAuditStatusFilePath = Path.Combine(Path.Combine(GetRootPath(), "NoticeFile"), "NoticeWaitAuditStatus.txt");
                                FileStream   fs = new FileStream(NoticeAuditStatusFilePath, FileMode.Append);
                                StreamWriter sr = new StreamWriter(fs, System.Text.Encoding.Default);
                                sr.WriteLine(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "|" + msg);
                                sr.Close();
                                fs.Close();
                            }
                            catch (Exception ex)
                            { }

                            OperateLog.AddLog(OperateLog.LogType.卷宗OCR及打包状态, "通知状态改变成功:[案件编号=" + model.AJBH + ",文书编号=" + model.WSBH + "]", model.BMSAH + "|" + model.AJBH + "|" + model.WSBH, null, null, this.Request);
                        }
                        catch (Exception ex)
                        {
                            OperateLog.AddLog(OperateLog.LogType.卷宗OCR及打包状态, "状态回写失败:" + ex.Message, "", UserInfo, UserRole, this.Request);
                        }
                    }
                }
                return(ReturnString.JsonToString(Prompt.win, "操作成功", null));
            }
            //数据日志
            OperateLog.AddLog(OperateLog.LogType.案件卷宗制作Web, "操作失败", "", UserInfo, UserRole, this.Request);
            return(ReturnString.JsonToString(Prompt.error, "操作失败", null));
        }