退货单头添加批次号,行添加过滤
This commit is contained in:
parent
92b9cfd578
commit
394e9ef8c6
@ -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();
|
||||
}
|
||||
|
@ -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 +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -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 +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<resultMap type="WmRtVendorLine" id="WmRtVendorLineResult">
|
||||
<result property="lineId" column="line_id" />
|
||||
<result property="rtId" column="rt_id" />
|
||||
<result property="materialStockId" column="material_stock_id" />
|
||||
<result property="itemId" column="item_id" />
|
||||
<result property="itemCode" column="item_code" />
|
||||
<result property="itemName" column="item_name" />
|
||||
@ -35,13 +36,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWmRtVendorLineVo">
|
||||
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
|
||||
</sql>
|
||||
|
||||
<select id="selectWmRtVendorLineList" parameterType="WmRtVendorLine" resultMap="WmRtVendorLineResult">
|
||||
<include refid="selectWmRtVendorLineVo"/>
|
||||
<where>
|
||||
<if test="rtId != null "> and rt_id = #{rtId}</if>
|
||||
<if test="materialStockId != null "> and material_stock_id = #{materialStockId}</if>
|
||||
<if test="itemId != null "> and item_id = #{itemId}</if>
|
||||
<if test="itemCode != null and itemCode != ''"> and item_code = #{itemCode}</if>
|
||||
<if test="itemName != null and itemName != ''"> and item_name like concat('%', #{itemName}, '%')</if>
|
||||
@ -70,6 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
insert into wm_rt_vendor_line
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="rtId != null">rt_id,</if>
|
||||
<if test="materialStockId != null">material_stock_id,</if>
|
||||
<if test="itemId != null">item_id,</if>
|
||||
<if test="itemCode != null">item_code,</if>
|
||||
<if test="itemName != null">item_name,</if>
|
||||
@ -98,6 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="rtId != null">#{rtId},</if>
|
||||
<if test="materialStockId != null">#{materialStockId},</if>
|
||||
<if test="itemId != null">#{itemId},</if>
|
||||
<if test="itemCode != null">#{itemCode},</if>
|
||||
<if test="itemName != null">#{itemName},</if>
|
||||
@ -130,6 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
update wm_rt_vendor_line
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="rtId != null">rt_id = #{rtId},</if>
|
||||
<if test="materialStockId != null">material_stock_id = #{materialStockId},</if>
|
||||
<if test="itemId != null">item_id = #{itemId},</if>
|
||||
<if test="itemCode != null">item_code = #{itemCode},</if>
|
||||
<if test="itemName != null">item_name = #{itemName},</if>
|
||||
|
@ -13,6 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="vendorCode" column="vendor_code" />
|
||||
<result property="vendorName" column="vendor_name" />
|
||||
<result property="vendorNick" column="vendor_nick" />
|
||||
<result property="batchCode" column="batch_code" />
|
||||
<result property="rtDate" column="rt_date" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
@ -27,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWmRtVendorVo">
|
||||
select rt_id, rt_code, rt_name, po_code, vendor_id, vendor_code, vendor_name, vendor_nick, rt_date, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_rt_vendor
|
||||
select rt_id, rt_code, rt_name, po_code, vendor_id, vendor_code, vendor_name, vendor_nick, batch_code, rt_date, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_rt_vendor
|
||||
</sql>
|
||||
|
||||
<select id="selectWmRtVendorList" parameterType="WmRtVendor" resultMap="WmRtVendorResult">
|
||||
@ -40,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="vendorCode != null and vendorCode != ''"> and vendor_code = #{vendorCode}</if>
|
||||
<if test="vendorName != null and vendorName != ''"> and vendor_name like concat('%', #{vendorName}, '%')</if>
|
||||
<if test="vendorNick != null and vendorNick != ''"> and vendor_nick = #{vendorNick}</if>
|
||||
<if test="batchCode != null and batchCode != ''"> and batch_code = #{batchCode}</if>
|
||||
<if test="rtDate != null "> and rt_date = #{rtDate}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
@ -65,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="vendorCode != null">vendor_code,</if>
|
||||
<if test="vendorName != null">vendor_name,</if>
|
||||
<if test="vendorNick != null">vendor_nick,</if>
|
||||
<if test="batchCode != null">batch_code,</if>
|
||||
<if test="rtDate != null">rt_date,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
@ -85,6 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="vendorCode != null">#{vendorCode},</if>
|
||||
<if test="vendorName != null">#{vendorName},</if>
|
||||
<if test="vendorNick != null">#{vendorNick},</if>
|
||||
<if test="batchCode != null">#{batchCode},</if>
|
||||
<if test="rtDate != null">#{rtDate},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
@ -109,6 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="vendorCode != null">vendor_code = #{vendorCode},</if>
|
||||
<if test="vendorName != null">vendor_name = #{vendorName},</if>
|
||||
<if test="vendorNick != null">vendor_nick = #{vendorNick},</if>
|
||||
<if test="batchCode != null">batch_code = #{batchCode},</if>
|
||||
<if test="rtDate != null">rt_date = #{rtDate},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
|
Loading…
Reference in New Issue
Block a user