产品码查询

整机产量统计
整机合格率统计
一次合格率统计
工位合格率统计(待完成)
master
Limy 5 years ago
parent 87b655ce8f
commit 9fe078166b

@ -79,7 +79,7 @@
<artifactId>shiro-ehcache</artifactId> <artifactId>shiro-ehcache</artifactId>
<version>${shiro.version}</version> <version>${shiro.version}</version>
</dependency> </dependency>
<!-- thymeleaf模板引擎和shiro框架的整合 --> <!-- thymeleaf模板引擎和shiro框架的整合 -->
<dependency> <dependency>
<groupId>com.github.theborakompanioni</groupId> <groupId>com.github.theborakompanioni</groupId>

@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -37,7 +38,7 @@ public class SelectParaAllController extends BaseController {
{ {
return prefix + "/ParaAllShow"; return prefix + "/ParaAllShow";
} }
@RequiresPermissions("nanjing:ProRpList:list") @RequiresPermissions("nanjing:ParaAllShow:list")
@PostMapping("/paraAllShow") @PostMapping("/paraAllShow")
@ResponseBody @ResponseBody
public TableDataInfo list(HttpServletRequest request) public TableDataInfo list(HttpServletRequest request)
@ -47,22 +48,24 @@ public class SelectParaAllController extends BaseController {
map.put("beginTime",null); map.put("beginTime",null);
map.put("endTime",null); map.put("endTime",null);
map.put("semiBarcode",semiBarcode); map.put("semiBarcode",semiBarcode);
List<ProRpList> list = tracestateService.selectAllPara(map); List<ParaAllShow> list = tracestateService.selectAllPara(map);
return getDataTable(list); return getDataTable(list);
} }
@RequiresPermissions("nanjing:ProRpList:export") @RequiresPermissions("nanjing:ParaAllShow:export")
@Log(title = "机种切换管理", businessType = BusinessType.EXPORT) @Log(title = "产品码查询", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(ParaAllShow paraAllShow) public AjaxResult export(HttpServletRequest request)
{ {
String semiBarcode = request.getParameter("semiBarcode");
Map map = new HashMap<String,Object>(); Map map = new HashMap<String,Object>();
map.put("beginTime",null); map.put("beginTime",null);
map.put("endTime",null); map.put("endTime",null);
map.put("semiBarcode",paraAllShow.getSemiBarcode()); map.put("semiBarcode",semiBarcode);
List<ProRpList> list = tracestateService.selectAllPara(map); List<ParaAllShow> list = tracestateService.selectAllPara(map);
ExcelUtil<ProRpList> util = new ExcelUtil<ProRpList>(ProRpList.class); ExcelUtil<ParaAllShow> util = new ExcelUtil<ParaAllShow>(ParaAllShow.class);
return util.exportExcel(list, "ParaAllShow"); return util.exportExcel(list, "ParaAllShow");
// return null;
} }
} }

@ -56,7 +56,7 @@ public class SelectProRpListController extends BaseController
} }
/** /**
* *
*/ */
@RequiresPermissions("nanjing:ProRpList:list") @RequiresPermissions("nanjing:ProRpList:list")
@PostMapping("/list") @PostMapping("/list")
@ -96,10 +96,10 @@ public class SelectProRpListController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/** /**
* *
*/ */
@RequiresPermissions("nanjing:ProRpList:export") @RequiresPermissions("nanjing:ProRpList:export")
@Log(title = "机种切换管理", businessType = BusinessType.EXPORT) @Log(title = "时段统计", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(ProRpList proRpList) public AjaxResult export(ProRpList proRpList)

@ -0,0 +1,74 @@
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.QsProduct;
import com.ruoyi.nanjing.service.ITBdProducttypeService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
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 java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/nanjing/StatisticQ1Product")
public class StatisticQ1ProductController extends BaseController {
private String prefix = "nanjing/Statistic";
@Autowired
private ITBdProducttypeService producttypeService;
@RequiresPermissions("nanjing:Q1Product:view")
@GetMapping()
public String Q1Product()
{
return prefix + "/Q1Product";
}
/**
*
*/
@RequiresPermissions("nanjing:Q1Product:list")
@PostMapping("/Q1list")
@ResponseBody
public TableDataInfo Q1list(QsProduct qsProduct)
{
// startPage();
Map map = new HashMap<String,Object>();
map.put("beginTime",qsProduct.getBeginTime());
map.put("endTime",qsProduct.getEndTime());
map.put("productType",qsProduct.getProductType());
map.put("productId","");
List<QsProduct> list = producttypeService.selectQsProductList(map);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("nanjing:Q1Product:export")
@Log(title = "时段统计", businessType = BusinessType.EXPORT)
@PostMapping("/Q1export")
@ResponseBody
public AjaxResult Q1export(QsProduct qsProduct)
{
Map map = new HashMap<String,Object>();
map.put("beginTime",qsProduct.getBeginTime());
map.put("endTime",qsProduct.getEndTime());
map.put("productType",qsProduct.getProductType());
map.put("productId","");
List<QsProduct> list = producttypeService.selectQ1ProductList(map);
ExcelUtil<QsProduct> util = new ExcelUtil<QsProduct>(QsProduct.class);
return util.exportExcel(list, "QsProduct");
}
}

@ -0,0 +1,82 @@
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.ProRpList;
import com.ruoyi.nanjing.domain.QsProduct;
import com.ruoyi.nanjing.domain.QtProduct;
import com.ruoyi.nanjing.domain.TBdProductinfo;
import com.ruoyi.nanjing.service.ITBdProducttypeService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
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 java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/nanjing/StatisticQsProduct")
public class StatisticQsProductController extends BaseController {
private String prefix = "nanjing/Statistic";
@Autowired
private ITBdProducttypeService producttypeService;
@RequiresPermissions("nanjing:QsProduct:view")
@GetMapping()
public String QsProduct()
{
return prefix + "/QsProduct";
}
/**
*
*/
@RequiresPermissions("nanjing:QsProduct:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(QsProduct qsProduct)
{
// startPage();
Map map = new HashMap<String,Object>();
map.put("beginTime",qsProduct.getBeginTime());
map.put("endTime",qsProduct.getEndTime());
map.put("productType",qsProduct.getProductType());
map.put("productId","");
List<QsProduct> list = producttypeService.selectQ1ProductList(map);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("nanjing:QsProduct:export")
@Log(title = "时段统计", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(QsProduct qsProduct)
{
Map map = new HashMap<String,Object>();
map.put("beginTime",qsProduct.getBeginTime());
map.put("endTime",qsProduct.getEndTime());
map.put("productType",qsProduct.getProductType());
map.put("productId","");
List<QsProduct> list = producttypeService.selectQsProductList(map);
ExcelUtil<QsProduct> util = new ExcelUtil<QsProduct>(QsProduct.class);
return util.exportExcel(list, "QsProduct");
}
}

@ -0,0 +1,83 @@
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.ProRpList;
import com.ruoyi.nanjing.domain.QtProduct;
import com.ruoyi.nanjing.domain.TBdProductinfo;
import com.ruoyi.nanjing.service.ITBdProducttypeService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
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 java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/nanjing/StatisticQtProduct")
public class StatisticQtProductController extends BaseController {
private String prefix = "nanjing/Statistic";
@Autowired
private ITBdProducttypeService producttypeService;
@RequiresPermissions("nanjing:QtProduct:view")
@GetMapping()
public String QtProduct()
{
return prefix + "/QtProduct";
}
/**
*
*/
@RequiresPermissions("nanjing:QtProduct:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(QtProduct qtProduct)
{
// startPage();
Map map = new HashMap<String,Object>();
map.put("beginTime",qtProduct.getBeginTime());
map.put("endTime",qtProduct.getEndTime());
map.put("productType",qtProduct.getProductType());
map.put("productId","");
map.put("shiftId","");
map.put("groupId","");
List<QtProduct> list = producttypeService.selectQtProductList(map);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("nanjing:QtProduct:export")
@Log(title = "时段统计", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(QtProduct qtProduct)
{
Map map = new HashMap<String,Object>();
map.put("beginTime",qtProduct.getBeginTime());
map.put("endTime",qtProduct.getEndTime());
map.put("productType",qtProduct.getProductType());
map.put("productId","");
map.put("shiftId","");
map.put("groupId","");
List<QtProduct> list = producttypeService.selectQtProductList(map);
ExcelUtil<QtProduct> util = new ExcelUtil<QtProduct>(QtProduct.class);
return util.exportExcel(list, "QtProduct");
}
}

@ -0,0 +1,42 @@
package com.ruoyi.web.controller.nanjing;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.nanjing.domain.QsProduct;
import com.ruoyi.nanjing.service.ITBdProducttypeService;
import com.ruoyi.system.domain.SysDept;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
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 java.util.List;
@Controller
@RequestMapping("/nanjing/StatisticStation")
public class StatisticStProductController extends BaseController {
private String prefix = "nanjing/Statistic";
@Autowired
private ITBdProducttypeService producttypeService;
@RequiresPermissions("nanjing:stationStatistic:view")
@GetMapping()
public String stationProduct()
{
return prefix + "/QsStation";
}
@RequiresPermissions("nanjing:stationStatistic:list")
@PostMapping("/list")
@ResponseBody
public List<QsProduct> list(QsProduct qsProduct)
{
// List<QsProduct> qsProducts = producttypeService.selectDeptList(qsProduct);
// return qsProducts;
return null;
}
}

@ -5,6 +5,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.ruoyi.common.core.domain.Ztree;
import com.ruoyi.common.core.text.Convert; import com.ruoyi.common.core.text.Convert;
import com.ruoyi.framework.util.ShiroUtils; import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.nanjing.domain.TBdLinetype; import com.ruoyi.nanjing.domain.TBdLinetype;
@ -75,6 +76,16 @@ public class TBdSubstationController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
*
*/
@GetMapping("/treeData")
@ResponseBody
public List<Ztree> treeData()
{
List<Ztree> ztrees = tBdSubstationService.selectTbdStationTree(new TBdSubstation());
return ztrees;
}
/** /**
* *
*/ */

@ -1,31 +1,31 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head> <head>
<th:block th:include="include :: header('时段统计查询')" /> <th:block th:include="include :: header('产品码查询')" />
</head> </head>
<body class="gray-bg"> <body class="gray-bg">
<div class="container-div"> <div class="container-div">
<div class="row"> <div class="row">
<div class="col-sm-12 search-collapse"> <div class="col-sm-12 search-collapse">
<form id="formId"> <form id="formId">
<div class="select-list"> <div class="select-list col-md-offset-4">
<ul> <ul>
<li> <li>
<label class="required">产品码:</label> <label class="required">产品码:</label>
<input type="text" name="semiBarcode" id="semiBarcode" required/> <input type="text" name="semiBarcode" id="semiBarcode" required/>
</li> </li>
<li> <li>
<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="searc()"><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>-->
<a class="btn btn-info btn-rounded btn-sm" onclick="celexport()" shiro:hasPermission="nanjing:ProRpList:export"><i class="fa fa-download"></i> 导出</a> <!-- <a class="btn btn-info btn-rounded btn-sm" onclick="celexport()" shiro:hasPermission="nanjing:ParaAllShow:export"><i class="fa fa-download"></i> 导出</a>-->
</li> </li>
</ul> </ul>
</div> </div>
</form> </form>
</div> </div>
<div class="col-sm-12 select-table table-striped"> <!-- <div class="col-sm-12 select-table table-striped">-->
<table id="bootstrap-table1"></table> <!-- <table id="bootstrap-table1"></table>-->
</div> <!-- </div>-->
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table2"></table> <table id="bootstrap-table2"></table>
</div> </div>
@ -34,7 +34,7 @@
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "nanjing/selectParaAll"; var prefix = ctx + "nanjing/selectParaAll";
$(function() { function searc() {
var formData = new FormData(); var formData = new FormData();
formData.append("semiBarcode",$("#semiBarcode").val()); formData.append("semiBarcode",$("#semiBarcode").val());
$.ajax({ $.ajax({
@ -46,50 +46,51 @@
json: 'callback', json: 'callback',
processData: false, processData: false,
contentType: false, contentType: false,
modalName: "产品码查询",
success: function (json) { success: function (json) {
var columnsArray2 = []; var columnsArray2 = [];
columnsArray2.push({field : "state", title : "产品码",colspan: 1,rowspan: 2}); columnsArray2.push({field : "semiBarcode",title : "产品码",colspan: 1,rowspan: 1});
columnsArray2.push({field : "monitorName",title : "部件码",colspan: 1,rowspan: 2}); columnsArray2.push({field : "proBarcode",title : "部件码",colspan: 1,rowspan: 1});
columnsArray2.push({field : "monitorType",title : "工位代码",colspan: 1,rowspan: 2}); columnsArray2.push({field : "stationCode",title : "工位代码",colspan: 1,rowspan: 1});
columnsArray2.push({field : "monitorType",title : "记录时间",colspan: 1,rowspan: 2}); columnsArray2.push({field : "insertTime",title : "记录时间",colspan: 1,rowspan: 1});
columnsArray2.push({field : "monitorType",title : "参数名称",colspan: 1,rowspan: 2}); columnsArray2.push({field : "paraName",title : "参数名称",colspan: 1,rowspan: 1});
columnsArray2.push({field : "monitorType",title : "实测值",colspan: 1,rowspan: 2}); columnsArray2.push({field : "realVal",title : "实测值",colspan: 1,rowspan: 1});
columnsArray2.push({field : "monitorType",title : "最小值",colspan: 1,rowspan: 2}); columnsArray2.push({field : "minVal",title : "最小值",colspan: 1,rowspan: 1});
columnsArray2.push({field : "monitorType",title : "最大值",colspan: 1,rowspan: 2}); columnsArray2.push({field : "maxVal",title : "最大值",colspan: 1,rowspan: 1});
columnsArray2.push({field : "monitorType",title : "参数状态",colspan: 1,rowspan: 2}); columnsArray2.push({field : "paraState",title : "参数状态",colspan: 1,rowspan: 1});
var columnsArray1 = []; // var columnsArray1 = [];
columnsArray1.push({field : "monitorType",title : "系统条码",colspan: 1,rowspan: 2}); // columnsArray1.push({field : "barcode",title : "系统条码",colspan: 1,rowspan: 1});
columnsArray1.push({field : "monitorType",title : "产品码",colspan: 1,rowspan: 2}); // columnsArray1.push({field : "semiBarcode",title : "产品码",colspan: 1,rowspan: 1});
columnsArray1.push({field : "monitorType",title : "机种类型",colspan: 1,rowspan: 2}); // columnsArray1.push({field : "productName",title : "机种类型",colspan: 1,rowspan: 1});
columnsArray1.push({field : "monitorType",title : "返修Y/N",colspan: 1,rowspan: 2}); // columnsArray1.push({field : "isDis",title : "返修Y/N",colspan: 1,rowspan: 1});
columnsArray1.push({field : "monitorType",title : "合格状态",colspan: 1,rowspan: 2}); // columnsArray1.push({field : "state",title : "合格状态",colspan: 1,rowspan: 1});
columnsArray1.push({field : "monitorType",title : "完成状态",colspan: 1,rowspan: 2}); // columnsArray1.push({field : "finishFlag",title : "完成状态",colspan: 1,rowspan: 1});
columnsArray1.push({field : "monitorType",title : "当前工位",colspan: 1,rowspan: 2}); // columnsArray1.push({field : "currentStation",title : "当前工位",colspan: 1,rowspan: 1});
columnsArray1.push({field : "monitorType",title : "NG工位",colspan: 1,rowspan: 2}); // columnsArray1.push({field : "NGStation",title : "NG工位",colspan: 1,rowspan: 1});
columnsArray1.push({field : "monitorType",title : "标签Y/N",colspan: 1,rowspan: 2}); // columnsArray1.push({field : "namePlateInfo",title : "标签Y/N",colspan: 1,rowspan: 1});
columnsArray1.push({field : "monitorType",title : "开始时间",colspan: 1,rowspan: 2}); // columnsArray1.push({field : "beginTime",title : "开始时间",colspan: 1,rowspan: 1});
columnsArray1.push({field : "monitorType",title : "结束时间",colspan: 1,rowspan: 2}); // columnsArray1.push({field : "endTime",title : "结束时间",colspan: 1,rowspan: 1});
//
$('#bootstrap-table1').bootstrapTable('destroy').bootstrapTable({ // $('#bootstrap-table1').bootstrapTable('destroy').bootstrapTable({
id: "bootstrap-table1", // id: "bootstrap-table1",
data:json, // data:json,
toolbar: "#toolbar", // toolbar: "#toolbar",
singleSelect: false, // singleSelect: false,
clickToSelect: true, // clickToSelect: true,
sortName: "recordTime", // sortName: "recordTime",
sortOrder: "desc", // sortOrder: "desc",
pageSize: 50, // pageSize: 50,
pageNumber: 1, // pageNumber: 1,
pageList: "[10, 15,25, 50, 100, All]", // pageList: "[10, 15,25, 50, All]",
showToggle: true, // showToggle: true,
showRefresh: true, // showRefresh: true,
showColumns: true, // showColumns: true,
search: false, // search: false,
pagination: true, // pagination: true,
showExport: false,//工具栏上显示导出按钮 // showExport: false,//工具栏上显示导出按钮
columns: columnsArray1 // columns: columnsArray1
}); // });
$('#bootstrap-table2').bootstrapTable('destroy').bootstrapTable({ $('#bootstrap-table2').bootstrapTable('destroy').bootstrapTable({
id: "bootstrap-table2", id: "bootstrap-table2",
@ -97,7 +98,7 @@
toolbar: "#toolbar", toolbar: "#toolbar",
singleSelect: false, singleSelect: false,
clickToSelect: true, clickToSelect: true,
sortName: "recordTime", sortName: "insertTime",
sortOrder: "desc", sortOrder: "desc",
pageSize: 50, pageSize: 50,
pageNumber: 1, pageNumber: 1,
@ -115,27 +116,39 @@
alert("查询失败!"); alert("查询失败!");
} }
}); });
}); }
function celexport(formId) { function celexport(formId) {
table.set(); table.set();
$.modal.confirm("确定导出所有" + table.options.modalName + "吗?", function() { var formData = new FormData();
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId; $.modal.confirm("确定导出所有数据吗?", function() {
var params = $("#" + table.options.id).bootstrapTable('getOptions'); // var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
var dataParam = $("#" + currentId).serializeArray(); // var params = $("#" + table.options.id).bootstrapTable('getOptions');
dataParam.push({ "name": "orderByColumn", "value": params.sortName }); // var dataParam = $("#" + currentId).serializeArray();
dataParam.push({ "name": "isAsc", "value": params.sortOrder }); // dataParam.push({ "name": "orderByColumn", "value": params.sortName });
dataParam.push({"name":"semiBaarcode","value":$("#semiBarcode").val()}); // dataParam.push({ "name": "isAsc", "value": params.sortOrder });
formData.append("semiBarcode",$("#semiBarcode").val());
console.log(formData.get("semiBarcode"));
$.modal.loading("正在导出数据,请稍后..."); $.modal.loading("正在导出数据,请稍后...");
$.post('nanjing/selectParaAll/export', dataParam, function(result) { $.ajax({
if (result.code == web_status.SUCCESS) { type: "post",
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true; url: prefix + "/export",
} else if (result.code == web_status.WARNING) { data: formData,
$.modal.alertWarning(result.msg) // contentType: "application/json;charset=utf-8",
} else { dataType: "json",
$.modal.alertError(result.msg); json: 'callback',
processData: false,
contentType: false,
success: function(result) {
if (result.code == web_status.SUCCESS) {
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
} else if (result.code == web_status.WARNING) {
$.modal.alertWarning(result.msg)
} else {
$.modal.alertError(result.msg);
}
$.modal.closeLoading();
} }
$.modal.closeLoading();
}); });
}); });
} }

@ -10,20 +10,6 @@
<form id="formId"> <form id="formId">
<div class="select-list"> <div class="select-list">
<ul> <ul>
<!-- <li>-->
<!-- <label>开始时间:</label>-->
<!-- <select name="productType" th:with="type=${@dict.getType('productType')}">-->
<!-- <option value="">所有</option>-->
<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
<!-- </select>-->
<!-- </li>-->
<!-- <li>-->
<!-- <label>结束时间:</label>-->
<!-- <select name="machine" th:with="type=${@dict.getType('ifLable')}">-->
<!-- <option value="">所有</option>-->
<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
<!-- </select>-->
<!-- </li>-->
<li class="select-time"> <li class="select-time">
<label>时间区间: </label> <label>时间区间: </label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/> <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>

@ -0,0 +1,79 @@
<!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="startTime" placeholder="开始时间" name="beginTime"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime"/>
</li>
<li>
<label>机种类型:</label>
<select name="productType" th:with="type=${@dict.getType('productType')}">
<option value="">全部</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<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-info btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="nanjing:Q1Product: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 prefix = ctx + "nanjing/StatisticQ1Product";
$(function() {
var options = {
url: prefix + "/Q1list",
exportUrl: prefix + "/Q1export",
modalName: "一次合格率统计",
columns: [
{
field: 'productTp',
title: '机种类型'
},
{
field: 'inputNum',
title: '投入量'
},
{
field: 'okNum',
title: '合格品'
},
{
field:'noNum',
title:'不合格品'
},
{
field:'ero',
title:'异常'
},
{
field: 'allRate',
title: '综合合格率',
}
]
};
$.table.init(options);
});
</script>
</body>
</html>

@ -0,0 +1,79 @@
<!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="startTime" placeholder="开始时间" name="beginTime"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime"/>
</li>
<li>
<label>机种类型:</label>
<select name="productType" th:with="type=${@dict.getType('productType')}">
<option value="">全部</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<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-info btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="nanjing:QsProduct: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 prefix = ctx + "nanjing/StatisticQsProduct";
$(function() {
var options = {
url: prefix + "/list",
exportUrl: prefix + "/export",
modalName: "整机合格率统计",
columns: [
{
field: 'productTp',
title: '机种类型'
},
{
field: 'inputNum',
title: '投入量'
},
{
field: 'okNum',
title: '合格品'
},
{
field:'noNum',
title:'不合格品'
},
{
field:'ero',
title:'异常'
},
{
field: 'allRate',
title: '综合合格率',
}
]
};
$.table.init(options);
});
</script>
</body>
</html>

@ -0,0 +1,149 @@
<!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('工位合格率统计')" />
<th:block th:include="include :: layout-latest-css" />
<th:block th:include="include :: ztree-css" />
</head>
<body class="gray-bg">
<div class="ui-layout-west">
<div class="box box-main">
<div class="box-header">
<div class="box-title">
<i class="fa icon-grid"></i> 组织机构
</div>
<div class="box-tools pull-right">
<a type="button" class="btn btn-box-tool" href="#" onclick="dept()" title="管理部门"><i class="fa fa-edit"></i></a>
<button type="button" class="btn btn-box-tool" id="btnExpand" title="展开" style="display:none;"><i class="fa fa-chevron-up"></i></button>
<button type="button" class="btn btn-box-tool" id="btnCollapse" title="折叠"><i class="fa fa-chevron-down"></i></button>
<button type="button" class="btn btn-box-tool" id="btnRefresh" title="刷新部门"><i class="fa fa-refresh"></i></button>
</div>
</div>
<div class="ui-layout-content">
<div id="tree" class="ztree"></div>
</div>
</div>
</div>
<div class="ui-layout-center">
<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="startTime" placeholder="开始时间" name="beginTime"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime"/>
</li>
<li>
<label>机种类型:</label>
<select name="productType" th:with="type=${@dict.getType('productType')}">
<option value="">全部</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<input type="hidden" id="stationId" name="stationId">
<!-- <input type="hidden" id="parentId" name="parentId">-->
<li>
<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-info btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="nanjing:QsProduct: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>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: layout-latest-js" />
<th:block th:include="include :: ztree-js" />
<script th:inline="javascript">
var prefix = ctx + "nanjing/StatisticStation";
$(function() {
var panehHidden = false;
if ($(this).width() < 769) {
panehHidden = true;
}
$('body').layout({ initClosed: panehHidden, west__size: 185 });
queryList();
queryDeptTree();
});
function queryList() {
var options = {
url: prefix + "/list",
exportUrl: prefix + "/export",
modalName: "整机合格率统计",
columns: [
{
field: 'productTp',
title: '机种类型'
},
{
field: 'inputNum',
title: '投入量'
},
{
field: 'okNum',
title: '合格品'
},
{
field:'noNum',
title:'不合格品'
},
{
field:'ero',
title:'异常'
},
{
field: 'allRate',
title: '综合合格率',
}
]
};
$.table.init(options);
}
function queryDeptTree()
{
var url = ctx + "nanjing/treeData";
var options = {
url: url,
expandLevel: 2,
onClick : zOnClick
};
$.tree.init(options);
function zOnClick(event, treeId, treeNode) {
$("#stationId").val(treeNode.id);
// $("#parentId").val(treeNode.pId);
$.table.search();
}
}
$('#btnExpand').click(function() {
$._tree.expandAll(true);
$(this).hide();
$('#btnCollapse').show();
});
$('#btnCollapse').click(function() {
$._tree.expandAll(false);
$(this).hide();
$('#btnExpand').show();
});
$('#btnRefresh').click(function() {
queryDeptTree();
});
</script>
</body>
</html>

@ -0,0 +1,83 @@
<!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="startTime" placeholder="开始时间" name="beginTime"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime"/>
</li>
<li>
<label>机种类型:</label>
<select name="productType" th:with="type=${@dict.getType('productType')}">
<option value="">全部</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<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-info btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="nanjingProductChangeInfo: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 prefix = ctx + "nanjing/StatisticQtProduct";
$(function() {
var options = {
url: prefix + "/list",
exportUrl: prefix + "/export",
modalName: "整机产量统计",
columns: [
{
field: 'shiftNo',
title: '班次'
},
{
field: 'groupNo',
title: '班组',
},
{
field: 'inputNum',
title: '投入量'
},
{
field: 'finNum',
title: '成品数量'
},
{
field: 'okNum',
title: '合格品'
},
{
field:'noNum',
title:'不合格品'
},
{
field:'ero',
title:'异常'
}
]
};
$.table.init(options);
});
</script>
</body>
</html>

@ -7,224 +7,243 @@ import java.util.Date;
public class ParaAllShow extends BaseEntity { public class ParaAllShow extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// private ProParaInfo proParaInfo;
// private ProRpList proRpList;
@Excel(name = "系统条码") private ProParaInfo proParaInfo;
private String barcode;
@Excel(name = "机种名称")
private String productName;
@Excel(name = "产品条码")
private String semiBarcode;
@Excel(name = "状态")
private String state;
@Excel(name = "当前工位")
private String currentStation;
@Excel(name = "NG工位")
private String NGStation;
@Excel(name = "完成标志")
private String finishFlag;
@Excel(name = "标签Y/N")
private String namePlateInfo;
@Excel(name = "返修Y/N")
private String isDis;
@Excel(name = "开始时间" ,width = 30,dateFormat = "yyyy-MM-dd")
private Date beginTime;
@Excel(name = "结束时间",width = 30,dateFormat = "yyyy-MM-dd")
private Date endTime;
@Excel(name = "部件码")
private String proBarcode;
private ProRpList proRpList;
public ProParaInfo getProParaInfo() {
return proParaInfo;
}
public void setProParaInfo(ProParaInfo proParaInfo) {
this.proParaInfo = proParaInfo;
}
public ProRpList getProRpList() {
return proRpList;
}
public void setProRpList(ProRpList proRpList) {
this.proRpList = proRpList;
}
// @Excel(name = "系统条码")
// private String barcode;
// @Excel(name = "机种类型")
// private String productName;
// @Excel(name = "产品条码")
// private String semiBarcode; // private String semiBarcode;
@Excel(name = "部件码") // @Excel(name = "状态")
private String stationCode; // private String state;
@Excel(name = "记录时间") // @Excel(name = "当前工位")
private Date insertTime; // private String currentStation;
@Excel(name = "参数名称") // @Excel(name = "NG工位")
private String paraName; // private String NGStation;
@Excel(name = "实测值") // @Excel(name = "完成标志")
private String realVal; // private String finishFlag;
@Excel(name = "最小值") // @Excel(name = "标签Y/N")
private String minVal; // private String namePlateInfo;
@Excel(name = "最大值") // @Excel(name = "返修Y/N")
private String maxVal; // private String isDis;
@Excel(name = "参数状态") // @Excel(name = "开始时间" ,width = 30,dateFormat = "yyyy-MM-dd")
private String paraState; // private Date beginTime;
// @Excel(name = "结束时间",width = 30,dateFormat = "yyyy-MM-dd")
@Override // private Date endTime;
public String toString() { // @Excel(name = "部件码")
return "ParaAllShow{" + // private String proBarcode;
"barcode='" + barcode + '\'' + //
", productName='" + productName + '\'' + // // private String semiBarcode;
", semiBarcode='" + semiBarcode + '\'' + // @Excel(name = "工位码")
", state='" + state + '\'' + // private String stationCode;
", currentStation='" + currentStation + '\'' + // @Excel(name = "记录时间")
", NGStation='" + NGStation + '\'' + // private Date insertTime;
", finishFlag='" + finishFlag + '\'' + // @Excel(name = "参数名称")
", namePlateInfo='" + namePlateInfo + '\'' + // private String paraName;
", isDis='" + isDis + '\'' + // @Excel(name = "实测值")
", beginTime=" + beginTime + // private String realVal;
", endTime=" + endTime + // @Excel(name = "最小值")
", proBarcode='" + proBarcode + '\'' + // private String minVal;
", stationCode='" + stationCode + '\'' + // @Excel(name = "最大值")
", insertTime=" + insertTime + // private String maxVal;
", paraName='" + paraName + '\'' + // @Excel(name = "参数状态")
", realVal='" + realVal + '\'' + // private String paraState;
", minVal='" + minVal + '\'' + //
", maxVal='" + maxVal + '\'' + // @Override
", paraState='" + paraState + '\'' + // public String toString() {
'}'; // return "ParaAllShow{" +
} // "barcode='" + barcode + '\'' +
// ", productName='" + productName + '\'' +
public String getBarcode() { // ", semiBarcode='" + semiBarcode + '\'' +
return barcode; // ", state='" + state + '\'' +
} // ", currentStation='" + currentStation + '\'' +
// ", NGStation='" + NGStation + '\'' +
public void setBarcode(String barcode) { // ", finishFlag='" + finishFlag + '\'' +
this.barcode = barcode; // ", namePlateInfo='" + namePlateInfo + '\'' +
} // ", isDis='" + isDis + '\'' +
// ", beginTime=" + beginTime +
public String getProductName() { // ", endTime=" + endTime +
return productName; // ", proBarcode='" + proBarcode + '\'' +
} // ", stationCode='" + stationCode + '\'' +
// ", insertTime=" + insertTime +
public void setProductName(String productName) { // ", paraName='" + paraName + '\'' +
this.productName = productName; // ", realVal='" + realVal + '\'' +
} // ", minVal='" + minVal + '\'' +
// ", maxVal='" + maxVal + '\'' +
public String getSemiBarcode() { // ", paraState='" + paraState + '\'' +
return semiBarcode; // '}';
} // }
//
public void setSemiBarcode(String semiBarcode) { // public String getBarcode() {
this.semiBarcode = semiBarcode; // return barcode;
} // }
//
public String getState() { // public void setBarcode(String barcode) {
return state; // this.barcode = barcode;
} // }
//
public void setState(String state) { // public String getProductName() {
this.state = state; // return productName;
} // }
//
public String getCurrentStation() { // public void setProductName(String productName) {
return currentStation; // this.productName = productName;
} // }
//
public void setCurrentStation(String currentStation) { // public String getSemiBarcode() {
this.currentStation = currentStation; // return semiBarcode;
} // }
//
public String getNGStation() { // public void setSemiBarcode(String semiBarcode) {
return NGStation; // this.semiBarcode = semiBarcode;
} // }
//
public void setNGStation(String NGStation) { // public String getState() {
this.NGStation = NGStation; // return state;
} // }
//
public String getFinishFlag() { // public void setState(String state) {
return finishFlag; // this.state = state;
} // }
//
public void setFinishFlag(String finishFlag) { // public String getCurrentStation() {
this.finishFlag = finishFlag; // return currentStation;
} // }
//
public String getNamePlateInfo() { // public void setCurrentStation(String currentStation) {
return namePlateInfo; // this.currentStation = currentStation;
} // }
//
public void setNamePlateInfo(String namePlateInfo) { // public String getNGStation() {
this.namePlateInfo = namePlateInfo; // return NGStation;
} // }
//
public String getIsDis() { // public void setNGStation(String NGStation) {
return isDis; // this.NGStation = NGStation;
} // }
//
public void setIsDis(String isDis) { // public String getFinishFlag() {
this.isDis = isDis; // return finishFlag;
} // }
//
public Date getBeginTime() { // public void setFinishFlag(String finishFlag) {
return beginTime; // this.finishFlag = finishFlag;
} // }
//
public void setBeginTime(Date beginTime) { // public String getNamePlateInfo() {
this.beginTime = beginTime; // return namePlateInfo;
} // }
//
public Date getEndTime() { // public void setNamePlateInfo(String namePlateInfo) {
return endTime; // this.namePlateInfo = namePlateInfo;
} // }
//
public void setEndTime(Date endTime) { // public String getIsDis() {
this.endTime = endTime; // return isDis;
} // }
//
public String getProBarcode() { // public void setIsDis(String isDis) {
return proBarcode; // this.isDis = isDis;
} // }
//
public void setProBarcode(String proBarcode) { // public Date getBeginTime() {
this.proBarcode = proBarcode; // return beginTime;
} // }
//
public String getStationCode() { // public void setBeginTime(Date beginTime) {
return stationCode; // this.beginTime = beginTime;
} // }
//
public void setStationCode(String stationCode) { // public Date getEndTime() {
this.stationCode = stationCode; // return endTime;
} // }
//
public Date getInsertTime() { // public void setEndTime(Date endTime) {
return insertTime; // this.endTime = endTime;
} // }
//
public void setInsertTime(Date insertTime) { // public String getProBarcode() {
this.insertTime = insertTime; // return proBarcode;
} // }
//
public String getParaName() { // public void setProBarcode(String proBarcode) {
return paraName; // this.proBarcode = proBarcode;
} // }
//
public void setParaName(String paraName) { // public String getStationCode() {
this.paraName = paraName; // return stationCode;
} // }
//
public String getRealVal() { // public void setStationCode(String stationCode) {
return realVal; // this.stationCode = stationCode;
} // }
//
public void setRealVal(String realVal) { // public Date getInsertTime() {
this.realVal = realVal; // return insertTime;
} // }
//
public String getMinVal() { // public void setInsertTime(Date insertTime) {
return minVal; // this.insertTime = insertTime;
} // }
//
public void setMinVal(String minVal) { // public String getParaName() {
this.minVal = minVal; // return paraName;
} // }
//
public String getMaxVal() { // public void setParaName(String paraName) {
return maxVal; // this.paraName = paraName;
} // }
//
public void setMaxVal(String maxVal) { // public String getRealVal() {
this.maxVal = maxVal; // return realVal;
} // }
//
public String getParaState() { // public void setRealVal(String realVal) {
return paraState; // this.realVal = realVal;
} // }
//
public void setParaState(String paraState) { // public String getMinVal() {
this.paraState = paraState; // return minVal;
} // }
//
// public void setMinVal(String minVal) {
// this.minVal = minVal;
// }
//
// public String getMaxVal() {
// return maxVal;
// }
//
// public void setMaxVal(String maxVal) {
// this.maxVal = maxVal;
// }
//
// public String getParaState() {
// return paraState;
// }
//
// public void setParaState(String paraState) {
// this.paraState = paraState;
// }
} }

@ -0,0 +1,98 @@
package com.ruoyi.nanjing.domain;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.util.Date;
public class QsProduct extends BaseEntity {
private static final long serialVersionUID = 1L;
@Excel(name = "机种类型")
private String productTp;
@Excel(name = "投入量")
private String inputNum;
@Excel(name = "合格品")
private String okNum;
@Excel(name = "不合格品")
private String noNum;
@Excel(name = "异常")
private String ero;
@Excel(name = "综合合格率")
private String allRate;
private Date beginTime;
private Date endTime;
private String productType;
public String getProductTp() {
return productTp;
}
public void setProductTp(String productTp) {
this.productTp = productTp;
}
public String getInputNum() {
return inputNum;
}
public void setInputNum(String inputNum) {
this.inputNum = inputNum;
}
public String getOkNum() {
return okNum;
}
public void setOkNum(String okNum) {
this.okNum = okNum;
}
public String getNoNum() {
return noNum;
}
public void setNoNum(String noNum) {
this.noNum = noNum;
}
public String getEro() {
return ero;
}
public void setEro(String ero) {
this.ero = ero;
}
public String getAllRate() {
return allRate;
}
public void setAllRate(String allRate) {
this.allRate = allRate;
}
public Date getBeginTime() {
return beginTime;
}
public void setBeginTime(Date beginTime) {
this.beginTime = beginTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public String getProductType() {
return productType;
}
public void setProductType(String productType) {
this.productType = productType;
}
}

@ -0,0 +1,110 @@
package com.ruoyi.nanjing.domain;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.util.Date;
public class QtProduct extends BaseEntity {
private static final long serialVersionUID = 1L;
@Excel(name = "班次")
private String shiftNo;
@Excel(name = "班组")
private String groupNo;
@Excel(name = "投入量")
private String inputNum;
@Excel(name = "成品数量")
private String finNum;
@Excel(name = "合格品")
private String okNum;
@Excel(name = "不合格品")
private String noNum;
@Excel(name = "异常")
private String ero;
private Date beginTime;
private Date endTime;
private String productType;
public String getProductType() {
return productType;
}
public void setProductType(String productType) {
this.productType = productType;
}
public Date getBeginTime() {
return beginTime;
}
public void setBeginTime(Date beginTime) {
this.beginTime = beginTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public String getShiftNo() {
return shiftNo;
}
public void setShiftNo(String shiftNo) {
this.shiftNo = shiftNo;
}
public String getGroupNo() {
return groupNo;
}
public void setGroupNo(String groupNo) {
this.groupNo = groupNo;
}
public String getInputNum() {
return inputNum;
}
public void setInputNum(String inputNum) {
this.inputNum = inputNum;
}
public String getFinNum() {
return finNum;
}
public void setFinNum(String finNum) {
this.finNum = finNum;
}
public String getOkNum() {
return okNum;
}
public void setOkNum(String okNum) {
this.okNum = okNum;
}
public String getNoNum() {
return noNum;
}
public void setNoNum(String noNum) {
this.noNum = noNum;
}
public String getEro() {
return ero;
}
public void setEro(String ero) {
this.ero = ero;
}
}

@ -4,6 +4,8 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import com.ruoyi.nanjing.domain.ProRpList; import com.ruoyi.nanjing.domain.ProRpList;
import com.ruoyi.nanjing.domain.QsProduct;
import com.ruoyi.nanjing.domain.QtProduct;
import com.ruoyi.nanjing.domain.TBdProducttype; import com.ruoyi.nanjing.domain.TBdProducttype;
/** /**
@ -26,4 +28,10 @@ public interface TBdProducttypeMapper
List<TBdProducttype> selectTBdProducttype(); List<TBdProducttype> selectTBdProducttype();
List<ProRpList> selectProLists(Map map); List<ProRpList> selectProLists(Map map);
List<QtProduct> selectQtProductList(Map map);
List<QsProduct> selectQsProductList(Map map);
List<QsProduct> selectQ1ProductList(Map map);
} }

@ -3,6 +3,8 @@ package com.ruoyi.nanjing.mapper;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.ruoyi.nanjing.domain.ParaAllShow;
import com.ruoyi.nanjing.domain.ProParaInfo;
import com.ruoyi.nanjing.domain.ProRpList; import com.ruoyi.nanjing.domain.ProRpList;
import com.ruoyi.nanjing.domain.TSyTracestate; import com.ruoyi.nanjing.domain.TSyTracestate;
@ -62,5 +64,8 @@ public interface TSyTracestateMapper
*/ */
public int deleteTSyTracestateByIds(String[] barcodes); public int deleteTSyTracestateByIds(String[] barcodes);
List<ProRpList> selectAllPara(Map map); List<ParaAllShow> selectAllPara(Map map);
// List<ProParaInfo> selectAllPara(Map map);
List<ProRpList> getInfo(Object semiBarcode);
} }

@ -3,9 +3,7 @@ package com.ruoyi.nanjing.service;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.ruoyi.nanjing.domain.ProRpList; import com.ruoyi.nanjing.domain.*;
import com.ruoyi.nanjing.domain.TBdProducttype;
import com.ruoyi.nanjing.domain.TRpProductchangeinfo;
/** /**
* Service * Service
@ -29,4 +27,10 @@ public interface ITBdProducttypeService
List<TBdProducttype> selectTBdProducttype(); List<TBdProducttype> selectTBdProducttype();
List<ProRpList> selectProLists(Map map); List<ProRpList> selectProLists(Map map);
List<QtProduct> selectQtProductList(Map map);
List<QsProduct> selectQsProductList(Map map);
List<QsProduct> selectQ1ProductList(Map map);
} }

@ -3,7 +3,9 @@ package com.ruoyi.nanjing.service;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.ruoyi.common.core.domain.Ztree;
import com.ruoyi.nanjing.domain.TBdSubstation; import com.ruoyi.nanjing.domain.TBdSubstation;
import com.ruoyi.system.domain.SysDept;
/** /**
* Service * Service
@ -71,4 +73,5 @@ public interface ITBdSubstationService
void deletePara(Map map); void deletePara(Map map);
List<Ztree> selectTbdStationTree(TBdSubstation substation);
} }

@ -3,6 +3,7 @@ package com.ruoyi.nanjing.service;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.ruoyi.nanjing.domain.ParaAllShow;
import com.ruoyi.nanjing.domain.ProRpList; import com.ruoyi.nanjing.domain.ProRpList;
import com.ruoyi.nanjing.domain.TSyTracestate; import com.ruoyi.nanjing.domain.TSyTracestate;
@ -62,5 +63,5 @@ public interface ITSyTracestateService
*/ */
public int deleteTSyTracestateById(String barcode); public int deleteTSyTracestateById(String barcode);
List<ProRpList> selectAllPara(Map map); List<ParaAllShow> selectAllPara(Map map);
} }

@ -4,6 +4,8 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import com.ruoyi.nanjing.domain.ProRpList; import com.ruoyi.nanjing.domain.ProRpList;
import com.ruoyi.nanjing.domain.QsProduct;
import com.ruoyi.nanjing.domain.QtProduct;
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.TBdProducttypeMapper; import com.ruoyi.nanjing.mapper.TBdProducttypeMapper;
@ -44,4 +46,19 @@ public class TBdProducttypeServiceImpl implements ITBdProducttypeService
public List<ProRpList> selectProLists(Map map) { public List<ProRpList> selectProLists(Map map) {
return tBdProducttypeMapper.selectProLists(map); return tBdProducttypeMapper.selectProLists(map);
} }
@Override
public List<QtProduct> selectQtProductList(Map map) {
return tBdProducttypeMapper.selectQtProductList(map);
}
@Override
public List<QsProduct> selectQsProductList(Map map) {
return tBdProducttypeMapper.selectQsProductList(map);
}
@Override
public List<QsProduct> selectQ1ProductList(Map map) {
return tBdProducttypeMapper.selectQ1ProductList(map);
}
} }

@ -1,8 +1,13 @@
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 java.util.Map; import java.util.Map;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.domain.Ztree;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.SysDept;
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.TBdSubstationMapper; import com.ruoyi.nanjing.mapper.TBdSubstationMapper;
@ -119,4 +124,37 @@ public class TBdSubstationServiceImpl implements ITBdSubstationService
tBdSubstationMapper.deletePara(map); tBdSubstationMapper.deletePara(map);
} }
@Override
public List<Ztree> selectTbdStationTree(TBdSubstation substation) {
List<TBdSubstation> substations= tBdSubstationMapper.selectTBdSubstationList(substation);
List<Ztree> ztrees = initZtree(substations);
return ztrees;
}
private List<Ztree> initZtree(List<TBdSubstation> substation) {
return initZtree(substation,null);
}
public List<Ztree> initZtree(List<TBdSubstation> substation, List<String> roleDeptList)
{
List<Ztree> ztrees = new ArrayList<Ztree>();
boolean isCheck = StringUtils.isNotNull(roleDeptList);
for (TBdSubstation substation1 : substation)
{
Ztree ztree = new Ztree();
ztree.setId(substation1.getStationID());
// ztree.setpId(substation1.getParentId());
ztree.setName(substation1.getStationName());
ztree.setTitle(substation1.getStationName());
if (isCheck)
{
ztree.setChecked(roleDeptList.contains(substation1.getStationID() + substation1.getStationName()));
}
ztrees.add(ztree);
}
return ztrees;
}
} }

@ -1,8 +1,11 @@
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 java.util.Map; import java.util.Map;
import com.ruoyi.nanjing.domain.ParaAllShow;
import com.ruoyi.nanjing.domain.ProParaInfo;
import com.ruoyi.nanjing.domain.ProRpList; import com.ruoyi.nanjing.domain.ProRpList;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -96,8 +99,21 @@ public class TSyTracestateServiceImpl implements ITSyTracestateService
} }
@Override @Override
public List<ProRpList> selectAllPara(Map map) { public List<ParaAllShow> selectAllPara(Map map) {
return tSyTracestateMapper.selectAllPara(map); // List<ParaAllShow> paraAllShows = new ArrayList<ParaAllShow>();
// List<ProParaInfo> list = tSyTracestateMapper.selectAllPara(map);
// List<ProRpList> list1 = tSyTracestateMapper.getInfo(map.get("semiBarcode"));
// ParaAllShow paraAllShow = new ParaAllShow();
// for (ProParaInfo ppi:list) {
// paraAllShow.setProParaInfo(ppi);
// paraAllShows.add(paraAllShow);
// }
// for (ProRpList prl:list1) {
// paraAllShow.setProRpList(prl);
// paraAllShows.add(paraAllShow);
// }
List<ParaAllShow> paraAllShows = tSyTracestateMapper.selectAllPara(map);
return paraAllShows;
} }

@ -24,7 +24,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="endTime" column="EndTime"/> <result property="endTime" column="EndTime"/>
</resultMap> </resultMap>
<resultMap id="qtProduct" type="com.ruoyi.nanjing.domain.QtProduct">
<result property="shiftNo" column="班次"/>
<result property="groupNo" column="班组"/>
<result property="inputNum" column="投入量"/>
<result property="finNum" column="成品数量"/>
<result property="okNum" column="合格品"/>
<result property="noNum" column="不合格品"/>
<result property="ero" column="异常"/>
</resultMap>
<resultMap id="qsProduct" type="com.ruoyi.nanjing.domain.QsProduct">
<result property="productTp" column="机种类型"/>
<result property="inputNum" column="投入量"/>
<result property="okNum" column="合格品"/>
<result property="noNum" column="不合格品"/>
<result property="ero" column="异常"/>
<result property="allRate" column="综合合格率"/>
</resultMap>
<sql id="selectTBdProducttypeVo"> <sql id="selectTBdProducttypeVo">
select ID, ProductTypeID, ProductTypeName from T_BD_ProductType select ID, ProductTypeID, ProductTypeName from T_BD_ProductType
</sql> </sql>
@ -54,27 +71,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
} }
</select> </select>
<select id="selectQtProductList" parameterType="map" resultMap="qtProduct" statementType="CALLABLE">
{
call pro_StatisticOfProductQty
(
#{beginTime,mode=IN,jdbcType=DATE},
#{endTime,mode=IN,jdbcType=DATE},
#{productId,mode=IN,jdbcType=VARCHAR},
#{productType,mode=IN,jdbcType=VARCHAR},
#{shiftId,mode=IN,jdbcType=VARCHAR},
#{groupId,mode=IN,jdbcType=VARCHAR}
)
}
</select>
<select id="selectQsProductList" parameterType="map" resultMap="qsProduct" statementType="CALLABLE">
{
call pro_StatisticOfProductQRate
(
#{beginTime,mode=IN,jdbcType=DATE},
#{endTime,mode=IN,jdbcType=DATE},
#{productId,mode=IN,jdbcType=VARCHAR},
#{productType,mode=IN,jdbcType=VARCHAR}
)
}
</select>
<select id="selectQ1ProductList" parameterType="map" resultMap="qsProduct" statementType="CALLABLE">
{
call pro_StatisticOfProductQ1Rate
(
#{beginTime,mode=IN,jdbcType=DATE},
#{endTime,mode=IN,jdbcType=DATE},
#{productId,mode=IN,jdbcType=VARCHAR},
#{productType,mode=IN,jdbcType=VARCHAR}
)
}
</select>
<!-- <insert id="insertTBdProducttype" parameterType="TBdProducttype">-->
<!-- <insert id="insertTBdProducttype" parameterType="TBdProducttype">-->
<!-- insert into T_BD_ProductType--> <!-- insert into T_BD_ProductType-->
<!-- <trim prefix="(" suffix=")" suffixOverrides=",">--> <!-- <trim prefix="(" suffix=")" suffixOverrides=",">-->
<!-- <if test="ID != null">ID,</if>--> <!-- <if test="ID != null">ID,</if>-->

@ -32,32 +32,73 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="d9Remark" column="D9Remark" /> <result property="d9Remark" column="D9Remark" />
</resultMap> </resultMap>
<resultMap id="paraAll" type="com.ruoyi.nanjing.domain.ParaAllShow"> <!-- <resultMap id="paraAll" type="com.ruoyi.nanjing.domain.ParaAllShow">-->
<result property="barcode" column="Barcode" /> <!-- <result property="barcode" column="系统条码" />-->
<result property="productName" column="ProductID" /> <!-- <result property="productName" column="机种类型" />-->
<result property="semiBarcode" column="BeginTime" /> <!-- <result property="semiBarcode" column="产品码" />-->
<result property="state" column="EndTime" /> <!-- <result property="state" column="合格状态" />-->
<result property="currentStation" column="ShiftID" /> <!-- <result property="currentStation" column="当前工位" />-->
<result property="NGStation" column="GroupID" /> <!-- <result property="NGStation" column="NG工位" />-->
<result property="finishFlag" column="ShiftNo" /> <!-- <result property="finishFlag" column="完成状态" />-->
<result property="namePlateInfo" column="SemiBarcode_A" /> <!-- <result property="namePlateInfo" column="标签Y/N" />-->
<result property="isDis" column="SemiBarcode_B" /> <!-- <result property="isDis" column="返修Y/N" />-->
<result property="beginTime" column="SemiBarcode_C" /> <!-- <result property="beginTime" column="开始时间" />-->
<result property="endTime" column="ProductBarcode" /> <!-- <result property="endTime" column="结束时间" />-->
<result property="proBarcode" column="SemiBarcode2" /> <!-- <result property="proBarcode" column="部件码" />-->
<result property="stationCode" column="shellbarcode" /> <!-- <result property="stationCode" column="工位代码" />-->
<result property="insertTime" column="NameplateInfo" /> <!-- <result property="insertTime" column="记录时间" />-->
<result property="paraName" column="MarkRecord" /> <!-- <result property="paraName" column="参数名称" />-->
<result property="realVal" column="Attr1" /> <!-- <result property="realVal" column="实测值" />-->
<result property="minVal" column="Attr2" /> <!-- <result property="minVal" column="最小值" />-->
<result property="maxVal" column="ISDis" /> <!-- <result property="maxVal" column="最大值" />-->
<result property="paraState" column="DisChecker" /> <!-- <result property="paraState" column="参数状态" />-->
<!-- </resultMap>-->
<resultMap id="col2" type="com.ruoyi.nanjing.domain.ProParaInfo">
<result property="semiBarcode" column="产品码" />
<result property="proBarcode" column="部件码" />
<result property="stationCode" column="工位代码" />
<result property="insertTime" column="记录时间" />
<result property="paraName" column="参数名称" />
<result property="realVal" column="实测值" />
<result property="minVal" column="最小值" />
<result property="maxVal" column="最大值" />
<result property="paraState" column="参数状态" />
<!-- <collection column="{semiCode=semiBarcode}" property="proRpList" ofType="com.ruoyi.nanjing.domain.ProRpList" select="getAttribute" >-->
<!-- </collection>-->
</resultMap>
<resultMap id="col1" type="com.ruoyi.nanjing.domain.ProRpList">
<result property="barcode" column="系统条码" />
<result property="semiBarcode" column="产品码" />
<result property="productName" column="机种类型" />
<result property="isDis" column="返修Y/N" />
<result property="state" column="合格状态" />
<result property="finishFlag" column="完成状态" />
<result property="currentStation" column="当前工位" />
<result property="NGStation" column="NG工位" />
<result property="namePlateInfo" column="标签Y/N" />
<result property="beginTime" column="开始时间" />
<result property="endTime" column="结束时间" />
</resultMap> </resultMap>
<sql id="selectTSyTracestateVo"> <sql id="selectTSyTracestateVo">
select Barcode, ProductID, BeginTime, EndTime, ShiftID, GroupID, ShiftNo, SemiBarcode_A, SemiBarcode_B, SemiBarcode_C, ProductBarcode, SemiBarcode2, shellbarcode, NameplateInfo, MarkRecord, Attr1, Attr2, ISDis, DisChecker, DisTime, State, CurrentStationID, NGStationID, FinishFlag, D9Remark from T_SY_TraceState select Barcode, ProductID, BeginTime, EndTime, ShiftID, GroupID, ShiftNo, SemiBarcode_A, SemiBarcode_B, SemiBarcode_C, ProductBarcode, SemiBarcode2, shellbarcode, NameplateInfo, MarkRecord, Attr1, Attr2, ISDis, DisChecker, DisTime, State, CurrentStationID, NGStationID, FinishFlag, D9Remark from T_SY_TraceState
</sql> </sql>
<select id="getInfo" resultMap="col1">
select t1.Barcode as 系统条码,t5.ProductBarcode as 产品码,
t2.ProductName as 机种类型,case t1.isDis when 1 then ' Y' else 'N' end as '返修Y/N' ,
case t1.State when 1 then '合格' when 2 then '不合格' else '异常' end as '合格状态',
case t1.FinishFlag when 1 then '完成' else '未完成' end as 完成状态,t3.StationName as 当前工位,
t4.StationName as NG工位,Machine as '标签Y/N',
begintime as 开始时间,Endtime as 结束时间
from T_SY_TraceState t1 left join T_BD_ProductInfo t2 on t1.ProductID=t2.ProductID
left join T_BD_SubStation t3 on t1.CurrentStationID=t3.StationID
left join T_BD_SubStation t4 on t1.NGStationID=t4.StationID
left join T_RP_BarcodeRelationShip t5 on t1.SemiBarcode_A = t5.SemiBarcode
where t5.ProductBarcode=#{semiCode,jdbcType = VARCHAR}
</select>
<select id="selectTSyTracestateList" parameterType="TSyTracestate" resultMap="TSyTracestateResult"> <select id="selectTSyTracestateList" parameterType="TSyTracestate" resultMap="TSyTracestateResult">
<include refid="selectTSyTracestateVo"/> <include refid="selectTSyTracestateVo"/>
<where> <where>
@ -69,13 +110,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where Barcode = #{barcode} where Barcode = #{barcode}
</select> </select>
<select id="selectAllPara" parameterType="map" resultMap="paraAll" statementType="CALLABLE">
<select id="selectAllPara" parameterType="map" resultMap="col2" statementType="CALLABLE">
{ {
call pro_AllParaShowInfo_Net call pro_AllParaShowInfo_Net
( (
#{semiBarcode,mode=IN,jdbcType=VARCHAR} #{semiBarcode,mode=IN,jdbcType=VARCHAR},
#{beginTime,mode=IN,jdbcType=VARCHAR} #{beginTime,mode=IN,jdbcType=DATE},
#{endTime,mode=IN,jdbcType=VARCHAR} #{endTime,mode=IN,jdbcType=DATE}
) )
} }
</select> </select>

Loading…
Cancel
Save