diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityOrderReportUnqualified.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityOrderReportUnqualified.java new file mode 100644 index 00000000..c7a22f16 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityOrderReportUnqualified.java @@ -0,0 +1,154 @@ +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_order_report_unqualified + * + * @author 刘晓旭 + * @date 2024-05-21 + */ +public class QualityOrderReportUnqualified extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 品质单报告不合格数Id */ + private Long orderReportUnqualifiedId; + + /** 供应商Id */ + @Excel(name = "供应商Id") + private String supplierCode; + + /** 供应商名称 */ + @Excel(name = "供应商名称") + private String supplierName; + + /** 料号 */ + @Excel(name = "料号") + private String materialNo; + + /** 物料名称 */ + @Excel(name = "物料名称") + private String materialName; + + /** 不良分类 */ + @Excel(name = "不良分类") + private String processBadClassification; + + /** 不良等级 */ + @Excel(name = "不良等级") + private String processBadGrade; + + /** 不良数量 */ + @Excel(name = "不良数量") + private String processBadNum; + + /** 不合格报告url */ + @Excel(name = "不合格报告url") + private String unqualifiedReportUrl; + + public void setOrderReportUnqualifiedId(Long orderReportUnqualifiedId) + { + this.orderReportUnqualifiedId = orderReportUnqualifiedId; + } + + public Long getOrderReportUnqualifiedId() + { + return orderReportUnqualifiedId; + } + public void setSupplierCode(String supplierCode) + { + this.supplierCode = supplierCode; + } + + public String getSupplierCode() + { + return supplierCode; + } + public void setSupplierName(String supplierName) + { + this.supplierName = supplierName; + } + + public String getSupplierName() + { + return supplierName; + } + public void setMaterialNo(String materialNo) + { + this.materialNo = materialNo; + } + + public String getMaterialNo() + { + return materialNo; + } + public void setMaterialName(String materialName) + { + this.materialName = materialName; + } + + public String getMaterialName() + { + return materialName; + } + 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; + } + public void setUnqualifiedReportUrl(String unqualifiedReportUrl) + { + this.unqualifiedReportUrl = unqualifiedReportUrl; + } + + public String getUnqualifiedReportUrl() + { + return unqualifiedReportUrl; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("orderReportUnqualifiedId", getOrderReportUnqualifiedId()) + .append("supplierCode", getSupplierCode()) + .append("supplierName", getSupplierName()) + .append("materialNo", getMaterialNo()) + .append("materialName", getMaterialName()) + .append("processBadClassification", getProcessBadClassification()) + .append("processBadGrade", getProcessBadGrade()) + .append("processBadNum", getProcessBadNum()) + .append("unqualifiedReportUrl", getUnqualifiedReportUrl()) + .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/QualityOrderReportUnqualifiedMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityOrderReportUnqualifiedMapper.java new file mode 100644 index 00000000..cb8d539e --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityOrderReportUnqualifiedMapper.java @@ -0,0 +1,86 @@ +package com.ruoyi.quality.mapper; + +import java.util.List; +import com.ruoyi.quality.domain.QualityOrderReportUnqualified; + +/** + * 品质管理品质单报告不合格数Mapper接口 + * + * @author 刘晓旭 + * @date 2024-05-21 + */ +public interface QualityOrderReportUnqualifiedMapper +{ + /** + * 查询品质管理品质单报告不合格数 + * + * @param orderReportUnqualifiedId 品质管理品质单报告不合格数ID + * @return 品质管理品质单报告不合格数 + */ + public QualityOrderReportUnqualified selectQualityOrderReportUnqualifiedById(Long orderReportUnqualifiedId); + + + /** + * 查询品质管理品质单报告不合格数列表 + * + * @param qualityOrderReportUnqualified 品质管理品质单报告不合格数 + * @return 品质管理品质单报告不合格数集合 + */ + public List selectQualityOrderReportUnqualifiedByCodeAndNo(QualityOrderReportUnqualified qualityOrderReportUnqualified); + + /** + * 查询品质管理品质单报告不合格数列表 + * + * @param qualityOrderReportUnqualified 品质管理品质单报告不合格数 + * @return 品质管理品质单报告不合格数集合 + */ + public List selectQualityOrderReportUnqualifiedList(QualityOrderReportUnqualified qualityOrderReportUnqualified); + + /** + * 新增品质管理品质单报告不合格数 + * + * @param qualityOrderReportUnqualified 品质管理品质单报告不合格数 + * @return 结果 + */ + public int insertQualityOrderReportUnqualified(QualityOrderReportUnqualified qualityOrderReportUnqualified); + + /** + * 修改品质管理品质单报告不合格数 + * + * @param qualityOrderReportUnqualified 品质管理品质单报告不合格数 + * @return 结果 + */ + public int updateQualityOrderReportUnqualified(QualityOrderReportUnqualified qualityOrderReportUnqualified); + + /** + * 删除品质管理品质单报告不合格数 + * + * @param orderReportUnqualifiedId 品质管理品质单报告不合格数ID + * @return 结果 + */ + public int deleteQualityOrderReportUnqualifiedById(Long orderReportUnqualifiedId); + + /** + * 批量删除品质管理品质单报告不合格数 + * + * @param orderReportUnqualifiedIds 需要删除的数据ID + * @return 结果 + */ + public int deleteQualityOrderReportUnqualifiedByIds(String[] orderReportUnqualifiedIds); + + /** + * 作废品质管理品质单报告不合格数 + * + * @param orderReportUnqualifiedId 品质管理品质单报告不合格数ID + * @return 结果 + */ + public int cancelQualityOrderReportUnqualifiedById(Long orderReportUnqualifiedId); + + /** + * 恢复品质管理品质单报告不合格数 + * + * @param orderReportUnqualifiedId 品质管理品质单报告不合格数ID + * @return 结果 + */ + public int restoreQualityOrderReportUnqualifiedById(Long orderReportUnqualifiedId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityOrderReportUnqualifiedService.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityOrderReportUnqualifiedService.java new file mode 100644 index 00000000..27d0a610 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityOrderReportUnqualifiedService.java @@ -0,0 +1,75 @@ +package com.ruoyi.quality.service; + +import java.util.List; +import com.ruoyi.quality.domain.QualityOrderReportUnqualified; + +/** + * 品质管理品质单报告不合格数Service接口 + * + * @author 刘晓旭 + * @date 2024-05-21 + */ +public interface IQualityOrderReportUnqualifiedService +{ + /** + * 查询品质管理品质单报告不合格数 + * + * @param orderReportUnqualifiedId 品质管理品质单报告不合格数ID + * @return 品质管理品质单报告不合格数 + */ + public QualityOrderReportUnqualified selectQualityOrderReportUnqualifiedById(Long orderReportUnqualifiedId); + + /** + * 查询品质管理品质单报告不合格数列表 + * + * @param qualityOrderReportUnqualified 品质管理品质单报告不合格数 + * @return 品质管理品质单报告不合格数集合 + */ + public List selectQualityOrderReportUnqualifiedList(QualityOrderReportUnqualified qualityOrderReportUnqualified); + + /** + * 新增品质管理品质单报告不合格数 + * + * @param qualityOrderReportUnqualified 品质管理品质单报告不合格数 + * @return 结果 + */ + public int insertQualityOrderReportUnqualified(QualityOrderReportUnqualified qualityOrderReportUnqualified); + + /** + * 修改品质管理品质单报告不合格数 + * + * @param qualityOrderReportUnqualified 品质管理品质单报告不合格数 + * @return 结果 + */ + public int updateQualityOrderReportUnqualified(QualityOrderReportUnqualified qualityOrderReportUnqualified); + + /** + * 批量删除品质管理品质单报告不合格数 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteQualityOrderReportUnqualifiedByIds(String ids); + + /** + * 删除品质管理品质单报告不合格数信息 + * + * @param orderReportUnqualifiedId 品质管理品质单报告不合格数ID + * @return 结果 + */ + public int deleteQualityOrderReportUnqualifiedById(Long orderReportUnqualifiedId); + + /** + * 作废品质管理品质单报告不合格数 + * @param orderReportUnqualifiedId 品质管理品质单报告不合格数ID + * @return + */ + int cancelQualityOrderReportUnqualifiedById(Long orderReportUnqualifiedId); + + /** + * 恢复品质管理品质单报告不合格数 + * @param orderReportUnqualifiedId 品质管理品质单报告不合格数ID + * @return + */ + int restoreQualityOrderReportUnqualifiedById(Long orderReportUnqualifiedId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderReportUnqualifiedServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderReportUnqualifiedServiceImpl.java new file mode 100644 index 00000000..77e60fec --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderReportUnqualifiedServiceImpl.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.QualityOrderReportUnqualifiedMapper; +import com.ruoyi.quality.domain.QualityOrderReportUnqualified; +import com.ruoyi.quality.service.IQualityOrderReportUnqualifiedService; +import com.ruoyi.common.core.text.Convert; + +/** + * 品质管理品质单报告不合格数Service业务层处理 + * + * @author 刘晓旭 + * @date 2024-05-21 + */ +@Service +public class QualityOrderReportUnqualifiedServiceImpl implements IQualityOrderReportUnqualifiedService +{ + @Autowired + private QualityOrderReportUnqualifiedMapper qualityOrderReportUnqualifiedMapper; + + /** + * 查询品质管理品质单报告不合格数 + * + * @param orderReportUnqualifiedId 品质管理品质单报告不合格数ID + * @return 品质管理品质单报告不合格数 + */ + @Override + public QualityOrderReportUnqualified selectQualityOrderReportUnqualifiedById(Long orderReportUnqualifiedId) + { + return qualityOrderReportUnqualifiedMapper.selectQualityOrderReportUnqualifiedById(orderReportUnqualifiedId); + } + + /** + * 查询品质管理品质单报告不合格数列表 + * + * @param qualityOrderReportUnqualified 品质管理品质单报告不合格数 + * @return 品质管理品质单报告不合格数 + */ + @Override + public List selectQualityOrderReportUnqualifiedList(QualityOrderReportUnqualified qualityOrderReportUnqualified) + { + return qualityOrderReportUnqualifiedMapper.selectQualityOrderReportUnqualifiedList(qualityOrderReportUnqualified); + } + + /** + * 新增品质管理品质单报告不合格数 + * + * @param qualityOrderReportUnqualified 品质管理品质单报告不合格数 + * @return 结果 + */ + @Override + public int insertQualityOrderReportUnqualified(QualityOrderReportUnqualified qualityOrderReportUnqualified) + { + String loginName = ShiroUtils.getLoginName(); + qualityOrderReportUnqualified.setCreateBy(loginName); + qualityOrderReportUnqualified.setCreateTime(DateUtils.getNowDate()); + return qualityOrderReportUnqualifiedMapper.insertQualityOrderReportUnqualified(qualityOrderReportUnqualified); + } + + /** + * 修改品质管理品质单报告不合格数 + * + * @param qualityOrderReportUnqualified 品质管理品质单报告不合格数 + * @return 结果 + */ + @Override + public int updateQualityOrderReportUnqualified(QualityOrderReportUnqualified qualityOrderReportUnqualified) + { + String loginName = ShiroUtils.getLoginName(); + qualityOrderReportUnqualified.setUpdateBy(loginName); + qualityOrderReportUnqualified.setUpdateTime(DateUtils.getNowDate()); + return qualityOrderReportUnqualifiedMapper.updateQualityOrderReportUnqualified(qualityOrderReportUnqualified); + } + + /** + * 删除品质管理品质单报告不合格数对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteQualityOrderReportUnqualifiedByIds(String ids) + { + return qualityOrderReportUnqualifiedMapper.deleteQualityOrderReportUnqualifiedByIds(Convert.toStrArray(ids)); + } + + /** + * 删除品质管理品质单报告不合格数信息 + * + * @param orderReportUnqualifiedId 品质管理品质单报告不合格数ID + * @return 结果 + */ + @Override + public int deleteQualityOrderReportUnqualifiedById(Long orderReportUnqualifiedId) + { + return qualityOrderReportUnqualifiedMapper.deleteQualityOrderReportUnqualifiedById(orderReportUnqualifiedId); + } + + /** + * 作废品质管理品质单报告不合格数 + * + * @param orderReportUnqualifiedId 品质管理品质单报告不合格数ID + * @return 结果 + */ + @Override + public int cancelQualityOrderReportUnqualifiedById(Long orderReportUnqualifiedId) + { + return qualityOrderReportUnqualifiedMapper.cancelQualityOrderReportUnqualifiedById(orderReportUnqualifiedId); + } + + /** + * 恢复品质管理品质单报告不合格数信息 + * + * @param orderReportUnqualifiedId 品质管理品质单报告不合格数ID + * @return 结果 + */ + @Override + public int restoreQualityOrderReportUnqualifiedById(Long orderReportUnqualifiedId) + { + return qualityOrderReportUnqualifiedMapper.restoreQualityOrderReportUnqualifiedById(orderReportUnqualifiedId); + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/quality/QualityOrderReportUnqualifiedMapper.xml b/ruoyi-admin/src/main/resources/mapper/quality/QualityOrderReportUnqualifiedMapper.xml new file mode 100644 index 00000000..e1733db4 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/quality/QualityOrderReportUnqualifiedMapper.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + select order_report_unqualified_id, supplier_code, supplier_name, material_no, material_name, process_bad_classification, process_bad_grade, process_bad_num, unqualified_report_url, remark, create_by, create_time, update_by, update_time from quality_order_report_unqualified + + + + + + + + + + + insert into quality_order_report_unqualified + + supplier_code, + supplier_name, + material_no, + material_name, + process_bad_classification, + process_bad_grade, + process_bad_num, + unqualified_report_url, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{supplierCode}, + #{supplierName}, + #{materialNo}, + #{materialName}, + #{processBadClassification}, + #{processBadGrade}, + #{processBadNum}, + #{unqualifiedReportUrl}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update quality_order_report_unqualified + + supplier_code = #{supplierCode}, + supplier_name = #{supplierName}, + material_no = #{materialNo}, + material_name = #{materialName}, + process_bad_classification = #{processBadClassification}, + process_bad_grade = #{processBadGrade}, + process_bad_num = #{processBadNum}, + unqualified_report_url = #{unqualifiedReportUrl}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where order_report_unqualified_id = #{orderReportUnqualifiedId} + + + + delete from quality_order_report_unqualified where order_report_unqualified_id = #{orderReportUnqualifiedId} + + + + delete from quality_order_report_unqualified where order_report_unqualified_id in + + #{orderReportUnqualifiedId} + + + + + update quality_order_report_unqualified set del_flag = '1' where order_report_unqualified_id = #{orderReportUnqualifiedId} + + + + update quality_order_report_unqualified set del_flag = '0' where order_report_unqualified_id = #{orderReportUnqualifiedId} + + + \ No newline at end of file