2021.3.5 18:18
parent
e48b6fcb0b
commit
e63e3c5a8b
@ -0,0 +1,84 @@
|
|||||||
|
package com.ruoyi.web.controller.nanjing;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
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.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.nanjing.domain.ParaAllShow;
|
||||||
|
import com.ruoyi.nanjing.domain.ProRpList;
|
||||||
|
import com.ruoyi.nanjing.domain.TBdProductinfo;
|
||||||
|
import com.ruoyi.nanjing.domain.TBdSubstation;
|
||||||
|
import com.ruoyi.nanjing.service.ITBdSubstationService;
|
||||||
|
import com.ruoyi.nanjing.service.ITSyTracestateService;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/nanjing/selectStationPara")
|
||||||
|
public class StationParaInfoController extends BaseController {
|
||||||
|
private String prefix = "nanjing/StationParaInfo";
|
||||||
|
@Autowired
|
||||||
|
private ITSyTracestateService tracestateService;
|
||||||
|
@Autowired
|
||||||
|
private ITBdSubstationService substationService;
|
||||||
|
@RequiresPermissions("nanjing:StationPara:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String ProRpList(ModelMap map)
|
||||||
|
{
|
||||||
|
List<TBdSubstation> substations = substationService.selectTBdSubstationList(new TBdSubstation());
|
||||||
|
map.addAttribute("list",substations);
|
||||||
|
return prefix + "/StationParaInfo";
|
||||||
|
}
|
||||||
|
@RequiresPermissions("nanjing:StationPara:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(HttpServletRequest request)
|
||||||
|
{
|
||||||
|
String stationCode = request.getParameter("stationCode");
|
||||||
|
String semiBarcode = request.getParameter("semiBarcode");
|
||||||
|
String beginTime = request.getParameter("beginTime");
|
||||||
|
String endTime = request.getParameter("endTime");
|
||||||
|
Map<String, Object> map = new HashMap<String,Object>();
|
||||||
|
map.put("beginTime",beginTime);
|
||||||
|
map.put("endTime",endTime);
|
||||||
|
map.put("StationID",stationCode);
|
||||||
|
map.put("Barcode","");
|
||||||
|
map.put("SemiBarcode",semiBarcode);
|
||||||
|
map.put("StateID","");
|
||||||
|
List list = tracestateService.selectStationPara(map);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// @RequiresPermissions("nanjing:StationPara:export")
|
||||||
|
// @Log(title = "产品码查询", businessType = BusinessType.EXPORT)
|
||||||
|
// @PostMapping("/export")
|
||||||
|
// @ResponseBody
|
||||||
|
// public AjaxResult export(HttpServletRequest request)
|
||||||
|
// {
|
||||||
|
// String semiBarcode = request.getParameter("semiBarcode");
|
||||||
|
// Map map = new HashMap<String,Object>();
|
||||||
|
// map.put("beginTime",null);
|
||||||
|
// map.put("endTime",null);
|
||||||
|
// map.put("semiBarcode",semiBarcode);
|
||||||
|
// List<ParaAllShow> list = tracestateService.selectAllPara(map);
|
||||||
|
// ExcelUtil<ParaAllShow> util = new ExcelUtil<ParaAllShow>(ParaAllShow.class);
|
||||||
|
// return util.exportExcel(list, "StationPara");
|
||||||
|
//// return null;
|
||||||
|
// }
|
||||||
|
}
|
@ -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="formId">
|
||||||
|
<div class="select-list">
|
||||||
|
<ul>
|
||||||
|
<li class="select-time">
|
||||||
|
<label>时间区间: </label>
|
||||||
|
<input type="text" class="time-input" id="beginTime" placeholder="开始时间" name="beginTime" required="required"/>
|
||||||
|
<span>-</span>
|
||||||
|
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime" required="required"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label> 工位代码:</label>
|
||||||
|
<select name="substation.TableName" id="stationCode" required>
|
||||||
|
<option th:each="ls : ${list}" th:text="${ls.StationCode}" th:value="${ls.StationID}"></option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label> 产品码:</label>
|
||||||
|
<input type="text" class="text-input" id="semiBarcode" name="semiBarcode"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="searc()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 查询全部</a>
|
||||||
|
<a class="btn btn-info btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="nanjing:WorkTrayHistoryInfo:export"><i class="fa fa-download"></i> 导出</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var editFlag = [[${@permission.hasPermi('nanjing:WorkTrayHistoryInfo:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('nanjing:WorkTrayHistoryInfo:remove')}]];
|
||||||
|
var datas = [[${@dict.getType('proState')}]];
|
||||||
|
var prefix = ctx + "nanjing/selectStationPara";
|
||||||
|
function searc() {
|
||||||
|
var formData = new FormData();
|
||||||
|
formData.append("stationCode",$("#stationCode").val());
|
||||||
|
formData.append("beginTime",$("#beginTime").val());
|
||||||
|
formData.append("endTime",$("#endTime").val());
|
||||||
|
formData.append("semiBarcode",$("#semiBarcode").val());
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: prefix + "/list",
|
||||||
|
data: formData,
|
||||||
|
contentType: "application/json;charset=utf-8",
|
||||||
|
dataType: "json",
|
||||||
|
json: 'callback',
|
||||||
|
processData: false,
|
||||||
|
contentType: false,
|
||||||
|
modalName: "工位参数查询",
|
||||||
|
success: function (json) {
|
||||||
|
console.log(json);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var columnsArray1 = [];
|
||||||
|
columnsArray1.push({field : "系统条码",title : "系统条码",colspan: 1,rowspan: 1});
|
||||||
|
columnsArray1.push({field : "semiBarcode" ,title : "产品码",colspan: 1,rowspan: 1});
|
||||||
|
columnsArray1.push({field : "机种类型",title : "机种类型",colspan: 1,rowspan: 1});
|
||||||
|
columnsArray1.push({field : "返修Y/N",title : "返修Y/N",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 : "NG工位",title : "NG工位",colspan: 1,rowspan: 1});
|
||||||
|
columnsArray1.push({field : "标签Y/N",title : "标签Y/N",colspan: 1,rowspan: 1});
|
||||||
|
columnsArray1.push({field : "开始时间",title : "开始时间",colspan: 1,rowspan: 1});
|
||||||
|
columnsArray1.push({field : "结束时间",title : "结束时间",colspan: 1,rowspan: 1});
|
||||||
|
|
||||||
|
$('#bootstrap-table1').bootstrapTable('destroy').bootstrapTable({
|
||||||
|
id: "bootstrap-table1",
|
||||||
|
data:json.rows[1],
|
||||||
|
toolbar: "#toolbar",
|
||||||
|
singleSelect: false,
|
||||||
|
clickToSelect: true,
|
||||||
|
sortName: "recordTime",
|
||||||
|
sortOrder: "desc",
|
||||||
|
pageSize: 50,
|
||||||
|
pageNumber: 1,
|
||||||
|
pageList: "[10, 15,25, 50, All]",
|
||||||
|
showToggle: true,
|
||||||
|
showRefresh: true,
|
||||||
|
showColumns: true,
|
||||||
|
search: false,
|
||||||
|
pagination: true,
|
||||||
|
showExport: false,//工具栏上显示导出按钮
|
||||||
|
columns: columnsArray1
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
error: function () {
|
||||||
|
alert("查询失败!");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue