提交源码

master
baogq 2 years ago
parent af9bd4eb48
commit e6dcd1141f

@ -1,23 +1,10 @@
package com.ruoyi.web.controller.nanjing; 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.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo; 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.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.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; 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.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; 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.*;
import java.util.stream.Collectors;
@Controller @Controller
@RequestMapping("/nanjing/reportData") @RequestMapping("/nanjing/reportData")
@ -60,12 +40,49 @@ public class ReportDataController extends BaseController {
map.put("end", end); map.put("end", end);
map.put("barcode", barcode); map.put("barcode", barcode);
List<Map<String,Object>> reportDataList = producttypeService.selectReport(map); List<Map<String,Object>> reportDataList = producttypeService.selectReport(map);
//查temp1表
// List<Map<String,Object>> reportDataList = producttypeService.selectReport();
//lmap--临时map用来存放判断的key
Map<String,Object> lmap = new HashMap<String,Object>();
//valueList--最终返回数据的集合
List<Map<String, Object>> valueList = new ArrayList<>();
//valueMap--存放在valueList中的map
Map<String,Object> valueMap = new LinkedHashMap<>();
//循环遍历拿到查询的数据
for(Map<String , Object> 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<String,Object>();
valueMap.put("Barcode",stationName);
valueMap.put("begintime",beginTime);
valueMap.put(parameaning,value);
valueList.add(valueMap);
//需要的条件用作keyvalueMap做value带入else语句情况下
lmap.put(stationName+beginTime,valueMap);
} else {
valueMap = (Map<String, Object>) lmap.get(stationName+beginTime);
valueMap.put(parameaning,value);
}
}
return getDataTable(valueList);
} }
// @PostMapping("/export") // @PostMapping("/export")
// @ResponseBody // @ResponseBody
// public AjaxResult export(String begin, String end, String barcode){ // public AjaxResult export(String begin, String end, String barcode){
@ -178,4 +195,6 @@ public class ReportDataController extends BaseController {
// return ajaxResult.success(targetFile); // return ajaxResult.success(targetFile);
// } // }
} }

@ -64,14 +64,14 @@ public class StatisticStProductController extends BaseController {
@PostMapping("/nodeClick") @PostMapping("/nodeClick")
@ResponseBody @ResponseBody
public List<QsStation> nodeClick(String begin,String end,String node) public List<QsStation> nodeClick(String begin,String end,String node,String productid)
{ {
Map map = new HashMap<String,Object>(); Map map = new HashMap<String,Object>();
map.put("begin",begin); map.put("begin",begin);
map.put("end",end); map.put("end",end);
map.put("stationId",node); map.put("stationId",node);
map.put("stationType",1); map.put("stationType",1);
map.put("productId","ALL"); map.put("productId",productid);
List<QsStation> qsStations = producttypeService.selectNodeQs(map); List<QsStation> qsStations = producttypeService.selectNodeQs(map);
return qsStations; return qsStations;
} }

@ -1,6 +1,10 @@
package com.ruoyi.web.controller.nanjing; package com.ruoyi.web.controller.nanjing;
import java.util.List; 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.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -47,11 +51,11 @@ public class TBdLinetypeController extends BaseController
@RequiresPermissions("nanjing:LineType:list") @RequiresPermissions("nanjing:LineType:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(TBdLinetype tBdLinetype) public List<TBdLinetype>list(TBdLinetype tBdLinetype)
{ {
startPage(); startPage();
List<TBdLinetype> list = tBdLinetypeService.selectTBdLinetypeList(tBdLinetype); List<TBdLinetype> list = tBdLinetypeService.selectTBdLinetypeList(tBdLinetype);
return getDataTable(list); return list;
} }
/** /**
@ -71,9 +75,15 @@ public class TBdLinetypeController extends BaseController
/** /**
* 线 * 线
*/ */
@GetMapping("/add") @GetMapping( value = { "/add/{LineID}", "/add/" })
public String 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"; return prefix + "/add";
} }
@ -86,6 +96,9 @@ public class TBdLinetypeController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult addSave(TBdLinetype tBdLinetype) public AjaxResult addSave(TBdLinetype tBdLinetype)
{ {
if(StringUtils.isNull(tBdLinetype.getPID())){
tBdLinetype.setPID(0L);
}
return toAjax(tBdLinetypeService.insertTBdLinetype(tBdLinetype)); return toAjax(tBdLinetypeService.insertTBdLinetype(tBdLinetype));
} }
@ -109,18 +122,36 @@ public class TBdLinetypeController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult editSave(TBdLinetype tBdLinetype) public AjaxResult editSave(TBdLinetype tBdLinetype)
{ {
if(StringUtils.isNull(tBdLinetype.getPID())){
tBdLinetype.setPID(0L);
}
return toAjax(tBdLinetypeService.updateTBdLinetype(tBdLinetype)); 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") @GetMapping("/treeData")
@Log(title = "主支线管理", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody @ResponseBody
public AjaxResult remove(String ids) public List<Ztree> treeData()
{
List<Ztree> 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";
} }
} }

@ -6,12 +6,12 @@ spring:
druid: druid:
# 主库数据源 # 主库数据源
master: 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 username: sa
password: Mesnac123 password: 123456
# url: jdbc:sqlserver://127.0.0.1:1433;SelectMethod=cursor;DatabaseName=FYATJ
# username: sa
# password: Mesnac123
# 从库数据源 # 从库数据源
slave: slave:
# 从数据源开关/默认关闭 # 从数据源开关/默认关闭

@ -17,7 +17,7 @@ ruoyi:
# 开发环境配置 # 开发环境配置
server: server:
# 服务器的HTTP端口默认为80 # 服务器的HTTP端口默认为80
port: 4935 port: 9080
servlet: servlet:
# 应用的访问路径 # 应用的访问路径
context-path: / context-path: /

@ -3,16 +3,16 @@ html {
} }
body.signin { body.signin {
height:auto; 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; -webkit-background-size:cover;
-moz-background-size:cover; -moz-background-size:cover;
-o-background-size:cover; -o-background-size:cover;
background-size:cover; background-size:cover
color:rgba(255,255,255,.95)
} }
.signinpanel { .signinpanel {
width:750px; width:750px;
margin:10% auto 0 margin:10% auto 0;
color:rgba(255,255,255,.95)
} }
.signinpanel .logopanel { .signinpanel .logopanel {
float:none; float:none;
@ -62,7 +62,7 @@ body.signin {
@media screen and (max-width:768px) { @media screen and (max-width:768px) {
.signinpanel,.signuppanel { .signinpanel,.signuppanel {
margin:0 auto; margin:0 auto;
width:420px!important; width:380px!important;
padding:20px padding:20px
} }
.signinpanel form { .signinpanel form {

@ -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} 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}

@ -729,6 +729,15 @@ var table = {
alertWarning: function(content) { alertWarning: function(content) {
$.modal.alert(content, modal_status.WARNING); $.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 () { close: function () {
var index = parent.layer.getFrameIndex(window.name); var index = parent.layer.getFrameIndex(window.name);
@ -1424,14 +1433,14 @@ var table = {
return false; return false;
} }
for (var i = 0; i < nodes.length; i++) { for (var i = 0; i < nodes.length; i++) {
if (nodes[i].level == 0) { // if (nodes[i].level == 0) {
$.modal.msgError("不能选择根节点(" + nodes[i].name + ""); // $.modal.msgError("不能选择根节点(" + nodes[i].name + "");
return false; // return false;
} // }
if (nodes[i].isParent) { // if (nodes[i].isParent) {
$.modal.msgError("不能选择父节点(" + nodes[i].name + ""); // $.modal.msgError("不能选择父节点(" + nodes[i].name + "");
return false; // return false;
} // }
} }
return true; return true;
}, },

@ -22,7 +22,7 @@
</select> </select>
</li> </li>
<li> <li>
<a class="btn btn-success btn-rounded btn-sm" onclick="$.operate.add()" shiro:hasPermission="nanjing:LineType:add"><i class="fa fa-plus"></i> 添加</a> <!-- <a class="btn btn-success btn-rounded btn-sm" onclick="$.operate.add()" shiro:hasPermission="nanjing:LineType:add"><i class="fa fa-plus"></i> 添加</a>-->
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;查询全部</a> <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;查询全部</a>
</li> </li>
@ -30,59 +30,52 @@
</div> </div>
</form> </form>
</div> </div>
<div class="btn-group-sm" id="toolbar" role="group">
<!-- <div class="btn-group-sm" id="toolbar" role="group">--> <a class="btn btn-success" onclick="$.operate.add(0)" shiro:hasPermission="nanjing:LineType:add">
<!-- --> <i class="fa fa-plus"></i> 新增
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="nanjing:LineType:edit">--> </a>
<!-- <i class="fa fa-edit"></i> 修改--> <a class="btn btn-primary" onclick="$.operate.edit()" shiro:hasPermission="nanjing:LineType:edit">
<!-- </a>--> <i class="fa fa-edit"></i> 修改
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="nanjing:LineType:remove">--> </a>
<!-- <i class="fa fa-remove"></i> 删除--> <a class="btn btn-info" id="expandAllBtn">
<!-- </a>--> <i class="fa fa-exchange"></i> 展开/折叠
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="nanjing:LineType:export">--> </a>
<!-- <i class="fa fa-download"></i> 导出--> </div>
<!-- </a>-->
<!-- </div>-->
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table> <table id="bootstrap-tree-table"></table>
</div> </div>
</div> </div>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-table-export-js" /> <th:block th:include="include :: bootstrap-table-export-js" />
<script th:inline="javascript"> <script th:inline="javascript">
var addFlag = [[${@permission.hasPermi('nanjing:LineType:add')}]];
var editFlag = [[${@permission.hasPermi('nanjing:LineType:edit')}]]; var editFlag = [[${@permission.hasPermi('nanjing:LineType:edit')}]];
var removeFlag = [[${@permission.hasPermi('nanjing:LineType:remove')}]]; var removeFlag = [[${@permission.hasPermi('nanjing:LineType:remove')}]];
var prefix = ctx + "nanjing/LineType"; var prefix = ctx + "nanjing/LineType";
var datas = [[${@dict.getType('LineType')}]]; var datas = [[${@dict.getType('LineType')}]];
$(function() { $(function() {
var options = { var options = {
code: "lineID",
parentCode: "pid",
uniqueId: "lineID",
url: prefix + "/list", url: prefix + "/list",
createUrl: prefix + "/add", createUrl: prefix + "/add/{id}",
updateUrl: prefix + "/edit/{id}", updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove", removeUrl: prefix + "/remove/{id}",
exportUrl: prefix + "/export", exportUrl: prefix + "/export",
modalName: "主支线管理", modalName: "主支线管理",
search: false, search: false,
showExport: true,//工具栏上显示导出按钮 showExport: true,//工具栏上显示导出按钮
exportOptions: { setOrderBy: 'lineID',
ignoreColumn: [-1, 5] //忽略最后一列 columns: [{
field: 'selectItem',
radio: true
}, },
columns: [
// {
// checkbox: true
// },
{
title:'序号',
formatter: function (value, row, index) {
return index+1;
}
},
{ {
field: 'lineID', field: 'lineID',
title: '编号', title: '编号',
// sortName:'LineId'
// sortable:true
}, },
{ {
field: 'lineTypeName', field: 'lineTypeName',
@ -105,13 +98,14 @@
align: 'center', align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-info btn-xs ' + addFlag + '" href="javascript:void(0)" onclick="$.operate.add(\'' + row.lineID + '\')"><i class="fa fa-plus"></i>新增</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.lineID + '\')"><i class="fa fa-edit"></i>编辑</a> '); actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.lineID + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.lineID + '\')"><i class="fa fa-remove"></i>删除</a>'); actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.lineID + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join(''); return actions.join('');
} }
}] }]
}; };
$.table.init(options); $.treeTable.init(options);
}); });
</script> </script>
</body> </body>

@ -6,7 +6,18 @@
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-LineType-add"> <form class="form-horizontal m" id="form-LineType-add">
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">主线编号:</label>
<div class="col-sm-8">
<div class="input-group">
<input id="treeId" name="PID" type="hidden" th:value="${TBdLinetype?.LineID}"/>
<input class="form-control" type="text" onclick="selectMonitorInfoTree()" id="treeName" readonly="true" th:value="${TBdLinetype?.LineTypeName}">
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">线路名称:</label> <label class="col-sm-3 control-label">线路名称:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="LineTypeName" class="form-control" type="text"> <input name="LineTypeName" class="form-control" type="text">
@ -31,15 +42,34 @@
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "nanjing/LineType" var prefix = ctx + "nanjing/LineType"
$("#form-LineType-add").validate({ $("#form-LineType-add").validate({
focusCleanup: true focusCleanup: true
}); });
/*测控点信息-新增-选择父节点信息树*/
function selectMonitorInfoTree() {
var options = {
title: '测控点信息选择',
width: "380",
url: prefix + "/selectLineTree/" + $("#treeId").val(),
callBack: doSubmit
};
$.modal.openOptions(options);
}
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-LineType-add').serialize()); $.operate.save(prefix + "/add", $('#form-LineType-add').serialize());
} }
} }
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);
}
}
</script> </script>
</body> </body>
</html> </html>

@ -6,6 +6,16 @@
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-LineType-edit" th:object="${tBdLinetype}"> <form class="form-horizontal m" id="form-LineType-edit" th:object="${tBdLinetype}">
<div class="form-group">
<label class="col-sm-3 control-label">所属主线:</label>
<div class="col-sm-8">
<div class="input-group">
<input id="treeId" name="PID" type="hidden" th:field="*{PID}" />
<input class="form-control" type="text" onclick="selectMonitorInfoTree()" id="treeName" readonly="true" th:field="*{parentName}">
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
</div>
</div>
<input name="LineID" th:field="*{LineID}" type="hidden"> <input name="LineID" th:field="*{LineID}" type="hidden">
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">线路名称:</label> <label class="col-sm-3 control-label">线路名称:</label>
@ -40,6 +50,25 @@
if ($.validate.form()) { if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-LineType-edit').serialize()); $.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);
}
} }
</script> </script>
</body> </body>

@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('测控点信息树选择')" />
<th:block th:include="include :: ztree-css" />
</head>
<style>
body{height:auto;font-family: "Microsoft YaHei";}
button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
</style>
<body class="hold-transition box box-main">
<input id="treeId" name="treeId" type="hidden" th:value="${baseMonitorInfo?.monitorId}"/>
<input id="treeName" name="treeName" type="hidden" th:value="${baseMonitorInfo?.monitorName}"/>
<div class="wrapper"><div class="treeShowHideButton" onclick="$.tree.toggleSearch();">
<label id="btnShow" title="显示搜索" style="display:none;"></label>
<label id="btnHide" title="隐藏搜索"></label>
</div>
<div class="treeSearchInput" id="search">
<label for="keyword">关键字:</label><input type="text" class="empty" id="keyword" maxlength="50">
<button class="btn" id="btn" onclick="$.tree.searchNode()"> 搜索 </button>
</div>
<div class="treeExpandCollapse">
<a href="#" onclick="$.tree.expand()">展开</a> /
<a href="#" onclick="$.tree.collapse()">折叠</a>
</div>
<div id="tree" class="ztree treeselect"></div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script th:inline="javascript">
$(function() {
var url = ctx + "nanjing/LineType/treeData";
var options = {
url: url,
expandLevel: 2,
onClick : zOnClick
};
$.tree.init(options);
});
function zOnClick(event, treeId, treeNode) {
var treeId = treeNode.id;
var treeName = treeNode.name;
$("#treeId").val(treeId);
$("#treeName").val(treeName);
}
</script>
</body>
</html>

@ -39,6 +39,7 @@
function searc() { function searc() {
var formData = new FormData(); var formData = new FormData();
formData.append("semiBarcode",$("#semiBarcode").val()); formData.append("semiBarcode",$("#semiBarcode").val());
$.modal.loading("数据加载中......");
$.ajax({ $.ajax({
type: "post", type: "post",
url: prefix + "/paraAllShow", url: prefix + "/paraAllShow",
@ -50,8 +51,6 @@
contentType: false, contentType: false,
modalName: "产品码查询", modalName: "产品码查询",
success: function (json) { success: function (json) {
console.log(json);
var columnsArray2 = []; var columnsArray2 = [];
columnsArray2.push({field : "semiBarcode",title : "产品码",colspan: 1,rowspan: 1}); columnsArray2.push({field : "semiBarcode",title : "产品码",colspan: 1,rowspan: 1});
columnsArray2.push({field : "部件码",title : "部件码",colspan: 1,rowspan: 1}); columnsArray2.push({field : "部件码",title : "部件码",colspan: 1,rowspan: 1});
@ -123,6 +122,7 @@
// exportDataType: 'all', // exportDataType: 'all',
columns: columnsArray2 columns: columnsArray2
}); });
$.modal.closeLoading();
}, },
error: function () { error: function () {
alert("查询失败!"); alert("查询失败!");

@ -39,6 +39,10 @@
<script th:inline="javascript"> <script th:inline="javascript">
var stateDatas = [[${@dict.getType('is_not_yx')}]]; var stateDatas = [[${@dict.getType('is_not_yx')}]];
function searchpara(){ function searchpara(){
// if ($('#barcode').val()==null||$('#barcode').val()==''){
// $.modal.msgWarning("产品条码为空!")
// return
// }
// console.log("点击查询按钮事件执行..."); // console.log("点击查询按钮事件执行...");
// //方式1行转列 // //方式1行转列
@ -46,6 +50,7 @@
formData.append("begin",$('#beginTime').val()); formData.append("begin",$('#beginTime').val());
formData.append("end",$('#endTime').val()); formData.append("end",$('#endTime').val());
formData.append("barcode",$('#barcode').val()); formData.append("barcode",$('#barcode').val());
$.modal.loading("数据加载中......");
$.ajax({ $.ajax({
type: "post", type: "post",
url: ctx + "nanjing/reportData/report", url: ctx + "nanjing/reportData/report",
@ -59,12 +64,13 @@
console.log(json) console.log(json)
var columnsArray = []; var columnsArray = [];
columnsArray.push({field : "Barcode",title : "产品条码",colspan: 1,rowspan: 1}); columnsArray.push({field : "Barcode",title : "产品条码",colspan: 1,rowspan: 1});
//columnsArray.push({field : "begintime",title : "开始时间",colspan: 1,rowspan: 1});
if(json.total>0){ if(json.total>0){
for (var i = 0; i < (Object.keys(json.rows[0])).length; i++) {//Object.keys(obj) 获取key名称 for (var i = 0; i < (Object.keys(json.rows[0])).length; i++) {//Object.keys(obj) 获取key名称
var property = (Object.keys(json.rows[0]))[i]; var property = (Object.keys(json.rows[0]))[i];
console.log(property) console.log(property)
if(property!='Barcode' && property!="ProductBarcode"){ if(property!='Barcode' && property!="ProductBarcode" && property!='begintime'){
columnsArray.push({ columnsArray.push({
"title": property, "title": property,
"field": property, "field": property,
@ -79,15 +85,14 @@
} }
// coulmnsData.push(columnsArray); // coulmnsData.push(columnsArray);
// coulmnsData.push(columns); // coulmnsData.push(columns);
console.log(columnsArray);
$('#bootstrap-table').bootstrapTable('destroy').bootstrapTable({ $('#bootstrap-table').bootstrapTable('destroy').bootstrapTable({
id: "bootstrap-table", id: "bootstrap-table",
data:json, data:json,
toolbar: "#toolbar", toolbar: "#toolbar",
singleSelect: false, singleSelect: false,
// clickToSelect: true, // clickToSelect: true,
sortName: "barcode", sortName: "begintime",
sortOrder: "desc", sortOrder: "asc",
pageSize: 15, pageSize: 15,
pageNumber: 1, pageNumber: 1,
pageList: "[10, 15,25, 50, 100, All]", pageList: "[10, 15,25, 50, 100, All]",
@ -107,11 +112,16 @@
columns: columnsArray columns: columnsArray
}); });
// columnsArray.push(); // columnsArray.push();
$.modal.closeLoading();
}, },
error: function () { error: function () {
alert("错误"); alert("错误");
} }
});
}
);
// 方式2 不进行行转列 // 方式2 不进行行转列
// var url = ctx + "nanjing/reportData/report"; // var url = ctx + "nanjing/reportData/report";
// $('#bootstrap-table').bootstrapTable('destroy'); // $('#bootstrap-table').bootstrapTable('destroy');

@ -74,7 +74,7 @@
console.log(json); console.log(json);
var columnsArray1 = []; var columnsArray1 = [];
// //
columnsArray1.push({field : "序号",title : "序号",colspan: 1,rowspan: 1}); // columnsArray1.push({field : "序号",title : "序号",colspan: 1,rowspan: 1});
columnsArray1.push({field : "产品码",title : "产品码",colspan: 1,rowspan: 1}); columnsArray1.push({field : "产品码",title : "产品码",colspan: 1,rowspan: 1});
columnsArray1.push({field : "状态",title : "状态",colspan: 1,rowspan: 1}); columnsArray1.push({field : "状态",title : "状态",colspan: 1,rowspan: 1});
columnsArray1.push({field : "记录时间",title : "记录时间",colspan: 1,rowspan: 1}); columnsArray1.push({field : "记录时间",title : "记录时间",colspan: 1,rowspan: 1});

@ -188,7 +188,8 @@
{ {
begin:$('#startTime').val(), begin:$('#startTime').val(),
end:$('#endTime').val(), end:$('#endTime').val(),
node:$('#stationId').val() node:$('#stationId').val(),
productid:$('#product').val()
}, },
modalName: "工位合格率统计", modalName: "工位合格率统计",
columns: [ columns: [

@ -19,7 +19,7 @@
<li> <li>
<label>机种类型:</label> <label>机种类型:</label>
<select name="productType" th:with="type=${@dict.getType('productType')}"> <select name="productType" th:with="type=${@dict.getType('productType')}">
<option value="">全部</option> <option value="all">全部</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select> </select>
</li> </li>

@ -59,12 +59,22 @@
</select> </select>
</div> </div>
</div> </div>
<div class="form-group"> <!-- <div class="form-group"> -->
<label class="col-sm-3 control-label">线路类型:</label> <!-- <label class="col-sm-3 control-label">线路类型:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <select name="LineID" class="form-control">-->
<!-- <option th:each="st:${linename}" th:value="${st.LineID}" th:text="${st.LineTypeName}"></option>-->
<!-- </select>-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group">
<label class="col-sm-3 control-label">所属线路:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select name="LineID" class="form-control"> <div class="input-group">
<option th:each="st:${linename}" th:value="${st.LineID}" th:text="${st.LineTypeName}"></option> <input id="treeId" name="LineID" type="hidden" th:value="${TBdLinetype?.LineID}"/>
</select> <input class="form-control" type="text" onclick="selectMonitorInfoTree()" id="treeName" readonly="true" th:value="${TBdLinetype?.LineTypeName}">
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
</div> </div>
</div> </div>
</form> </form>
@ -73,6 +83,7 @@
<th:block th:include="include :: select2-js" /> <th:block th:include="include :: select2-js" />
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "nanjing/SubStation" var prefix = ctx + "nanjing/SubStation"
var LineType = ctx + "nanjing/LineType"
$("#form-SubStation-add").validate({ $("#form-SubStation-add").validate({
focusCleanup: true focusCleanup: true
}); });
@ -104,6 +115,25 @@
function fillTableName() { function fillTableName() {
$('#tableName').val("T_RP_StationPara_"+$('#stationCode').val().toString().trim()); $('#tableName').val("T_RP_StationPara_"+$('#stationCode').val().toString().trim());
} }
/*测控点信息-新增-选择父节点信息树*/
function selectMonitorInfoTree() {
var options = {
title: '测控点信息选择',
width: "380",
url: LineType + "/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);
}
}
</script> </script>
</body> </body>
</html> </html>

@ -178,10 +178,13 @@
} }
function doSubmit(index, layero){ function doSubmit(index, layero){
var body = layer.getChildFrame('body', index); var tree = layero.find("iframe")[0].contentWindow.$._tree;
$("#treeId").val(body.find('#treeId').val()); if ($.tree.notAllowParents(tree)) {
$("#treeName").val(body.find('#treeName').val()); var body = layer.getChildFrame('body', index);
layer.close(index); $("#treeId").val(body.find('#treeId').val());
$("#treeName").val(body.find('#treeName').val());
layer.close(index);
}
} }
</script> </script>
</body> </body>

@ -4,7 +4,7 @@ import java.io.Serializable;
/** /**
* Ztree * Ztree
* *
* @author ruoyi * @author ruoyi
*/ */
public class Ztree implements Serializable public class Ztree implements Serializable
@ -12,10 +12,10 @@ public class Ztree implements Serializable
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 节点ID */ /** 节点ID */
private Long id; private String id;
/** 节点父ID */ /** 节点父ID */
private Long pId; private String pId;
/** 节点名称 */ /** 节点名称 */
private String name; private String name;
@ -32,22 +32,22 @@ public class Ztree implements Serializable
/** 是否能勾选 */ /** 是否能勾选 */
private boolean nocheck = false; private boolean nocheck = false;
public Long getId() public String getId()
{ {
return id; return id;
} }
public void setId(Long id) public void setId(String id)
{ {
this.id = id; this.id = id;
} }
public Long getpId() public String getpId()
{ {
return pId; return pId;
} }
public void setpId(Long pId) public void setpId(String pId)
{ {
this.pId = pId; this.pId = pId;
} }

@ -1,5 +1,6 @@
package com.ruoyi.nanjing.domain; 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.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
@ -11,7 +12,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* @author limy * @author limy
* @date 2021-01-22 * @date 2021-01-22
*/ */
public class TBdLinetype extends BaseEntity public class TBdLinetype extends TreeEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -30,50 +31,58 @@ public class TBdLinetype extends BaseEntity
@Excel(name = "条码前缀") @Excel(name = "条码前缀")
private String BarcodeHead; private String BarcodeHead;
public void setLineID(Long LineID) @Excel(name = "主线")
{ private Long PID;
this.LineID = LineID;
}
public Long getLineID() public Long getLineID() {
{
return LineID; return LineID;
} }
public void setLineTypeName(String LineTypeName)
{ public void setLineID(Long lineID) {
this.LineTypeName = LineTypeName; LineID = lineID;
} }
public String getLineTypeName() public String getLineTypeName() {
{
return LineTypeName; return LineTypeName;
} }
public void setLineTypeFlag(String LineTypeFlag)
{ public void setLineTypeName(String lineTypeName) {
this.LineTypeFlag = LineTypeFlag; LineTypeName = lineTypeName;
} }
public String getLineTypeFlag() public String getLineTypeFlag() {
{
return LineTypeFlag; return LineTypeFlag;
} }
public void setBarcodeHead(String BarcodeHead)
{ public void setLineTypeFlag(String lineTypeFlag) {
this.BarcodeHead = BarcodeHead; LineTypeFlag = lineTypeFlag;
} }
public String getBarcodeHead() public String getBarcodeHead() {
{
return BarcodeHead; return BarcodeHead;
} }
public void setBarcodeHead(String barcodeHead) {
BarcodeHead = barcodeHead;
}
public Long getPID() {
return PID;
}
public void setPID(Long PID) {
this.PID = PID;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("LineID", getLineID()) .append("LineID", getLineID())
.append("LineTypeName", getLineTypeName()) .append("LineTypeName", getLineTypeName())
.append("LineTypeFlag", getLineTypeFlag()) .append("LineTypeFlag", getLineTypeFlag())
.append("BarcodeHead", getBarcodeHead()) .append("BarcodeHead", getBarcodeHead())
.toString(); .toString();
} }
} }

@ -1,5 +1,6 @@
package com.ruoyi.nanjing.mapper; package com.ruoyi.nanjing.mapper;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -28,6 +29,7 @@ public interface TBdProducttypeMapper
List<QtProduct> selectQtProductList(Map map); List<QtProduct> selectQtProductList(Map map);
List<QsProduct> selectQsProductList(Map map); List<QsProduct> selectQsProductList(Map map);
List<QsProduct> selectQ1ProductList(Map map); List<QsProduct> selectQ1ProductList(Map map);

@ -1,6 +1,8 @@
package com.ruoyi.nanjing.service; package com.ruoyi.nanjing.service;
import java.util.List; import java.util.List;
import com.ruoyi.common.core.domain.Ztree;
import com.ruoyi.nanjing.domain.TBdLinetype; import com.ruoyi.nanjing.domain.TBdLinetype;
/** /**
@ -58,4 +60,11 @@ public interface ITBdLinetypeService
* @return * @return
*/ */
public int deleteTBdLinetypeById(Long LineID); public int deleteTBdLinetypeById(Long LineID);
/**
*
*
* @return
*/
public List<Ztree> selectBaseMonitorInfoTree();
} }

@ -40,5 +40,7 @@ public interface ITBdProducttypeService
List<QsStation> selectNodeQs(Map map); List<QsStation> selectNodeQs(Map map);
// List<Map<String,Object>> selectReport(Map map);
List<Map<String,Object>> selectReport(Map map); List<Map<String,Object>> selectReport(Map map);
} }

@ -1,6 +1,9 @@
package com.ruoyi.nanjing.service.impl; package com.ruoyi.nanjing.service.impl;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.ruoyi.common.core.domain.Ztree;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ruoyi.nanjing.mapper.TBdLinetypeMapper; import com.ruoyi.nanjing.mapper.TBdLinetypeMapper;
@ -91,4 +94,25 @@ public class TBdLinetypeServiceImpl implements ITBdLinetypeService
{ {
return tBdLinetypeMapper.deleteTBdLinetypeById(LineID); return tBdLinetypeMapper.deleteTBdLinetypeById(LineID);
} }
/**
*
*
* @return
*/
@Override
public List<Ztree> selectBaseMonitorInfoTree()
{
List<TBdLinetype> baseMonitorInfoList = tBdLinetypeMapper.selectTBdLinetypeList(new TBdLinetype());
List<Ztree> ztrees = new ArrayList<Ztree>();
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;
}
} }

@ -144,8 +144,8 @@ public class TBdSubstationServiceImpl implements ITBdSubstationService
{ {
Ztree ztree = new Ztree(); Ztree ztree = new Ztree();
ztree.setId(substation1.getStationID()); ztree.setId(substation1.getStationID().toString());
ztree.setpId(substation1.getParentId()); ztree.setpId(substation1.getParentId().toString());
ztree.setName(substation1.getStationName()); ztree.setName(substation1.getStationName());
ztree.setTitle(substation1.getStationName()); ztree.setTitle(substation1.getStationName());
if (isCheck) if (isCheck)

@ -134,8 +134,8 @@ public class SysDeptServiceImpl implements ISysDeptService
if (UserConstants.DEPT_NORMAL.equals(dept.getStatus())) if (UserConstants.DEPT_NORMAL.equals(dept.getStatus()))
{ {
Ztree ztree = new Ztree(); Ztree ztree = new Ztree();
ztree.setId(dept.getDeptId()); ztree.setId(dept.getDeptId().toString());
ztree.setpId(dept.getParentId()); ztree.setpId(dept.getParentId().toString());
ztree.setName(dept.getDeptName()); ztree.setName(dept.getDeptName());
ztree.setTitle(dept.getDeptName()); ztree.setTitle(dept.getDeptName());
if (isCheck) if (isCheck)

@ -222,7 +222,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
if (UserConstants.DICT_NORMAL.equals(dict.getStatus())) if (UserConstants.DICT_NORMAL.equals(dict.getStatus()))
{ {
Ztree ztree = new Ztree(); Ztree ztree = new Ztree();
ztree.setId(dict.getDictId()); ztree.setId(dict.getDictId().toString());
ztree.setName(transDictName(dict)); ztree.setName(transDictName(dict));
ztree.setTitle(dict.getDictType()); ztree.setTitle(dict.getDictType());
ztrees.add(ztree); ztrees.add(ztree);

@ -204,8 +204,8 @@ public class SysMenuServiceImpl implements ISysMenuService
for (SysMenu menu : menuList) for (SysMenu menu : menuList)
{ {
Ztree ztree = new Ztree(); Ztree ztree = new Ztree();
ztree.setId(menu.getMenuId()); ztree.setId(menu.getMenuId().toString());
ztree.setpId(menu.getParentId()); ztree.setpId(menu.getParentId().toString());
ztree.setName(transMenuName(menu, permsFlag)); ztree.setName(transMenuName(menu, permsFlag));
ztree.setTitle(menu.getMenuName()); ztree.setTitle(menu.getMenuName());
if (isCheck) if (isCheck)

@ -9,10 +9,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="LineTypeName" column="LineTypeName" /> <result property="LineTypeName" column="LineTypeName" />
<result property="LineTypeFlag" column="LineTypeFlag" /> <result property="LineTypeFlag" column="LineTypeFlag" />
<result property="BarcodeHead" column="BarcodeHead" /> <result property="BarcodeHead" column="BarcodeHead" />
<result property="PID" column="PID" />
<result property="parentName" column="parentName" />
</resultMap> </resultMap>
<sql id="selectTBdLinetypeVo"> <sql id="selectTBdLinetypeVo">
select LineID, LineTypeName, LineTypeFlag, BarcodeHead from T_BD_LineType select LineID, LineTypeName, LineTypeFlag, BarcodeHead,PID from T_BD_LineType
</sql> </sql>
<select id="selectTBdLinetypeList" parameterType="TBdLinetype" resultMap="TBdLinetypeResult"> <select id="selectTBdLinetypeList" parameterType="TBdLinetype" resultMap="TBdLinetypeResult">
@ -21,14 +23,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="LineTypeName != null and LineTypeName != ''"> and LineTypeName like ('%' + #{LineTypeName} + '%')</if> <if test="LineTypeName != null and LineTypeName != ''"> and LineTypeName like ('%' + #{LineTypeName} + '%')</if>
<if test="LineTypeFlag != null and LineTypeFlag != ''"> and LineTypeFlag = #{LineTypeFlag}</if> <if test="LineTypeFlag != null and LineTypeFlag != ''"> and LineTypeFlag = #{LineTypeFlag}</if>
</where> </where>
order by LineID desc order by LineID asc
</select> </select>
<select id="selectTBdLinetypeById" parameterType="Long" resultMap="TBdLinetypeResult"> <select id="selectTBdLinetypeById" parameterType="Long" resultMap="TBdLinetypeResult">
<include refid="selectTBdLinetypeVo"/> select t.LineID,t.LineTypeName,t.LineTypeFlag,t.BarcodeHead, p.LineTypeName as parentName,t.pid from dbo.T_BD_LineType t
where LineID = #{LineID} left join dbo.T_BD_LineType p on p.LineID = t.pid
where t.LineID = #{LineID}
</select> </select>
<insert id="insertTBdLinetype" parameterType="TBdLinetype"> <insert id="insertTBdLinetype" parameterType="TBdLinetype">
insert into T_BD_LineType insert into T_BD_LineType
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
@ -36,12 +42,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="LineTypeName != null">LineTypeName,</if> <if test="LineTypeName != null">LineTypeName,</if>
<if test="LineTypeFlag != null">LineTypeFlag,</if> <if test="LineTypeFlag != null">LineTypeFlag,</if>
<if test="BarcodeHead != null">BarcodeHead,</if> <if test="BarcodeHead != null">BarcodeHead,</if>
<if test="PID != null">PID,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="LineID != null">#{LineID},</if> <if test="LineID != null">#{LineID},</if>
<if test="LineTypeName != null">#{LineTypeName},</if> <if test="LineTypeName != null">#{LineTypeName},</if>
<if test="LineTypeFlag != null">#{LineTypeFlag},</if> <if test="LineTypeFlag != null">#{LineTypeFlag},</if>
<if test="BarcodeHead != null">#{BarcodeHead},</if> <if test="BarcodeHead != null">#{BarcodeHead},</if>
<if test="PID != null">#{PID},</if>
</trim> </trim>
</insert> </insert>
@ -51,6 +59,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="LineTypeName != null">LineTypeName = #{LineTypeName},</if> <if test="LineTypeName != null">LineTypeName = #{LineTypeName},</if>
<if test="LineTypeFlag != null">LineTypeFlag = #{LineTypeFlag},</if> <if test="LineTypeFlag != null">LineTypeFlag = #{LineTypeFlag},</if>
<if test="BarcodeHead != null">BarcodeHead = #{BarcodeHead},</if> <if test="BarcodeHead != null">BarcodeHead = #{BarcodeHead},</if>
<if test="PID != null">PID = #{PID},</if>
</trim> </trim>
where LineID = #{LineID} where LineID = #{LineID}
</update> </update>

@ -130,8 +130,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
{ {
call pro_StationQStatistic call pro_StationQStatistic
( (
#{beginTime,mode=IN,jdbcType=DATE}, #{begin,mode=IN,jdbcType=DATE},
#{endTime,mode=IN,jdbcType=DATE}, #{end,mode=IN,jdbcType=DATE},
#{stationType,mode=IN,jdbcType=VARCHAR}, #{stationType,mode=IN,jdbcType=VARCHAR},
#{stationId,mode=IN,jdbcType=VARCHAR}, #{stationId,mode=IN,jdbcType=VARCHAR},
#{productId,mode=IN,jdbcType=VARCHAR} #{productId,mode=IN,jdbcType=VARCHAR}
@ -152,14 +152,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectReport" parameterType="map" statementType="CALLABLE" resultType="java.util.LinkedHashMap"> <select id="selectReport" parameterType="map" statementType="CALLABLE" resultType="java.util.LinkedHashMap">
{
call testrow {
( call begin_date5
#{begin,mode=IN,jdbcType=DATE}, (
#{end,mode=IN,jdbcType=DATE}, #{begin,mode=IN,jdbcType=DATE},
#{barcode,mode=IN,jdbcType=VARCHAR} #{end,mode=IN,jdbcType=DATE},
) #{barcode,mode=IN,jdbcType=VARCHAR}
} )
}
</select> </select>

Loading…
Cancel
Save