From dbd3b1600727b519bf09b5a397d413d6904f500f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=81=92=E6=9D=B0?= <2658502433@qq.com> Date: Thu, 2 Nov 2023 17:00:56 +0800 Subject: [PATCH] =?UTF-8?q?rfid=E6=B5=81=E7=A8=8B=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/domain/mes/ProRfidProcessDetail.java | 89 +++++++++++++------ .../mapper/mes/ProRfidProcessDetailMapper.xml | 7 +- 2 files changed, 70 insertions(+), 26 deletions(-) diff --git a/op-api/op-api-system/src/main/java/com/op/system/api/domain/mes/ProRfidProcessDetail.java b/op-api/op-api-system/src/main/java/com/op/system/api/domain/mes/ProRfidProcessDetail.java index 4379d6f1..80c66a47 100644 --- a/op-api/op-api-system/src/main/java/com/op/system/api/domain/mes/ProRfidProcessDetail.java +++ b/op-api/op-api-system/src/main/java/com/op/system/api/domain/mes/ProRfidProcessDetail.java @@ -54,7 +54,7 @@ public class ProRfidProcessDetail extends BaseEntity { /** 出时间 */ @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "出时间", width = 30, dateFormat = "yyyy-MM-dd") + @Excel(name = "出时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") private Date outTime; /** 状态0待办1完成 */ @@ -107,6 +107,39 @@ public class ProRfidProcessDetail extends BaseEntity { @Excel(name = "订单号") private String orderCode; + @Excel(name = "产品编码") + private String productName; + + @Excel(name = "生产时间") + private String productDate; + + @Excel(name = "班次") + private String shiftId; + + public String getShiftId() { + return shiftId; + } + + public void setShiftId(String shiftId) { + this.shiftId = shiftId; + } + + public String getProductDate() { + return productDate; + } + + public void setProductDate(String productDate) { + this.productDate = productDate; + } + + public String getProductName() { + return productName; + } + + public void setProductName(String productName) { + this.productName = productName; + } + public String getOrderCode() { return orderCode; } @@ -288,29 +321,35 @@ public class ProRfidProcessDetail extends BaseEntity { @Override public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("recordId", getRecordId()) - .append("workorderCode", getWorkorderCode()) - .append("rfid", getRfid()) - .append("factoryCode", getFactoryCode()) - .append("machineCode", getMachineCode()) - .append("nowProcessId", getNowProcessId()) - .append("nextProcessId", getNextProcessId()) - .append("orderNum", getOrderNum()) - .append("inTime", getInTime()) - .append("outTime", getOutTime()) - .append("status", getStatus()) - .append("remark", getRemark()) - .append("attr1", getAttr1()) - .append("attr2", getAttr2()) - .append("attr3", getAttr3()) - .append("attr4", getAttr4()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("workBatchCode", getWorkBatchCode()) - .append("bindStatus", getBindStatus()) - .toString(); + return "ProRfidProcessDetail{" + + "recordId='" + recordId + '\'' + + ", workorderCode='" + workorderCode + '\'' + + ", rfid='" + rfid + '\'' + + ", factoryCode='" + factoryCode + '\'' + + ", machineCode='" + machineCode + '\'' + + ", prodLineCode='" + prodLineCode + '\'' + + ", nowProcessId='" + nowProcessId + '\'' + + ", nextProcessId='" + nextProcessId + '\'' + + ", orderNum=" + orderNum + + ", inTime=" + inTime + + ", outTime=" + outTime + + ", status='" + status + '\'' + + ", attr1='" + attr1 + '\'' + + ", attr2='" + attr2 + '\'' + + ", attr3='" + attr3 + '\'' + + ", attr4='" + attr4 + '\'' + + ", workBatchCode='" + workBatchCode + '\'' + + ", bindStatus='" + bindStatus + '\'' + + ", productCode='" + productCode + '\'' + + ", productModel='" + productModel + '\'' + + ", nowProcessCode='" + nowProcessCode + '\'' + + ", nowProcessName='" + nowProcessName + '\'' + + ", nextProcessCode='" + nextProcessCode + '\'' + + ", nextProcessName='" + nextProcessName + '\'' + + ", orderCode='" + orderCode + '\'' + + ", productName='" + productName + '\'' + + ", productDate='" + productDate + '\'' + + ", shiftId='" + shiftId + '\'' + + '}'; } } diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/ProRfidProcessDetailMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/ProRfidProcessDetailMapper.xml index c71ed154..cab05f69 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/ProRfidProcessDetailMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/ProRfidProcessDetailMapper.xml @@ -64,11 +64,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" pp.process_name as nextProcessName, ppp.process_code as nowProcessCode, ppp.process_name as nowProcessName, - pow.order_code as orderCode + pow.order_code as orderCode, + pow.product_code as productCode, + pow.product_name as productName, + pow.product_date as productDate, + pow.shift_id as shiftId from pro_rfid_process_detail ppd left join pro_process pp on pp.process_id = ppd.next_process_id left join pro_process ppp on ppp.process_id = ppd.now_process_id left join pro_order_workorder pow on pow.workorder_code = ppd.workorder_code + order by ppd.in_time desc and ppd.workorder_code like concat('%', #{workorderCode}, '%') and rfid like concat('%', #{rfid}, '%')