master
Limy 4 years ago
parent 5a70e720b8
commit e48b6fcb0b

@ -44,28 +44,32 @@ public class SelectParaAllController extends BaseController {
public TableDataInfo list(HttpServletRequest request) public TableDataInfo list(HttpServletRequest request)
{ {
String semiBarcode = request.getParameter("semiBarcode"); String semiBarcode = request.getParameter("semiBarcode");
Map map = new HashMap<String,Object>(); Map<String, Object> map = new HashMap<String,Object>();
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<ParaAllShow> list = tracestateService.selectAllPara(map); // List<List<?>> multiResult = tracestateService.selectAllPara(map);
// List<ParaAllShow> list = tracestateService.selectAllPara(map);
List<List<HashMap<String,String>>> list = tracestateService.selectAllPara(map);
return getDataTable(list); return getDataTable(list);
}
@RequiresPermissions("nanjing:ParaAllShow: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, "ParaAllShow");
// return null;
} }
// @RequiresPermissions("nanjing:ParaAllShow: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, "ParaAllShow");
//// return null;
// }
} }

@ -16,16 +16,17 @@
</li> </li>
<li> <li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="searc()"><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:ParaAllShow: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>
@ -48,53 +49,55 @@
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 : "proBarcode",title : "部件码",colspan: 1,rowspan: 1}); columnsArray2.push({field : "部件码",title : "部件码",colspan: 1,rowspan: 1});
columnsArray2.push({field : "stationCode",title : "工位代码",colspan: 1,rowspan: 1}); columnsArray2.push({field : "工位代码",title : "工位代码",colspan: 1,rowspan: 1});
columnsArray2.push({field : "insertTime",title : "记录时间",colspan: 1,rowspan: 1}); columnsArray2.push({field : "记录时间",title : "记录时间",colspan: 1,rowspan: 1});
columnsArray2.push({field : "paraName",title : "参数名称",colspan: 1,rowspan: 1}); columnsArray2.push({field : "参数名称",title : "参数名称",colspan: 1,rowspan: 1});
columnsArray2.push({field : "realVal",title : "实测值",colspan: 1,rowspan: 1}); columnsArray2.push({field : "实测值",title : "实测值",colspan: 1,rowspan: 1});
columnsArray2.push({field : "minVal",title : "最小值",colspan: 1,rowspan: 1}); columnsArray2.push({field : "最小值",title : "最小值",colspan: 1,rowspan: 1});
columnsArray2.push({field : "maxVal",title : "最大值",colspan: 1,rowspan: 1}); columnsArray2.push({field : "最大值",title : "最大值",colspan: 1,rowspan: 1});
columnsArray2.push({field : "paraState",title : "参数状态",colspan: 1,rowspan: 1}); columnsArray2.push({field : "参数状态",title : "参数状态",colspan: 1,rowspan: 1});
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});
// var columnsArray1 = []; $('#bootstrap-table1').bootstrapTable('destroy').bootstrapTable({
// columnsArray1.push({field : "barcode",title : "系统条码",colspan: 1,rowspan: 1}); id: "bootstrap-table1",
// columnsArray1.push({field : "semiBarcode",title : "产品码",colspan: 1,rowspan: 1}); data:json.rows[1],
// columnsArray1.push({field : "productName",title : "机种类型",colspan: 1,rowspan: 1}); toolbar: "#toolbar",
// columnsArray1.push({field : "isDis",title : "返修Y/N",colspan: 1,rowspan: 1}); singleSelect: false,
// columnsArray1.push({field : "state",title : "合格状态",colspan: 1,rowspan: 1}); clickToSelect: true,
// columnsArray1.push({field : "finishFlag",title : "完成状态",colspan: 1,rowspan: 1}); sortName: "recordTime",
// columnsArray1.push({field : "currentStation",title : "当前工位",colspan: 1,rowspan: 1}); sortOrder: "desc",
// columnsArray1.push({field : "NGStation",title : "NG工位",colspan: 1,rowspan: 1}); pageSize: 50,
// columnsArray1.push({field : "namePlateInfo",title : "标签Y/N",colspan: 1,rowspan: 1}); pageNumber: 1,
// columnsArray1.push({field : "beginTime",title : "开始时间",colspan: 1,rowspan: 1}); pageList: "[10, 15,25, 50, All]",
// columnsArray1.push({field : "endTime",title : "结束时间",colspan: 1,rowspan: 1}); showToggle: true,
// showRefresh: true,
// $('#bootstrap-table1').bootstrapTable('destroy').bootstrapTable({ showColumns: true,
// id: "bootstrap-table1", search: false,
// data:json, pagination: true,
// toolbar: "#toolbar", showExport: false,//工具栏上显示导出按钮
// singleSelect: false, columns: columnsArray1
// 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
// });
$('#bootstrap-table2').bootstrapTable('destroy').bootstrapTable({ $('#bootstrap-table2').bootstrapTable('destroy').bootstrapTable({
id: "bootstrap-table2", id: "bootstrap-table2",
data:json, data:json.rows[0],
toolbar: "#toolbar", toolbar: "#toolbar",
singleSelect: false, singleSelect: false,
clickToSelect: true, clickToSelect: true,

@ -68,9 +68,9 @@
title:'参数值' title:'参数值'
}, },
], ],
onLoadSuccess:function(data){ // onLoadSuccess:function(data){
mergeTable(data,"table"); // mergeTable(data,"table");
}, // },
}) })
} }

@ -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;
@ -7,6 +8,9 @@ import com.ruoyi.nanjing.domain.ParaAllShow;
import com.ruoyi.nanjing.domain.ProParaInfo; 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;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.mapping.StatementType;
/** /**
* traceStateMapper * traceStateMapper
@ -64,8 +68,9 @@ public interface TSyTracestateMapper
*/ */
public int deleteTSyTracestateByIds(String[] barcodes); public int deleteTSyTracestateByIds(String[] barcodes);
List<ParaAllShow> selectAllPara(Map map); @ResultMap({"col1","col2"})
// List<ProParaInfo> selectAllPara(Map map); @Options(statementType = StatementType.CALLABLE)
List<List<HashMap<String,String>>> selectAllPara(Map map);
List<ProRpList> getInfo(Object semiBarcode); List<ProRpList> getInfo(Object semiBarcode);
} }

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

@ -1,6 +1,7 @@
package com.ruoyi.nanjing.service.impl; package com.ruoyi.nanjing.service.impl;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -99,22 +100,11 @@ public class TSyTracestateServiceImpl implements ITSyTracestateService
} }
@Override @Override
public List<ParaAllShow> selectAllPara(Map map) { public List<List<HashMap<String,String>>> selectAllPara(Map map) {
// List<ParaAllShow> paraAllShows = new ArrayList<ParaAllShow>(); List<List<HashMap<String,String>>> paraAllShows= tSyTracestateMapper.selectAllPara(map);
// 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; return paraAllShows;
} }
} }

@ -151,7 +151,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectReport" parameterType="map" statementType="CALLABLE" resultMap="repo"> <select id="selectReport" parameterType="map" statementType="CALLABLE" resultMap="repo">
{ {
call begin_date3 call begin_date4
( (
#{begin,mode=IN,jdbcType=DATE}, #{begin,mode=IN,jdbcType=DATE},
#{end,mode=IN,jdbcType=DATE}, #{end,mode=IN,jdbcType=DATE},

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.nanjing.mapper.TSyTracestateMapper"> <mapper namespace="com.ruoyi.nanjing.mapper.TSyTracestateMapper">
<resultMap type="TSyTracestate" id="TSyTracestateResult"> <resultMap type="TSyTracestate" id="TSyTracestateResult">
@ -32,48 +32,48 @@ 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="系统条码" />--> <!-- <result property="barcode" column="系统条码" />-->
<!-- <result property="productName" column="机种类型" />--> <!-- <result property="productName" column="机种类型" />-->
<!-- <result property="semiBarcode" column="产品码" />--> <!-- <result property="semiBarcode" column="产品码" />-->
<!-- <result property="state" column="合格状态" />--> <!-- <result property="state" column="合格状态" />-->
<!-- <result property="currentStation" column="当前工位" />--> <!-- <result property="currentStation" column="当前工位" />-->
<!-- <result property="NGStation" column="NG工位" />--> <!-- <result property="NGStation" column="NG工位" />-->
<!-- <result property="finishFlag" column="完成状态" />--> <!-- <result property="finishFlag" column="完成状态" />-->
<!-- <result property="namePlateInfo" column="标签Y/N" />--> <!-- <result property="namePlateInfo" column="标签Y/N" />-->
<!-- <result property="isDis" column="返修Y/N" />--> <!-- <result property="isDis" column="返修Y/N" />-->
<!-- <result property="beginTime" column="开始时间" />--> <!-- <result property="beginTime" column="开始时间" />-->
<!-- <result property="endTime" column="结束时间" />--> <!-- <result property="endTime" column="结束时间" />-->
<!-- <result property="proBarcode" column="部件码" />--> <!-- <result property="proBarcode" column="部件码" />-->
<!-- <result property="stationCode" column="工位代码" />--> <!-- <result property="stationCode" column="工位代码" />-->
<!-- <result property="insertTime" column="记录时间" />--> <!-- <result property="insertTime" column="记录时间" />-->
<!-- <result property="paraName" column="参数名称" />--> <!-- <result property="paraName" column="参数名称" />-->
<!-- <result property="realVal" column="实测值" />--> <!-- <result property="realVal" column="实测值" />-->
<!-- <result property="minVal" column="最小值" />--> <!-- <result property="minVal" column="最小值" />-->
<!-- <result property="maxVal" column="最大值" />--> <!-- <result property="maxVal" column="最大值" />-->
<!-- <result property="paraState" column="参数状态" />--> <!-- <result property="paraState" column="参数状态" />-->
<!-- </resultMap>--> <!-- </resultMap>-->
<resultMap id="col2" type="com.ruoyi.nanjing.domain.ProParaInfo"> <resultMap type="java.util.HashMap" id="col2">
<result property="semiBarcode" column="产品码" /> <result property="semiBarcode" column="产品码" />
<result property="proBarcode" column="部件码" /> <result property="proBarcode" column="部件码" />
<result property="stationCode" column="工位代码" /> <result property="stationCode" column="工位代码" />
<result property="insertTime" column="记录时间" /> <result property="insertTime" column="记录时间" />
<result property="paraName" column="参数名称" /> <result property="paraName" column="参数名称" />
<result property="realVal" column="实测值" /> <result property="realVal" column="实测值" />
<result property="minVal" column="最小值" /> <result property="minVal" column="最小值" />
<result property="maxVal" column="最大值" /> <result property="maxVal" column="最大值" />
<result property="paraState" column="参数状态" /> <result property="paraState" column="参数状态" />
<!-- <collection column="{semiCode=semiBarcode}" property="proRpList" ofType="com.ruoyi.nanjing.domain.ProRpList" select="getAttribute" >--> <!-- <collection column="{semiCode=semiBarcode}" property="proRpList" ofType="com.ruoyi.nanjing.domain.ProRpList" select="getAttribute" >-->
<!-- </collection>--> <!-- </collection>-->
</resultMap> </resultMap>
<resultMap id="col1" type="com.ruoyi.nanjing.domain.ProRpList"> <resultMap type="java.util.HashMap" id="col1" >
<result property="barcode" column="系统条码" /> <result property="barcode" column="系统条码" />
<result property="semiBarcode" column="产品码" /> <result property="semiBarcode" column="产品码" />
<result property="productName" column="机种类型" /> <result property="productName" column="机种类型" />
<result property="isDis" column="返修Y/N" /> <result property="isDis" column="返修Y/N" />
<result property="state" column="合格状态" /> <result property="state" column="合格状态" />
<result property="finishFlag" column="完成状态" /> <result property="finishFlag" column="完成状态" />
<result property="currentStation" column="当前工位" /> <result property="currentStation" column="当前工位" />
<result property="NGStation" column="NG工位" /> <result property="NGStation" column="NG工位" />
@ -111,7 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectAllPara" parameterType="map" resultMap="col2" statementType="CALLABLE"> <select id="selectAllPara" statementType="CALLABLE" parameterType="map" resultMap="col1,col2" >
{ {
call pro_AllParaShowInfo_Net call pro_AllParaShowInfo_Net
( (
@ -150,7 +150,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="nGStationID != null">NGStationID,</if> <if test="nGStationID != null">NGStationID,</if>
<if test="finishFlag != null">FinishFlag,</if> <if test="finishFlag != null">FinishFlag,</if>
<if test="d9Remark != null">D9Remark,</if> <if test="d9Remark != null">D9Remark,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="barcode != null">#{barcode},</if> <if test="barcode != null">#{barcode},</if>
<if test="productID != null">#{productID},</if> <if test="productID != null">#{productID},</if>
@ -177,7 +177,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="nGStationID != null">#{nGStationID},</if> <if test="nGStationID != null">#{nGStationID},</if>
<if test="finishFlag != null">#{finishFlag},</if> <if test="finishFlag != null">#{finishFlag},</if>
<if test="d9Remark != null">#{d9Remark},</if> <if test="d9Remark != null">#{d9Remark},</if>
</trim> </trim>
</insert> </insert>
<update id="updateTSyTracestate" parameterType="TSyTracestate"> <update id="updateTSyTracestate" parameterType="TSyTracestate">

Loading…
Cancel
Save