diff --git a/src/main/java/com/sipai/controller/pipeline/PipelineDataController.java b/src/main/java/com/sipai/controller/pipeline/PipelineDataController.java index f93d7457..981b7d7f 100644 --- a/src/main/java/com/sipai/controller/pipeline/PipelineDataController.java +++ b/src/main/java/com/sipai/controller/pipeline/PipelineDataController.java @@ -74,7 +74,7 @@ public class PipelineDataController { @RequestMapping("/delete.do") public String dodelete(HttpServletRequest request, Model model, - @RequestParam(value = "id") String id) { + @RequestParam(value = "id") Long id) { int result = this.pipelineDataService.deleteById(id); model.addAttribute("result", result); return "result"; @@ -83,15 +83,14 @@ public class PipelineDataController { @RequestMapping("/deletes.do") public String dodeletes(HttpServletRequest request, Model model, @RequestParam(value = "ids") String ids) { - ids = ids.replace(",", "','"); - int result = this.pipelineDataService.deleteByWhere("where id in ('" + ids + "')"); + int result = this.pipelineDataService.deleteByWhere("where id in (" + ids + ")"); model.addAttribute("result", result); return "result"; } @RequestMapping("/edit.do") public String doedit(HttpServletRequest request, Model model, - @RequestParam(value = "id") String id) { + @RequestParam(value = "id") Long id) { PipelineData pipelineData = this.pipelineDataService.selectById(id); model.addAttribute("pipelineData", pipelineData); return "/pipeline/pipelineDataEdit"; @@ -109,7 +108,7 @@ public class PipelineDataController { @RequestMapping("/view.do") public String doview(HttpServletRequest request, Model model, - @RequestParam(value = "id") String id) { + @RequestParam(value = "id") Long id) { PipelineData pipelineData = this.pipelineDataService.selectById(id); model.addAttribute("pipelineData", pipelineData); return "/pipeline/pipelineDataView"; diff --git a/src/main/java/com/sipai/dao/base/CommDaoImpl.java b/src/main/java/com/sipai/dao/base/CommDaoImpl.java index 4516daef..e917f198 100644 --- a/src/main/java/com/sipai/dao/base/CommDaoImpl.java +++ b/src/main/java/com/sipai/dao/base/CommDaoImpl.java @@ -49,6 +49,14 @@ public class CommDaoImpl implements CommDao { T o = getSqlSession().selectOne(mappernamespace+"."+Thread.currentThread().getStackTrace()[1].getMethodName(), t); return o; } + + /** + * 根据ID查询(Long类型) + */ + public T selectByPrimaryKey(Long t){ + T o = getSqlSession().selectOne(mappernamespace+"."+Thread.currentThread().getStackTrace()[1].getMethodName(), t); + return o; + } /** * wxp为activiti测试修改 * @param t @@ -62,6 +70,13 @@ public class CommDaoImpl implements CommDao { return getSqlSession().delete(mappernamespace+"."+Thread.currentThread().getStackTrace()[1].getMethodName(), t); } + /** + * 根据ID删除(Long类型) + */ + public int deleteByPrimaryKey(Long t) { + return getSqlSession().delete(mappernamespace+"."+Thread.currentThread().getStackTrace()[1].getMethodName(), t); + } + public int insert(T t){ return getSqlSession().insert(mappernamespace+"."+Thread.currentThread().getStackTrace()[1].getMethodName(), t); } diff --git a/src/main/java/com/sipai/mapper/pipeline/PipelineDataMapper.xml b/src/main/java/com/sipai/mapper/pipeline/PipelineDataMapper.xml index ccaf5688..d4aa72fd 100644 --- a/src/main/java/com/sipai/mapper/pipeline/PipelineDataMapper.xml +++ b/src/main/java/com/sipai/mapper/pipeline/PipelineDataMapper.xml @@ -16,32 +16,30 @@ id, pipeline_name, diameter_mm, length_m, start_burial_depth_m, end_burial_depth_m, start_ground_elevation_m, end_ground_elevation_m, pipeline_invert_elevation_m - select - from pipeline_data - where id = #{id,jdbcType=VARCHAR} + from tb_pipeline_data + where id = #{id,jdbcType=BIGINT} - - delete from pipeline_data - where id = #{id,jdbcType=VARCHAR} + + delete from tb_pipeline_data + where id = #{id,jdbcType=BIGINT} - - insert into pipeline_data (id, pipeline_name, diameter_mm, + + insert into tb_pipeline_data (pipeline_name, diameter_mm, length_m, start_burial_depth_m, end_burial_depth_m, start_ground_elevation_m, end_ground_elevation_m, pipeline_invert_elevation_m) - values (#{id,jdbcType=VARCHAR}, #{pipelineName,jdbcType=VARCHAR}, #{diameterMm,jdbcType=DECIMAL}, + values (#{pipelineName,jdbcType=VARCHAR}, #{diameterMm,jdbcType=DECIMAL}, #{lengthM,jdbcType=DECIMAL}, #{startBurialDepthM,jdbcType=DECIMAL}, #{endBurialDepthM,jdbcType=DECIMAL}, #{startGroundElevationM,jdbcType=DECIMAL}, #{endGroundElevationM,jdbcType=DECIMAL}, #{pipelineInvertElevationM,jdbcType=DECIMAL}) - - insert into pipeline_data + + insert into tb_pipeline_data - - id, - + pipeline_name, @@ -68,9 +66,7 @@ - - #{id,jdbcType=VARCHAR}, - + #{pipelineName,jdbcType=VARCHAR}, @@ -98,7 +94,7 @@ - update pipeline_data + update tb_pipeline_data pipeline_name = #{pipelineName,jdbcType=VARCHAR}, @@ -125,10 +121,10 @@ pipeline_invert_elevation_m = #{pipelineInvertElevationM,jdbcType=DECIMAL}, - where id = #{id,jdbcType=VARCHAR} + where id = #{id,jdbcType=BIGINT} - update pipeline_data + update tb_pipeline_data set pipeline_name = #{pipelineName,jdbcType=VARCHAR}, diameter_mm = #{diameterMm,jdbcType=DECIMAL}, length_m = #{lengthM,jdbcType=DECIMAL}, @@ -137,17 +133,17 @@ start_ground_elevation_m = #{startGroundElevationM,jdbcType=DECIMAL}, end_ground_elevation_m = #{endGroundElevationM,jdbcType=DECIMAL}, pipeline_invert_elevation_m = #{pipelineInvertElevationM,jdbcType=DECIMAL} - where id = #{id,jdbcType=VARCHAR} + where id = #{id,jdbcType=BIGINT} delete from - pipeline_data + tb_pipeline_data ${where} diff --git a/src/main/java/com/sipai/service/pipeline/PipelineDataService.java b/src/main/java/com/sipai/service/pipeline/PipelineDataService.java index af267eaf..7e05d3c3 100644 --- a/src/main/java/com/sipai/service/pipeline/PipelineDataService.java +++ b/src/main/java/com/sipai/service/pipeline/PipelineDataService.java @@ -19,11 +19,25 @@ public class PipelineDataService implements CommService { return pipelineData; } + /** + * 根据ID查询(Long类型) + */ + public PipelineData selectById(Long id) { + return pipelineDataDao.selectByPrimaryKey(id); + } + @Override public int deleteById(String id) { return pipelineDataDao.deleteByPrimaryKey(id); } + /** + * 根据ID删除(Long类型) + */ + public int deleteById(Long id) { + return pipelineDataDao.deleteByPrimaryKey(id); + } + @Override public int save(PipelineData pipelineData) { return pipelineDataDao.insert(pipelineData); diff --git a/src/main/resources/redis.properties b/src/main/resources/redis.properties index da61caaf..d86b5c6b 100644 --- a/src/main/resources/redis.properties +++ b/src/main/resources/redis.properties @@ -1,10 +1,10 @@ #redis���� -#redis.host=122.51.194.184 - redis.host=127.0.0.1 +redis.host=122.51.194.184 +# redis.host=127.0.0.1 #����single ��Ⱥcluster redis.mode=single -#redis.port=26739 - redis.port=6379 +redis.port=26739 +# redis.port=6379 redis.password=Aa112211 redis.maxIdle=100 redis.maxActive=300 diff --git a/src/main/webapp/JS/comm.js b/src/main/webapp/JS/comm.js index 63447865..c8ce9394 100644 --- a/src/main/webapp/JS/comm.js +++ b/src/main/webapp/JS/comm.js @@ -532,9 +532,9 @@ function initMenu() { // 注意:新菜单项可能直接是文本,也可能包含 i 标签 var exists = false; $treeviewMenu.find('li').each(function() { - if ($(this).text().indexOf('新源头GIS管理') > -1) { - exists = true; - } + // if ($(this).text().indexOf('管道管理') > -1) { + // exists = true; + // } }); if (!exists) { @@ -545,9 +545,6 @@ function initMenu() { var newMenuHtml = ''; if (typeof addTab === 'function') { // 假设 addTab(id, name, url) - // /jsp/pipeline/pipelineDataList.jsp - // newMenuHtml = '
  • 新源头GIS管理
  • '; - newMenuHtml = '
  • 管道管理
  • '; } else { // 如果没有 addTab,尝试使用 iframe 加载或者直接跳转(但在框架内) // refreshPage 通常是 location.replace,这会刷新整个页面。 @@ -565,8 +562,6 @@ function initMenu() { // 所以我们应该优先使用 addTab。 // 如果 addTab 未定义(可能在 index.jsp 中定义),我们尝试模拟它。 // 由于 comm.js 被 index.jsp 引用,addTab 应该可用。 - // newMenuHtml = '
  • 新源头GIS管理
  • '; - newMenuHtml = '
  • 管道管理
  • '; } $treeviewMenu.append(newMenuHtml); diff --git a/src/main/webapp/WEB-INF/lib/sqljdbc4-4.0.jar b/src/main/webapp/WEB-INF/lib/sqljdbc4-4.0.jar new file mode 100644 index 00000000..d6b7f6da Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/sqljdbc4-4.0.jar differ diff --git a/src/main/webapp/jsp/bigScreen.jsp b/src/main/webapp/jsp/bigScreen.jsp index 8ddb0cfc..94df6e72 100644 --- a/src/main/webapp/jsp/bigScreen.jsp +++ b/src/main/webapp/jsp/bigScreen.jsp @@ -1,70 +1,619 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> - + - - + + 水厂大屏展示 + + + - - + +
    - +
    +
    +
    6040
    +
    4197
    +
    12356
    +
    + + +
    +
    +
    + + +
    +
    +
    0
    +
    200
    +
    4.89
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    300
    +
    200
    +
    1
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    参数当前值平均值最高最低指标
    COD (mg/L)13.18612.99614.66611.920.000–20.000
    TP (mg/L)13.18612.99614.66611.920.000–20.000
    NH3–N (mg/L)13.18612.99614.66611.920.000–20.000
    TN (mg/L)13.18612.99614.66611.920.000–20.000
    PH (mg/L)13.18612.99614.66611.920.000–20.000
    SS13.18612.99614.66611.920.000–20.000
    温度(℃)13.18612.99614.66611.920.000–20.000
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + + +
    + +
    + +
    + +
    + + +
    + +
    + +
    +
    +
    + + +
    - + + diff --git a/src/main/webapp/jsp/bigScreen2.jsp b/src/main/webapp/jsp/bigScreen2.jsp index 943a1ecc..612bc938 100644 --- a/src/main/webapp/jsp/bigScreen2.jsp +++ b/src/main/webapp/jsp/bigScreen2.jsp @@ -1,462 +1,574 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> - +<%@ page language="java" contentType="text/html; charset=UTF-8" +pageEncoding="UTF-8"%> + - - + + 区域管线大屏展示 - + - - + +
    -
    53829.5
    -
    2495
    -
    2460
    - -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    +
    53829.5
    +
    2495
    +
    2460
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    - + diff --git a/src/main/webapp/jsp/bigScreen3.jsp b/src/main/webapp/jsp/bigScreen3.jsp index 22dcb9ae..fd32e68b 100644 --- a/src/main/webapp/jsp/bigScreen3.jsp +++ b/src/main/webapp/jsp/bigScreen3.jsp @@ -1,825 +1,970 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> - +<%@ page language="java" contentType="text/html; charset=UTF-8" +pageEncoding="UTF-8"%> + - - + + 排污户大屏展示 - - + - - + +
    -
    - -
    -
    -
    辖区排污企业总数
    -
    0
    -
    -
    -
    已接入监控
    -
    0
    -
    -
    -
    正在接入中
    -
    0
    -
    +
    + +
    +
    +
    辖区排污企业总数
    +
    + 0
    - - -
    -
    +
    +
    +
    已接入监控
    +
    + 0
    +
    +
    +
    正在接入中
    +
    + 0 +
    +
    - -
    -
    企业名称加载中...
    -
    -
    -
    污水特性: --
    -
    当前排污量: --
    -
    接入状态: --
    -
    -
    - 现场照片 -
    现场监控画面
    -
    -
    -
    -
    -
    瞬时排污量历史曲线 (近3天)
    -
    -
    -
    -
    累计流量历史曲线 (日差值 - 近14天)
    -
    -
    -
    + +
    +
    - - -
    -
    +
    + + +
    +
    + 企业名称加载中...
    +
    +
    +
    + 污水特性: -- +
    +
    + 当前排污量: -- +
    +
    + 接入状态: -- +
    +
    +
    + 现场照片 +
    现场监控画面
    +
    +
    +
    +
    +
    瞬时排污量历史曲线 (近3天)
    +
    +
    +
    +
    累计流量历史曲线 (日差值 - 近14天)
    +
    +
    +
    +
    + + +
    +
    +
    - - + + diff --git a/src/main/webapp/jsp/main_JS_Company.jsp b/src/main/webapp/jsp/main_JS_Company.jsp index 8c9e4e92..099eaeb3 100644 --- a/src/main/webapp/jsp/main_JS_Company.jsp +++ b/src/main/webapp/jsp/main_JS_Company.jsp @@ -179,7 +179,7 @@
    - 上海金山卫污水公司 + 上海金山卫污水公司11
    diff --git a/src/main/webapp/jsp/z_bigScreen/bigScreen1.html b/src/main/webapp/jsp/z_bigScreen/bigScreen1.html index a470a568..6147efe1 100644 --- a/src/main/webapp/jsp/z_bigScreen/bigScreen1.html +++ b/src/main/webapp/jsp/z_bigScreen/bigScreen1.html @@ -1,581 +1,617 @@ - + - - + + 水厂大屏展示 - + - - + +
    -
    -
    -
    6040
    -
    4197
    -
    12356
    -
    - - -
    -
    -
    - - -
    -
    -
    0
    -
    200
    -
    4.89
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    300
    -
    200
    -
    1
    -
    - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    参数当前值平均值最高最低指标
    COD (mg/L)13.18612.99614.66611.920.000–20.000
    TP (mg/L)13.18612.99614.66611.920.000–20.000
    NH3–N (mg/L)13.18612.99614.66611.920.000–20.000
    TN (mg/L)13.18612.99614.66611.920.000–20.000
    PH (mg/L)13.18612.99614.66611.920.000–20.000
    SS13.18612.99614.66611.920.000–20.000
    温度(℃)13.18612.99614.66611.920.000–20.000
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    - - -
    - -
    - -
    - -
    - - -
    - -
    - -
    -
    +
    +
    +
    6040
    +
    4197
    +
    12356
    - -
    - + +
    +
    + + +
    +
    +
    0
    +
    200
    +
    4.89
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    300
    +
    200
    +
    1
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    参数当前值平均值最高最低指标
    COD (mg/L)13.18612.99614.66611.920.000–20.000
    TP (mg/L)13.18612.99614.66611.920.000–20.000
    NH3–N (mg/L)13.18612.99614.66611.920.000–20.000
    TN (mg/L)13.18612.99614.66611.920.000–20.000
    PH (mg/L)13.18612.99614.66611.920.000–20.000
    SS13.18612.99614.66611.920.000–20.000
    温度(℃)13.18612.99614.66611.920.000–20.000
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + + +
    + +
    + +
    + +
    + + +
    + +
    + +
    +
    +
    + + +
    - + diff --git a/src/main/webapp/jsp/z_bigScreen/bigScreen2.html b/src/main/webapp/jsp/z_bigScreen/bigScreen2.html index 300a19af..0de6b864 100644 --- a/src/main/webapp/jsp/z_bigScreen/bigScreen2.html +++ b/src/main/webapp/jsp/z_bigScreen/bigScreen2.html @@ -1,462 +1,574 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> - +<%@ page language="java" contentType="text/html; charset=UTF-8" +pageEncoding="UTF-8"%> + - - + + 区域管线大屏展示 - + - - + +
    -
    53829.5
    -
    2495
    -
    2460
    - -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    +
    53829.5
    +
    2495
    +
    2460
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    - + diff --git a/src/main/webapp/jsp/z_bigScreen/bigScreen3.html b/src/main/webapp/jsp/z_bigScreen/bigScreen3.html index 91d41ad8..91b27b01 100644 --- a/src/main/webapp/jsp/z_bigScreen/bigScreen3.html +++ b/src/main/webapp/jsp/z_bigScreen/bigScreen3.html @@ -1,825 +1,970 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> - +<%@ page language="java" contentType="text/html; charset=UTF-8" +pageEncoding="UTF-8"%> + - - + + 排污户大屏展示 - + - - + +
    -
    - -
    -
    -
    辖区排污企业总数
    -
    0
    -
    -
    -
    已接入监控
    -
    0
    -
    -
    -
    正在接入中
    -
    0
    -
    +
    + +
    +
    +
    辖区排污企业总数
    +
    + 0
    - - -
    -
    +
    +
    +
    已接入监控
    +
    + 0
    +
    +
    +
    正在接入中
    +
    + 0 +
    +
    - -
    -
    企业名称加载中...
    -
    -
    -
    污水特性: --
    -
    当前排污量: --
    -
    接入状态: --
    -
    -
    - 现场照片 -
    现场监控画面
    -
    -
    -
    -
    -
    瞬时排污量历史曲线 (近3天)
    -
    -
    -
    -
    累计流量历史曲线 (日差值 - 近14天)
    -
    -
    -
    + +
    +
    - - -
    -
    +
    + + +
    +
    + 企业名称加载中...
    +
    +
    +
    + 污水特性: -- +
    +
    + 当前排污量: -- +
    +
    + 接入状态: -- +
    +
    +
    + 现场照片 +
    现场监控画面
    +
    +
    +
    +
    +
    瞬时排污量历史曲线 (近3天)
    +
    +
    +
    +
    累计流量历史曲线 (日差值 - 近14天)
    +
    +
    +
    +
    + + +
    +
    +
    - - + +