parent
49843665fc
commit
42fe60d0d4
@ -0,0 +1,105 @@
|
||||
package com.hw.wms.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
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.hw.common.log.annotation.Log;
|
||||
import com.hw.common.log.enums.BusinessType;
|
||||
import com.hw.common.security.annotation.RequiresPermissions;
|
||||
import com.hw.wms.domain.WmsTransfer;
|
||||
import com.hw.wms.service.IWmsTransferService;
|
||||
import com.hw.common.core.web.controller.BaseController;
|
||||
import com.hw.common.core.web.domain.AjaxResult;
|
||||
import com.hw.common.core.utils.poi.ExcelUtil;
|
||||
import com.hw.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 转库记录Controller
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-01-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/transfer")
|
||||
public class WmsTransferController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWmsTransferService wmsTransferService;
|
||||
|
||||
/**
|
||||
* 查询转库记录列表
|
||||
*/
|
||||
@RequiresPermissions("wms:transfer:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WmsTransfer wmsTransfer)
|
||||
{
|
||||
startPage();
|
||||
List<WmsTransfer> list = wmsTransferService.selectWmsTransferList(wmsTransfer);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出转库记录列表
|
||||
*/
|
||||
@RequiresPermissions("wms:transfer:export")
|
||||
@Log(title = "转库记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WmsTransfer wmsTransfer)
|
||||
{
|
||||
List<WmsTransfer> list = wmsTransferService.selectWmsTransferList(wmsTransfer);
|
||||
ExcelUtil<WmsTransfer> util = new ExcelUtil<WmsTransfer>(WmsTransfer.class);
|
||||
util.exportExcel(response, list, "转库记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取转库记录详细信息
|
||||
*/
|
||||
@RequiresPermissions("wms:transfer:query")
|
||||
@GetMapping(value = "/{transferId}")
|
||||
public AjaxResult getInfo(@PathVariable("transferId") Long transferId)
|
||||
{
|
||||
return success(wmsTransferService.selectWmsTransferByTransferId(transferId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增转库记录
|
||||
*/
|
||||
@RequiresPermissions("wms:transfer:add")
|
||||
@Log(title = "转库记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WmsTransfer wmsTransfer)
|
||||
{
|
||||
return toAjax(wmsTransferService.insertWmsTransfer(wmsTransfer));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改转库记录
|
||||
*/
|
||||
@RequiresPermissions("wms:transfer:edit")
|
||||
@Log(title = "转库记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WmsTransfer wmsTransfer)
|
||||
{
|
||||
return toAjax(wmsTransferService.updateWmsTransfer(wmsTransfer));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除转库记录
|
||||
*/
|
||||
@RequiresPermissions("wms:transfer:remove")
|
||||
@Log(title = "转库记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{transferIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] transferIds)
|
||||
{
|
||||
return toAjax(wmsTransferService.deleteWmsTransferByTransferIds(transferIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,436 @@
|
||||
package com.hw.wms.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
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.hw.common.core.annotation.Excel;
|
||||
import com.hw.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 转库记录对象 wms_transfer
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-01-12
|
||||
*/
|
||||
public class WmsTransfer extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 转库记录ID */
|
||||
private Long transferId;
|
||||
|
||||
/** 任务编号 */
|
||||
@Excel(name = "任务编号")
|
||||
private String taskCode;
|
||||
|
||||
/** 原仓库ID */
|
||||
@Excel(name = "原仓库ID")
|
||||
private Long oriWarehouseId;
|
||||
|
||||
/** 原库位编码 */
|
||||
@Excel(name = "原库位编码")
|
||||
private String oriLocationCode;
|
||||
|
||||
/** 目标仓库ID */
|
||||
@Excel(name = "目标仓库ID")
|
||||
private Long targetWarehouseId;
|
||||
|
||||
/** 目标库位编码 */
|
||||
@Excel(name = "目标库位编码")
|
||||
private String targetLocationCode;
|
||||
|
||||
/** 物料ID */
|
||||
@Excel(name = "物料ID")
|
||||
private Long materialId;
|
||||
|
||||
/** 产品批次号 */
|
||||
@Excel(name = "产品批次号")
|
||||
private String productBatch;
|
||||
|
||||
/** 计划编号,关联pd_base_plan_info的plan_code */
|
||||
@Excel(name = "计划编号,关联pd_base_plan_info的plan_code")
|
||||
private String planCode;
|
||||
|
||||
/** 申请数量 */
|
||||
@Excel(name = "申请数量")
|
||||
private BigDecimal applyQty;
|
||||
|
||||
/** 已出数量 */
|
||||
@Excel(name = "已出数量")
|
||||
private BigDecimal outstockQty;
|
||||
|
||||
/** 已入数量 */
|
||||
@Excel(name = "已入数量")
|
||||
private BigDecimal instockQty;
|
||||
|
||||
/** 操作类型(0自动,1人工,2强制,3调度) */
|
||||
@Excel(name = "操作类型(0自动,1人工,2强制,3调度)")
|
||||
private String operationType;
|
||||
|
||||
/** 转库类型(1、出半成品库入成品库) */
|
||||
@Excel(name = "转库类型(1、出半成品库入成品库)")
|
||||
private String transferType;
|
||||
|
||||
/** 申请原因 */
|
||||
@Excel(name = "申请原因")
|
||||
private String applyReason;
|
||||
|
||||
/** 审核原因 */
|
||||
@Excel(name = "审核原因")
|
||||
private String auditReason;
|
||||
|
||||
/** 审核状态(0待审核,1审核通过,2审核未通过) */
|
||||
@Excel(name = "审核状态(0待审核,1审核通过,2审核未通过)")
|
||||
private String auditStatus;
|
||||
|
||||
/** 执行状态(0待执行,1待执行,2已完成) */
|
||||
@Excel(name = "执行状态(0待执行,1待执行,2已完成)")
|
||||
private String executeStatus;
|
||||
|
||||
/** 申请人 */
|
||||
@Excel(name = "申请人")
|
||||
private String applyBy;
|
||||
|
||||
/** 申请时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date applyDate;
|
||||
|
||||
/** 审核人 */
|
||||
@Excel(name = "审核人")
|
||||
private String auditBy;
|
||||
|
||||
/** 审核时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date auditDate;
|
||||
|
||||
/** 最后更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updateDate;
|
||||
|
||||
/** 开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date beginTime;
|
||||
|
||||
/** 结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date endTime;
|
||||
|
||||
|
||||
|
||||
private String oriWarehouseName;
|
||||
private String targetWarehouseName;
|
||||
private String materialCode;
|
||||
private String materialName;
|
||||
|
||||
/** 转库记录明细;移库合库记录对应的明细信息信息 */
|
||||
private List<WmsTransferDetail> wmsTransferDetailList;
|
||||
|
||||
public void setTransferId(Long transferId)
|
||||
{
|
||||
this.transferId = transferId;
|
||||
}
|
||||
|
||||
public Long getTransferId()
|
||||
{
|
||||
return transferId;
|
||||
}
|
||||
public void setTaskCode(String taskCode)
|
||||
{
|
||||
this.taskCode = taskCode;
|
||||
}
|
||||
|
||||
public String getTaskCode()
|
||||
{
|
||||
return taskCode;
|
||||
}
|
||||
public void setOriWarehouseId(Long oriWarehouseId)
|
||||
{
|
||||
this.oriWarehouseId = oriWarehouseId;
|
||||
}
|
||||
|
||||
public Long getOriWarehouseId()
|
||||
{
|
||||
return oriWarehouseId;
|
||||
}
|
||||
public void setOriLocationCode(String oriLocationCode)
|
||||
{
|
||||
this.oriLocationCode = oriLocationCode;
|
||||
}
|
||||
|
||||
public String getOriLocationCode()
|
||||
{
|
||||
return oriLocationCode;
|
||||
}
|
||||
public void setTargetWarehouseId(Long targetWarehouseId)
|
||||
{
|
||||
this.targetWarehouseId = targetWarehouseId;
|
||||
}
|
||||
|
||||
public Long getTargetWarehouseId()
|
||||
{
|
||||
return targetWarehouseId;
|
||||
}
|
||||
public void setTargetLocationCode(String targetLocationCode)
|
||||
{
|
||||
this.targetLocationCode = targetLocationCode;
|
||||
}
|
||||
|
||||
public String getTargetLocationCode()
|
||||
{
|
||||
return targetLocationCode;
|
||||
}
|
||||
public void setMaterialId(Long materialId)
|
||||
{
|
||||
this.materialId = materialId;
|
||||
}
|
||||
|
||||
public Long getMaterialId()
|
||||
{
|
||||
return materialId;
|
||||
}
|
||||
public void setProductBatch(String productBatch)
|
||||
{
|
||||
this.productBatch = productBatch;
|
||||
}
|
||||
|
||||
public String getProductBatch()
|
||||
{
|
||||
return productBatch;
|
||||
}
|
||||
public void setPlanCode(String planCode)
|
||||
{
|
||||
this.planCode = planCode;
|
||||
}
|
||||
|
||||
public String getPlanCode()
|
||||
{
|
||||
return planCode;
|
||||
}
|
||||
public void setApplyQty(BigDecimal applyQty)
|
||||
{
|
||||
this.applyQty = applyQty;
|
||||
}
|
||||
|
||||
public BigDecimal getApplyQty()
|
||||
{
|
||||
return applyQty;
|
||||
}
|
||||
public void setOutstockQty(BigDecimal outstockQty)
|
||||
{
|
||||
this.outstockQty = outstockQty;
|
||||
}
|
||||
|
||||
public BigDecimal getOutstockQty()
|
||||
{
|
||||
return outstockQty;
|
||||
}
|
||||
public void setInstockQty(BigDecimal instockQty)
|
||||
{
|
||||
this.instockQty = instockQty;
|
||||
}
|
||||
|
||||
public BigDecimal getInstockQty()
|
||||
{
|
||||
return instockQty;
|
||||
}
|
||||
public void setOperationType(String operationType)
|
||||
{
|
||||
this.operationType = operationType;
|
||||
}
|
||||
|
||||
public String getOperationType()
|
||||
{
|
||||
return operationType;
|
||||
}
|
||||
public void setTransferType(String transferType)
|
||||
{
|
||||
this.transferType = transferType;
|
||||
}
|
||||
|
||||
public String getTransferType()
|
||||
{
|
||||
return transferType;
|
||||
}
|
||||
public void setApplyReason(String applyReason)
|
||||
{
|
||||
this.applyReason = applyReason;
|
||||
}
|
||||
|
||||
public String getApplyReason()
|
||||
{
|
||||
return applyReason;
|
||||
}
|
||||
public void setAuditReason(String auditReason)
|
||||
{
|
||||
this.auditReason = auditReason;
|
||||
}
|
||||
|
||||
public String getAuditReason()
|
||||
{
|
||||
return auditReason;
|
||||
}
|
||||
public void setAuditStatus(String auditStatus)
|
||||
{
|
||||
this.auditStatus = auditStatus;
|
||||
}
|
||||
|
||||
public String getAuditStatus()
|
||||
{
|
||||
return auditStatus;
|
||||
}
|
||||
public void setExecuteStatus(String executeStatus)
|
||||
{
|
||||
this.executeStatus = executeStatus;
|
||||
}
|
||||
|
||||
public String getExecuteStatus()
|
||||
{
|
||||
return executeStatus;
|
||||
}
|
||||
public void setApplyBy(String applyBy)
|
||||
{
|
||||
this.applyBy = applyBy;
|
||||
}
|
||||
|
||||
public String getApplyBy()
|
||||
{
|
||||
return applyBy;
|
||||
}
|
||||
public void setApplyDate(Date applyDate)
|
||||
{
|
||||
this.applyDate = applyDate;
|
||||
}
|
||||
|
||||
public Date getApplyDate()
|
||||
{
|
||||
return applyDate;
|
||||
}
|
||||
public void setAuditBy(String auditBy)
|
||||
{
|
||||
this.auditBy = auditBy;
|
||||
}
|
||||
|
||||
public String getAuditBy()
|
||||
{
|
||||
return auditBy;
|
||||
}
|
||||
public void setAuditDate(Date auditDate)
|
||||
{
|
||||
this.auditDate = auditDate;
|
||||
}
|
||||
|
||||
public Date getAuditDate()
|
||||
{
|
||||
return auditDate;
|
||||
}
|
||||
public void setUpdateDate(Date updateDate)
|
||||
{
|
||||
this.updateDate = updateDate;
|
||||
}
|
||||
|
||||
public Date getUpdateDate()
|
||||
{
|
||||
return updateDate;
|
||||
}
|
||||
public void setBeginTime(Date beginTime)
|
||||
{
|
||||
this.beginTime = beginTime;
|
||||
}
|
||||
|
||||
public Date getBeginTime()
|
||||
{
|
||||
return beginTime;
|
||||
}
|
||||
public void setEndTime(Date endTime)
|
||||
{
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public Date getEndTime()
|
||||
{
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public List<WmsTransferDetail> getWmsTransferDetailList()
|
||||
{
|
||||
return wmsTransferDetailList;
|
||||
}
|
||||
|
||||
public void setWmsTransferDetailList(List<WmsTransferDetail> wmsTransferDetailList)
|
||||
{
|
||||
this.wmsTransferDetailList = wmsTransferDetailList;
|
||||
}
|
||||
|
||||
public String getOriWarehouseName() {
|
||||
return oriWarehouseName;
|
||||
}
|
||||
|
||||
public void setOriWarehouseName(String oriWarehouseName) {
|
||||
this.oriWarehouseName = oriWarehouseName;
|
||||
}
|
||||
|
||||
public String getTargetWarehouseName() {
|
||||
return targetWarehouseName;
|
||||
}
|
||||
|
||||
public void setTargetWarehouseName(String targetWarehouseName) {
|
||||
this.targetWarehouseName = targetWarehouseName;
|
||||
}
|
||||
|
||||
public String getMaterialCode() {
|
||||
return materialCode;
|
||||
}
|
||||
|
||||
public void setMaterialCode(String materialCode) {
|
||||
this.materialCode = materialCode;
|
||||
}
|
||||
|
||||
public String getMaterialName() {
|
||||
return materialName;
|
||||
}
|
||||
|
||||
public void setMaterialName(String materialName) {
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("transferId", getTransferId())
|
||||
.append("taskCode", getTaskCode())
|
||||
.append("oriWarehouseId", getOriWarehouseId())
|
||||
.append("oriLocationCode", getOriLocationCode())
|
||||
.append("targetWarehouseId", getTargetWarehouseId())
|
||||
.append("targetLocationCode", getTargetLocationCode())
|
||||
.append("materialId", getMaterialId())
|
||||
.append("productBatch", getProductBatch())
|
||||
.append("planCode", getPlanCode())
|
||||
.append("applyQty", getApplyQty())
|
||||
.append("outstockQty", getOutstockQty())
|
||||
.append("instockQty", getInstockQty())
|
||||
.append("operationType", getOperationType())
|
||||
.append("transferType", getTransferType())
|
||||
.append("applyReason", getApplyReason())
|
||||
.append("auditReason", getAuditReason())
|
||||
.append("auditStatus", getAuditStatus())
|
||||
.append("executeStatus", getExecuteStatus())
|
||||
.append("applyBy", getApplyBy())
|
||||
.append("applyDate", getApplyDate())
|
||||
.append("auditBy", getAuditBy())
|
||||
.append("auditDate", getAuditDate())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateDate", getUpdateDate())
|
||||
.append("beginTime", getBeginTime())
|
||||
.append("endTime", getEndTime())
|
||||
.append("wmsTransferDetailList", getWmsTransferDetailList())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.wms.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.wms.domain.WmsProductOutstockDetail;
|
||||
|
||||
/**
|
||||
* 成品出库记录明细Mapper接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-01-16
|
||||
*/
|
||||
public interface WmsProductOutstockDetailMapper
|
||||
{
|
||||
/**
|
||||
* 查询成品出库记录明细
|
||||
*
|
||||
* @param productOutstockDetailId 成品出库记录明细主键
|
||||
* @return 成品出库记录明细
|
||||
*/
|
||||
public WmsProductOutstockDetail selectWmsProductOutstockDetailByProductOutstockDetailId(Long productOutstockDetailId);
|
||||
|
||||
/**
|
||||
* 查询成品出库记录明细列表
|
||||
*
|
||||
* @param wmsProductOutstockDetail 成品出库记录明细
|
||||
* @return 成品出库记录明细集合
|
||||
*/
|
||||
public List<WmsProductOutstockDetail> selectWmsProductOutstockDetailList(WmsProductOutstockDetail wmsProductOutstockDetail);
|
||||
|
||||
/**
|
||||
* 新增成品出库记录明细
|
||||
*
|
||||
* @param wmsProductOutstockDetail 成品出库记录明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWmsProductOutstockDetail(WmsProductOutstockDetail wmsProductOutstockDetail);
|
||||
|
||||
/**
|
||||
* 修改成品出库记录明细
|
||||
*
|
||||
* @param wmsProductOutstockDetail 成品出库记录明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWmsProductOutstockDetail(WmsProductOutstockDetail wmsProductOutstockDetail);
|
||||
|
||||
/**
|
||||
* 删除成品出库记录明细
|
||||
*
|
||||
* @param productOutstockDetailId 成品出库记录明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWmsProductOutstockDetailByProductOutstockDetailId(Long productOutstockDetailId);
|
||||
|
||||
/**
|
||||
* 批量删除成品出库记录明细
|
||||
*
|
||||
* @param productOutstockDetailIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWmsProductOutstockDetailByProductOutstockDetailIds(Long[] productOutstockDetailIds);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.wms.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.wms.domain.WmsProductOutstockDetail;
|
||||
|
||||
/**
|
||||
* 成品出库记录明细Service接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-01-16
|
||||
*/
|
||||
public interface IWmsProductOutstockDetailService
|
||||
{
|
||||
/**
|
||||
* 查询成品出库记录明细
|
||||
*
|
||||
* @param productOutstockDetailId 成品出库记录明细主键
|
||||
* @return 成品出库记录明细
|
||||
*/
|
||||
public WmsProductOutstockDetail selectWmsProductOutstockDetailByProductOutstockDetailId(Long productOutstockDetailId);
|
||||
|
||||
/**
|
||||
* 查询成品出库记录明细列表
|
||||
*
|
||||
* @param wmsProductOutstockDetail 成品出库记录明细
|
||||
* @return 成品出库记录明细集合
|
||||
*/
|
||||
public List<WmsProductOutstockDetail> selectWmsProductOutstockDetailList(WmsProductOutstockDetail wmsProductOutstockDetail);
|
||||
|
||||
/**
|
||||
* 新增成品出库记录明细
|
||||
*
|
||||
* @param wmsProductOutstockDetail 成品出库记录明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWmsProductOutstockDetail(WmsProductOutstockDetail wmsProductOutstockDetail);
|
||||
|
||||
/**
|
||||
* 修改成品出库记录明细
|
||||
*
|
||||
* @param wmsProductOutstockDetail 成品出库记录明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWmsProductOutstockDetail(WmsProductOutstockDetail wmsProductOutstockDetail);
|
||||
|
||||
/**
|
||||
* 批量删除成品出库记录明细
|
||||
*
|
||||
* @param productOutstockDetailIds 需要删除的成品出库记录明细主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWmsProductOutstockDetailByProductOutstockDetailIds(Long[] productOutstockDetailIds);
|
||||
|
||||
/**
|
||||
* 删除成品出库记录明细信息
|
||||
*
|
||||
* @param productOutstockDetailId 成品出库记录明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWmsProductOutstockDetailByProductOutstockDetailId(Long productOutstockDetailId);
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
<?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.hw.wms.mapper.WmsProductOutstockDetailMapper">
|
||||
|
||||
<resultMap type="WmsProductOutstockDetail" id="WmsProductOutstockDetailResult">
|
||||
<result property="productOutstockDetailId" column="product_outstock_detail_id" />
|
||||
<result property="productOutstockId" column="product_outstock_id" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="locationCode" column="location_code" />
|
||||
<result property="productBarcode" column="product_barcode" />
|
||||
<result property="productBatch" column="product_batch" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="planAmount" column="plan_amount" />
|
||||
<result property="outstockAmount" column="outstock_amount" />
|
||||
<result property="executeStatus" column="execute_status" />
|
||||
<result property="erpStatus" column="erp_status" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateDate" column="update_date" />
|
||||
<result property="beginTime" column="begin_time" />
|
||||
<result property="endTime" column="end_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWmsProductOutstockDetailVo">
|
||||
select product_outstock_detail_id, product_outstock_id, warehouse_id, location_code, product_barcode, product_batch, product_id, plan_amount, outstock_amount, execute_status, erp_status, update_by, update_date, begin_time, end_time from wms_product_outstock_detail
|
||||
</sql>
|
||||
|
||||
<select id="selectWmsProductOutstockDetailList" parameterType="WmsProductOutstockDetail" resultMap="WmsProductOutstockDetailResult">
|
||||
<include refid="selectWmsProductOutstockDetailVo"/>
|
||||
<where>
|
||||
<if test="productOutstockId != null "> and product_outstock_id = #{productOutstockId}</if>
|
||||
<if test="warehouseId != null "> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if>
|
||||
<if test="productBarcode != null and productBarcode != ''"> and product_barcode = #{productBarcode}</if>
|
||||
<if test="productBatch != null and productBatch != ''"> and product_batch = #{productBatch}</if>
|
||||
<if test="productId != null "> and product_id = #{productId}</if>
|
||||
<if test="planAmount != null "> and plan_amount = #{planAmount}</if>
|
||||
<if test="outstockAmount != null "> and outstock_amount = #{outstockAmount}</if>
|
||||
<if test="executeStatus != null and executeStatus != ''"> and execute_status = #{executeStatus}</if>
|
||||
<if test="erpStatus != null and erpStatus != ''"> and erp_status = #{erpStatus}</if>
|
||||
<if test="updateDate != null "> and update_date = #{updateDate}</if>
|
||||
<if test="beginTime != null "> and begin_time = #{beginTime}</if>
|
||||
<if test="endTime != null "> and end_time = #{endTime}</if>
|
||||
</where>
|
||||
order by end_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectWmsProductOutstockDetailByProductOutstockDetailId" parameterType="Long" resultMap="WmsProductOutstockDetailResult">
|
||||
<include refid="selectWmsProductOutstockDetailVo"/>
|
||||
where product_outstock_detail_id = #{productOutstockDetailId}
|
||||
</select>
|
||||
|
||||
<insert id="insertWmsProductOutstockDetail" parameterType="WmsProductOutstockDetail" useGeneratedKeys="true" keyProperty="productOutstockDetailId">
|
||||
insert into wms_product_outstock_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="productOutstockId != null">product_outstock_id,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="locationCode != null and locationCode != ''">location_code,</if>
|
||||
<if test="productBarcode != null and productBarcode != ''">product_barcode,</if>
|
||||
<if test="productBatch != null">product_batch,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="planAmount != null">plan_amount,</if>
|
||||
<if test="outstockAmount != null">outstock_amount,</if>
|
||||
<if test="executeStatus != null and executeStatus != ''">execute_status,</if>
|
||||
<if test="erpStatus != null">erp_status,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateDate != null">update_date,</if>
|
||||
<if test="beginTime != null">begin_time,</if>
|
||||
<if test="endTime != null">end_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="productOutstockId != null">#{productOutstockId},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="locationCode != null and locationCode != ''">#{locationCode},</if>
|
||||
<if test="productBarcode != null and productBarcode != ''">#{productBarcode},</if>
|
||||
<if test="productBatch != null">#{productBatch},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="planAmount != null">#{planAmount},</if>
|
||||
<if test="outstockAmount != null">#{outstockAmount},</if>
|
||||
<if test="executeStatus != null and executeStatus != ''">#{executeStatus},</if>
|
||||
<if test="erpStatus != null">#{erpStatus},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateDate != null">#{updateDate},</if>
|
||||
<if test="beginTime != null">#{beginTime},</if>
|
||||
<if test="endTime != null">#{endTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWmsProductOutstockDetail" parameterType="WmsProductOutstockDetail">
|
||||
update wms_product_outstock_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="productOutstockId != null">product_outstock_id = #{productOutstockId},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="locationCode != null and locationCode != ''">location_code = #{locationCode},</if>
|
||||
<if test="productBarcode != null and productBarcode != ''">product_barcode = #{productBarcode},</if>
|
||||
<if test="productBatch != null">product_batch = #{productBatch},</if>
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="planAmount != null">plan_amount = #{planAmount},</if>
|
||||
<if test="outstockAmount != null">outstock_amount = #{outstockAmount},</if>
|
||||
<if test="executeStatus != null and executeStatus != ''">execute_status = #{executeStatus},</if>
|
||||
<if test="erpStatus != null">erp_status = #{erpStatus},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateDate != null">update_date = #{updateDate},</if>
|
||||
<if test="beginTime != null">begin_time = #{beginTime},</if>
|
||||
<if test="endTime != null">end_time = #{endTime},</if>
|
||||
</trim>
|
||||
where product_outstock_detail_id = #{productOutstockDetailId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWmsProductOutstockDetailByProductOutstockDetailId" parameterType="Long">
|
||||
delete from wms_product_outstock_detail where product_outstock_detail_id = #{productOutstockDetailId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWmsProductOutstockDetailByProductOutstockDetailIds" parameterType="String">
|
||||
delete from wms_product_outstock_detail where product_outstock_detail_id in
|
||||
<foreach item="productOutstockDetailId" collection="array" open="(" separator="," close=")">
|
||||
#{productOutstockDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,270 @@
|
||||
<?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.hw.wms.mapper.WmsTransferMapper">
|
||||
|
||||
<resultMap type="WmsTransfer" id="WmsTransferResult">
|
||||
<result property="transferId" column="transfer_id" />
|
||||
<result property="taskCode" column="task_code" />
|
||||
<result property="oriWarehouseId" column="ori_warehouse_id" />
|
||||
<result property="oriLocationCode" column="ori_location_code" />
|
||||
<result property="targetWarehouseId" column="target_warehouse_id" />
|
||||
<result property="targetLocationCode" column="target_location_code" />
|
||||
<result property="materialId" column="material_id" />
|
||||
<result property="productBatch" column="product_batch" />
|
||||
<result property="planCode" column="plan_code" />
|
||||
<result property="applyQty" column="apply_qty" />
|
||||
<result property="outstockQty" column="outstock_qty" />
|
||||
<result property="instockQty" column="instock_qty" />
|
||||
<result property="operationType" column="operation_type" />
|
||||
<result property="transferType" column="transfer_type" />
|
||||
<result property="applyReason" column="apply_reason" />
|
||||
<result property="auditReason" column="audit_reason" />
|
||||
<result property="auditStatus" column="audit_status" />
|
||||
<result property="executeStatus" column="execute_status" />
|
||||
<result property="applyBy" column="apply_by" />
|
||||
<result property="applyDate" column="apply_date" />
|
||||
<result property="auditBy" column="audit_by" />
|
||||
<result property="auditDate" column="audit_date" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateDate" column="update_date" />
|
||||
<result property="beginTime" column="begin_time" />
|
||||
<result property="endTime" column="end_time" />
|
||||
<result property="oriWarehouseName" column="ori_warehouse_name" />
|
||||
<result property="targetWarehouseName" column="target_warehouse_name" />
|
||||
<result property="materialCode" column="material_code" />
|
||||
<result property="materialName" column="material_name" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="WmsTransferWmsTransferDetailResult" type="WmsTransfer" extends="WmsTransferResult">
|
||||
<collection property="wmsTransferDetailList" notNullColumn="sub_transfer_detail_id" javaType="java.util.List" resultMap="WmsTransferDetailResult" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="WmsTransferDetail" id="WmsTransferDetailResult">
|
||||
<result property="transferDetailId" column="sub_transfer_detail_id" />
|
||||
<result property="transferId" column="sub_transfer_id" />
|
||||
<result property="locationCode" column="sub_location_code" />
|
||||
<result property="materialBarcode" column="sub_material_barcode" />
|
||||
<result property="instockBatch" column="sub_instock_batch" />
|
||||
<result property="materialId" column="sub_material_id" />
|
||||
<result property="planAmount" column="sub_plan_amount" />
|
||||
<result property="realAmount" column="sub_real_amount" />
|
||||
<result property="executeStatus" column="sub_execute_status" />
|
||||
<result property="executePerson" column="sub_execute_person" />
|
||||
<result property="executeTime" column="sub_execute_time" />
|
||||
<result property="transferDetailType" column="sub_transfer_detail_type" />
|
||||
<result property="machineName" column="sub_machine_name" />
|
||||
<result property="createBy" column="sub_create_by" />
|
||||
<result property="createDate" column="sub_create_date" />
|
||||
<result property="updateBy" column="sub_update_by" />
|
||||
<result property="updateDate" column="sub_update_date" />
|
||||
<result property="activeFlag" column="sub_active_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWmsTransferVo">
|
||||
select transfer_id, task_code, ori_warehouse_id, ori_location_code, target_warehouse_id, target_location_code, material_id, product_batch, plan_code, apply_qty, outstock_qty, instock_qty, operation_type, transfer_type, apply_reason, audit_reason, audit_status, execute_status, apply_by, apply_date, audit_by, audit_date, update_by, update_date, begin_time, end_time from wms_transfer
|
||||
</sql>
|
||||
|
||||
<select id="selectWmsTransferList" parameterType="WmsTransfer" resultMap="WmsTransferResult">
|
||||
<include refid="selectWmsTransferVo"/>
|
||||
<where>
|
||||
<if test="taskCode != null and taskCode != ''"> and task_code = #{taskCode}</if>
|
||||
<if test="oriWarehouseId != null "> and ori_warehouse_id = #{oriWarehouseId}</if>
|
||||
<if test="oriLocationCode != null and oriLocationCode != ''"> and ori_location_code = #{oriLocationCode}</if>
|
||||
<if test="targetWarehouseId != null "> and target_warehouse_id = #{targetWarehouseId}</if>
|
||||
<if test="targetLocationCode != null and targetLocationCode != ''"> and target_location_code = #{targetLocationCode}</if>
|
||||
<if test="materialId != null "> and material_id = #{materialId}</if>
|
||||
<if test="productBatch != null and productBatch != ''"> and product_batch = #{productBatch}</if>
|
||||
<if test="planCode != null and planCode != ''"> and plan_code = #{planCode}</if>
|
||||
<if test="applyQty != null "> and apply_qty = #{applyQty}</if>
|
||||
<if test="outstockQty != null "> and outstock_qty = #{outstockQty}</if>
|
||||
<if test="instockQty != null "> and instock_qty = #{instockQty}</if>
|
||||
<if test="operationType != null and operationType != ''"> and operation_type = #{operationType}</if>
|
||||
<if test="transferType != null and transferType != ''"> and transfer_type = #{transferType}</if>
|
||||
<if test="applyReason != null and applyReason != ''"> and apply_reason = #{applyReason}</if>
|
||||
<if test="auditReason != null and auditReason != ''"> and audit_reason = #{auditReason}</if>
|
||||
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if>
|
||||
<if test="executeStatus != null and executeStatus != '' and executeStatus != 'notFinish'"> and execute_status = #{executeStatus}</if>
|
||||
<if test="executeStatus != null and executeStatus != '' and executeStatus == 'notFinish'"> and (execute_status = '0' or execute_status = '1')</if>
|
||||
<if test="applyBy != null and applyBy != ''"> and apply_by = #{applyBy}</if>
|
||||
<if test="applyDate != null "> and apply_date = #{applyDate}</if>
|
||||
<if test="auditBy != null and auditBy != ''"> and audit_by = #{auditBy}</if>
|
||||
<if test="auditDate != null "> and audit_date = #{auditDate}</if>
|
||||
<if test="updateDate != null "> and update_date = #{updateDate}</if>
|
||||
<if test="beginTime != null "> and begin_time = #{beginTime}</if>
|
||||
<if test="endTime != null "> and end_time = #{endTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWmsTransferByTransferId" parameterType="Long" resultMap="WmsTransferWmsTransferDetailResult">
|
||||
select a.transfer_id, a.task_code, a.ori_warehouse_id, a.ori_location_code, a.target_warehouse_id, a.target_location_code, a.material_id, a.product_batch, a.plan_code, a.apply_qty, a.outstock_qty, a.instock_qty, a.operation_type, a.transfer_type, a.apply_reason, a.audit_reason, a.audit_status, a.execute_status, a.apply_by, a.apply_date, a.audit_by, a.audit_date, a.update_by, a.update_date, a.begin_time, a.end_time,
|
||||
b.transfer_detail_id as sub_transfer_detail_id, b.transfer_id as sub_transfer_id, b.location_code as sub_location_code, b.material_barcode as sub_material_barcode, b.instock_batch as sub_instock_batch, b.material_id as sub_material_id, b.plan_amount as sub_plan_amount, b.real_amount as sub_real_amount, b.execute_status as sub_execute_status, b.execute_person as sub_execute_person, b.execute_time as sub_execute_time, b.transfer_detail_type as sub_transfer_detail_type, b.machine_name as sub_machine_name, b.create_by as sub_create_by, b.create_date as sub_create_date, b.update_by as sub_update_by, b.update_date as sub_update_date, b.active_flag as sub_active_flag
|
||||
from wms_transfer a
|
||||
left join wms_transfer_detail b on b.transfer_id = a.transfer_id
|
||||
where a.transfer_id = #{transferId}
|
||||
</select>
|
||||
|
||||
<insert id="insertWmsTransfer" parameterType="WmsTransfer" useGeneratedKeys="true" keyProperty="transferId">
|
||||
insert into wms_transfer
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="taskCode != null">task_code,</if>
|
||||
<if test="oriWarehouseId != null">ori_warehouse_id,</if>
|
||||
<if test="oriLocationCode != null and oriLocationCode != ''">ori_location_code,</if>
|
||||
<if test="targetWarehouseId != null">target_warehouse_id,</if>
|
||||
<if test="targetLocationCode != null">target_location_code,</if>
|
||||
<if test="materialId != null">material_id,</if>
|
||||
<if test="productBatch != null and productBatch != ''">product_batch,</if>
|
||||
<if test="planCode != null and planCode != ''">plan_code,</if>
|
||||
<if test="applyQty != null">apply_qty,</if>
|
||||
<if test="outstockQty != null">outstock_qty,</if>
|
||||
<if test="instockQty != null">instock_qty,</if>
|
||||
<if test="operationType != null and operationType != ''">operation_type,</if>
|
||||
<if test="transferType != null and transferType != ''">transfer_type,</if>
|
||||
<if test="applyReason != null">apply_reason,</if>
|
||||
<if test="auditReason != null">audit_reason,</if>
|
||||
<if test="auditStatus != null and auditStatus != ''">audit_status,</if>
|
||||
<if test="executeStatus != null and executeStatus != ''">execute_status,</if>
|
||||
<if test="applyBy != null">apply_by,</if>
|
||||
<if test="applyDate != null">apply_date,</if>
|
||||
<if test="auditBy != null">audit_by,</if>
|
||||
<if test="auditDate != null">audit_date,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateDate != null">update_date,</if>
|
||||
<if test="beginTime != null">begin_time,</if>
|
||||
<if test="endTime != null">end_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="taskCode != null">#{taskCode},</if>
|
||||
<if test="oriWarehouseId != null">#{oriWarehouseId},</if>
|
||||
<if test="oriLocationCode != null and oriLocationCode != ''">#{oriLocationCode},</if>
|
||||
<if test="targetWarehouseId != null">#{targetWarehouseId},</if>
|
||||
<if test="targetLocationCode != null">#{targetLocationCode},</if>
|
||||
<if test="materialId != null">#{materialId},</if>
|
||||
<if test="productBatch != null and productBatch != ''">#{productBatch},</if>
|
||||
<if test="planCode != null and planCode != ''">#{planCode},</if>
|
||||
<if test="applyQty != null">#{applyQty},</if>
|
||||
<if test="outstockQty != null">#{outstockQty},</if>
|
||||
<if test="instockQty != null">#{instockQty},</if>
|
||||
<if test="operationType != null and operationType != ''">#{operationType},</if>
|
||||
<if test="transferType != null and transferType != ''">#{transferType},</if>
|
||||
<if test="applyReason != null">#{applyReason},</if>
|
||||
<if test="auditReason != null">#{auditReason},</if>
|
||||
<if test="auditStatus != null and auditStatus != ''">#{auditStatus},</if>
|
||||
<if test="executeStatus != null and executeStatus != ''">#{executeStatus},</if>
|
||||
<if test="applyBy != null">#{applyBy},</if>
|
||||
<if test="applyDate != null">#{applyDate},</if>
|
||||
<if test="auditBy != null">#{auditBy},</if>
|
||||
<if test="auditDate != null">#{auditDate},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateDate != null">#{updateDate},</if>
|
||||
<if test="beginTime != null">#{beginTime},</if>
|
||||
<if test="endTime != null">#{endTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWmsTransfer" parameterType="WmsTransfer">
|
||||
update wms_transfer
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="taskCode != null">task_code = #{taskCode},</if>
|
||||
<if test="oriWarehouseId != null">ori_warehouse_id = #{oriWarehouseId},</if>
|
||||
<if test="oriLocationCode != null and oriLocationCode != ''">ori_location_code = #{oriLocationCode},</if>
|
||||
<if test="targetWarehouseId != null">target_warehouse_id = #{targetWarehouseId},</if>
|
||||
<if test="targetLocationCode != null">target_location_code = #{targetLocationCode},</if>
|
||||
<if test="materialId != null">material_id = #{materialId},</if>
|
||||
<if test="productBatch != null and productBatch != ''">product_batch = #{productBatch},</if>
|
||||
<if test="planCode != null and planCode != ''">plan_code = #{planCode},</if>
|
||||
<if test="applyQty != null">apply_qty = #{applyQty},</if>
|
||||
<if test="outstockQty != null">outstock_qty = #{outstockQty},</if>
|
||||
<if test="instockQty != null">instock_qty = #{instockQty},</if>
|
||||
<if test="operationType != null and operationType != ''">operation_type = #{operationType},</if>
|
||||
<if test="transferType != null and transferType != ''">transfer_type = #{transferType},</if>
|
||||
<if test="applyReason != null">apply_reason = #{applyReason},</if>
|
||||
<if test="auditReason != null">audit_reason = #{auditReason},</if>
|
||||
<if test="auditStatus != null and auditStatus != ''">audit_status = #{auditStatus},</if>
|
||||
<if test="executeStatus != null and executeStatus != ''">execute_status = #{executeStatus},</if>
|
||||
<if test="applyBy != null">apply_by = #{applyBy},</if>
|
||||
<if test="applyDate != null">apply_date = #{applyDate},</if>
|
||||
<if test="auditBy != null">audit_by = #{auditBy},</if>
|
||||
<if test="auditDate != null">audit_date = #{auditDate},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateDate != null">update_date = #{updateDate},</if>
|
||||
<if test="beginTime != null">begin_time = #{beginTime},</if>
|
||||
<if test="endTime != null">end_time = #{endTime},</if>
|
||||
</trim>
|
||||
where transfer_id = #{transferId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWmsTransferByTransferId" parameterType="Long">
|
||||
delete from wms_transfer where transfer_id = #{transferId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWmsTransferByTransferIds" parameterType="String">
|
||||
delete from wms_transfer where transfer_id in
|
||||
<foreach item="transferId" collection="array" open="(" separator="," close=")">
|
||||
#{transferId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWmsTransferDetailByTransferIds" parameterType="String">
|
||||
delete from wms_transfer_detail where transfer_id in
|
||||
<foreach item="transferId" collection="array" open="(" separator="," close=")">
|
||||
#{transferId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWmsTransferDetailByTransferId" parameterType="Long">
|
||||
delete from wms_transfer_detail where transfer_id = #{transferId}
|
||||
</delete>
|
||||
|
||||
<insert id="batchWmsTransferDetail">
|
||||
insert into wms_transfer_detail( transfer_detail_id, transfer_id, location_code, material_barcode, instock_batch, material_id, plan_amount, real_amount, execute_status, execute_person, execute_time, transfer_detail_type, machine_name, create_by, create_date, update_by, update_date, active_flag) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.transferDetailId}, #{item.transferId}, #{item.locationCode}, #{item.materialBarcode}, #{item.instockBatch}, #{item.materialId}, #{item.planAmount}, #{item.realAmount}, #{item.executeStatus}, #{item.executePerson}, #{item.executeTime}, #{item.transferDetailType}, #{item.machineName}, #{item.createBy}, #{item.createDate}, #{item.updateBy}, #{item.updateDate}, #{item.activeFlag})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="selectWmsTransferJoinList" parameterType="WmsTransfer" resultMap="WmsTransferResult">
|
||||
select wt.transfer_id, wt.task_code, wt.ori_warehouse_id, wt.ori_location_code, wt.target_warehouse_id, wt.target_location_code, wt.material_id, wt.product_batch,
|
||||
wt.plan_code, wt.apply_qty, wt.outstock_qty, wt.instock_qty, wt.operation_type, wt.transfer_type,
|
||||
wt.audit_status, wt.execute_status, wt.apply_by, wt.apply_date,
|
||||
wbw.warehouse_name ori_warehouse_name,wbw2.warehouse_name target_warehouse_name,mbmi.material_code,mbmi.material_name
|
||||
from wms_transfer wt
|
||||
left join wms_base_warehouse wbw on wbw.warehouse_id = wt.ori_warehouse_id
|
||||
left join wms_base_warehouse wbw2 on wbw2.warehouse_id = wt.target_warehouse_id
|
||||
left join mes_base_material_info mbmi on mbmi.material_id=wt.material_id
|
||||
<where>
|
||||
<if test="taskCode != null and taskCode != ''"> and wt.task_code = #{taskCode}</if>
|
||||
<if test="oriWarehouseId != null "> and wt.ori_warehouse_id = #{oriWarehouseId}</if>
|
||||
<if test="oriLocationCode != null and oriLocationCode != ''"> and wt.ori_location_code = #{oriLocationCode}</if>
|
||||
<if test="targetWarehouseId != null "> and wt.target_warehouse_id = #{targetWarehouseId}</if>
|
||||
<if test="targetLocationCode != null and targetLocationCode != ''"> and wt.target_location_code = #{targetLocationCode}</if>
|
||||
<if test="materialId != null "> and wt.material_id = #{materialId}</if>
|
||||
<if test="productBatch != null and productBatch != ''"> and wt.product_batch = #{productBatch}</if>
|
||||
<if test="planCode != null and planCode != ''"> and wt.plan_code = #{planCode}</if>
|
||||
<if test="applyQty != null "> and wt.apply_qty = #{applyQty}</if>
|
||||
<if test="outstockQty != null "> and wt.outstock_qty = #{outstockQty}</if>
|
||||
<if test="instockQty != null "> and wt.instock_qty = #{instockQty}</if>
|
||||
<if test="operationType != null and operationType != ''"> and wt.operation_type = #{operationType}</if>
|
||||
<if test="transferType != null and transferType != ''"> and wt.transfer_type = #{transferType}</if>
|
||||
<if test="auditStatus != null and auditStatus != ''"> and wt.audit_status = #{auditStatus}</if>
|
||||
<if test="executeStatus != null and executeStatus != '' and executeStatus != 'notFinish'"> and wt.execute_status = #{executeStatus}</if>
|
||||
<if test="executeStatus != null and executeStatus != '' and executeStatus = 'notFinish'"> and (wt.execute_status = '0' or wt.execute_status = '1')</if>
|
||||
<if test="applyBy != null and applyBy != ''"> and wt.apply_by = #{applyBy}</if>
|
||||
<if test="applyDate != null "> and wt.apply_date = #{applyDate}</if>
|
||||
<if test="auditBy != null and auditBy != ''"> and wt.audit_by = #{auditBy}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue