From 726d14eeb4471614585c05c6bb18d9c0241c37e5 Mon Sep 17 00:00:00 2001 From: Kelvin Date: Wed, 18 Dec 2024 14:25:27 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=A0=B9=E6=8D=AE=E6=96=99?= =?UTF-8?q?=E7=AE=B1=E6=9F=A5=E8=AF=A2=E4=BB=BB=E5=8A=A1=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=B0=86=E6=96=99=E7=AE=B1rfid=E7=BB=91=E5=AE=9A=E8=87=B3?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wm/controller/WmsInTaskController.java | 3 + .../java/com/ktg/mes/wm/domain/WmsInTask.java | 206 +----------------- .../resources/mapper/wm/WmsInTaskMapper.xml | 10 +- 3 files changed, 18 insertions(+), 201 deletions(-) diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmsInTaskController.java b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmsInTaskController.java index f7586ae..576a0c0 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmsInTaskController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmsInTaskController.java @@ -95,6 +95,9 @@ public class WmsInTaskController extends BaseController { if (wmsInTask == null) { return AjaxResult.error("未查询到相关任务"); } + // 将料箱rfid绑定至任务 + wmsInTask.setBoxRfid(rfid); + wmsInTaskService.updateWmsInTask(wmsInTask); return AjaxResult.success(wmsInTask); } diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmsInTask.java b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmsInTask.java index 83a0ffb..3717ad6 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmsInTask.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmsInTask.java @@ -1,5 +1,7 @@ package com.ktg.mes.wm.domain; +import lombok.Getter; +import lombok.Setter; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ktg.common.annotation.Excel; @@ -13,6 +15,8 @@ import java.util.List; * @author yinjinlu * @date 2024-11-01 */ +@Setter +@Getter public class WmsInTask extends BaseEntity { private static final long serialVersionUID = 1L; @@ -139,208 +143,10 @@ public class WmsInTask extends BaseEntity { */ private String planTypeCode; + private String boxRfid; + private List wmsInPlanDetailEntityList; - public void setId(Long id) { - this.id = id; - } - - public Long getId() { - return id; - } - - public void setTaskInCode(String taskInCode) { - this.taskInCode = taskInCode; - } - - public String getTaskInCode() { - return taskInCode; - } - - public void setPlanInId(Long planInId) { - this.planInId = planInId; - } - - public Long getPlanInId() { - return planInId; - } - - public void setTaskInQuantity(Integer taskInQuantity) { - this.taskInQuantity = taskInQuantity; - } - - public Integer getTaskInQuantity() { - return taskInQuantity; - } - - public void setActualInQuantity(Integer actualInQuantity) { - this.actualInQuantity = actualInQuantity; - } - - public Integer getActualInQuantity() { - return actualInQuantity; - } - - public void setCellTgt(Long cellTgt) { - this.cellTgt = cellTgt; - } - - public Long getCellTgt() { - return cellTgt; - } - - public void setCellOrig(String cellOrig) { - this.cellOrig = cellOrig; - } - - public String getCellOrig() { - return cellOrig; - } - - public String getCellName() { - return cellName; - } - - public void setCellName(String cellName) { - this.cellName = cellName; - } - - public String getCellCode() { - return cellCode; - } - - public void setCellCode(String cellCode) { - this.cellCode = cellCode; - } - - public String getCellX() { - return cellX; - } - - public void setCellX(String cellX) { - this.cellX = cellX; - } - - public String getCellY() { - return cellY; - } - - public void setCellY(String cellY) { - this.cellY = cellY; - } - - public String getCellZ() { - return cellZ; - } - - public void setCellZ(String cellZ) { - this.cellZ = cellZ; - } - - public void setIsActive(String isActive) { - this.isActive = isActive; - } - - public String getIsActive() { - return isActive; - } - - public void setIsDelete(String isDelete) { - this.isDelete = isDelete; - } - - public String getIsDelete() { - return isDelete; - } - - public void setBatch(String batch) { - this.batch = batch; - } - - public String getBatch() { - return batch; - } - - public void setMaterialId(String materialId) { - this.materialId = materialId; - } - - public String getMaterialId() { - return materialId; - } - - public void setPlanTypeId(String planTypeId) { - this.planTypeId = planTypeId; - } - - public String getPlanTypeId() { - return planTypeId; - } - - public void setPlanInStatus(String planInStatus) { - this.planInStatus = planInStatus; - } - - public String getPlanInStatus() { - return planInStatus; - } - - public void setPlanInCode(String planInCode) { - this.planInCode = planInCode; - } - - public String getPlanInCode() { - return planInCode; - } - - public void setMaterialCode(String materialCode) { - this.materialCode = materialCode; - } - - public String getMaterialCode() { - return materialCode; - } - - public Long getDetailInId() { - return detailInId; - } - - public void setDetailInId(Long detailInId) { - this.detailInId = detailInId; - } - - public String getMaterialName() { - return materialName; - } - - public void setMaterialName(String materialName) { - this.materialName = materialName; - } - - public String getMaterialUnit() { - return materialUnit; - } - - public void setMaterialUnit(String materialUnit) { - this.materialUnit = materialUnit; - } - - public List getWmsInPlanDetailEntityList() { - return wmsInPlanDetailEntityList; - } - - public void setWmsInPlanDetailEntityList(List wmsInPlanDetailEntityList) { - this.wmsInPlanDetailEntityList = wmsInPlanDetailEntityList; - } - - public String getPlanTypeCode() { - return planTypeCode; - } - - public void setPlanTypeCode(String planTypeCode) { - this.planTypeCode = planTypeCode; - } - @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) diff --git a/ktg-mes/src/main/resources/mapper/wm/WmsInTaskMapper.xml b/ktg-mes/src/main/resources/mapper/wm/WmsInTaskMapper.xml index 8dc5dc1..2e4025c 100644 --- a/ktg-mes/src/main/resources/mapper/wm/WmsInTaskMapper.xml +++ b/ktg-mes/src/main/resources/mapper/wm/WmsInTaskMapper.xml @@ -31,6 +31,7 @@ + @@ -56,6 +57,7 @@ a.PLAN_IN_CODE, a.MATERIAL_CODE, a.DETAIL_IN_ID, + a.BOX_RFID, b.AREA_CODE as CELL_CODE, b.AREA_NAME as CELL_NAME, c.UNIT_NAME AS MATERIAL_UNIT, @@ -89,8 +91,11 @@ and PLAN_TYPE_CODE = #{planTypeCode} and PLAN_IN_STATUS = #{planInStatus} and PLAN_IN_CODE = #{planInCode} - and MATERIAL_CODE like concat('%', #{materialCode}, '%') + and MATERIAL_CODE like concat('%', #{materialCode}, + '%') + and DETAIL_IN_ID = #{detailInId} + and BOX_RFID = #{boxRfid} order by a.CREATE_TIME desc @@ -124,6 +129,7 @@ PLAN_IN_CODE, MATERIAL_CODE, DETAIL_IN_ID, + BOX_RFID, #{taskInCode}, @@ -147,6 +153,7 @@ #{planInCode}, #{materialCode}, #{detailInId}, + #{boxRfid}, @@ -174,6 +181,7 @@ PLAN_IN_CODE = #{planInCode}, MATERIAL_CODE = #{materialCode}, DETAIL_IN_ID = #{detailInId}, + BOX_RFID = #{boxRfid}, where ID = #{id}