Esempio n. 1
0
        /// <summary>
        /// 编辑详情
        /// </summary>
        /// <param name="educationId"></param>
        /// <returns></returns>
        public ActionResult Edit(string whiteListId)
        {
            var entity = new ComWhiteListEntity();

            if (!string.IsNullOrEmpty(whiteListId))
            {
                entity = _whiteListBll.Get(whiteListId);
            }
            else
            {
                entity.Id = Guid.NewGuid().ToString();  //主键
            }

            //省份
            var carNoProviences = new ComResourceBll().GetSearchResult(new ComResourceEntity {
                ParentId = "0025"
            });

            carNoProviences.Insert(0, new ComResourceEntity {
                Id = "", RsKey = "请选择"
            });
            ViewData["CarCarNoProvience"] = new SelectList(carNoProviences, "RsKey", "RsKey");

            //26个市字母
            var carCarNoWord = new ComResourceBll().GetSearchResult(new ComResourceEntity {
                ParentId = "0026"
            });

            carCarNoWord.Insert(0, new ComResourceEntity {
                Id = "", RsKey = "请选择"
            });
            ViewData["CarCarNoWord"] = new SelectList(carCarNoWord, "RsKey", "RsKey");

            return(View(entity));
        }
Esempio n. 2
0
        /// <summary>
        /// 获取消息类型数据
        /// 添加人:胡 耀 锋
        /// 添加时间:2014-04-09
        /// </summary>
        /// <returns></returns>
        public JsonResult GetMessageType()
        {
            var type = new ComResourceBll().GetSearchResult(new ComResourceEntity()
            {
                ParentId = "0005"
            });

            return(Json(type, JsonRequestBehavior.AllowGet));
        }
Esempio n. 3
0
        /// <summary>
        /// 编辑
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult Edit(string id)
        {
            var entity = new ComResourceEntity();

            if (!string.IsNullOrEmpty(id))
            {
                entity = new ComResourceBll().Get(id);
            }
            return(View(entity));
        }
Esempio n. 4
0
        /// <summary>
        /// 请求Grid数据
        /// 添加人:周 鹏
        /// 添加时间:2015-01-26
        /// </summary>
        /// <history>
        /// 修改描述:时间+作者+描述
        /// </history>
        /// <param name="id"></param>
        /// <returns></returns>
        public string GetGridJson(string id)
        {
            var resourceList = new List <ComResourceEntity>();

            if (!string.IsNullOrEmpty(id))
            {
                resourceList = new ComResourceBll().GetResourcesByParentId(id);
            }
            var result = new PageJqDatagrid <ComResourceEntity>()
            {
                rows = resourceList
            };

            return(JsonConvert.SerializeObject(result));
        }
Esempio n. 5
0
        public JsonResult Delete(string id)
        {
            var rtState = 1;

            if (!string.IsNullOrEmpty(id))
            {
                rtState = new ComResourceBll().BatchDelete("'" + id + "'") ? 1 : 0;
            }
            var rtEntity = new StatusModel <DBNull>
            {
                rtData  = null,
                rtMsrg  = "成功",
                rtState = rtState
            };

            return(Json(rtEntity, JsonRequestBehavior.AllowGet));
        }
Esempio n. 6
0
        /// <summary>
        /// 请求TreeJson
        /// 添加人:周 鹏
        /// 添加时间:2015-01-26
        /// <history>
        /// 修改描述:时间+作者+描述
        /// </history>
        /// </summary>
        /// <returns></returns>
        public JsonResult TreeDictionary(string parentId = "", string id = "")
        {
            var resourceList = new ComResourceBll().GetSearchResult(new ComResourceEntity()
            {
            });

            var topResource = resourceList.Where(x => x.ParentId == parentId).ToList();
            var result      = (from crmRoleEntity in topResource
                               select new TreeNode()
            {
                id = crmRoleEntity.Id,
                text = crmRoleEntity.RsKey,
                showcheck = false,
                isexpand = true,
                complete = true,
                hasChildren = false,
                ChildNodes = null
            }).ToList();

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
Esempio n. 7
0
        /// <summary>
        /// 请求TreeJson
        /// 添加人:周 鹏
        /// 添加时间:2015-01-26
        /// <history>
        /// 修改描述:时间+作者+描述
        /// </history>
        /// </summary>
        /// <returns></returns>
        public JsonResult TreeDetailsDictionary(string dataDictionaryId = "")
        {
            var resourceList = new ComResourceBll().GetSearchResult(new ComResourceEntity()
            {
            });

            var topResource = resourceList.Where(x => x.Id == dataDictionaryId).ToList();

            var result = (from resourceEntity in topResource
                          let childs = ChildTree(resourceList, resourceEntity.Id)
                                       select new TreeNode()
            {
                id = resourceEntity.Id,
                text = resourceEntity.RsKey,
                showcheck = false,
                isexpand = false,
                complete = true,
                hasChildren = childs.Count > 0,
                ChildNodes = childs
            }).ToList();

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
Esempio n. 8
0
        /// <summary>
        /// add by lpl
        /// 2019-1-3
        /// 绑定权力事项类型
        /// </summary>
        /// <returns></returns>
        public string BindLx()
        {
            var data = new ComResourceBll().GetResourcesByParentId("0058");

            return(JsonConvert.SerializeObject(data));
        }
Esempio n. 9
0
        //重新执行照片合成
        public void ConverInf(string checksignId)
        {
            var search = new InfCarChecksignBll().Get(checksignId);

            var listWt = new InfCarAttachBll().Query(Yookey.WisdomClassed.SIP.Model.QueryCondition.Instance.AddEqual(InfCarAttachEntity.Parm_INF_CAR_ATTACH_ResourceId, search.Id).
                                                     AddEqual(InfCarAttachEntity.Parm_INF_CAR_ATTACH_FileType, "2"));
            string picCompleteAddr = "";  //合成后的照片

            //如果该条案件没有合成照片,合成案件照片,有的话,则直接取
            if (listWt.Count <= 0)
            {
                #region 合成照片
                //设备编号
                var sbCode = AppConfig.SBCode;
                ////公路等级
                //违法行为
                var wfxw = AppConfig.WFXW;
                //发现机关
                var fxjg = AppConfig.FXJG;
                //执勤民警
                var zqmj = AppConfig.ZQMJ;
                //实测值
                var scValue = AppConfig.SCValue;
                //标准值
                var bzValue = AppConfig.BZValue;
                //通知书编号
                var tzsbh = AppConfig.TZSBH;
                //采集方式
                var cjfs = AppConfig.CJFS;
                //识别用户
                var sbyh = AppConfig.SBYH;
                //总数
                var total = AppConfig.Total;
                //序号
                var sn = AppConfig.SN;
                //备注
                var remark = AppConfig.Remark;
                //版本
                var ver = AppConfig.Ver;

                //取得案件的单张照片
                listWt = new InfCarAttachBll().Query(Yookey.WisdomClassed.SIP.Model.QueryCondition.Instance.AddEqual(InfCarAttachEntity.Parm_INF_CAR_ATTACH_ResourceId, search.Id).
                                                     AddEqual(InfCarAttachEntity.Parm_INF_CAR_ATTACH_FileType, "1"));
                if (listWt != null && listWt.Count > 0)
                {
                    var filename = "";

                    #region 构造附件名称
                    filename = sbCode + "_"; //设备编号
                    var road = search.Road;

                    string _GLDJ = "9999";
                    filename += road + "_";                    //主干道地点代码
                    filename += _GLDJ + "_";                   //公路等级
                    filename += search.CheckSignAddress + "_"; //违章地点
                    filename += "9_";                          //方向

                    var checkDate = search.CheckDate;

                    var ctime = checkDate.ToString("yyyyMMddHHmmss");

                    filename += ctime + "_";                                                                                                                       //违章时间
                    filename += scValue + "_";                                                                                                                     //实测值
                    filename += bzValue + "_";                                                                                                                     //标准值
                    filename += new ComResourceBll().Get(search.CarType).RsValue + "_";                                                                            //号牌种类
                    var carno = search.CarNo;
                    if (carno.Substring(carno.Length - 1, 1) == "学" || carno.Substring(carno.Length - 1, 1) == "挂" || carno.Substring(carno.Length - 1, 1) == "警") //判断车牌号码后面是否带学或挂等字
                    {
                        //如果包含学或挂字,去掉
                        carno = carno.Substring(0, carno.Length - 1);
                    }
                    filename += carno + "_";  //车牌号码
                    filename += wfxw + "_";   //违法行为
                    filename += fxjg + "_";   //发现机关
                    filename += zqmj + "_";   //执勤民警
                    filename += tzsbh + "_";  //通知书编号
                    filename += cjfs + "_";   //采集方式
                    filename += sbyh + "_";   //识别用户
                    filename += total + "_";  //总数
                    filename += sn + "_";     //序号
                    filename += remark + "_"; //备注
                    filename += ver;          //版本
                    #endregion

                    var fjFileName = filename + ".JPG";//合并的照片名称

                    #region 创建合成文件
                    string filePath1 = "", filePath2 = "", filePath3 = "";
                    for (var i = 0; i < listWt.Count; i++)
                    {
                        var imgAddr = "";
                        if (listWt[i].ImgAddress != null)
                        {
                            imgAddr = listWt[i].ImgAddress;  //单张照片的路径
                        }
                        switch (i)
                        {
                        case 0:
                            filePath1 = imgAddr;
                            break;

                        case 1:
                            filePath2 = imgAddr;
                            break;

                        case 2:
                            filePath3 = imgAddr;
                            break;
                        }
                    }
                    var pwh = AppConfig.Pwh;
                    var w   = int.Parse(pwh.Split('|')[0]); //获得指定宽度
                    var h   = int.Parse(pwh.Split('|')[1]); //获得指定高度

                    if (filePath1 != "" && filePath2 != "") //判断如果本地照片数量大于2张的话,则调用合成方法
                    {
                        //调用服务执行合并生成违章停车照片方法
                        var pictureService = new PictureService.PictureService(AppConfig.FileSaveServiceLink);
                        picCompleteAddr = pictureService.MakewatermarkNew(filePath1, filePath2, filePath3, fjFileName, "", w, h, "HW", "1");
                    }
                    else if (filePath1 != "" && filePath2 == "" && filePath3 == "") //如果只有一张单张片,复制一张添加进去。
                    {
                        //调用服务执行复制重命名图片
                        var pictureService = new PictureService.PictureService(AppConfig.FileSaveServiceLink);
                        picCompleteAddr = pictureService.CopNewPic(filePath1, fjFileName);
                    }

                    //将新的合成图片保存附件至数据库中
                    if (picCompleteAddr != "")
                    {
                        var pic = new InfCarAttachEntity()
                        {
                            ImgAddress = picCompleteAddr,
                            FileType   = "2",
                            FileName   = fjFileName,
                            CreateBy   = "",
                            CreateDate = DateTime.Now,
                            RowStatus  = 1,
                            ResourceId = search.Id
                        };
                        new InfCarAttachBll().Add(pic);
                    }
                    #endregion
                }
                #endregion
            }
        }
Esempio n. 10
0
        /// <summary>
        /// add by lpl
        /// 2019-1-10
        /// 绑定企业规模
        /// </summary>
        /// <returns></returns>
        public ActionResult BindCompanySize()
        {
            var list = new ComResourceBll().GetListByParentId("0005");

            return(Json(list, JsonRequestBehavior.AllowGet));
        }
Esempio n. 11
0
        /// <summary>
        /// add by lpl
        /// 2019-1-10
        ///产品类型
        /// </summary>
        /// <returns></returns>
        public ActionResult BindProductType()
        {
            var list = new ComResourceBll().GetListByParentId("0004");

            return(Json(list, JsonRequestBehavior.AllowGet));
        }