20240719
parent
bb7f8e4577
commit
ffa8736820
@ -0,0 +1,131 @@
|
||||
package com.ruoyi.nanjing.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 条码打印记录对象 base_Barcode_PrintInfo
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-05-24
|
||||
*/
|
||||
public class BaseBarcodePrintinfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "编号")
|
||||
private String ID;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "产品条码")
|
||||
private String ProductBarcode;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "序列号")
|
||||
private String SerialNo;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "是否补码")
|
||||
private Long IsRestart;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "产品型号")
|
||||
private Long ProductID;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "班次")
|
||||
private String ShiftID;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "记录时间")
|
||||
private Date InsertTime;
|
||||
public TBdProductinfo gettBdProductinfo() {
|
||||
return tBdProductinfo;
|
||||
}
|
||||
|
||||
public void settBdProductinfo(TBdProductinfo tBdProductinfo) {
|
||||
this.tBdProductinfo = tBdProductinfo;
|
||||
}
|
||||
private TBdProductinfo tBdProductinfo;
|
||||
public void setID(String ID)
|
||||
{
|
||||
this.ID = ID;
|
||||
}
|
||||
|
||||
public String getID()
|
||||
{
|
||||
return ID;
|
||||
}
|
||||
public void setProductBarcode(String ProductBarcode)
|
||||
{
|
||||
this.ProductBarcode = ProductBarcode;
|
||||
}
|
||||
|
||||
public String getProductBarcode()
|
||||
{
|
||||
return ProductBarcode;
|
||||
}
|
||||
public void setSerialNo(String SerialNo)
|
||||
{
|
||||
this.SerialNo = SerialNo;
|
||||
}
|
||||
|
||||
public String getSerialNo()
|
||||
{
|
||||
return SerialNo;
|
||||
}
|
||||
public void setIsRestart(Long IsRestart)
|
||||
{
|
||||
this.IsRestart = IsRestart;
|
||||
}
|
||||
|
||||
public Long getIsRestart()
|
||||
{
|
||||
return IsRestart;
|
||||
}
|
||||
public void setProductID(Long ProductID)
|
||||
{
|
||||
this.ProductID = ProductID;
|
||||
}
|
||||
|
||||
public Long getProductID()
|
||||
{
|
||||
return ProductID;
|
||||
}
|
||||
public void setShiftID(String ShiftID)
|
||||
{
|
||||
this.ShiftID = ShiftID;
|
||||
}
|
||||
|
||||
public String getShiftID()
|
||||
{
|
||||
return ShiftID;
|
||||
}
|
||||
public void setInsertTime(Date InsertTime)
|
||||
{
|
||||
this.InsertTime = InsertTime;
|
||||
}
|
||||
|
||||
public Date getInsertTime()
|
||||
{
|
||||
return InsertTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("ID", getID())
|
||||
.append("ProductBarcode", getProductBarcode())
|
||||
.append("SerialNo", getSerialNo())
|
||||
.append("IsRestart", getIsRestart())
|
||||
.append("ProductID", getProductID())
|
||||
.append("ShiftID", getShiftID())
|
||||
.append("InsertTime", getInsertTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.ruoyi.nanjing.mapper;
|
||||
|
||||
import com.ruoyi.nanjing.domain.BaseBarcodePrintinfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 条码打印记录Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-05-24
|
||||
*/
|
||||
public interface BaseBarcodePrintinfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询条码打印记录
|
||||
*
|
||||
* @param ID 条码打印记录ID
|
||||
* @return 条码打印记录
|
||||
*/
|
||||
public BaseBarcodePrintinfo selectBaseBarcodePrintinfoById(String ID);
|
||||
|
||||
/**
|
||||
* 查询条码打印记录列表
|
||||
*
|
||||
* @param baseBarcodePrintinfo 条码打印记录
|
||||
* @return 条码打印记录集合
|
||||
*/
|
||||
public List<BaseBarcodePrintinfo> selectBaseBarcodePrintinfoList(BaseBarcodePrintinfo baseBarcodePrintinfo);
|
||||
|
||||
/**
|
||||
* 新增条码打印记录
|
||||
*
|
||||
* @param baseBarcodePrintinfo 条码打印记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseBarcodePrintinfo(BaseBarcodePrintinfo baseBarcodePrintinfo);
|
||||
|
||||
/**
|
||||
* 修改条码打印记录
|
||||
*
|
||||
* @param baseBarcodePrintinfo 条码打印记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseBarcodePrintinfo(BaseBarcodePrintinfo baseBarcodePrintinfo);
|
||||
|
||||
/**
|
||||
* 删除条码打印记录
|
||||
*
|
||||
* @param ID 条码打印记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseBarcodePrintinfoById(String ID);
|
||||
|
||||
/**
|
||||
* 批量删除条码打印记录
|
||||
*
|
||||
* @param IDs 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseBarcodePrintinfoByIds(String[] IDs);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.ruoyi.nanjing.service;
|
||||
|
||||
import com.ruoyi.nanjing.domain.BaseBarcodePrintinfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 条码打印记录Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-05-24
|
||||
*/
|
||||
public interface IBaseBarcodePrintinfoService
|
||||
{
|
||||
/**
|
||||
* 查询条码打印记录
|
||||
*
|
||||
* @param ID 条码打印记录ID
|
||||
* @return 条码打印记录
|
||||
*/
|
||||
public BaseBarcodePrintinfo selectBaseBarcodePrintinfoById(String ID);
|
||||
|
||||
/**
|
||||
* 查询条码打印记录列表
|
||||
*
|
||||
* @param baseBarcodePrintinfo 条码打印记录
|
||||
* @return 条码打印记录集合
|
||||
*/
|
||||
public List<BaseBarcodePrintinfo> selectBaseBarcodePrintinfoList(BaseBarcodePrintinfo baseBarcodePrintinfo);
|
||||
|
||||
/**
|
||||
* 新增条码打印记录
|
||||
*
|
||||
* @param baseBarcodePrintinfo 条码打印记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseBarcodePrintinfo(BaseBarcodePrintinfo baseBarcodePrintinfo);
|
||||
|
||||
/**
|
||||
* 修改条码打印记录
|
||||
*
|
||||
* @param baseBarcodePrintinfo 条码打印记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseBarcodePrintinfo(BaseBarcodePrintinfo baseBarcodePrintinfo);
|
||||
|
||||
/**
|
||||
* 批量删除条码打印记录
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseBarcodePrintinfoByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除条码打印记录信息
|
||||
*
|
||||
* @param ID 条码打印记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseBarcodePrintinfoById(String ID);
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package com.ruoyi.nanjing.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.nanjing.domain.BaseBarcodePrintinfo;
|
||||
import com.ruoyi.nanjing.mapper.BaseBarcodePrintinfoMapper;
|
||||
import com.ruoyi.nanjing.service.IBaseBarcodePrintinfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 条码打印记录Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-05-24
|
||||
*/
|
||||
@Service
|
||||
public class BaseBarcodePrintinfoServiceImpl implements IBaseBarcodePrintinfoService
|
||||
{
|
||||
@Autowired
|
||||
private BaseBarcodePrintinfoMapper baseBarcodePrintinfoMapper;
|
||||
|
||||
/**
|
||||
* 查询条码打印记录
|
||||
*
|
||||
* @param ID 条码打印记录ID
|
||||
* @return 条码打印记录
|
||||
*/
|
||||
@Override
|
||||
public BaseBarcodePrintinfo selectBaseBarcodePrintinfoById(String ID)
|
||||
{
|
||||
return baseBarcodePrintinfoMapper.selectBaseBarcodePrintinfoById(ID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询条码打印记录列表
|
||||
*
|
||||
* @param baseBarcodePrintinfo 条码打印记录
|
||||
* @return 条码打印记录
|
||||
*/
|
||||
@Override
|
||||
public List<BaseBarcodePrintinfo> selectBaseBarcodePrintinfoList(BaseBarcodePrintinfo baseBarcodePrintinfo)
|
||||
{
|
||||
return baseBarcodePrintinfoMapper.selectBaseBarcodePrintinfoList(baseBarcodePrintinfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增条码打印记录
|
||||
*
|
||||
* @param baseBarcodePrintinfo 条码打印记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBaseBarcodePrintinfo(BaseBarcodePrintinfo baseBarcodePrintinfo)
|
||||
{
|
||||
return baseBarcodePrintinfoMapper.insertBaseBarcodePrintinfo(baseBarcodePrintinfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改条码打印记录
|
||||
*
|
||||
* @param baseBarcodePrintinfo 条码打印记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBaseBarcodePrintinfo(BaseBarcodePrintinfo baseBarcodePrintinfo)
|
||||
{
|
||||
return baseBarcodePrintinfoMapper.updateBaseBarcodePrintinfo(baseBarcodePrintinfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除条码打印记录对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseBarcodePrintinfoByIds(String ids)
|
||||
{
|
||||
return baseBarcodePrintinfoMapper.deleteBaseBarcodePrintinfoByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除条码打印记录信息
|
||||
*
|
||||
* @param ID 条码打印记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseBarcodePrintinfoById(String ID)
|
||||
{
|
||||
return baseBarcodePrintinfoMapper.deleteBaseBarcodePrintinfoById(ID);
|
||||
}
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
<?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.ruoyi.nanjing.mapper.BaseBarcodePrintinfoMapper">
|
||||
|
||||
<resultMap type="BaseBarcodePrintinfo" id="BaseBarcodePrintinfoResult">
|
||||
<result property="ID" column="ID" />
|
||||
<result property="ProductBarcode" column="ProductBarcode" />
|
||||
<result property="SerialNo" column="SerialNo" />
|
||||
<result property="IsRestart" column="IsRestart" />
|
||||
<result property="ProductID" column="ProductID" />
|
||||
<result property="ShiftID" column="ShiftID" />
|
||||
<result property="InsertTime" column="InsertTime" />
|
||||
<association property="tBdProductinfo" column="productName" javaType="com.ruoyi.nanjing.domain.TBdProductinfo" resultMap="prodName"/>
|
||||
</resultMap>
|
||||
<resultMap id="prodName" type="com.ruoyi.nanjing.domain.TBdProductinfo">
|
||||
<result property="productName" column="ProductName"></result>
|
||||
</resultMap>
|
||||
<sql id="selectBaseBarcodePrintinfoVo">
|
||||
select t1.ID, t1.ProductBarcode, t1.SerialNo, t1.IsRestart, t1.ProductID, t2.ProductName,t1.ShiftID, t1.InsertTime from base_Barcode_PrintInfo t1
|
||||
left join T_BD_ProductInfo t2 on t1.ProductId = t2.ProductID
|
||||
</sql>
|
||||
|
||||
<select id="selectBaseBarcodePrintinfoList" parameterType="BaseBarcodePrintinfo" resultMap="BaseBarcodePrintinfoResult">
|
||||
<include refid="selectBaseBarcodePrintinfoVo"/>
|
||||
<where>
|
||||
<if test="ID != null and ID != ''"> and t1.ID = #{ID}</if>
|
||||
<if test="ProductBarcode != null and ProductBarcode != ''"> and t1.ProductBarcode = #{ProductBarcode}</if>
|
||||
<if test="SerialNo != null and SerialNo != ''"> and t1.SerialNo = #{SerialNo}</if>
|
||||
<if test="IsRestart != null "> and t1.IsRestart = #{IsRestart}</if>
|
||||
<if test="ProductID != null "> and t1.ProductID = #{ProductID}</if>
|
||||
<if test="ShiftID != null and ShiftID != ''"> and t1.ShiftID = #{ShiftID}</if>
|
||||
<!-- <if test="InsertTime != null "> and t1.InsertTime = #{InsertTime}</if>-->
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
AND datediff(dd,#{params.beginTime},t1.InsertTime)>=0
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
AND datediff(dd,t1.InsertTime,#{params.endTime})>=0
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBaseBarcodePrintinfoById" parameterType="String" resultMap="BaseBarcodePrintinfoResult">
|
||||
<include refid="selectBaseBarcodePrintinfoVo"/>
|
||||
where ID = #{ID}
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseBarcodePrintinfo" parameterType="BaseBarcodePrintinfo">
|
||||
insert into base_Barcode_PrintInfo
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="ID != null">ID,</if>
|
||||
<if test="ProductBarcode != null">ProductBarcode,</if>
|
||||
<if test="SerialNo != null">SerialNo,</if>
|
||||
<if test="IsRestart != null">IsRestart,</if>
|
||||
<if test="ProductID != null">ProductID,</if>
|
||||
<if test="ShiftID != null">ShiftID,</if>
|
||||
<if test="InsertTime != null">InsertTime,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="ID != null">#{ID},</if>
|
||||
<if test="ProductBarcode != null">#{ProductBarcode},</if>
|
||||
<if test="SerialNo != null">#{SerialNo},</if>
|
||||
<if test="IsRestart != null">#{IsRestart},</if>
|
||||
<if test="ProductID != null">#{ProductID},</if>
|
||||
<if test="ShiftID != null">#{ShiftID},</if>
|
||||
<if test="InsertTime != null">#{InsertTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBaseBarcodePrintinfo" parameterType="BaseBarcodePrintinfo">
|
||||
update base_Barcode_PrintInfo
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="ProductBarcode != null">ProductBarcode = #{ProductBarcode},</if>
|
||||
<if test="SerialNo != null">SerialNo = #{SerialNo},</if>
|
||||
<if test="IsRestart != null">IsRestart = #{IsRestart},</if>
|
||||
<if test="ProductID != null">ProductID = #{ProductID},</if>
|
||||
<if test="ShiftID != null">ShiftID = #{ShiftID},</if>
|
||||
<if test="InsertTime != null">InsertTime = #{InsertTime},</if>
|
||||
</trim>
|
||||
where ID = #{ID}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseBarcodePrintinfoById" parameterType="String">
|
||||
delete from base_Barcode_PrintInfo where ID = #{ID}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseBarcodePrintinfoByIds" parameterType="String">
|
||||
delete from base_Barcode_PrintInfo where ID in
|
||||
<foreach item="ID" collection="array" open="(" separator="," close=")">
|
||||
#{ID}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue