From e6dcd1141fc7687ed04a98e3900f6065beefe189 Mon Sep 17 00:00:00 2001 From: baogq <445720029@qq.com> Date: Mon, 13 Mar 2023 08:41:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=BA=90=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nanjing/ReportDataController.java | 61 ++++++++++++------- .../nanjing/StatisticStProductController.java | 4 +- .../nanjing/TBdLinetypeController.java | 51 +++++++++++++--- .../src/main/resources/application-druid.yml | 10 +-- .../src/main/resources/application.yml | 2 +- .../src/main/resources/static/css/login.css | 10 +-- .../main/resources/static/css/login.min.css | 2 +- .../main/resources/static/ruoyi/js/ry-ui.js | 25 +++++--- .../templates/nanjing/LineType/LineType.html | 58 ++++++++---------- .../templates/nanjing/LineType/add.html | 34 ++++++++++- .../templates/nanjing/LineType/edit.html | 29 +++++++++ .../templates/nanjing/LineType/tree.html | 49 +++++++++++++++ .../nanjing/ParaAllShow/ParaAllShow.html | 4 +- .../templates/nanjing/Report/Report.html | 20 ++++-- .../StationParaInfo/StationParaInfo.html | 2 +- .../nanjing/Statistic/QsStation.html | 3 +- .../nanjing/Statistic/QtProduct.html | 2 +- .../templates/nanjing/SubStation/add.html | 40 ++++++++++-- .../resources/templates/system/menu/add.html | 11 ++-- .../com/ruoyi/common/core/domain/Ztree.java | 14 ++--- .../com/ruoyi/nanjing/domain/TBdLinetype.java | 55 ++++++++++------- .../nanjing/mapper/TBdProducttypeMapper.java | 2 + .../nanjing/service/ITBdLinetypeService.java | 9 +++ .../service/ITBdProducttypeService.java | 2 + .../service/impl/TBdLinetypeServiceImpl.java | 24 ++++++++ .../impl/TBdSubstationServiceImpl.java | 4 +- .../service/impl/SysDeptServiceImpl.java | 4 +- .../service/impl/SysDictTypeServiceImpl.java | 2 +- .../service/impl/SysMenuServiceImpl.java | 4 +- .../mapper/nanjing/TBdLinetypeMapper.xml | 18 ++++-- .../mapper/nanjing/TBdProducttypeMapper.xml | 22 ++++--- 31 files changed, 420 insertions(+), 157 deletions(-) create mode 100644 ruoyi-admin/src/main/resources/templates/nanjing/LineType/tree.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/ReportDataController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/ReportDataController.java index 43c5d89f..99eda100 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/ReportDataController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/ReportDataController.java @@ -1,23 +1,10 @@ package com.ruoyi.web.controller.nanjing; -import com.alibaba.excel.EasyExcel; -import com.alibaba.excel.ExcelWriter; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import com.mysql.cj.xdevapi.JsonArray; import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.nanjing.domain.ReportData; -import com.ruoyi.nanjing.domain.TBdProductinfo; import com.ruoyi.nanjing.service.ITBdProducttypeService; -import com.ruoyi.web.controller.common.DemoData; -import org.apache.catalina.User; -import org.apache.poi.ss.formula.functions.T; -import org.apache.poi.xssf.usermodel.*; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -27,14 +14,7 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; -import javax.servlet.ServletOutputStream; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletResponse; -import java.io.*; -import java.text.DateFormat; -import java.text.SimpleDateFormat; import java.util.*; -import java.util.stream.Collectors; @Controller @RequestMapping("/nanjing/reportData") @@ -60,12 +40,49 @@ public class ReportDataController extends BaseController { map.put("end", end); map.put("barcode", barcode); List> reportDataList = producttypeService.selectReport(map); + //查temp1表 +// List> reportDataList = producttypeService.selectReport(); +//lmap--临时map,用来存放判断的key + Map lmap = new HashMap(); +//valueList--最终返回数据的集合 + List> valueList = new ArrayList<>(); +//valueMap--存放在valueList中的map + Map valueMap = new LinkedHashMap<>(); +//循环遍历拿到查询的数据 + for(Map map1 : reportDataList){ - return getDataTable(reportDataList); + String parameaning = map1.get("parameaning").toString(); + String value = map1.get("value").toString(); + String beginTime = ""; + if(map1.containsKey("begintime")){ + beginTime = map1.get("begintime").toString(); + } +// else{ +// beginTime = ""; +// } + //String beginTime = map1.get("begintime").toString(); + String stationName = map1.get("Barcode").toString(); + //判断条件,来实现行转列 + if (!lmap.containsKey(stationName+beginTime)){ + valueMap = new LinkedHashMap(); + valueMap.put("Barcode",stationName); + valueMap.put("begintime",beginTime); + valueMap.put(parameaning,value); + valueList.add(valueMap); + //需要的条件用作key,valueMap做value,带入else语句情况下 + lmap.put(stationName+beginTime,valueMap); + } else { + valueMap = (Map) lmap.get(stationName+beginTime); + valueMap.put(parameaning,value); + } + } + return getDataTable(valueList); } + + // @PostMapping("/export") // @ResponseBody // public AjaxResult export(String begin, String end, String barcode){ @@ -178,4 +195,6 @@ public class ReportDataController extends BaseController { // return ajaxResult.success(targetFile); // } + + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/StatisticStProductController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/StatisticStProductController.java index 4605d6a1..d0cd02d1 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/StatisticStProductController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/StatisticStProductController.java @@ -64,14 +64,14 @@ public class StatisticStProductController extends BaseController { @PostMapping("/nodeClick") @ResponseBody - public List nodeClick(String begin,String end,String node) + public List nodeClick(String begin,String end,String node,String productid) { Map map = new HashMap(); map.put("begin",begin); map.put("end",end); map.put("stationId",node); map.put("stationType",1); - map.put("productId","ALL"); + map.put("productId",productid); List qsStations = producttypeService.selectNodeQs(map); return qsStations; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/TBdLinetypeController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/TBdLinetypeController.java index 7049e0dd..f1411538 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/TBdLinetypeController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/nanjing/TBdLinetypeController.java @@ -1,6 +1,10 @@ package com.ruoyi.web.controller.nanjing; import java.util.List; + +import com.alibaba.fastjson.JSONArray; +import com.ruoyi.common.core.domain.Ztree; +import com.ruoyi.common.utils.StringUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -47,11 +51,11 @@ public class TBdLinetypeController extends BaseController @RequiresPermissions("nanjing:LineType:list") @PostMapping("/list") @ResponseBody - public TableDataInfo list(TBdLinetype tBdLinetype) + public Listlist(TBdLinetype tBdLinetype) { startPage(); List list = tBdLinetypeService.selectTBdLinetypeList(tBdLinetype); - return getDataTable(list); + return list; } /** @@ -71,9 +75,15 @@ public class TBdLinetypeController extends BaseController /** * 新增主支线管理 */ - @GetMapping("/add") - public String add() + @GetMapping( value = { "/add/{LineID}", "/add/" }) + public String add(@PathVariable(value = "LineID",required = false)String LineID, ModelMap mmap) { + TBdLinetype TBdLinetype = null; + if(StringUtils.isNotNull(LineID)){ + TBdLinetype = tBdLinetypeService.selectTBdLinetypeById(Long.parseLong(LineID)); + mmap.put("TBdLinetype", TBdLinetype); + } + return prefix + "/add"; } @@ -86,6 +96,9 @@ public class TBdLinetypeController extends BaseController @ResponseBody public AjaxResult addSave(TBdLinetype tBdLinetype) { + if(StringUtils.isNull(tBdLinetype.getPID())){ + tBdLinetype.setPID(0L); + } return toAjax(tBdLinetypeService.insertTBdLinetype(tBdLinetype)); } @@ -109,18 +122,36 @@ public class TBdLinetypeController extends BaseController @ResponseBody public AjaxResult editSave(TBdLinetype tBdLinetype) { + if(StringUtils.isNull(tBdLinetype.getPID())){ + tBdLinetype.setPID(0L); + } return toAjax(tBdLinetypeService.updateTBdLinetype(tBdLinetype)); } + @RequiresPermissions("nanjing:LineType:remove") + @Log(title = "主支线管理", businessType = BusinessType.DELETE) + @GetMapping("/remove/{LineID}") + @ResponseBody + public AjaxResult remove(@PathVariable("LineID") Long LineID) + { + return toAjax(tBdLinetypeService.deleteTBdLinetypeById(LineID)); + } /** - * 删除主支线管理 + * 加载测控点信息树列表 */ - @RequiresPermissions("nanjing:LineType:remove") - @Log(title = "主支线管理", businessType = BusinessType.DELETE) - @PostMapping( "/remove") + @GetMapping("/treeData") @ResponseBody - public AjaxResult remove(String ids) + public List treeData() + { + List ztrees = tBdLinetypeService.selectBaseMonitorInfoTree(); + return ztrees; + } + @GetMapping( value = {"/selectLineTree/{lineId}", "/selectLineTree/"}) + public String selectMenuTree(@PathVariable(value = "lineId", required = false) String lineId, ModelMap mmap) { - return toAjax(tBdLinetypeService.deleteTBdLinetypeByIds(ids)); + if(StringUtils.isNotNull(lineId) ){ + mmap.put("TBdLinetype", tBdLinetypeService.selectTBdLinetypeById(Long.parseLong(lineId))); + } + return prefix + "/tree"; } } diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index 04726022..7402ad61 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -6,12 +6,12 @@ spring: druid: # 主库数据源 master: - url: jdbc:sqlserver://127.0.0.1:1433;SelectMethod=cursor;DatabaseName=FYATJ +# url: jdbc:sqlserver://121.36.58.109:1433;SelectMethod=cursor;DatabaseName=FYATJ +# username: sa +# password: haiwei@123 + url: jdbc:sqlserver://127.0.0.1:1433;SelectMethod=cursor;DatabaseName=JYD_shengjie username: sa - password: Mesnac123 -# url: jdbc:sqlserver://127.0.0.1:1433;SelectMethod=cursor;DatabaseName=FYATJ -# username: sa -# password: Mesnac123 + password: 123456 # 从库数据源 slave: # 从数据源开关/默认关闭 diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 898be993..66d96668 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -17,7 +17,7 @@ ruoyi: # 开发环境配置 server: # 服务器的HTTP端口,默认为80 - port: 4935 + port: 9080 servlet: # 应用的访问路径 context-path: / diff --git a/ruoyi-admin/src/main/resources/static/css/login.css b/ruoyi-admin/src/main/resources/static/css/login.css index 1d60b460..5fb5a0cb 100644 --- a/ruoyi-admin/src/main/resources/static/css/login.css +++ b/ruoyi-admin/src/main/resources/static/css/login.css @@ -3,16 +3,16 @@ html { } body.signin { height:auto; - background:url(../img/login-background.jpg) no-repeat center fixed; + background:url(../img/login.jpg) no-repeat center fixed; -webkit-background-size:cover; -moz-background-size:cover; -o-background-size:cover; - background-size:cover; - color:rgba(255,255,255,.95) + background-size:cover } .signinpanel { width:750px; - margin:10% auto 0 + margin:10% auto 0; + color:rgba(255,255,255,.95) } .signinpanel .logopanel { float:none; @@ -62,7 +62,7 @@ body.signin { @media screen and (max-width:768px) { .signinpanel,.signuppanel { margin:0 auto; - width:420px!important; + width:380px!important; padding:20px } .signinpanel form { diff --git a/ruoyi-admin/src/main/resources/static/css/login.min.css b/ruoyi-admin/src/main/resources/static/css/login.min.css index 79ec2324..899c40e9 100644 --- a/ruoyi-admin/src/main/resources/static/css/login.min.css +++ b/ruoyi-admin/src/main/resources/static/css/login.min.css @@ -1 +1 @@ -html{height:100%}body.signin{height:auto;background:url(../img/login-background.jpg) no-repeat center fixed;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;color:rgba(255,255,255,.95)}.signinpanel{width:750px;margin:10% auto 0}.signinpanel .logopanel{float:none;width:auto;padding:0;background:0}.signinpanel .signin-info ul{list-style:none;padding:0;margin:20px 0}.signinpanel .form-control{display:block;margin-top:15px}.signinpanel .uname{background:#fff url(../img/user.png) no-repeat 95% center;color:#333}.signinpanel .pword{background:#fff url(../img/locked.png) no-repeat 95% center;color:#333}.signinpanel .code{background:#fff no-repeat 95% center;color:#333;margin:0 0 15px 0}.signinpanel .btn{margin-top:15px}.signinpanel form{background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.3);-moz-box-shadow:0 3px 0 rgba(12,12,12,.03);-webkit-box-shadow:0 3px 0 rgba(12,12,12,.03);box-shadow:0 3px 0 rgba(12,12,12,.03);-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:30px}.signup-footer{border-top:solid 1px rgba(255,255,255,.3);margin:20px 0;padding-top:15px}@media screen and (max-width:768px){.signinpanel,.signuppanel{margin:0 auto;width:420px!important;padding:20px}.signinpanel form{margin-top:20px}.signup-footer,.signuppanel .form-control{margin-bottom:10px}.signup-footer .pull-left,.signup-footer .pull-right{float:none!important;text-align:center}.signinpanel .signin-info ul{display:none}}@media screen and (max-width:320px){.signinpanel,.signuppanel{margin:0 20px;width:auto}}.checkbox-custom{position:relative;padding:0 15px 0 25px;margin-bottom:7px;display:inline-block}.checkbox-custom input[type="checkbox"]{opacity:0;position:absolute;cursor:pointer;z-index:2;margin:-6px 0 0 0;top:50%;left:3px}.checkbox-custom label:before{content:'';position:absolute;top:50%;left:0;margin-top:-9px;width:18px;height:17px;display:inline-block;border-radius:2px;border:1px solid #bbb;background:#fff}.checkbox-custom input[type="checkbox"]:checked+label:after{position:absolute;display:inline-block;font-family:'Glyphicons Halflings';content:"\e013";top:42%;left:3px;margin-top:-5px;font-size:11px;line-height:1;width:16px;height:16px;color:#333}.checkbox-custom label{cursor:pointer;line-height:1.2;font-weight:normal;margin-bottom:0;text-align:left}.form-control,.form-control:focus,.has-error .form-control:focus,.has-success .form-control:focus,.has-warning .form-control:focus,.navbar-collapse,.navbar-form,.navbar-form-custom .form-control:focus,.navbar-form-custom .form-control:hover,.open .btn.dropdown-toggle,.panel,.popover,.progress,.progress-bar{box-shadow:none}.form-control{border-radius:1px!important;padding:6px 12px!important;height:34px!important}.form-control:focus{border-color:#1ab394!important} \ No newline at end of file +html{height:100%}body.signin{height:auto;background:url(../img/login.jpg) no-repeat center fixed;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover}.signinpanel{width:750px;margin:10% auto 0;color:rgba(255,255,255,.95)}.signinpanel .logopanel{float:none;width:auto;padding:0;background:0}.signinpanel .signin-info ul{list-style:none;padding:0;margin:20px 0}.signinpanel .form-control{display:block;margin-top:15px}.signinpanel .uname{background:#fff url(../img/user.png) no-repeat 95% center;color:#333}.signinpanel .pword{background:#fff url(../img/locked.png) no-repeat 95% center;color:#333}.signinpanel .code{background:#fff no-repeat 95% center;color:#333;margin:0 0 15px 0}.signinpanel .btn{margin-top:15px}.signinpanel form{background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.3);-moz-box-shadow:0 3px 0 rgba(12,12,12,.03);-webkit-box-shadow:0 3px 0 rgba(12,12,12,.03);box-shadow:0 3px 0 rgba(12,12,12,.03);-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:30px}.signup-footer{border-top:solid 1px rgba(255,255,255,.3);margin:20px 0;padding-top:15px}@media screen and (max-width:768px){.signinpanel,.signuppanel{margin:0 auto;width:380px!important;padding:20px}.signinpanel form{margin-top:20px}.signup-footer,.signuppanel .form-control{margin-bottom:10px}.signup-footer .pull-left,.signup-footer .pull-right{float:none!important;text-align:center}.signinpanel .signin-info ul{display:none}}@media screen and (max-width:320px){.signinpanel,.signuppanel{margin:0 20px;width:auto}}.checkbox-custom{position:relative;padding:0 15px 0 25px;margin-bottom:7px;display:inline-block}.checkbox-custom input[type="checkbox"]{opacity:0;position:absolute;cursor:pointer;z-index:2;margin:-6px 0 0 0;top:50%;left:3px}.checkbox-custom label:before{content:'';position:absolute;top:50%;left:0;margin-top:-9px;width:18px;height:17px;display:inline-block;border-radius:2px;border:1px solid #bbb;background:#fff}.checkbox-custom input[type="checkbox"]:checked+label:after{position:absolute;display:inline-block;font-family:'Glyphicons Halflings';content:"\e013";top:42%;left:3px;margin-top:-5px;font-size:11px;line-height:1;width:16px;height:16px;color:#333}.checkbox-custom label{cursor:pointer;line-height:1.2;font-weight:normal;margin-bottom:0;text-align:left}.form-control,.form-control:focus,.has-error .form-control:focus,.has-success .form-control:focus,.has-warning .form-control:focus,.navbar-collapse,.navbar-form,.navbar-form-custom .form-control:focus,.navbar-form-custom .form-control:hover,.open .btn.dropdown-toggle,.panel,.popover,.progress,.progress-bar{box-shadow:none}.form-control{border-radius:1px!important;padding:6px 12px!important;height:34px!important}.form-control:focus{border-color:#1ab394!important} \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js index e73fa4cd..51d43676 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js @@ -729,6 +729,15 @@ var table = { alertWarning: function(content) { $.modal.alert(content, modal_status.WARNING); }, + // 获取iframe页的DOM + getChildFrame: function (index) { + if($.common.isEmpty(index)){ + var index = parent.layer.getFrameIndex(window.name); + return parent.layer.getChildFrame('body', index); + } else { + return top.layer.getChildFrame('body', index); + } + }, // 关闭窗体 close: function () { var index = parent.layer.getFrameIndex(window.name); @@ -1424,14 +1433,14 @@ var table = { return false; } for (var i = 0; i < nodes.length; i++) { - if (nodes[i].level == 0) { - $.modal.msgError("不能选择根节点(" + nodes[i].name + ")"); - return false; - } - if (nodes[i].isParent) { - $.modal.msgError("不能选择父节点(" + nodes[i].name + ")"); - return false; - } + // if (nodes[i].level == 0) { + // $.modal.msgError("不能选择根节点(" + nodes[i].name + ")"); + // return false; + // } + // if (nodes[i].isParent) { + // $.modal.msgError("不能选择父节点(" + nodes[i].name + ")"); + // return false; + // } } return true; }, diff --git a/ruoyi-admin/src/main/resources/templates/nanjing/LineType/LineType.html b/ruoyi-admin/src/main/resources/templates/nanjing/LineType/LineType.html index 41301fa3..1656d916 100644 --- a/ruoyi-admin/src/main/resources/templates/nanjing/LineType/LineType.html +++ b/ruoyi-admin/src/main/resources/templates/nanjing/LineType/LineType.html @@ -22,7 +22,7 @@
  • - 添加 +  搜索  查询全部
  • @@ -30,59 +30,52 @@ - - - - - - - - - - - - - +
    -
    +
    diff --git a/ruoyi-admin/src/main/resources/templates/nanjing/LineType/add.html b/ruoyi-admin/src/main/resources/templates/nanjing/LineType/add.html index 6fe8cf65..1e5d317d 100644 --- a/ruoyi-admin/src/main/resources/templates/nanjing/LineType/add.html +++ b/ruoyi-admin/src/main/resources/templates/nanjing/LineType/add.html @@ -6,7 +6,18 @@
    -
    +
    + +
    +
    + + + +
    +
    +
    +
    +
    @@ -31,15 +42,34 @@ \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/nanjing/LineType/edit.html b/ruoyi-admin/src/main/resources/templates/nanjing/LineType/edit.html index 916206ad..a0b94b7b 100644 --- a/ruoyi-admin/src/main/resources/templates/nanjing/LineType/edit.html +++ b/ruoyi-admin/src/main/resources/templates/nanjing/LineType/edit.html @@ -6,6 +6,16 @@
    +
    + +
    +
    + + + +
    +
    +
    @@ -40,6 +50,25 @@ if ($.validate.form()) { $.operate.save(prefix + "/edit", $('#form-LineType-edit').serialize()); } + + } + /*测控点信息-编辑-选择父节点信息树*/ + function selectMonitorInfoTree() { + var options = { + title: '测控点信息选择', + width: "380", + url: prefix + "/selectLineTree/" + $("#treeId").val(), + callBack: doSubmit + }; + $.modal.openOptions(options); + } + function doSubmit(index, layero){ + var tree = layero.find("iframe")[0].contentWindow.$._tree; + if ($.tree.notAllowParents(tree)) { var body = layer.getChildFrame('body', index); + $("#treeId").val(body.find('#treeId').val()); + $("#treeName").val(body.find('#treeName').val()); + layer.close(index); + } } diff --git a/ruoyi-admin/src/main/resources/templates/nanjing/LineType/tree.html b/ruoyi-admin/src/main/resources/templates/nanjing/LineType/tree.html new file mode 100644 index 00000000..c54ddda0 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/nanjing/LineType/tree.html @@ -0,0 +1,49 @@ + + + + + + + + + + +
    + + +
    + +
    + 展开 / + 折叠 +
    +
    +
    + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/nanjing/ParaAllShow/ParaAllShow.html b/ruoyi-admin/src/main/resources/templates/nanjing/ParaAllShow/ParaAllShow.html index 240a2f83..4aa77e09 100644 --- a/ruoyi-admin/src/main/resources/templates/nanjing/ParaAllShow/ParaAllShow.html +++ b/ruoyi-admin/src/main/resources/templates/nanjing/ParaAllShow/ParaAllShow.html @@ -39,6 +39,7 @@ function searc() { var formData = new FormData(); formData.append("semiBarcode",$("#semiBarcode").val()); + $.modal.loading("数据加载中......"); $.ajax({ type: "post", url: prefix + "/paraAllShow", @@ -50,8 +51,6 @@ contentType: false, modalName: "产品码查询", success: function (json) { - console.log(json); - var columnsArray2 = []; columnsArray2.push({field : "semiBarcode",title : "产品码",colspan: 1,rowspan: 1}); columnsArray2.push({field : "部件码",title : "部件码",colspan: 1,rowspan: 1}); @@ -123,6 +122,7 @@ // exportDataType: 'all', columns: columnsArray2 }); + $.modal.closeLoading(); }, error: function () { alert("查询失败!"); diff --git a/ruoyi-admin/src/main/resources/templates/nanjing/Report/Report.html b/ruoyi-admin/src/main/resources/templates/nanjing/Report/Report.html index e02ee7fc..a339577f 100644 --- a/ruoyi-admin/src/main/resources/templates/nanjing/Report/Report.html +++ b/ruoyi-admin/src/main/resources/templates/nanjing/Report/Report.html @@ -39,6 +39,10 @@ \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/menu/add.html b/ruoyi-admin/src/main/resources/templates/system/menu/add.html index 39ebb735..0e8a3157 100644 --- a/ruoyi-admin/src/main/resources/templates/system/menu/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/menu/add.html @@ -178,10 +178,13 @@ } function doSubmit(index, layero){ - var body = layer.getChildFrame('body', index); - $("#treeId").val(body.find('#treeId').val()); - $("#treeName").val(body.find('#treeName').val()); - layer.close(index); + var tree = layero.find("iframe")[0].contentWindow.$._tree; + if ($.tree.notAllowParents(tree)) { + var body = layer.getChildFrame('body', index); + $("#treeId").val(body.find('#treeId').val()); + $("#treeName").val(body.find('#treeName').val()); + layer.close(index); + } } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/Ztree.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/Ztree.java index e7fe780e..afbbfa71 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/Ztree.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/Ztree.java @@ -4,7 +4,7 @@ import java.io.Serializable; /** * Ztree树结构实体类 - * + * * @author ruoyi */ public class Ztree implements Serializable @@ -12,10 +12,10 @@ public class Ztree implements Serializable private static final long serialVersionUID = 1L; /** 节点ID */ - private Long id; + private String id; /** 节点父ID */ - private Long pId; + private String pId; /** 节点名称 */ private String name; @@ -32,22 +32,22 @@ public class Ztree implements Serializable /** 是否能勾选 */ private boolean nocheck = false; - public Long getId() + public String getId() { return id; } - public void setId(Long id) + public void setId(String id) { this.id = id; } - public Long getpId() + public String getpId() { return pId; } - public void setpId(Long pId) + public void setpId(String pId) { this.pId = pId; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/nanjing/domain/TBdLinetype.java b/ruoyi-system/src/main/java/com/ruoyi/nanjing/domain/TBdLinetype.java index 06764854..81e29737 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/nanjing/domain/TBdLinetype.java +++ b/ruoyi-system/src/main/java/com/ruoyi/nanjing/domain/TBdLinetype.java @@ -1,5 +1,6 @@ package com.ruoyi.nanjing.domain; +import com.ruoyi.common.core.domain.TreeEntity; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; @@ -11,7 +12,7 @@ import com.ruoyi.common.core.domain.BaseEntity; * @author limy * @date 2021-01-22 */ -public class TBdLinetype extends BaseEntity +public class TBdLinetype extends TreeEntity { private static final long serialVersionUID = 1L; @@ -30,50 +31,58 @@ public class TBdLinetype extends BaseEntity @Excel(name = "条码前缀") private String BarcodeHead; - public void setLineID(Long LineID) - { - this.LineID = LineID; - } + @Excel(name = "主线") + private Long PID; - public Long getLineID() - { + public Long getLineID() { return LineID; } - public void setLineTypeName(String LineTypeName) - { - this.LineTypeName = LineTypeName; + + public void setLineID(Long lineID) { + LineID = lineID; } - public String getLineTypeName() - { + public String getLineTypeName() { return LineTypeName; } - public void setLineTypeFlag(String LineTypeFlag) - { - this.LineTypeFlag = LineTypeFlag; + + public void setLineTypeName(String lineTypeName) { + LineTypeName = lineTypeName; } - public String getLineTypeFlag() - { + public String getLineTypeFlag() { return LineTypeFlag; } - public void setBarcodeHead(String BarcodeHead) - { - this.BarcodeHead = BarcodeHead; + + public void setLineTypeFlag(String lineTypeFlag) { + LineTypeFlag = lineTypeFlag; } - public String getBarcodeHead() - { + public String getBarcodeHead() { return BarcodeHead; } + public void setBarcodeHead(String barcodeHead) { + BarcodeHead = barcodeHead; + } + + public Long getPID() { + return PID; + } + + public void setPID(Long PID) { + this.PID = PID; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("LineID", getLineID()) + .append("LineID", getLineID()) .append("LineTypeName", getLineTypeName()) .append("LineTypeFlag", getLineTypeFlag()) .append("BarcodeHead", getBarcodeHead()) .toString(); } + + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/nanjing/mapper/TBdProducttypeMapper.java b/ruoyi-system/src/main/java/com/ruoyi/nanjing/mapper/TBdProducttypeMapper.java index 5e357de4..827ea923 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/nanjing/mapper/TBdProducttypeMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/nanjing/mapper/TBdProducttypeMapper.java @@ -1,5 +1,6 @@ package com.ruoyi.nanjing.mapper; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -28,6 +29,7 @@ public interface TBdProducttypeMapper List selectQtProductList(Map map); + List selectQsProductList(Map map); List selectQ1ProductList(Map map); diff --git a/ruoyi-system/src/main/java/com/ruoyi/nanjing/service/ITBdLinetypeService.java b/ruoyi-system/src/main/java/com/ruoyi/nanjing/service/ITBdLinetypeService.java index 28730148..e5ba6004 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/nanjing/service/ITBdLinetypeService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/nanjing/service/ITBdLinetypeService.java @@ -1,6 +1,8 @@ package com.ruoyi.nanjing.service; import java.util.List; + +import com.ruoyi.common.core.domain.Ztree; import com.ruoyi.nanjing.domain.TBdLinetype; /** @@ -58,4 +60,11 @@ public interface ITBdLinetypeService * @return 结果 */ public int deleteTBdLinetypeById(Long LineID); + + /** + * 查询测控点信息树列表 + * + * @return 所有测控点信息信息 + */ + public List selectBaseMonitorInfoTree(); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/nanjing/service/ITBdProducttypeService.java b/ruoyi-system/src/main/java/com/ruoyi/nanjing/service/ITBdProducttypeService.java index 394c165f..755e1028 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/nanjing/service/ITBdProducttypeService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/nanjing/service/ITBdProducttypeService.java @@ -40,5 +40,7 @@ public interface ITBdProducttypeService List selectNodeQs(Map map); +// List> selectReport(Map map); + List> selectReport(Map map); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/nanjing/service/impl/TBdLinetypeServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/nanjing/service/impl/TBdLinetypeServiceImpl.java index a2b62221..4873f938 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/nanjing/service/impl/TBdLinetypeServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/nanjing/service/impl/TBdLinetypeServiceImpl.java @@ -1,6 +1,9 @@ package com.ruoyi.nanjing.service.impl; +import java.util.ArrayList; import java.util.List; + +import com.ruoyi.common.core.domain.Ztree; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.nanjing.mapper.TBdLinetypeMapper; @@ -91,4 +94,25 @@ public class TBdLinetypeServiceImpl implements ITBdLinetypeService { return tBdLinetypeMapper.deleteTBdLinetypeById(LineID); } + /** + * 查询测控点信息树列表 + * + * @return 所有测控点信息信息 + */ + @Override + public List selectBaseMonitorInfoTree() + { + List baseMonitorInfoList = tBdLinetypeMapper.selectTBdLinetypeList(new TBdLinetype()); + List ztrees = new ArrayList(); + for (TBdLinetype baseMonitorInfo : baseMonitorInfoList) + { + Ztree ztree = new Ztree(); + ztree.setId(baseMonitorInfo.getLineID().toString()); + ztree.setpId(baseMonitorInfo.getPID().toString()); + ztree.setName(baseMonitorInfo.getLineTypeName()); + ztree.setTitle(baseMonitorInfo.getLineTypeName()); + ztrees.add(ztree); + } + return ztrees; + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/nanjing/service/impl/TBdSubstationServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/nanjing/service/impl/TBdSubstationServiceImpl.java index cefc5042..b98d54ef 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/nanjing/service/impl/TBdSubstationServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/nanjing/service/impl/TBdSubstationServiceImpl.java @@ -144,8 +144,8 @@ public class TBdSubstationServiceImpl implements ITBdSubstationService { Ztree ztree = new Ztree(); - ztree.setId(substation1.getStationID()); - ztree.setpId(substation1.getParentId()); + ztree.setId(substation1.getStationID().toString()); + ztree.setpId(substation1.getParentId().toString()); ztree.setName(substation1.getStationName()); ztree.setTitle(substation1.getStationName()); if (isCheck) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java index 69cbdeb1..b7b1420f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java @@ -134,8 +134,8 @@ public class SysDeptServiceImpl implements ISysDeptService if (UserConstants.DEPT_NORMAL.equals(dept.getStatus())) { Ztree ztree = new Ztree(); - ztree.setId(dept.getDeptId()); - ztree.setpId(dept.getParentId()); + ztree.setId(dept.getDeptId().toString()); + ztree.setpId(dept.getParentId().toString()); ztree.setName(dept.getDeptName()); ztree.setTitle(dept.getDeptName()); if (isCheck) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java index 495389b8..0e767df1 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java @@ -222,7 +222,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService if (UserConstants.DICT_NORMAL.equals(dict.getStatus())) { Ztree ztree = new Ztree(); - ztree.setId(dict.getDictId()); + ztree.setId(dict.getDictId().toString()); ztree.setName(transDictName(dict)); ztree.setTitle(dict.getDictType()); ztrees.add(ztree); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java index ce6a65e7..8334ee0e 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java @@ -204,8 +204,8 @@ public class SysMenuServiceImpl implements ISysMenuService for (SysMenu menu : menuList) { Ztree ztree = new Ztree(); - ztree.setId(menu.getMenuId()); - ztree.setpId(menu.getParentId()); + ztree.setId(menu.getMenuId().toString()); + ztree.setpId(menu.getParentId().toString()); ztree.setName(transMenuName(menu, permsFlag)); ztree.setTitle(menu.getMenuName()); if (isCheck) diff --git a/ruoyi-system/src/main/resources/mapper/nanjing/TBdLinetypeMapper.xml b/ruoyi-system/src/main/resources/mapper/nanjing/TBdLinetypeMapper.xml index d24784c8..776e836f 100644 --- a/ruoyi-system/src/main/resources/mapper/nanjing/TBdLinetypeMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/nanjing/TBdLinetypeMapper.xml @@ -9,10 +9,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + - select LineID, LineTypeName, LineTypeFlag, BarcodeHead from T_BD_LineType + select LineID, LineTypeName, LineTypeFlag, BarcodeHead,PID from T_BD_LineType + + + insert into T_BD_LineType @@ -36,12 +42,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LineTypeName, LineTypeFlag, BarcodeHead, + PID, #{LineID}, #{LineTypeName}, #{LineTypeFlag}, #{BarcodeHead}, + #{PID}, @@ -51,6 +59,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LineTypeName = #{LineTypeName}, LineTypeFlag = #{LineTypeFlag}, BarcodeHead = #{BarcodeHead}, + PID = #{PID}, + where LineID = #{LineID} diff --git a/ruoyi-system/src/main/resources/mapper/nanjing/TBdProducttypeMapper.xml b/ruoyi-system/src/main/resources/mapper/nanjing/TBdProducttypeMapper.xml index d4c30baa..e7b8edc3 100644 --- a/ruoyi-system/src/main/resources/mapper/nanjing/TBdProducttypeMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/nanjing/TBdProducttypeMapper.xml @@ -130,8 +130,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" { call pro_StationQStatistic ( - #{beginTime,mode=IN,jdbcType=DATE}, - #{endTime,mode=IN,jdbcType=DATE}, + #{begin,mode=IN,jdbcType=DATE}, + #{end,mode=IN,jdbcType=DATE}, #{stationType,mode=IN,jdbcType=VARCHAR}, #{stationId,mode=IN,jdbcType=VARCHAR}, #{productId,mode=IN,jdbcType=VARCHAR} @@ -152,14 +152,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"