parent
241eea0010
commit
d145ba3b34
@ -0,0 +1,46 @@
|
|||||||
|
package com.hw.wms.domain.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 转库记录对象VO
|
||||||
|
* @ClassName: WmsProductTransferVo
|
||||||
|
* @Author : xins
|
||||||
|
* @Date :2024-01-15 8:51
|
||||||
|
* @Version :1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WmsProductTransferVo {
|
||||||
|
|
||||||
|
//原仓库ID
|
||||||
|
@NotNull(message="原仓库必须输入")
|
||||||
|
private Long oriWarehouseId;
|
||||||
|
|
||||||
|
//目标仓库ID
|
||||||
|
@NotNull(message="目标仓库ID必须输入")
|
||||||
|
private Long targetWarehouseId;
|
||||||
|
|
||||||
|
//原库位编号
|
||||||
|
@NotBlank(message="原库位编号必须输入")
|
||||||
|
private String oriLocationCode;
|
||||||
|
|
||||||
|
//产品ID
|
||||||
|
@NotNull(message="成品ID必须输入")
|
||||||
|
private Long productId;
|
||||||
|
|
||||||
|
//产品批次
|
||||||
|
@NotBlank(message="产品批次必须输入")
|
||||||
|
private String productBatch;
|
||||||
|
|
||||||
|
//生产计划Code
|
||||||
|
@NotBlank(message="生产计划编号必须输入")
|
||||||
|
private String planCode;
|
||||||
|
|
||||||
|
private BigDecimal applyCount;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.hw.wms.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.hw.wms.domain.WmsTransferDetail;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 转库记录明细Mapper接口
|
||||||
|
*
|
||||||
|
* @author xins
|
||||||
|
* @date 2024-01-15
|
||||||
|
*/
|
||||||
|
public interface WmsTransferDetailMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询转库记录明细
|
||||||
|
*
|
||||||
|
* @param transferDetailId 转库记录明细主键
|
||||||
|
* @return 转库记录明细
|
||||||
|
*/
|
||||||
|
public WmsTransferDetail selectWmsTransferDetailByTransferDetailId(Long transferDetailId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询转库记录明细列表
|
||||||
|
*
|
||||||
|
* @param wmsTransferDetail 转库记录明细
|
||||||
|
* @return 转库记录明细集合
|
||||||
|
*/
|
||||||
|
public List<WmsTransferDetail> selectWmsTransferDetailList(WmsTransferDetail wmsTransferDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增转库记录明细
|
||||||
|
*
|
||||||
|
* @param wmsTransferDetail 转库记录明细
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertWmsTransferDetail(WmsTransferDetail wmsTransferDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改转库记录明细
|
||||||
|
*
|
||||||
|
* @param wmsTransferDetail 转库记录明细
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateWmsTransferDetail(WmsTransferDetail wmsTransferDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除转库记录明细
|
||||||
|
*
|
||||||
|
* @param transferDetailId 转库记录明细主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmsTransferDetailByTransferDetailId(Long transferDetailId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除转库记录明细
|
||||||
|
*
|
||||||
|
* @param transferDetailIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmsTransferDetailByTransferDetailIds(Long[] transferDetailIds);
|
||||||
|
}
|
@ -0,0 +1,134 @@
|
|||||||
|
<?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.WmsTransferDetailMapper">
|
||||||
|
|
||||||
|
<resultMap type="WmsTransferDetail" id="WmsTransferDetailResult">
|
||||||
|
<result property="transferDetailId" column="transfer_detail_id" />
|
||||||
|
<result property="transferId" column="transfer_id" />
|
||||||
|
<result property="locationCode" column="location_code" />
|
||||||
|
<result property="materialBarcode" column="material_barcode" />
|
||||||
|
<result property="instockBatch" column="instock_batch" />
|
||||||
|
<result property="materialId" column="material_id" />
|
||||||
|
<result property="planAmount" column="plan_amount" />
|
||||||
|
<result property="realAmount" column="real_amount" />
|
||||||
|
<result property="executeStatus" column="execute_status" />
|
||||||
|
<result property="executePerson" column="execute_person" />
|
||||||
|
<result property="executeTime" column="execute_time" />
|
||||||
|
<result property="transferDetailType" column="transfer_detail_type" />
|
||||||
|
<result property="machineName" column="machine_name" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createDate" column="create_date" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateDate" column="update_date" />
|
||||||
|
<result property="activeFlag" column="active_flag" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectWmsTransferDetailVo">
|
||||||
|
select 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 from wms_transfer_detail
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectWmsTransferDetailList" parameterType="WmsTransferDetail" resultMap="WmsTransferDetailResult">
|
||||||
|
<include refid="selectWmsTransferDetailVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="transferId != null "> and transfer_id = #{transferId}</if>
|
||||||
|
<if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if>
|
||||||
|
<if test="materialBarcode != null and materialBarcode != ''"> and material_barcode = #{materialBarcode}</if>
|
||||||
|
<if test="instockBatch != null and instockBatch != ''"> and instock_batch = #{instockBatch}</if>
|
||||||
|
<if test="materialId != null "> and material_id = #{materialId}</if>
|
||||||
|
<if test="planAmount != null "> and plan_amount = #{planAmount}</if>
|
||||||
|
<if test="realAmount != null "> and real_amount = #{realAmount}</if>
|
||||||
|
<if test="executeStatus != null and executeStatus != ''"> and execute_status = #{executeStatus}</if>
|
||||||
|
<if test="executePerson != null and executePerson != ''"> and execute_person = #{executePerson}</if>
|
||||||
|
<if test="executeTime != null "> and execute_time = #{executeTime}</if>
|
||||||
|
<if test="transferDetailType != null and transferDetailType != ''"> and transfer_detail_type = #{transferDetailType}</if>
|
||||||
|
<if test="machineName != null and machineName != ''"> and machine_name like concat('%', #{machineName}, '%')</if>
|
||||||
|
<if test="createDate != null "> and create_date = #{createDate}</if>
|
||||||
|
<if test="updateDate != null "> and update_date = #{updateDate}</if>
|
||||||
|
<if test="activeFlag != null and activeFlag != ''"> and active_flag = #{activeFlag}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectWmsTransferDetailByTransferDetailId" parameterType="Long" resultMap="WmsTransferDetailResult">
|
||||||
|
<include refid="selectWmsTransferDetailVo"/>
|
||||||
|
where transfer_detail_id = #{transferDetailId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertWmsTransferDetail" parameterType="WmsTransferDetail" useGeneratedKeys="true" keyProperty="transferDetailId">
|
||||||
|
insert into wms_transfer_detail
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="transferId != null">transfer_id,</if>
|
||||||
|
<if test="locationCode != null and locationCode != ''">location_code,</if>
|
||||||
|
<if test="materialBarcode != null and materialBarcode != ''">material_barcode,</if>
|
||||||
|
<if test="instockBatch != null">instock_batch,</if>
|
||||||
|
<if test="materialId != null">material_id,</if>
|
||||||
|
<if test="planAmount != null">plan_amount,</if>
|
||||||
|
<if test="realAmount != null">real_amount,</if>
|
||||||
|
<if test="executeStatus != null and executeStatus != ''">execute_status,</if>
|
||||||
|
<if test="executePerson != null">execute_person,</if>
|
||||||
|
<if test="executeTime != null">execute_time,</if>
|
||||||
|
<if test="transferDetailType != null and transferDetailType != ''">transfer_detail_type,</if>
|
||||||
|
<if test="machineName != null">machine_name,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createDate != null">create_date,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateDate != null">update_date,</if>
|
||||||
|
<if test="activeFlag != null">active_flag,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="transferId != null">#{transferId},</if>
|
||||||
|
<if test="locationCode != null and locationCode != ''">#{locationCode},</if>
|
||||||
|
<if test="materialBarcode != null and materialBarcode != ''">#{materialBarcode},</if>
|
||||||
|
<if test="instockBatch != null">#{instockBatch},</if>
|
||||||
|
<if test="materialId != null">#{materialId},</if>
|
||||||
|
<if test="planAmount != null">#{planAmount},</if>
|
||||||
|
<if test="realAmount != null">#{realAmount},</if>
|
||||||
|
<if test="executeStatus != null and executeStatus != ''">#{executeStatus},</if>
|
||||||
|
<if test="executePerson != null">#{executePerson},</if>
|
||||||
|
<if test="executeTime != null">#{executeTime},</if>
|
||||||
|
<if test="transferDetailType != null and transferDetailType != ''">#{transferDetailType},</if>
|
||||||
|
<if test="machineName != null">#{machineName},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createDate != null">#{createDate},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateDate != null">#{updateDate},</if>
|
||||||
|
<if test="activeFlag != null">#{activeFlag},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateWmsTransferDetail" parameterType="WmsTransferDetail">
|
||||||
|
update wms_transfer_detail
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="transferId != null">transfer_id = #{transferId},</if>
|
||||||
|
<if test="locationCode != null and locationCode != ''">location_code = #{locationCode},</if>
|
||||||
|
<if test="materialBarcode != null and materialBarcode != ''">material_barcode = #{materialBarcode},</if>
|
||||||
|
<if test="instockBatch != null">instock_batch = #{instockBatch},</if>
|
||||||
|
<if test="materialId != null">material_id = #{materialId},</if>
|
||||||
|
<if test="planAmount != null">plan_amount = #{planAmount},</if>
|
||||||
|
<if test="realAmount != null">real_amount = #{realAmount},</if>
|
||||||
|
<if test="executeStatus != null and executeStatus != ''">execute_status = #{executeStatus},</if>
|
||||||
|
<if test="executePerson != null">execute_person = #{executePerson},</if>
|
||||||
|
<if test="executeTime != null">execute_time = #{executeTime},</if>
|
||||||
|
<if test="transferDetailType != null and transferDetailType != ''">transfer_detail_type = #{transferDetailType},</if>
|
||||||
|
<if test="machineName != null">machine_name = #{machineName},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createDate != null">create_date = #{createDate},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateDate != null">update_date = #{updateDate},</if>
|
||||||
|
<if test="activeFlag != null">active_flag = #{activeFlag},</if>
|
||||||
|
</trim>
|
||||||
|
where transfer_detail_id = #{transferDetailId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteWmsTransferDetailByTransferDetailId" parameterType="Long">
|
||||||
|
delete from wms_transfer_detail where transfer_detail_id = #{transferDetailId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteWmsTransferDetailByTransferDetailIds" parameterType="String">
|
||||||
|
delete from wms_transfer_detail where transfer_detail_id in
|
||||||
|
<foreach item="transferDetailId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{transferDetailId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue