diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityManufacturingUnqualifiedClass.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityManufacturingUnqualifiedClass.java new file mode 100644 index 00000000..62db88b9 --- /dev/null +++ b/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(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityManufacturingUnqualifiedClassMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityManufacturingUnqualifiedClassMapper.java new file mode 100644 index 00000000..8c367481 --- /dev/null +++ b/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 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); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityManufacturingUnqualifiedClassService.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityManufacturingUnqualifiedClassService.java new file mode 100644 index 00000000..b6a74610 --- /dev/null +++ b/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 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); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityManufacturingUnqualifiedClassServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityManufacturingUnqualifiedClassServiceImpl.java new file mode 100644 index 00000000..735514d4 --- /dev/null +++ b/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 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); + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/quality/QualityManufacturingUnqualifiedClassMapper.xml b/ruoyi-admin/src/main/resources/mapper/quality/QualityManufacturingUnqualifiedClassMapper.xml new file mode 100644 index 00000000..40e77cda --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/quality/QualityManufacturingUnqualifiedClassMapper.xml @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into quality_manufacturing_unqualified_class + + manufacturing_process_code, + manufacturing_process_name, + process_bad_classification, + process_bad_grade, + process_bad_num, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{manufacturingProcessCode}, + #{manufacturingProcessName}, + #{processBadClassification}, + #{processBadGrade}, + #{processBadNum}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update quality_manufacturing_unqualified_class + + manufacturing_process_code = #{manufacturingProcessCode}, + manufacturing_process_name = #{manufacturingProcessName}, + process_bad_classification = #{processBadClassification}, + process_bad_grade = #{processBadGrade}, + process_bad_num = #{processBadNum}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where manufacturing_unqualified_class_id = #{manufacturingUnqualifiedClassId} + + + + delete from quality_manufacturing_unqualified_class where manufacturing_unqualified_class_id = #{manufacturingUnqualifiedClassId} + + + + delete from quality_manufacturing_unqualified_class where manufacturing_unqualified_class_id in + + #{manufacturingUnqualifiedClassId} + + + + + update quality_manufacturing_unqualified_class set del_flag = '1' where manufacturing_unqualified_class_id = #{manufacturingUnqualifiedClassId} + + + + update quality_manufacturing_unqualified_class set del_flag = '0' where manufacturing_unqualified_class_id = #{manufacturingUnqualifiedClassId} + + + \ No newline at end of file