开发DOE分析功能
This commit is contained in:
parent
4734ea70a9
commit
baa50519d9
|
|
@ -0,0 +1,56 @@
|
|||
package com.ruoyi.dfm.controller;
|
||||
|
||||
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.http.HttpUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
* DOE分析控制器
|
||||
*
|
||||
* @author wangwu
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/doeAnalysis.do")
|
||||
public class DoeAnalysisController extends BaseController {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(DoeAnalysisController.class);
|
||||
|
||||
@Value("${api.doe.GetDataByKeyParam}")
|
||||
private String getDataByKeyParamUrl;
|
||||
|
||||
/**
|
||||
* 获取分析页面
|
||||
*
|
||||
* @param mmap
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("")
|
||||
public String index(ModelMap mmap) {
|
||||
return "dfm/doeAnalysis";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分析页面
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(@RequestParam("productname") String productname, @RequestParam("version") String version, @RequestParam("dataType") String dataType) {
|
||||
String apiUrl = apiRootUrl + getDataByKeyParamUrl;
|
||||
String param = "productname=" + productname +"&version=" + version;
|
||||
log.info("request remote api, url={}, param={}", apiUrl, param);
|
||||
String result = HttpUtils.sendGet(apiUrl, param);
|
||||
log.info("response remote api, url={}, param={}, result={}", apiUrl, param, result);
|
||||
return getDataTable(null);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -144,3 +144,10 @@ wait:
|
|||
task:
|
||||
result:
|
||||
inquire=admin: admin
|
||||
|
||||
|
||||
api:
|
||||
root:
|
||||
url: http://101.133.130.84:8210/
|
||||
doe:
|
||||
GetDataByKeyParam: api/DOEAnalysis/GetDataByKeyParam
|
||||
|
|
@ -95,7 +95,7 @@
|
|||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-12 select-table table-striped" >
|
||||
<div class="col-sm-12 select-table table-striped" style="overflow: scroll;height: 500px;" >
|
||||
<table id="analysisResultTable"></table>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,113 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('用户列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="role-form">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
板名:<input type="text" name="productname"/>
|
||||
</li>
|
||||
<li>
|
||||
版本:<input type="text" name="version"/>
|
||||
</li>
|
||||
<li>
|
||||
筛选:
|
||||
<select name="dataType" required>
|
||||
<option value="-1">--请选择--</option>
|
||||
<option value="keyParam" selected>关键工艺参数</option>
|
||||
<option value="rework">维修不良</option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 检索</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 select-table table-striped" style="overflow: scroll;height: 500px;">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "doeAnalysis.do";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
// url: prefix + "/getUserList",
|
||||
// createUrl: prefix + "/add",
|
||||
// updateUrl: prefix + "/edit?uid={id}",
|
||||
// removeUrl: prefix + "/remove",
|
||||
// exportUrl: prefix + "/export",
|
||||
// pauseUrl: prefix + "/changeUserState",
|
||||
sortName: "roleSort",
|
||||
modalName: "DOE分析-关键工艺参数",
|
||||
columns: [
|
||||
{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'keyparamtype',
|
||||
title: '规则名',
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
field: 'refdes',
|
||||
title: '位号',
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
field: 'keyparttype',
|
||||
title: '器件类型',
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
field: 'relativerefdes',
|
||||
title: '关联位号',
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
field: 'relativeparttype',
|
||||
title: '关联类型',
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
field: 'measurementvalue',
|
||||
title: '测量值',
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
field: 'checkvalue',
|
||||
title: '规则值',
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
field: 'isRework',
|
||||
title: '是否维修',
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
field: 'defecttype',
|
||||
title: '维修类型关联',
|
||||
sortable: false,
|
||||
formatter: function (value, row, index) {
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -150,13 +150,8 @@
|
|||
pauseOperType = "启用";
|
||||
userState = 0;
|
||||
}
|
||||
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.roleId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="$.operate.removeUser(' + row.id + ')"><i class="fa fa-remove"></i>删除</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="$.operate.pauseUser(' + row.id + ',' + userState + ')"><i class="fa fa-edit"></i>' + pauseOperType + '</a> ');
|
||||
// var more = [];
|
||||
// more.push("<a class='btn btn-default btn-xs " + editFlag + "' href='javascript:void(0)' onclick='authDataScope(" + row.roleId + ")'><i class='fa fa-check-square-o'></i>数据权限</a> ");
|
||||
// more.push("<a class='btn btn-default btn-xs " + editFlag + "' href='javascript:void(0)' onclick='authUser(" + row.roleId + ")'><i class='fa fa-user'></i>分配用户</a>");
|
||||
// actions.push('<a tabindex="0" class="btn btn-info btn-xs" role="button" data-container="body" data-placement="left" data-toggle="popover" data-html="true" data-trigger="hover" data-content="' + more.join('') + '"><i class="fa fa-chevron-circle-right"></i>更多操作</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||
import javax.servlet.http.HttpSession;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.WebDataBinder;
|
||||
import org.springframework.web.bind.annotation.InitBinder;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
|
|
@ -32,6 +33,9 @@ public class BaseController
|
|||
{
|
||||
protected final Logger logger = LoggerFactory.getLogger(BaseController.class);
|
||||
|
||||
@Value("${api.root.url}")
|
||||
protected String apiRootUrl;
|
||||
|
||||
/**
|
||||
* 将前台传递过来的日期格式的字符串,自动转化为Date类型
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue