托盘实时信息查询(完成)

master
Limy 4 years ago
parent 19ab861cd5
commit 2ccbcb42a7

@ -64,8 +64,12 @@ public class SelectWorktrayrealtimeinfoController extends BaseController {
@ResponseBody @ResponseBody
public AjaxResult export(TRpWorktrayrealtimeinfo tRpWorktrayrealtimeinfo) { public AjaxResult export(TRpWorktrayrealtimeinfo tRpWorktrayrealtimeinfo) {
List<TRpWorktrayrealtimeinfo> list = tRpWorktrayrealtimeinfoService.selectrealtimeinfoList(tRpWorktrayrealtimeinfo); List<TRpWorktrayrealtimeinfo> list = tRpWorktrayrealtimeinfoService.selectrealtimeinfoList(tRpWorktrayrealtimeinfo);
for (TRpWorktrayrealtimeinfo tw:list)
{
tw.setProductCode(tw.getBarcoderelationship().getProductBarcode());
}
ExcelUtil<TRpWorktrayrealtimeinfo> util = new ExcelUtil<TRpWorktrayrealtimeinfo>(TRpWorktrayrealtimeinfo.class); ExcelUtil<TRpWorktrayrealtimeinfo> util = new ExcelUtil<TRpWorktrayrealtimeinfo>(TRpWorktrayrealtimeinfo.class);
return util.exportExcel(list, "WorkTrayRealTimeInfo"); return util.exportExcel(list, "托盘实时信息");
} }
} }

@ -14,11 +14,11 @@
<label> 工位名称:</label> <label> 工位名称:</label>
<select name="StationCode" required> <select name="StationCode" required>
<option value="">全部</option> <option value="">全部</option>
<option th:each="ls : ${list}" th:text="${ls.StationCode}" th:value="${ls.StationCode}"></option> <option th:each="ls : ${list}" th:text="${ls.StationCode}" th:value="${ls.StationID}"></option>
</select> </select>
</li> </li>
<li> <li>
<label>托盘RFID码</label> 托盘RFID码
<input type="text" name="rfidNum"/> <input type="text" name="rfidNum"/>
</li> </li>
<li> <li>
@ -38,6 +38,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/selectWorkTrayRealTimeInfo"; var prefix = ctx + "nanjing/selectWorkTrayRealTimeInfo";
var datas = [[${@dict.getType('proState')}]];
$(function() { $(function() {
var options = { var options = {
url: prefix + "/list", url: prefix + "/list",
@ -49,7 +50,7 @@
title: '托盘条码' title: '托盘条码'
}, },
{ {
field: 'barcode', field: 'barCode',
title: '系统条码' title: '系统条码'
}, },
{ {
@ -58,7 +59,10 @@
}, },
{ {
field: 'state', field: 'state',
title: '状态' title: '状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(datas, value);
}
}, },
{ {
field: 'updateTime', field: 'updateTime',

@ -25,27 +25,62 @@ public class TRpWorktrayrealtimeinfo extends BaseEntity
private String barCode; private String barCode;
/** 产线条码 */ /** 产线条码 */
@Excel(name = "产线条码") // @Excel(name = "产线条码")
private String semiBarcode; private String semiBarcode;
/** 当前工位 */ /** 当前工位 */
private String currentStation; private String currentStation;
/** 质量品级 */ /** 质量品级 */
@Excel(name = "质量品级(1合格2不合格)")
private Long state; private Long state;
/** 使用状态 */ /** 使用状态 */
@Excel(name = "使用状态") // @Excel(name = "使用状态")
private Long usedFlag; private Long usedFlag;
/** 更新时间 */
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updateTime;
@Override
public Date getUpdateTime() {
return updateTime;
}
@Override
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/** 添加时间 */ /** 添加时间 */
@Excel(name = "添加时间", width = 30, dateFormat = "yyyy-MM-dd") // @Excel(name = "添加时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date insertTime; private Date insertTime;
/** 停用时间 */ /** 停用时间 */
@Excel(name = "停用时间", width = 30, dateFormat = "yyyy-MM-dd") // @Excel(name = "停用时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date deleteTime; private Date deleteTime;
private String StationCode;
public String getStationCode() {
return StationCode;
}
public void setStationCode(String stationCode) {
StationCode = stationCode;
}
@Excel(name = "部件码")
private String productCode;
public String getProductCode() {
return productCode;
}
public void setProductCode(String productCode) {
this.productCode = productCode;
}
private TRpBarcoderelationship barcoderelationship; private TRpBarcoderelationship barcoderelationship;

@ -38,7 +38,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectrealtimeinfoList" resultMap="TRpWorktrayrealtimeinfoResult"> <select id="selectrealtimeinfoList" resultMap="TRpWorktrayrealtimeinfoResult">
select t1.RFIDnum,t1.barcode,t3.ProductBarcode ,t1.state,t1.UpdateTime from dbo.T_RP_WorkTrayRealTimeInfo t1 left join T_BD_SubStation t2 on t1.currentStation=t2.StationID left join dbo.T_RP_BarcodeRelationShip t3 on t1.SemiBarcode=t3.SemiBarcode_Line where UsedFlag='1' select t1.RFIDnum,t1.barcode,t3.ProductBarcode ,t1.state,t1.UpdateTime from dbo.T_RP_WorkTrayRealTimeInfo t1 left join T_BD_SubStation t2 on t1.currentStation=t2.StationID left join dbo.T_RP_BarcodeRelationShip t3 on t1.SemiBarcode=t3.SemiBarcode_Line
<where>
<if test="StationCode != '' "> and t2.StationID = #{StationCode}</if>
<if test="rfidNum != '' "> and t1.RFIDnum = #{rfidNum}</if>
and UsedFlag='1'
</where>
</select> </select>
<insert id="insertTRpWorktrayrealtimeinfo" parameterType="TRpWorktrayrealtimeinfo"> <insert id="insertTRpWorktrayrealtimeinfo" parameterType="TRpWorktrayrealtimeinfo">

Loading…
Cancel
Save