转移单行后台代码

This commit is contained in:
DESKTOP-J7ED0MB\yinjinlu 2022-11-28 15:38:09 +08:00
parent 41f79db739
commit 5d81c76516
6 changed files with 1177 additions and 0 deletions

View File

@ -0,0 +1,104 @@
package com.ktg.mes.wm.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ktg.common.annotation.Log;
import com.ktg.common.core.controller.BaseController;
import com.ktg.common.core.domain.AjaxResult;
import com.ktg.common.enums.BusinessType;
import com.ktg.mes.wm.domain.WmTransferLine;
import com.ktg.mes.wm.service.IWmTransferLineService;
import com.ktg.common.utils.poi.ExcelUtil;
import com.ktg.common.core.page.TableDataInfo;
/**
* 转移单行Controller
*
* @author yinjinlu
* @date 2022-11-28
*/
@RestController
@RequestMapping("/wm/transferline")
public class WmTransferLineController extends BaseController
{
@Autowired
private IWmTransferLineService wmTransferLineService;
/**
* 查询转移单行列表
*/
@PreAuthorize("@ss.hasPermi('wm:transferline:list')")
@GetMapping("/list")
public TableDataInfo list(WmTransferLine wmTransferLine)
{
startPage();
List<WmTransferLine> list = wmTransferLineService.selectWmTransferLineList(wmTransferLine);
return getDataTable(list);
}
/**
* 导出转移单行列表
*/
@PreAuthorize("@ss.hasPermi('wm:transferline:export')")
@Log(title = "转移单行", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, WmTransferLine wmTransferLine)
{
List<WmTransferLine> list = wmTransferLineService.selectWmTransferLineList(wmTransferLine);
ExcelUtil<WmTransferLine> util = new ExcelUtil<WmTransferLine>(WmTransferLine.class);
util.exportExcel(response, list, "转移单行数据");
}
/**
* 获取转移单行详细信息
*/
@PreAuthorize("@ss.hasPermi('wm:transferline:query')")
@GetMapping(value = "/{lineId}")
public AjaxResult getInfo(@PathVariable("lineId") Long lineId)
{
return AjaxResult.success(wmTransferLineService.selectWmTransferLineByLineId(lineId));
}
/**
* 新增转移单行
*/
@PreAuthorize("@ss.hasPermi('wm:transferline:add')")
@Log(title = "转移单行", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody WmTransferLine wmTransferLine)
{
return toAjax(wmTransferLineService.insertWmTransferLine(wmTransferLine));
}
/**
* 修改转移单行
*/
@PreAuthorize("@ss.hasPermi('wm:transferline:edit')")
@Log(title = "转移单行", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody WmTransferLine wmTransferLine)
{
return toAjax(wmTransferLineService.updateWmTransferLine(wmTransferLine));
}
/**
* 删除转移单行
*/
@PreAuthorize("@ss.hasPermi('wm:transferline:remove')")
@Log(title = "转移单行", businessType = BusinessType.DELETE)
@DeleteMapping("/{lineIds}")
public AjaxResult remove(@PathVariable Long[] lineIds)
{
return toAjax(wmTransferLineService.deleteWmTransferLineByLineIds(lineIds));
}
}

View File

@ -0,0 +1,574 @@
package com.ktg.mes.wm.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ktg.common.annotation.Excel;
import com.ktg.common.core.domain.BaseEntity;
/**
* 转移单行对象 wm_transfer_line
*
* @author yinjinlu
* @date 2022-11-28
*/
public class WmTransferLine extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 明细行ID */
private Long lineId;
/** 装箱单ID */
@Excel(name = "装箱单ID")
private Long transferId;
/** 库存记录ID */
@Excel(name = "库存记录ID")
private Long materialStockId;
/** 产品物料ID */
@Excel(name = "产品物料ID")
private Long itemId;
/** 产品物料编码 */
@Excel(name = "产品物料编码")
private String itemCode;
/** 产品物料名称 */
@Excel(name = "产品物料名称")
private String itemName;
/** 规格型号 */
@Excel(name = "规格型号")
private String specification;
/** 单位 */
@Excel(name = "单位")
private String unitOfMeasure;
/** 装箱数量 */
@Excel(name = "装箱数量")
private BigDecimal quantityTransfer;
/** 生产工单ID */
@Excel(name = "生产工单ID")
private Long workorderId;
/** 生产工单编号 */
@Excel(name = "生产工单编号")
private String workorderCode;
/** 批次号 */
@Excel(name = "批次号")
private String batchCode;
/** 移出仓库ID */
@Excel(name = "移出仓库ID")
private Long fromWarehouseId;
/** 移出仓库编码 */
@Excel(name = "移出仓库编码")
private String fromWarehouseCode;
/** 移出仓库名称 */
@Excel(name = "移出仓库名称")
private String fromWarehouseName;
/** 移出库区ID */
@Excel(name = "移出库区ID")
private Long fromLocationId;
/** 移出库区编码 */
@Excel(name = "移出库区编码")
private String fromLocationCode;
/** 移出库区名称 */
@Excel(name = "移出库区名称")
private String fromLocationName;
/** 移出库位ID */
@Excel(name = "移出库位ID")
private Long fromAreaId;
/** 移出库位编码 */
@Excel(name = "移出库位编码")
private String fromAreaCode;
/** 移出库位名称 */
@Excel(name = "移出库位名称")
private String fromAreaName;
/** 移入仓库ID */
@Excel(name = "移入仓库ID")
private Long toWarehouseId;
/** 移入仓库编码 */
@Excel(name = "移入仓库编码")
private String toWarehouseCode;
/** 移入仓库名称 */
@Excel(name = "移入仓库名称")
private String toWarehouseName;
/** 移入库区ID */
@Excel(name = "移入库区ID")
private Long toLocationId;
/** 移入库区编码 */
@Excel(name = "移入库区编码")
private String toLocationCode;
/** 移入库区名称 */
@Excel(name = "移入库区名称")
private String toLocationName;
/** 移入库位ID */
@Excel(name = "移入库位ID")
private Long toAreaId;
/** 移入库位编码 */
@Excel(name = "移入库位编码")
private String toAreaCode;
/** 移入库位名称 */
@Excel(name = "移入库位名称")
private String toAreaName;
/** 有效期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "有效期", width = 30, dateFormat = "yyyy-MM-dd")
private Date expireDate;
/** 供应商ID */
@Excel(name = "供应商ID")
private Long vendorId;
/** 供应商编码 */
@Excel(name = "供应商编码")
private String vendorCode;
/** 供应商名称 */
@Excel(name = "供应商名称")
private String vendorName;
/** 供应商简称 */
@Excel(name = "供应商简称")
private String vendorNick;
/** 预留字段1 */
private String attr1;
/** 预留字段2 */
private String attr2;
/** 预留字段3 */
private Long attr3;
/** 预留字段4 */
private Long attr4;
public void setLineId(Long lineId)
{
this.lineId = lineId;
}
public Long getLineId()
{
return lineId;
}
public void setTransferId(Long transferId)
{
this.transferId = transferId;
}
public Long getTransferId()
{
return transferId;
}
public void setMaterialStockId(Long materialStockId)
{
this.materialStockId = materialStockId;
}
public Long getMaterialStockId()
{
return materialStockId;
}
public void setItemId(Long itemId)
{
this.itemId = itemId;
}
public Long getItemId()
{
return itemId;
}
public void setItemCode(String itemCode)
{
this.itemCode = itemCode;
}
public String getItemCode()
{
return itemCode;
}
public void setItemName(String itemName)
{
this.itemName = itemName;
}
public String getItemName()
{
return itemName;
}
public void setSpecification(String specification)
{
this.specification = specification;
}
public String getSpecification()
{
return specification;
}
public void setUnitOfMeasure(String unitOfMeasure)
{
this.unitOfMeasure = unitOfMeasure;
}
public String getUnitOfMeasure()
{
return unitOfMeasure;
}
public void setQuantityTransfer(BigDecimal quantityTransfer)
{
this.quantityTransfer = quantityTransfer;
}
public BigDecimal getQuantityTransfer()
{
return quantityTransfer;
}
public void setWorkorderId(Long workorderId)
{
this.workorderId = workorderId;
}
public Long getWorkorderId()
{
return workorderId;
}
public void setWorkorderCode(String workorderCode)
{
this.workorderCode = workorderCode;
}
public String getWorkorderCode()
{
return workorderCode;
}
public void setBatchCode(String batchCode)
{
this.batchCode = batchCode;
}
public String getBatchCode()
{
return batchCode;
}
public void setFromWarehouseId(Long fromWarehouseId)
{
this.fromWarehouseId = fromWarehouseId;
}
public Long getFromWarehouseId()
{
return fromWarehouseId;
}
public void setFromWarehouseCode(String fromWarehouseCode)
{
this.fromWarehouseCode = fromWarehouseCode;
}
public String getFromWarehouseCode()
{
return fromWarehouseCode;
}
public void setFromWarehouseName(String fromWarehouseName)
{
this.fromWarehouseName = fromWarehouseName;
}
public String getFromWarehouseName()
{
return fromWarehouseName;
}
public void setFromLocationId(Long fromLocationId)
{
this.fromLocationId = fromLocationId;
}
public Long getFromLocationId()
{
return fromLocationId;
}
public void setFromLocationCode(String fromLocationCode)
{
this.fromLocationCode = fromLocationCode;
}
public String getFromLocationCode()
{
return fromLocationCode;
}
public void setFromLocationName(String fromLocationName)
{
this.fromLocationName = fromLocationName;
}
public String getFromLocationName()
{
return fromLocationName;
}
public void setFromAreaId(Long fromAreaId)
{
this.fromAreaId = fromAreaId;
}
public Long getFromAreaId()
{
return fromAreaId;
}
public void setFromAreaCode(String fromAreaCode)
{
this.fromAreaCode = fromAreaCode;
}
public String getFromAreaCode()
{
return fromAreaCode;
}
public void setFromAreaName(String fromAreaName)
{
this.fromAreaName = fromAreaName;
}
public String getFromAreaName()
{
return fromAreaName;
}
public void setToWarehouseId(Long toWarehouseId)
{
this.toWarehouseId = toWarehouseId;
}
public Long getToWarehouseId()
{
return toWarehouseId;
}
public void setToWarehouseCode(String toWarehouseCode)
{
this.toWarehouseCode = toWarehouseCode;
}
public String getToWarehouseCode()
{
return toWarehouseCode;
}
public void setToWarehouseName(String toWarehouseName)
{
this.toWarehouseName = toWarehouseName;
}
public String getToWarehouseName()
{
return toWarehouseName;
}
public void setToLocationId(Long toLocationId)
{
this.toLocationId = toLocationId;
}
public Long getToLocationId()
{
return toLocationId;
}
public void setToLocationCode(String toLocationCode)
{
this.toLocationCode = toLocationCode;
}
public String getToLocationCode()
{
return toLocationCode;
}
public void setToLocationName(String toLocationName)
{
this.toLocationName = toLocationName;
}
public String getToLocationName()
{
return toLocationName;
}
public void setToAreaId(Long toAreaId)
{
this.toAreaId = toAreaId;
}
public Long getToAreaId()
{
return toAreaId;
}
public void setToAreaCode(String toAreaCode)
{
this.toAreaCode = toAreaCode;
}
public String getToAreaCode()
{
return toAreaCode;
}
public void setToAreaName(String toAreaName)
{
this.toAreaName = toAreaName;
}
public String getToAreaName()
{
return toAreaName;
}
public void setExpireDate(Date expireDate)
{
this.expireDate = expireDate;
}
public Date getExpireDate()
{
return expireDate;
}
public void setVendorId(Long vendorId)
{
this.vendorId = vendorId;
}
public Long getVendorId()
{
return vendorId;
}
public void setVendorCode(String vendorCode)
{
this.vendorCode = vendorCode;
}
public String getVendorCode()
{
return vendorCode;
}
public void setVendorName(String vendorName)
{
this.vendorName = vendorName;
}
public String getVendorName()
{
return vendorName;
}
public void setVendorNick(String vendorNick)
{
this.vendorNick = vendorNick;
}
public String getVendorNick()
{
return vendorNick;
}
public void setAttr1(String attr1)
{
this.attr1 = attr1;
}
public String getAttr1()
{
return attr1;
}
public void setAttr2(String attr2)
{
this.attr2 = attr2;
}
public String getAttr2()
{
return attr2;
}
public void setAttr3(Long attr3)
{
this.attr3 = attr3;
}
public Long getAttr3()
{
return attr3;
}
public void setAttr4(Long attr4)
{
this.attr4 = attr4;
}
public Long getAttr4()
{
return attr4;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("lineId", getLineId())
.append("transferId", getTransferId())
.append("materialStockId", getMaterialStockId())
.append("itemId", getItemId())
.append("itemCode", getItemCode())
.append("itemName", getItemName())
.append("specification", getSpecification())
.append("unitOfMeasure", getUnitOfMeasure())
.append("quantityTransfer", getQuantityTransfer())
.append("workorderId", getWorkorderId())
.append("workorderCode", getWorkorderCode())
.append("batchCode", getBatchCode())
.append("fromWarehouseId", getFromWarehouseId())
.append("fromWarehouseCode", getFromWarehouseCode())
.append("fromWarehouseName", getFromWarehouseName())
.append("fromLocationId", getFromLocationId())
.append("fromLocationCode", getFromLocationCode())
.append("fromLocationName", getFromLocationName())
.append("fromAreaId", getFromAreaId())
.append("fromAreaCode", getFromAreaCode())
.append("fromAreaName", getFromAreaName())
.append("toWarehouseId", getToWarehouseId())
.append("toWarehouseCode", getToWarehouseCode())
.append("toWarehouseName", getToWarehouseName())
.append("toLocationId", getToLocationId())
.append("toLocationCode", getToLocationCode())
.append("toLocationName", getToLocationName())
.append("toAreaId", getToAreaId())
.append("toAreaCode", getToAreaCode())
.append("toAreaName", getToAreaName())
.append("expireDate", getExpireDate())
.append("vendorId", getVendorId())
.append("vendorCode", getVendorCode())
.append("vendorName", getVendorName())
.append("vendorNick", getVendorNick())
.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();
}
}

View File

@ -0,0 +1,68 @@
package com.ktg.mes.wm.mapper;
import java.util.List;
import com.ktg.mes.wm.domain.WmTransferLine;
/**
* 转移单行Mapper接口
*
* @author yinjinlu
* @date 2022-11-28
*/
public interface WmTransferLineMapper
{
/**
* 查询转移单行
*
* @param lineId 转移单行主键
* @return 转移单行
*/
public WmTransferLine selectWmTransferLineByLineId(Long lineId);
/**
* 查询转移单行列表
*
* @param wmTransferLine 转移单行
* @return 转移单行集合
*/
public List<WmTransferLine> selectWmTransferLineList(WmTransferLine wmTransferLine);
/**
* 新增转移单行
*
* @param wmTransferLine 转移单行
* @return 结果
*/
public int insertWmTransferLine(WmTransferLine wmTransferLine);
/**
* 修改转移单行
*
* @param wmTransferLine 转移单行
* @return 结果
*/
public int updateWmTransferLine(WmTransferLine wmTransferLine);
/**
* 删除转移单行
*
* @param lineId 转移单行主键
* @return 结果
*/
public int deleteWmTransferLineByLineId(Long lineId);
/**
* 批量删除转移单行
*
* @param lineIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteWmTransferLineByLineIds(Long[] lineIds);
/**
* 根据头ID删除所有行
* @param transferId
* @return
*/
public int deleteByTransferId(Long transferId);
}

View File

@ -0,0 +1,68 @@
package com.ktg.mes.wm.service;
import java.util.List;
import com.ktg.mes.wm.domain.WmTransferLine;
/**
* 转移单行Service接口
*
* @author yinjinlu
* @date 2022-11-28
*/
public interface IWmTransferLineService
{
/**
* 查询转移单行
*
* @param lineId 转移单行主键
* @return 转移单行
*/
public WmTransferLine selectWmTransferLineByLineId(Long lineId);
/**
* 查询转移单行列表
*
* @param wmTransferLine 转移单行
* @return 转移单行集合
*/
public List<WmTransferLine> selectWmTransferLineList(WmTransferLine wmTransferLine);
/**
* 新增转移单行
*
* @param wmTransferLine 转移单行
* @return 结果
*/
public int insertWmTransferLine(WmTransferLine wmTransferLine);
/**
* 修改转移单行
*
* @param wmTransferLine 转移单行
* @return 结果
*/
public int updateWmTransferLine(WmTransferLine wmTransferLine);
/**
* 批量删除转移单行
*
* @param lineIds 需要删除的转移单行主键集合
* @return 结果
*/
public int deleteWmTransferLineByLineIds(Long[] lineIds);
/**
* 删除转移单行信息
*
* @param lineId 转移单行主键
* @return 结果
*/
public int deleteWmTransferLineByLineId(Long lineId);
/**
* 根据头ID删除所有行
* @param transferId
* @return
*/
public int deleteByTransferId(Long transferId);
}

View File

@ -0,0 +1,101 @@
package com.ktg.mes.wm.service.impl;
import java.util.List;
import com.ktg.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktg.mes.wm.mapper.WmTransferLineMapper;
import com.ktg.mes.wm.domain.WmTransferLine;
import com.ktg.mes.wm.service.IWmTransferLineService;
/**
* 转移单行Service业务层处理
*
* @author yinjinlu
* @date 2022-11-28
*/
@Service
public class WmTransferLineServiceImpl implements IWmTransferLineService
{
@Autowired
private WmTransferLineMapper wmTransferLineMapper;
/**
* 查询转移单行
*
* @param lineId 转移单行主键
* @return 转移单行
*/
@Override
public WmTransferLine selectWmTransferLineByLineId(Long lineId)
{
return wmTransferLineMapper.selectWmTransferLineByLineId(lineId);
}
/**
* 查询转移单行列表
*
* @param wmTransferLine 转移单行
* @return 转移单行
*/
@Override
public List<WmTransferLine> selectWmTransferLineList(WmTransferLine wmTransferLine)
{
return wmTransferLineMapper.selectWmTransferLineList(wmTransferLine);
}
/**
* 新增转移单行
*
* @param wmTransferLine 转移单行
* @return 结果
*/
@Override
public int insertWmTransferLine(WmTransferLine wmTransferLine)
{
wmTransferLine.setCreateTime(DateUtils.getNowDate());
return wmTransferLineMapper.insertWmTransferLine(wmTransferLine);
}
/**
* 修改转移单行
*
* @param wmTransferLine 转移单行
* @return 结果
*/
@Override
public int updateWmTransferLine(WmTransferLine wmTransferLine)
{
wmTransferLine.setUpdateTime(DateUtils.getNowDate());
return wmTransferLineMapper.updateWmTransferLine(wmTransferLine);
}
/**
* 批量删除转移单行
*
* @param lineIds 需要删除的转移单行主键
* @return 结果
*/
@Override
public int deleteWmTransferLineByLineIds(Long[] lineIds)
{
return wmTransferLineMapper.deleteWmTransferLineByLineIds(lineIds);
}
/**
* 删除转移单行信息
*
* @param lineId 转移单行主键
* @return 结果
*/
@Override
public int deleteWmTransferLineByLineId(Long lineId)
{
return wmTransferLineMapper.deleteWmTransferLineByLineId(lineId);
}
@Override
public int deleteByTransferId(Long transferId) {
return wmTransferLineMapper.deleteByTransferId(transferId);
}
}

View File

@ -0,0 +1,262 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ktg.mes.wm.mapper.WmTransferLineMapper">
<resultMap type="WmTransferLine" id="WmTransferLineResult">
<result property="lineId" column="line_id" />
<result property="transferId" column="transfer_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" />
<result property="specification" column="specification" />
<result property="unitOfMeasure" column="unit_of_measure" />
<result property="quantityTransfer" column="quantity_transfer" />
<result property="workorderId" column="workorder_id" />
<result property="workorderCode" column="workorder_code" />
<result property="batchCode" column="batch_code" />
<result property="fromWarehouseId" column="from_warehouse_id" />
<result property="fromWarehouseCode" column="from_warehouse_code" />
<result property="fromWarehouseName" column="from_warehouse_name" />
<result property="fromLocationId" column="from_location_id" />
<result property="fromLocationCode" column="from_location_code" />
<result property="fromLocationName" column="from_location_name" />
<result property="fromAreaId" column="from_area_id" />
<result property="fromAreaCode" column="from_area_code" />
<result property="fromAreaName" column="from_area_name" />
<result property="toWarehouseId" column="to_warehouse_id" />
<result property="toWarehouseCode" column="to_warehouse_code" />
<result property="toWarehouseName" column="to_warehouse_name" />
<result property="toLocationId" column="to_location_id" />
<result property="toLocationCode" column="to_location_code" />
<result property="toLocationName" column="to_location_name" />
<result property="toAreaId" column="to_area_id" />
<result property="toAreaCode" column="to_area_code" />
<result property="toAreaName" column="to_area_name" />
<result property="expireDate" column="expire_date" />
<result property="vendorId" column="vendor_id" />
<result property="vendorCode" column="vendor_code" />
<result property="vendorName" column="vendor_name" />
<result property="vendorNick" column="vendor_nick" />
<result property="remark" column="remark" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
<result property="attr4" column="attr4" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectWmTransferLineVo">
select line_id, transfer_id, material_stock_id, item_id, item_code, item_name, specification, unit_of_measure, quantity_transfer, workorder_id, workorder_code, batch_code, from_warehouse_id, from_warehouse_code, from_warehouse_name, from_location_id, from_location_code, from_location_name, from_area_id, from_area_code, from_area_name, to_warehouse_id, to_warehouse_code, to_warehouse_name, to_location_id, to_location_code, to_location_name, to_area_id, to_area_code, to_area_name, expire_date, vendor_id, vendor_code, vendor_name, vendor_nick, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_transfer_line
</sql>
<select id="selectWmTransferLineList" parameterType="WmTransferLine" resultMap="WmTransferLineResult">
<include refid="selectWmTransferLineVo"/>
<where>
<if test="transferId != null "> and transfer_id = #{transferId}</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>
<if test="specification != null and specification != ''"> and specification = #{specification}</if>
<if test="unitOfMeasure != null and unitOfMeasure != ''"> and unit_of_measure = #{unitOfMeasure}</if>
<if test="quantityTransfer != null "> and quantity_transfer = #{quantityTransfer}</if>
<if test="workorderId != null "> and workorder_id = #{workorderId}</if>
<if test="workorderCode != null and workorderCode != ''"> and workorder_code = #{workorderCode}</if>
<if test="batchCode != null and batchCode != ''"> and batch_code = #{batchCode}</if>
<if test="fromWarehouseId != null "> and from_warehouse_id = #{fromWarehouseId}</if>
<if test="fromWarehouseCode != null and fromWarehouseCode != ''"> and from_warehouse_code = #{fromWarehouseCode}</if>
<if test="fromWarehouseName != null and fromWarehouseName != ''"> and from_warehouse_name like concat('%', #{fromWarehouseName}, '%')</if>
<if test="fromLocationId != null "> and from_location_id = #{fromLocationId}</if>
<if test="fromLocationCode != null and fromLocationCode != ''"> and from_location_code = #{fromLocationCode}</if>
<if test="fromLocationName != null and fromLocationName != ''"> and from_location_name like concat('%', #{fromLocationName}, '%')</if>
<if test="fromAreaId != null "> and from_area_id = #{fromAreaId}</if>
<if test="fromAreaCode != null and fromAreaCode != ''"> and from_area_code = #{fromAreaCode}</if>
<if test="fromAreaName != null and fromAreaName != ''"> and from_area_name like concat('%', #{fromAreaName}, '%')</if>
<if test="toWarehouseId != null "> and to_warehouse_id = #{toWarehouseId}</if>
<if test="toWarehouseCode != null and toWarehouseCode != ''"> and to_warehouse_code = #{toWarehouseCode}</if>
<if test="toWarehouseName != null and toWarehouseName != ''"> and to_warehouse_name like concat('%', #{toWarehouseName}, '%')</if>
<if test="toLocationId != null "> and to_location_id = #{toLocationId}</if>
<if test="toLocationCode != null and toLocationCode != ''"> and to_location_code = #{toLocationCode}</if>
<if test="toLocationName != null and toLocationName != ''"> and to_location_name like concat('%', #{toLocationName}, '%')</if>
<if test="toAreaId != null "> and to_area_id = #{toAreaId}</if>
<if test="toAreaCode != null and toAreaCode != ''"> and to_area_code = #{toAreaCode}</if>
<if test="toAreaName != null and toAreaName != ''"> and to_area_name like concat('%', #{toAreaName}, '%')</if>
<if test="expireDate != null "> and expire_date = #{expireDate}</if>
<if test="vendorId != null "> and vendor_id = #{vendorId}</if>
<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>
</where>
</select>
<select id="selectWmTransferLineByLineId" parameterType="Long" resultMap="WmTransferLineResult">
<include refid="selectWmTransferLineVo"/>
where line_id = #{lineId}
</select>
<insert id="insertWmTransferLine" parameterType="WmTransferLine" useGeneratedKeys="true" keyProperty="lineId">
insert into wm_transfer_line
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="transferId != null">transfer_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>
<if test="specification != null">specification,</if>
<if test="unitOfMeasure != null">unit_of_measure,</if>
<if test="quantityTransfer != null">quantity_transfer,</if>
<if test="workorderId != null">workorder_id,</if>
<if test="workorderCode != null">workorder_code,</if>
<if test="batchCode != null">batch_code,</if>
<if test="fromWarehouseId != null">from_warehouse_id,</if>
<if test="fromWarehouseCode != null">from_warehouse_code,</if>
<if test="fromWarehouseName != null">from_warehouse_name,</if>
<if test="fromLocationId != null">from_location_id,</if>
<if test="fromLocationCode != null">from_location_code,</if>
<if test="fromLocationName != null">from_location_name,</if>
<if test="fromAreaId != null">from_area_id,</if>
<if test="fromAreaCode != null">from_area_code,</if>
<if test="fromAreaName != null">from_area_name,</if>
<if test="toWarehouseId != null">to_warehouse_id,</if>
<if test="toWarehouseCode != null">to_warehouse_code,</if>
<if test="toWarehouseName != null">to_warehouse_name,</if>
<if test="toLocationId != null">to_location_id,</if>
<if test="toLocationCode != null">to_location_code,</if>
<if test="toLocationName != null">to_location_name,</if>
<if test="toAreaId != null">to_area_id,</if>
<if test="toAreaCode != null">to_area_code,</if>
<if test="toAreaName != null">to_area_name,</if>
<if test="expireDate != null">expire_date,</if>
<if test="vendorId != null">vendor_id,</if>
<if test="vendorCode != null">vendor_code,</if>
<if test="vendorName != null">vendor_name,</if>
<if test="vendorNick != null">vendor_nick,</if>
<if test="remark != null">remark,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if>
<if test="attr4 != null">attr4,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="transferId != null">#{transferId},</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>
<if test="specification != null">#{specification},</if>
<if test="unitOfMeasure != null">#{unitOfMeasure},</if>
<if test="quantityTransfer != null">#{quantityTransfer},</if>
<if test="workorderId != null">#{workorderId},</if>
<if test="workorderCode != null">#{workorderCode},</if>
<if test="batchCode != null">#{batchCode},</if>
<if test="fromWarehouseId != null">#{fromWarehouseId},</if>
<if test="fromWarehouseCode != null">#{fromWarehouseCode},</if>
<if test="fromWarehouseName != null">#{fromWarehouseName},</if>
<if test="fromLocationId != null">#{fromLocationId},</if>
<if test="fromLocationCode != null">#{fromLocationCode},</if>
<if test="fromLocationName != null">#{fromLocationName},</if>
<if test="fromAreaId != null">#{fromAreaId},</if>
<if test="fromAreaCode != null">#{fromAreaCode},</if>
<if test="fromAreaName != null">#{fromAreaName},</if>
<if test="toWarehouseId != null">#{toWarehouseId},</if>
<if test="toWarehouseCode != null">#{toWarehouseCode},</if>
<if test="toWarehouseName != null">#{toWarehouseName},</if>
<if test="toLocationId != null">#{toLocationId},</if>
<if test="toLocationCode != null">#{toLocationCode},</if>
<if test="toLocationName != null">#{toLocationName},</if>
<if test="toAreaId != null">#{toAreaId},</if>
<if test="toAreaCode != null">#{toAreaCode},</if>
<if test="toAreaName != null">#{toAreaName},</if>
<if test="expireDate != null">#{expireDate},</if>
<if test="vendorId != null">#{vendorId},</if>
<if test="vendorCode != null">#{vendorCode},</if>
<if test="vendorName != null">#{vendorName},</if>
<if test="vendorNick != null">#{vendorNick},</if>
<if test="remark != null">#{remark},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if>
<if test="attr4 != null">#{attr4},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateWmTransferLine" parameterType="WmTransferLine">
update wm_transfer_line
<trim prefix="SET" suffixOverrides=",">
<if test="transferId != null">transfer_id = #{transferId},</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>
<if test="specification != null">specification = #{specification},</if>
<if test="unitOfMeasure != null">unit_of_measure = #{unitOfMeasure},</if>
<if test="quantityTransfer != null">quantity_transfer = #{quantityTransfer},</if>
<if test="workorderId != null">workorder_id = #{workorderId},</if>
<if test="workorderCode != null">workorder_code = #{workorderCode},</if>
<if test="batchCode != null">batch_code = #{batchCode},</if>
<if test="fromWarehouseId != null">from_warehouse_id = #{fromWarehouseId},</if>
<if test="fromWarehouseCode != null">from_warehouse_code = #{fromWarehouseCode},</if>
<if test="fromWarehouseName != null">from_warehouse_name = #{fromWarehouseName},</if>
<if test="fromLocationId != null">from_location_id = #{fromLocationId},</if>
<if test="fromLocationCode != null">from_location_code = #{fromLocationCode},</if>
<if test="fromLocationName != null">from_location_name = #{fromLocationName},</if>
<if test="fromAreaId != null">from_area_id = #{fromAreaId},</if>
<if test="fromAreaCode != null">from_area_code = #{fromAreaCode},</if>
<if test="fromAreaName != null">from_area_name = #{fromAreaName},</if>
<if test="toWarehouseId != null">to_warehouse_id = #{toWarehouseId},</if>
<if test="toWarehouseCode != null">to_warehouse_code = #{toWarehouseCode},</if>
<if test="toWarehouseName != null">to_warehouse_name = #{toWarehouseName},</if>
<if test="toLocationId != null">to_location_id = #{toLocationId},</if>
<if test="toLocationCode != null">to_location_code = #{toLocationCode},</if>
<if test="toLocationName != null">to_location_name = #{toLocationName},</if>
<if test="toAreaId != null">to_area_id = #{toAreaId},</if>
<if test="toAreaCode != null">to_area_code = #{toAreaCode},</if>
<if test="toAreaName != null">to_area_name = #{toAreaName},</if>
<if test="expireDate != null">expire_date = #{expireDate},</if>
<if test="vendorId != null">vendor_id = #{vendorId},</if>
<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="remark != null">remark = #{remark},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>
<if test="attr3 != null">attr3 = #{attr3},</if>
<if test="attr4 != null">attr4 = #{attr4},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where line_id = #{lineId}
</update>
<delete id="deleteWmTransferLineByLineId" parameterType="Long">
delete from wm_transfer_line where line_id = #{lineId}
</delete>
<delete id="deleteWmTransferLineByLineIds" parameterType="String">
delete from wm_transfer_line where line_id in
<foreach item="lineId" collection="array" open="(" separator="," close=")">
#{lineId}
</foreach>
</delete>
<delete id="deleteByTransferId" parameterType="Long">
delete from wm_transfer_line where transfer_id = #{transferId}
</delete>
</mapper>