From 394e9ef8c62d8d9e132cf1034c330800b6de19ae Mon Sep 17 00:00:00 2001
From: "JinLu.Yin" <411641505@qq.com>
Date: Tue, 14 Jun 2022 14:11:32 +0800
Subject: [PATCH] =?UTF-8?q?=E9=80=80=E8=B4=A7=E5=8D=95=E5=A4=B4=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0=E6=89=B9=E6=AC=A1=E5=8F=B7=EF=BC=8C=E8=A1=8C=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0=E8=BF=87=E6=BB=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../wm/controller/WmRtVendorController.java | 7 ++
.../com/ktg/mes/wm/domain/WmRtVendor.java | 51 ++++++++------
.../com/ktg/mes/wm/domain/WmRtVendorLine.java | 67 ++++++++++---------
.../mapper/wm/WmRtVendorLineMapper.xml | 7 +-
.../resources/mapper/wm/WmRtVendorMapper.xml | 7 +-
5 files changed, 85 insertions(+), 54 deletions(-)
diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmRtVendorController.java b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmRtVendorController.java
index 826fcf3..90a3b51 100644
--- a/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmRtVendorController.java
+++ b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmRtVendorController.java
@@ -128,6 +128,13 @@ public class WmRtVendorController extends BaseController
@Transactional
@PutMapping("/{rtId}")
public AjaxResult execute(@PathVariable Long rtId){
+ //判断单据状态
+ WmRtVendor wmRtVendor = wmRtVendorService.selectWmRtVendorByRtId(rtId);
+ if(!UserConstants.ORDER_STATUS_CONFIRMED.equals(wmRtVendor.getStatus())){
+ return AjaxResult.error("请先确认单据!");
+ }
+
+ //构造事务Bean
return AjaxResult.success();
}
diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmRtVendor.java b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmRtVendor.java
index e17dbc5..7099176 100644
--- a/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmRtVendor.java
+++ b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmRtVendor.java
@@ -48,6 +48,9 @@ public class WmRtVendor extends BaseEntity
@Excel(name = "供应商简称")
private String vendorNick;
+ @Excel(name = "批次号" )
+ private String batchCode;
+
/** 退货日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "退货日期", width = 30, dateFormat = "yyyy-MM-dd")
@@ -146,7 +149,15 @@ public class WmRtVendor extends BaseEntity
this.rtDate = rtDate;
}
- public Date getRtDate()
+ public String getBatchCode() {
+ return batchCode;
+ }
+
+ public void setBatchCode(String batchCode) {
+ this.batchCode = batchCode;
+ }
+
+ public Date getRtDate()
{
return rtDate;
}
@@ -198,26 +209,22 @@ public class WmRtVendor extends BaseEntity
@Override
public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("rtId", getRtId())
- .append("rtCode", getRtCode())
- .append("rtName", getRtName())
- .append("poCode", getPoCode())
- .append("vendorId", getVendorId())
- .append("vendorCode", getVendorCode())
- .append("vendorName", getVendorName())
- .append("vendorNick", getVendorNick())
- .append("rtDate", getRtDate())
- .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())
- .toString();
+ return "WmRtVendor{" +
+ "rtId=" + rtId +
+ ", rtCode='" + rtCode + '\'' +
+ ", rtName='" + rtName + '\'' +
+ ", poCode='" + poCode + '\'' +
+ ", vendorId=" + vendorId +
+ ", vendorCode='" + vendorCode + '\'' +
+ ", vendorName='" + vendorName + '\'' +
+ ", vendorNick='" + vendorNick + '\'' +
+ ", batchCode='" + batchCode + '\'' +
+ ", rtDate=" + rtDate +
+ ", status='" + status + '\'' +
+ ", attr1='" + attr1 + '\'' +
+ ", attr2='" + attr2 + '\'' +
+ ", attr3=" + attr3 +
+ ", attr4=" + attr4 +
+ '}';
}
}
diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmRtVendorLine.java b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmRtVendorLine.java
index 961cfe1..a6efc76 100644
--- a/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmRtVendorLine.java
+++ b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmRtVendorLine.java
@@ -19,6 +19,8 @@ public class WmRtVendorLine extends BaseEntity
/** 行ID */
private Long lineId;
+ private Long materialStockId;
+
/** 退货单ID */
@Excel(name = "退货单ID")
private Long rtId;
@@ -108,7 +110,16 @@ public class WmRtVendorLine extends BaseEntity
{
return lineId;
}
- public void setRtId(Long rtId)
+
+ public Long getMaterialStockId() {
+ return materialStockId;
+ }
+
+ public void setMaterialStockId(Long materialStockId) {
+ this.materialStockId = materialStockId;
+ }
+
+ public void setRtId(Long rtId)
{
this.rtId = rtId;
}
@@ -300,34 +311,30 @@ public class WmRtVendorLine extends BaseEntity
@Override
public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("lineId", getLineId())
- .append("rtId", getRtId())
- .append("itemId", getItemId())
- .append("itemCode", getItemCode())
- .append("itemName", getItemName())
- .append("specification", getSpecification())
- .append("unitOfMeasure", getUnitOfMeasure())
- .append("quantityRted", getQuantityRted())
- .append("batchCode", getBatchCode())
- .append("warehouseId", getWarehouseId())
- .append("warehouseCode", getWarehouseCode())
- .append("warehouseName", getWarehouseName())
- .append("locationId", getLocationId())
- .append("locationCode", getLocationCode())
- .append("locationName", getLocationName())
- .append("areaId", getAreaId())
- .append("areaCode", getAreaCode())
- .append("areaName", getAreaName())
- .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())
- .toString();
+ return "WmRtVendorLine{" +
+ "lineId=" + lineId +
+ ", materialStockId=" + materialStockId +
+ ", rtId=" + rtId +
+ ", itemId=" + itemId +
+ ", itemCode='" + itemCode + '\'' +
+ ", itemName='" + itemName + '\'' +
+ ", specification='" + specification + '\'' +
+ ", unitOfMeasure='" + unitOfMeasure + '\'' +
+ ", quantityRted=" + quantityRted +
+ ", batchCode='" + batchCode + '\'' +
+ ", warehouseId=" + warehouseId +
+ ", warehouseCode='" + warehouseCode + '\'' +
+ ", warehouseName='" + warehouseName + '\'' +
+ ", locationId=" + locationId +
+ ", locationCode='" + locationCode + '\'' +
+ ", locationName='" + locationName + '\'' +
+ ", areaId=" + areaId +
+ ", areaCode='" + areaCode + '\'' +
+ ", areaName='" + areaName + '\'' +
+ ", attr1='" + attr1 + '\'' +
+ ", attr2='" + attr2 + '\'' +
+ ", attr3=" + attr3 +
+ ", attr4=" + attr4 +
+ '}';
}
}
diff --git a/ktg-mes/src/main/resources/mapper/wm/WmRtVendorLineMapper.xml b/ktg-mes/src/main/resources/mapper/wm/WmRtVendorLineMapper.xml
index 82a6418..1a60eae 100644
--- a/ktg-mes/src/main/resources/mapper/wm/WmRtVendorLineMapper.xml
+++ b/ktg-mes/src/main/resources/mapper/wm/WmRtVendorLineMapper.xml
@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
@@ -35,13 +36,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- select line_id, rt_id, item_id, item_code, item_name, specification, unit_of_measure, quantity_rted, batch_code, warehouse_id, warehouse_code, warehouse_name, location_id, location_code, location_name, area_id, area_code, area_name, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_rt_vendor_line
+ select line_id, rt_id, material_stock_id, item_id, item_code, item_name, specification, unit_of_measure, quantity_rted, batch_code, warehouse_id, warehouse_code, warehouse_name, location_id, location_code, location_name, area_id, area_code, area_name, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_rt_vendor_line