From 99a04ecb0a2e4763d896908b00339fcaebe3a245 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Wed, 15 May 2024 09:24:22 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=E5=93=81=E8=B4=A8=E7=AE=A1=E7=90=86:=20?= =?UTF-8?q?=E5=88=B6=E7=A8=8B=E6=A3=80=E9=AA=8C=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=88=B6=E7=A8=8B=E6=A3=80=E9=AA=8C=E4=B8=8D=E5=90=88=E6=A0=BC?= =?UTF-8?q?=E5=88=86=E7=B1=BBdomian=20=E6=96=B0=E5=A2=9E=E5=88=B6=E7=A8=8B?= =?UTF-8?q?=E6=A3=80=E9=AA=8C=E4=B8=8D=E5=90=88=E6=A0=BC=E5=88=86=E7=B1=BB?= =?UTF-8?q?Mapper=20=E6=96=B0=E5=A2=9E=E5=88=B6=E7=A8=8B=E6=A3=80=E9=AA=8C?= =?UTF-8?q?=E4=B8=8D=E5=90=88=E6=A0=BC=E5=88=86=E7=B1=BBMapper.xml=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=88=B6=E7=A8=8B=E6=A3=80=E9=AA=8C=E4=B8=8D?= =?UTF-8?q?=E5=90=88=E6=A0=BC=E5=88=86=E7=B1=BBService=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=88=B6=E7=A8=8B=E6=A3=80=E9=AA=8C=E4=B8=8D=E5=90=88?= =?UTF-8?q?=E6=A0=BC=E5=88=86=E7=B1=BBServiceImpl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../QualityManufacturingUnqualifiedClass.java | 112 ++++++++++++++++ ...tyManufacturingUnqualifiedClassMapper.java | 77 +++++++++++ ...yManufacturingUnqualifiedClassService.java | 75 +++++++++++ ...ufacturingUnqualifiedClassServiceImpl.java | 126 ++++++++++++++++++ ...ityManufacturingUnqualifiedClassMapper.xml | 100 ++++++++++++++ 5 files changed, 490 insertions(+) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityManufacturingUnqualifiedClass.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityManufacturingUnqualifiedClassMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityManufacturingUnqualifiedClassService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityManufacturingUnqualifiedClassServiceImpl.java create mode 100644 ruoyi-admin/src/main/resources/mapper/quality/QualityManufacturingUnqualifiedClassMapper.xml 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