parent
05467aed61
commit
f714ca4bad
@ -0,0 +1,94 @@
|
||||
package com.hw.mes.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 生产计划明细校验信息详情对象 mes_material_check_result_detail
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-04-07
|
||||
*/
|
||||
public class MesMaterialCheckResultDetail extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键标识 */
|
||||
private Long checkResultDetailId;
|
||||
|
||||
/** 生产计划明细校验信息ID */
|
||||
@Excel(name = "生产计划明细校验信息ID")
|
||||
private Long materialCheckResultId;
|
||||
|
||||
/** 物料条码 */
|
||||
@Excel(name = "物料条码")
|
||||
private String materialBarcode;
|
||||
|
||||
/** 批次码 */
|
||||
@Excel(name = "批次码")
|
||||
private String batchCode;
|
||||
|
||||
/** 检验数量 */
|
||||
@Excel(name = "检验数量")
|
||||
private BigDecimal checkAmount;
|
||||
|
||||
public void setCheckResultDetailId(Long checkResultDetailId)
|
||||
{
|
||||
this.checkResultDetailId = checkResultDetailId;
|
||||
}
|
||||
|
||||
public Long getCheckResultDetailId()
|
||||
{
|
||||
return checkResultDetailId;
|
||||
}
|
||||
public void setMaterialCheckResultId(Long materialCheckResultId)
|
||||
{
|
||||
this.materialCheckResultId = materialCheckResultId;
|
||||
}
|
||||
|
||||
public Long getMaterialCheckResultId()
|
||||
{
|
||||
return materialCheckResultId;
|
||||
}
|
||||
public void setMaterialBarcode(String materialBarcode)
|
||||
{
|
||||
this.materialBarcode = materialBarcode;
|
||||
}
|
||||
|
||||
public String getMaterialBarcode()
|
||||
{
|
||||
return materialBarcode;
|
||||
}
|
||||
public void setBatchCode(String batchCode)
|
||||
{
|
||||
this.batchCode = batchCode;
|
||||
}
|
||||
|
||||
public String getBatchCode()
|
||||
{
|
||||
return batchCode;
|
||||
}
|
||||
public void setCheckAmount(BigDecimal checkAmount)
|
||||
{
|
||||
this.checkAmount = checkAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getCheckAmount()
|
||||
{
|
||||
return checkAmount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("checkResultDetailId", getCheckResultDetailId())
|
||||
.append("materialCheckResultId", getMaterialCheckResultId())
|
||||
.append("materialBarcode", getMaterialBarcode())
|
||||
.append("batchCode", getBatchCode())
|
||||
.append("checkAmount", getCheckAmount())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.hw.mes.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @Description: 物料扫描确认VO对象
|
||||
* @ClassName: MesMaterialScanVo
|
||||
* @Author : xins
|
||||
* @Date :2024-04-07 10:17
|
||||
* @Version :1.0
|
||||
*/
|
||||
@Data
|
||||
public class MesMaterialScanVo {
|
||||
|
||||
//生产计划ID
|
||||
@NotNull(message = "生产计划ID必须输入")
|
||||
private Long planId;
|
||||
|
||||
//生产计划明细ID
|
||||
@NotNull(message = "生产计划明细ID必须输入")
|
||||
private Long planDetailId;
|
||||
|
||||
|
||||
//物料条码
|
||||
@NotBlank(message = "物料条码必须输入")
|
||||
private String materialBarcode;
|
||||
|
||||
//数量
|
||||
@NotNull(message = "数量必须输入")
|
||||
private BigDecimal checkAmount;
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.mes.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.mes.domain.MesMaterialCheckResultDetail;
|
||||
|
||||
/**
|
||||
* 生产计划明细校验信息详情Mapper接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-04-07
|
||||
*/
|
||||
public interface MesMaterialCheckResultDetailMapper
|
||||
{
|
||||
/**
|
||||
* 查询生产计划明细校验信息详情
|
||||
*
|
||||
* @param checkResultDetailId 生产计划明细校验信息详情主键
|
||||
* @return 生产计划明细校验信息详情
|
||||
*/
|
||||
public MesMaterialCheckResultDetail selectMesMaterialCheckResultDetailByCheckResultDetailId(Long checkResultDetailId);
|
||||
|
||||
/**
|
||||
* 查询生产计划明细校验信息详情列表
|
||||
*
|
||||
* @param mesMaterialCheckResultDetail 生产计划明细校验信息详情
|
||||
* @return 生产计划明细校验信息详情集合
|
||||
*/
|
||||
public List<MesMaterialCheckResultDetail> selectMesMaterialCheckResultDetailList(MesMaterialCheckResultDetail mesMaterialCheckResultDetail);
|
||||
|
||||
/**
|
||||
* 新增生产计划明细校验信息详情
|
||||
*
|
||||
* @param mesMaterialCheckResultDetail 生产计划明细校验信息详情
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesMaterialCheckResultDetail(MesMaterialCheckResultDetail mesMaterialCheckResultDetail);
|
||||
|
||||
/**
|
||||
* 修改生产计划明细校验信息详情
|
||||
*
|
||||
* @param mesMaterialCheckResultDetail 生产计划明细校验信息详情
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesMaterialCheckResultDetail(MesMaterialCheckResultDetail mesMaterialCheckResultDetail);
|
||||
|
||||
/**
|
||||
* 删除生产计划明细校验信息详情
|
||||
*
|
||||
* @param checkResultDetailId 生产计划明细校验信息详情主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesMaterialCheckResultDetailByCheckResultDetailId(Long checkResultDetailId);
|
||||
|
||||
/**
|
||||
* 批量删除生产计划明细校验信息详情
|
||||
*
|
||||
* @param checkResultDetailIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesMaterialCheckResultDetailByCheckResultDetailIds(Long[] checkResultDetailIds);
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
<?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.mes.mapper.MesMaterialCheckResultDetailMapper">
|
||||
|
||||
<resultMap type="MesMaterialCheckResultDetail" id="MesMaterialCheckResultDetailResult">
|
||||
<result property="checkResultDetailId" column="check_result_detail_id" />
|
||||
<result property="materialCheckResultId" column="material_check_result_id" />
|
||||
<result property="materialBarcode" column="material_barcode" />
|
||||
<result property="batchCode" column="batch_code" />
|
||||
<result property="checkAmount" column="check_amount" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMesMaterialCheckResultDetailVo">
|
||||
select check_result_detail_id, material_check_result_id, material_barcode, batch_code, check_amount from mes_material_check_result_detail
|
||||
</sql>
|
||||
|
||||
<select id="selectMesMaterialCheckResultDetailList" parameterType="MesMaterialCheckResultDetail" resultMap="MesMaterialCheckResultDetailResult">
|
||||
<include refid="selectMesMaterialCheckResultDetailVo"/>
|
||||
<where>
|
||||
<if test="materialCheckResultId != null "> and material_check_result_id = #{materialCheckResultId}</if>
|
||||
<if test="materialBarcode != null and materialBarcode != ''"> and material_barcode = #{materialBarcode}</if>
|
||||
<if test="batchCode != null and batchCode != ''"> and batch_code = #{batchCode}</if>
|
||||
<if test="checkAmount != null "> and check_amount = #{checkAmount}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMesMaterialCheckResultDetailByCheckResultDetailId" parameterType="Long" resultMap="MesMaterialCheckResultDetailResult">
|
||||
<include refid="selectMesMaterialCheckResultDetailVo"/>
|
||||
where check_result_detail_id = #{checkResultDetailId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMesMaterialCheckResultDetail" parameterType="MesMaterialCheckResultDetail" useGeneratedKeys="true" keyProperty="checkResultDetailId">
|
||||
insert into mes_material_check_result_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="materialCheckResultId != null">material_check_result_id,</if>
|
||||
<if test="materialBarcode != null and materialBarcode != ''">material_barcode,</if>
|
||||
<if test="batchCode != null and batchCode != ''">batch_code,</if>
|
||||
<if test="checkAmount != null">check_amount,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="materialCheckResultId != null">#{materialCheckResultId},</if>
|
||||
<if test="materialBarcode != null and materialBarcode != ''">#{materialBarcode},</if>
|
||||
<if test="batchCode != null and batchCode != ''">#{batchCode},</if>
|
||||
<if test="checkAmount != null">#{checkAmount},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMesMaterialCheckResultDetail" parameterType="MesMaterialCheckResultDetail">
|
||||
update mes_material_check_result_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="materialCheckResultId != null">material_check_result_id = #{materialCheckResultId},</if>
|
||||
<if test="materialBarcode != null and materialBarcode != ''">material_barcode = #{materialBarcode},</if>
|
||||
<if test="batchCode != null and batchCode != ''">batch_code = #{batchCode},</if>
|
||||
<if test="checkAmount != null">check_amount = #{checkAmount},</if>
|
||||
</trim>
|
||||
where check_result_detail_id = #{checkResultDetailId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMesMaterialCheckResultDetailByCheckResultDetailId" parameterType="Long">
|
||||
delete from mes_material_check_result_detail where check_result_detail_id = #{checkResultDetailId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesMaterialCheckResultDetailByCheckResultDetailIds" parameterType="String">
|
||||
delete from mes_material_check_result_detail where check_result_detail_id in
|
||||
<foreach item="checkResultDetailId" collection="array" open="(" separator="," close=")">
|
||||
#{checkResultDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue