微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

基于百度地图实现产品销售的单位位置查看功能设计与实现

1.描述

  本人最近参与基于MVC5+EF6+ Bootstrap3的食品安全监管系统设计、开发。先前感觉百度地图很神秘的样子、高大上的样子,设计、开发过程遇到些问题,经查看园子高手指点、示例摸索实践,终将百度地图嵌入系统。为感谢各位朋友的帮助,今有空,将基于百度地图实现产品销售的单位位置查看功能分享给大家。不当之处,欢迎指正。

2.产品生产批次查询

  查看单位产品生产批次信息,根据产品生产批次查看,产品销售单位情况。

  效果图如下:

3.产品销售地图

  根据选择的产品生产批次信息,查询统计产品销售到哪些省市,省市有多少家单位,根据单位地址,使用百度地图显示单位所在省市位置。

  效果图如下:

4.产品销售地图View代码

rush:js;"> @{ ViewBag.Title = "Index"; Layout = "~/Views/Shared/_TableLayout.cshtml"; } @*工具栏*@ @section actionBar{

<button class="btn dark btn-outline btn-circle btn-sm" data-bind="click: nextCommand" id="btnNext">下一条
}
@section CustomContent
{
<form id="frmObj" name="frmObj" class="form-horizontal form-table-bordered"
enctype="multipart/form-data">
<div class="form-body">
<div class="portlet Box blue">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-gift">产品生产信息

销售地图
省市 市区 单位家数
} @section customScript { }

5.产品销售地图 Controler 代码

rush:js;"> #region 销售地图 public ActionResult IndexMap(Guid ProductId,Guid BatchId) { try { List list = _IProductBatchs.GetEntityList(t => t.IsDelete == false && t.ProductID == ProductId); ProductBatchviewmodel mviewmodel = null; string mPrevId = string.Empty,mNextId = string.Empty; //读取当前抽检任务及上、下抽检任务标识。 for (int index = 0; index < list.Count; index++) { if (list[index].Id == BatchId) { mViewModel = list[index]; if (list.Count > index + 1) mNextId = list[index + 1].Id.ToString(); break; } mPrevId = list[index].Id.ToString(); } if (mviewmodel == null) { return this.ResultError("产品生产信息不能为空!"); } //ReturnResult mReturn = _IProductBatchSup.GetBAreaStatistics(ProductId,BatchId); //if (mReturn.State == false) // return this.ResultError(mReturn.Message); //mviewmodel.PBatchBArea = (ICollection)mReturn.Result; ViewBag.bCreate = 0; ViewBag.ProductId = ProductId; ViewBag.PrevId = mPrevId; ViewBag.NextId = mNextId; ViewBag.viewmodel = mviewmodel.Toviewmodel(); return View("_IndexMap"); } catch (Exception e) { return this.ResultError(e.Message); } } [Import(typeof(IProductBatchSup))] public IProductBatchSup _IProductBatchSup; public ActionResult GetBAreaStatistics(Guid ProductId,Guid BatchId) { try { ReturnResult mReturn = _IProductBatchSup.GetBAreaStatistics(ProductId,BatchId); if (mReturn.State == false) return this.ResultError(mReturn.Message); return JsonNetResult.toDataTable(mReturn.Result); } catch (Exception e) { return this.ResultError(e.Message); } } public ActionResult GetBEnterStatistics(Guid ProductId,Guid BatchId,string ProvinceName,string CityName) { try { ReturnResult mReturn = _IProductBatchSup.GetBEnterStatistics(ProductId,BatchId,ProvinceName,CityName); if (mReturn.State == false) return this.ResultError(mReturn.Message); return JsonNetResult.toDataTable(mReturn.Result); } catch (Exception e) { return this.ResultError(e.Message); } } #endregion

以上所述是小编给大家介绍的基于百度地图实现产品销售的单位位置查看功能设计与实现,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对编程之家网站的支持

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

百度地图实现产品销售功能

相关推荐