Browse Source

[feat]品质管理:

制程检验
新增制程检验不合格分类domian
新增制程检验不合格分类Mapper
新增制程检验不合格分类Mapper.xml
新增制程检验不合格分类Service
新增制程检验不合格分类ServiceImpl
dev
liuxiaoxu 6 months ago
parent
commit
99a04ecb0a
  1. 112
      ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityManufacturingUnqualifiedClass.java
  2. 77
      ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityManufacturingUnqualifiedClassMapper.java
  3. 75
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityManufacturingUnqualifiedClassService.java
  4. 126
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityManufacturingUnqualifiedClassServiceImpl.java
  5. 100
      ruoyi-admin/src/main/resources/mapper/quality/QualityManufacturingUnqualifiedClassMapper.xml

112
ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityManufacturingUnqualifiedClass.java

@ -0,0 +1,112 @@
package com.ruoyi.quality.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 品质管理制程检验工序不合格分类对象 quality_manufacturing_unqualified_class
*
* @author 刘晓旭
* @date 2024-05-13
*/
public class QualityManufacturingUnqualifiedClass extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 工序不合格分类Id */
private Long manufacturingUnqualifiedClassId;
/** 制程工序编号 */
@Excel(name = "制程工序编号")
private String manufacturingProcessCode;
/** 制程工序名称 */
@Excel(name = "制程工序名称")
private String manufacturingProcessName;
/** 制程工序不良分类 */
@Excel(name = "制程工序不良分类")
private String processBadClassification;
/** 制程工序不良等级 */
@Excel(name = "制程工序不良等级")
private String processBadGrade;
/** 制程工序不良数量 */
@Excel(name = "制程工序不良数量")
private String processBadNum;
public void setManufacturingUnqualifiedClassId(Long manufacturingUnqualifiedClassId)
{
this.manufacturingUnqualifiedClassId = manufacturingUnqualifiedClassId;
}
public Long getManufacturingUnqualifiedClassId()
{
return manufacturingUnqualifiedClassId;
}
public void setManufacturingProcessCode(String manufacturingProcessCode)
{
this.manufacturingProcessCode = manufacturingProcessCode;
}
public String getManufacturingProcessCode()
{
return manufacturingProcessCode;
}
public void setManufacturingProcessName(String manufacturingProcessName)
{
this.manufacturingProcessName = manufacturingProcessName;
}
public String getManufacturingProcessName()
{
return manufacturingProcessName;
}
public void setProcessBadClassification(String processBadClassification)
{
this.processBadClassification = processBadClassification;
}
public String getProcessBadClassification()
{
return processBadClassification;
}
public void setProcessBadGrade(String processBadGrade)
{
this.processBadGrade = processBadGrade;
}
public String getProcessBadGrade()
{
return processBadGrade;
}
public void setProcessBadNum(String processBadNum)
{
this.processBadNum = processBadNum;
}
public String getProcessBadNum()
{
return processBadNum;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("manufacturingUnqualifiedClassId", getManufacturingUnqualifiedClassId())
.append("manufacturingProcessCode", getManufacturingProcessCode())
.append("manufacturingProcessName", getManufacturingProcessName())
.append("processBadClassification", getProcessBadClassification())
.append("processBadGrade", getProcessBadGrade())
.append("processBadNum", getProcessBadNum())
.append("remark", getRemark())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

77
ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityManufacturingUnqualifiedClassMapper.java

@ -0,0 +1,77 @@
package com.ruoyi.quality.mapper;
import java.util.List;
import com.ruoyi.quality.domain.QualityManufacturingUnqualifiedClass;
/**
* 品质管理制程检验工序不合格分类Mapper接口
*
* @author 刘晓旭
* @date 2024-05-13
*/
public interface QualityManufacturingUnqualifiedClassMapper
{
/**
* 查询品质管理制程检验工序不合格分类
*
* @param manufacturingUnqualifiedClassId 品质管理制程检验工序不合格分类ID
* @return 品质管理制程检验工序不合格分类
*/
public QualityManufacturingUnqualifiedClass selectQualityManufacturingUnqualifiedClassById(Long manufacturingUnqualifiedClassId);
/**
* 查询品质管理制程检验工序不合格分类列表
*
* @param qualityManufacturingUnqualifiedClass 品质管理制程检验工序不合格分类
* @return 品质管理制程检验工序不合格分类集合
*/
public List<QualityManufacturingUnqualifiedClass> selectQualityManufacturingUnqualifiedClassList(QualityManufacturingUnqualifiedClass qualityManufacturingUnqualifiedClass);
/**
* 新增品质管理制程检验工序不合格分类
*
* @param qualityManufacturingUnqualifiedClass 品质管理制程检验工序不合格分类
* @return 结果
*/
public int insertQualityManufacturingUnqualifiedClass(QualityManufacturingUnqualifiedClass qualityManufacturingUnqualifiedClass);
/**
* 修改品质管理制程检验工序不合格分类
*
* @param qualityManufacturingUnqualifiedClass 品质管理制程检验工序不合格分类
* @return 结果
*/
public int updateQualityManufacturingUnqualifiedClass(QualityManufacturingUnqualifiedClass qualityManufacturingUnqualifiedClass);
/**
* 删除品质管理制程检验工序不合格分类
*
* @param manufacturingUnqualifiedClassId 品质管理制程检验工序不合格分类ID
* @return 结果
*/
public int deleteQualityManufacturingUnqualifiedClassById(Long manufacturingUnqualifiedClassId);
/**
* 批量删除品质管理制程检验工序不合格分类
*
* @param manufacturingUnqualifiedClassIds 需要删除的数据ID
* @return 结果
*/
public int deleteQualityManufacturingUnqualifiedClassByIds(String[] manufacturingUnqualifiedClassIds);
/**
* 作废品质管理制程检验工序不合格分类
*
* @param manufacturingUnqualifiedClassId 品质管理制程检验工序不合格分类ID
* @return 结果
*/
public int cancelQualityManufacturingUnqualifiedClassById(Long manufacturingUnqualifiedClassId);
/**
* 恢复品质管理制程检验工序不合格分类
*
* @param manufacturingUnqualifiedClassId 品质管理制程检验工序不合格分类ID
* @return 结果
*/
public int restoreQualityManufacturingUnqualifiedClassById(Long manufacturingUnqualifiedClassId);
}

75
ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityManufacturingUnqualifiedClassService.java

@ -0,0 +1,75 @@
package com.ruoyi.quality.service;
import java.util.List;
import com.ruoyi.quality.domain.QualityManufacturingUnqualifiedClass;
/**
* 品质管理制程检验工序不合格分类Service接口
*
* @author 刘晓旭
* @date 2024-05-13
*/
public interface IQualityManufacturingUnqualifiedClassService
{
/**
* 查询品质管理制程检验工序不合格分类
*
* @param manufacturingUnqualifiedClassId 品质管理制程检验工序不合格分类ID
* @return 品质管理制程检验工序不合格分类
*/
public QualityManufacturingUnqualifiedClass selectQualityManufacturingUnqualifiedClassById(Long manufacturingUnqualifiedClassId);
/**
* 查询品质管理制程检验工序不合格分类列表
*
* @param qualityManufacturingUnqualifiedClass 品质管理制程检验工序不合格分类
* @return 品质管理制程检验工序不合格分类集合
*/
public List<QualityManufacturingUnqualifiedClass> selectQualityManufacturingUnqualifiedClassList(QualityManufacturingUnqualifiedClass qualityManufacturingUnqualifiedClass);
/**
* 新增品质管理制程检验工序不合格分类
*
* @param qualityManufacturingUnqualifiedClass 品质管理制程检验工序不合格分类
* @return 结果
*/
public int insertQualityManufacturingUnqualifiedClass(QualityManufacturingUnqualifiedClass qualityManufacturingUnqualifiedClass);
/**
* 修改品质管理制程检验工序不合格分类
*
* @param qualityManufacturingUnqualifiedClass 品质管理制程检验工序不合格分类
* @return 结果
*/
public int updateQualityManufacturingUnqualifiedClass(QualityManufacturingUnqualifiedClass qualityManufacturingUnqualifiedClass);
/**
* 批量删除品质管理制程检验工序不合格分类
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteQualityManufacturingUnqualifiedClassByIds(String ids);
/**
* 删除品质管理制程检验工序不合格分类信息
*
* @param manufacturingUnqualifiedClassId 品质管理制程检验工序不合格分类ID
* @return 结果
*/
public int deleteQualityManufacturingUnqualifiedClassById(Long manufacturingUnqualifiedClassId);
/**
* 作废品质管理制程检验工序不合格分类
* @param manufacturingUnqualifiedClassId 品质管理制程检验工序不合格分类ID
* @return
*/
int cancelQualityManufacturingUnqualifiedClassById(Long manufacturingUnqualifiedClassId);
/**
* 恢复品质管理制程检验工序不合格分类
* @param manufacturingUnqualifiedClassId 品质管理制程检验工序不合格分类ID
* @return
*/
int restoreQualityManufacturingUnqualifiedClassById(Long manufacturingUnqualifiedClassId);
}

126
ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityManufacturingUnqualifiedClassServiceImpl.java

@ -0,0 +1,126 @@
package com.ruoyi.quality.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.quality.mapper.QualityManufacturingUnqualifiedClassMapper;
import com.ruoyi.quality.domain.QualityManufacturingUnqualifiedClass;
import com.ruoyi.quality.service.IQualityManufacturingUnqualifiedClassService;
import com.ruoyi.common.core.text.Convert;
/**
* 品质管理制程检验工序不合格分类Service业务层处理
*
* @author 刘晓旭
* @date 2024-05-13
*/
@Service
public class QualityManufacturingUnqualifiedClassServiceImpl implements IQualityManufacturingUnqualifiedClassService
{
@Autowired
private QualityManufacturingUnqualifiedClassMapper qualityManufacturingUnqualifiedClassMapper;
/**
* 查询品质管理制程检验工序不合格分类
*
* @param manufacturingUnqualifiedClassId 品质管理制程检验工序不合格分类ID
* @return 品质管理制程检验工序不合格分类
*/
@Override
public QualityManufacturingUnqualifiedClass selectQualityManufacturingUnqualifiedClassById(Long manufacturingUnqualifiedClassId)
{
return qualityManufacturingUnqualifiedClassMapper.selectQualityManufacturingUnqualifiedClassById(manufacturingUnqualifiedClassId);
}
/**
* 查询品质管理制程检验工序不合格分类列表
*
* @param qualityManufacturingUnqualifiedClass 品质管理制程检验工序不合格分类
* @return 品质管理制程检验工序不合格分类
*/
@Override
public List<QualityManufacturingUnqualifiedClass> selectQualityManufacturingUnqualifiedClassList(QualityManufacturingUnqualifiedClass qualityManufacturingUnqualifiedClass)
{
return qualityManufacturingUnqualifiedClassMapper.selectQualityManufacturingUnqualifiedClassList(qualityManufacturingUnqualifiedClass);
}
/**
* 新增品质管理制程检验工序不合格分类
*
* @param qualityManufacturingUnqualifiedClass 品质管理制程检验工序不合格分类
* @return 结果
*/
@Override
public int insertQualityManufacturingUnqualifiedClass(QualityManufacturingUnqualifiedClass qualityManufacturingUnqualifiedClass)
{
String loginName = ShiroUtils.getLoginName();
qualityManufacturingUnqualifiedClass.setCreateBy(loginName);
qualityManufacturingUnqualifiedClass.setCreateTime(DateUtils.getNowDate());
return qualityManufacturingUnqualifiedClassMapper.insertQualityManufacturingUnqualifiedClass(qualityManufacturingUnqualifiedClass);
}
/**
* 修改品质管理制程检验工序不合格分类
*
* @param qualityManufacturingUnqualifiedClass 品质管理制程检验工序不合格分类
* @return 结果
*/
@Override
public int updateQualityManufacturingUnqualifiedClass(QualityManufacturingUnqualifiedClass qualityManufacturingUnqualifiedClass)
{
String loginName = ShiroUtils.getLoginName();
qualityManufacturingUnqualifiedClass.setUpdateBy(loginName);
qualityManufacturingUnqualifiedClass.setUpdateTime(DateUtils.getNowDate());
return qualityManufacturingUnqualifiedClassMapper.updateQualityManufacturingUnqualifiedClass(qualityManufacturingUnqualifiedClass);
}
/**
* 删除品质管理制程检验工序不合格分类对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteQualityManufacturingUnqualifiedClassByIds(String ids)
{
return qualityManufacturingUnqualifiedClassMapper.deleteQualityManufacturingUnqualifiedClassByIds(Convert.toStrArray(ids));
}
/**
* 删除品质管理制程检验工序不合格分类信息
*
* @param manufacturingUnqualifiedClassId 品质管理制程检验工序不合格分类ID
* @return 结果
*/
@Override
public int deleteQualityManufacturingUnqualifiedClassById(Long manufacturingUnqualifiedClassId)
{
return qualityManufacturingUnqualifiedClassMapper.deleteQualityManufacturingUnqualifiedClassById(manufacturingUnqualifiedClassId);
}
/**
* 作废品质管理制程检验工序不合格分类
*
* @param manufacturingUnqualifiedClassId 品质管理制程检验工序不合格分类ID
* @return 结果
*/
@Override
public int cancelQualityManufacturingUnqualifiedClassById(Long manufacturingUnqualifiedClassId)
{
return qualityManufacturingUnqualifiedClassMapper.cancelQualityManufacturingUnqualifiedClassById(manufacturingUnqualifiedClassId);
}
/**
* 恢复品质管理制程检验工序不合格分类信息
*
* @param manufacturingUnqualifiedClassId 品质管理制程检验工序不合格分类ID
* @return 结果
*/
@Override
public int restoreQualityManufacturingUnqualifiedClassById(Long manufacturingUnqualifiedClassId)
{
return qualityManufacturingUnqualifiedClassMapper.restoreQualityManufacturingUnqualifiedClassById(manufacturingUnqualifiedClassId);
}
}

100
ruoyi-admin/src/main/resources/mapper/quality/QualityManufacturingUnqualifiedClassMapper.xml

@ -0,0 +1,100 @@
<?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.quality.mapper.QualityManufacturingUnqualifiedClassMapper">
<resultMap type="QualityManufacturingUnqualifiedClass" id="QualityManufacturingUnqualifiedClassResult">
<result property="manufacturingUnqualifiedClassId" column="manufacturing_unqualified_class_id" />
<result property="manufacturingProcessCode" column="manufacturing_process_code" />
<result property="manufacturingProcessName" column="manufacturing_process_name" />
<result property="processBadClassification" column="process_bad_classification" />
<result property="processBadGrade" column="process_bad_grade" />
<result property="processBadNum" column="process_bad_num" />
<result property="remark" column="remark" />
<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="selectQualityManufacturingUnqualifiedClassVo">
select manufacturing_unqualified_class_id, manufacturing_process_code, manufacturing_process_name, process_bad_classification, process_bad_grade, process_bad_num, remark, create_by, create_time, update_by, update_time from quality_manufacturing_unqualified_class
</sql>
<select id="selectQualityManufacturingUnqualifiedClassList" parameterType="QualityManufacturingUnqualifiedClass" resultMap="QualityManufacturingUnqualifiedClassResult">
<include refid="selectQualityManufacturingUnqualifiedClassVo"/>
<where>
</where>
</select>
<select id="selectQualityManufacturingUnqualifiedClassById" parameterType="Long" resultMap="QualityManufacturingUnqualifiedClassResult">
<include refid="selectQualityManufacturingUnqualifiedClassVo"/>
where manufacturing_unqualified_class_id = #{manufacturingUnqualifiedClassId}
</select>
<insert id="insertQualityManufacturingUnqualifiedClass" parameterType="QualityManufacturingUnqualifiedClass" useGeneratedKeys="true" keyProperty="manufacturingUnqualifiedClassId">
insert into quality_manufacturing_unqualified_class
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="manufacturingProcessCode != null">manufacturing_process_code,</if>
<if test="manufacturingProcessName != null">manufacturing_process_name,</if>
<if test="processBadClassification != null">process_bad_classification,</if>
<if test="processBadGrade != null">process_bad_grade,</if>
<if test="processBadNum != null">process_bad_num,</if>
<if test="remark != null">remark,</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="manufacturingProcessCode != null">#{manufacturingProcessCode},</if>
<if test="manufacturingProcessName != null">#{manufacturingProcessName},</if>
<if test="processBadClassification != null">#{processBadClassification},</if>
<if test="processBadGrade != null">#{processBadGrade},</if>
<if test="processBadNum != null">#{processBadNum},</if>
<if test="remark != null">#{remark},</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="updateQualityManufacturingUnqualifiedClass" parameterType="QualityManufacturingUnqualifiedClass">
update quality_manufacturing_unqualified_class
<trim prefix="SET" suffixOverrides=",">
<if test="manufacturingProcessCode != null">manufacturing_process_code = #{manufacturingProcessCode},</if>
<if test="manufacturingProcessName != null">manufacturing_process_name = #{manufacturingProcessName},</if>
<if test="processBadClassification != null">process_bad_classification = #{processBadClassification},</if>
<if test="processBadGrade != null">process_bad_grade = #{processBadGrade},</if>
<if test="processBadNum != null">process_bad_num = #{processBadNum},</if>
<if test="remark != null">remark = #{remark},</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 manufacturing_unqualified_class_id = #{manufacturingUnqualifiedClassId}
</update>
<delete id="deleteQualityManufacturingUnqualifiedClassById" parameterType="Long">
delete from quality_manufacturing_unqualified_class where manufacturing_unqualified_class_id = #{manufacturingUnqualifiedClassId}
</delete>
<delete id="deleteQualityManufacturingUnqualifiedClassByIds" parameterType="String">
delete from quality_manufacturing_unqualified_class where manufacturing_unqualified_class_id in
<foreach item="manufacturingUnqualifiedClassId" collection="array" open="(" separator="," close=")">
#{manufacturingUnqualifiedClassId}
</foreach>
</delete>
<update id="cancelQualityManufacturingUnqualifiedClassById" parameterType="Long">
update quality_manufacturing_unqualified_class set del_flag = '1' where manufacturing_unqualified_class_id = #{manufacturingUnqualifiedClassId}
</update>
<update id="restoreQualityManufacturingUnqualifiedClassById" parameterType="Long">
update quality_manufacturing_unqualified_class set del_flag = '0' where manufacturing_unqualified_class_id = #{manufacturingUnqualifiedClassId}
</update>
</mapper>
Loading…
Cancel
Save