diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityRefundsExchangesController.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityRefundsExchangesController.java index e57be105..1b33d4c1 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityRefundsExchangesController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityRefundsExchangesController.java @@ -4,6 +4,7 @@ import java.util.List; import com.ruoyi.erp.domain.ErpMaterialVo; import com.ruoyi.erp.service.IErpMaterialService; +import com.ruoyi.quality.domain.QualityOrderReport; import com.ruoyi.quality.domain.VO.CheckoutMaterialVO; import org.apache.poi.ss.formula.functions.T; import org.apache.shiro.authz.annotation.RequiresPermissions; @@ -138,4 +139,5 @@ public class QualityRefundsExchangesController extends BaseController return getDataTable(erpMaterialVos); } + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchangesUnqualified.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchangesUnqualified.java new file mode 100644 index 00000000..ffa3bbe7 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchangesUnqualified.java @@ -0,0 +1,157 @@ +package com.ruoyi.quality.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +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_refunds_exchanges_unqualified + * + * @author 刘晓旭 + * @date 2024-05-24 + */ +public class QualityRefundsExchangesUnqualified extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 退换货不合格分类Id */ + private Long refundsExchangesUnqualifiedId; + + /** 退换货单号 */ + @Excel(name = "退换货单号") + private String refundsExchangesCode; + + /** 料号 */ + @Excel(name = "料号") + private String materialNo; + + /** 物料名称 */ + @Excel(name = "物料名称") + private String materialName; + + /** 制程工序不良分类 */ + @Excel(name = "制程工序不良分类") + private String processBadClassification; + + /** 制程工序不良等级 */ + @Excel(name = "制程工序不良等级") + private String processBadGrade; + + /** 制程工序不良数量 */ + @Excel(name = "制程工序不良数量") + private Integer processBadNum; + + /** 不合格报告url */ + @Excel(name = "不合格报告url") + private String unqualifiedReportUrl; + + /** 检验完成时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "检验完成时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date inspectionTime; + + public void setRefundsExchangesUnqualifiedId(Long refundsExchangesUnqualifiedId) + { + this.refundsExchangesUnqualifiedId = refundsExchangesUnqualifiedId; + } + + public Long getRefundsExchangesUnqualifiedId() + { + return refundsExchangesUnqualifiedId; + } + public void setRefundsExchangesCode(String refundsExchangesCode) + { + this.refundsExchangesCode = refundsExchangesCode; + } + + public String getRefundsExchangesCode() + { + return refundsExchangesCode; + } + 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(Integer processBadNum) + { + this.processBadNum = processBadNum; + } + + public Integer getProcessBadNum() + { + return processBadNum; + } + public void setUnqualifiedReportUrl(String unqualifiedReportUrl) + { + this.unqualifiedReportUrl = unqualifiedReportUrl; + } + + public String getUnqualifiedReportUrl() + { + return unqualifiedReportUrl; + } + public void setInspectionTime(Date inspectionTime) + { + this.inspectionTime = inspectionTime; + } + + public Date getInspectionTime() + { + return inspectionTime; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("refundsExchangesUnqualifiedId", getRefundsExchangesUnqualifiedId()) + .append("refundsExchangesCode", getRefundsExchangesCode()) + .append("materialNo", getMaterialNo()) + .append("materialName", getMaterialName()) + .append("processBadClassification", getProcessBadClassification()) + .append("processBadGrade", getProcessBadGrade()) + .append("processBadNum", getProcessBadNum()) + .append("unqualifiedReportUrl", getUnqualifiedReportUrl()) + .append("inspectionTime", getInspectionTime()) + .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/QualityRefundsExchangesUnqualifiedMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityRefundsExchangesUnqualifiedMapper.java new file mode 100644 index 00000000..fb1f8d1d --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityRefundsExchangesUnqualifiedMapper.java @@ -0,0 +1,77 @@ +package com.ruoyi.quality.mapper; + +import java.util.List; +import com.ruoyi.quality.domain.QualityRefundsExchangesUnqualified; + +/** + * 品质管理退换货不合格分类Mapper接口 + * + * @author 刘晓旭 + * @date 2024-05-24 + */ +public interface QualityRefundsExchangesUnqualifiedMapper +{ + /** + * 查询品质管理退换货不合格分类 + * + * @param refundsExchangesUnqualifiedId 品质管理退换货不合格分类ID + * @return 品质管理退换货不合格分类 + */ + public QualityRefundsExchangesUnqualified selectQualityRefundsExchangesUnqualifiedById(Long refundsExchangesUnqualifiedId); + + /** + * 查询品质管理退换货不合格分类列表 + * + * @param qualityRefundsExchangesUnqualified 品质管理退换货不合格分类 + * @return 品质管理退换货不合格分类集合 + */ + public List selectQualityRefundsExchangesUnqualifiedList(QualityRefundsExchangesUnqualified qualityRefundsExchangesUnqualified); + + /** + * 新增品质管理退换货不合格分类 + * + * @param qualityRefundsExchangesUnqualified 品质管理退换货不合格分类 + * @return 结果 + */ + public int insertQualityRefundsExchangesUnqualified(QualityRefundsExchangesUnqualified qualityRefundsExchangesUnqualified); + + /** + * 修改品质管理退换货不合格分类 + * + * @param qualityRefundsExchangesUnqualified 品质管理退换货不合格分类 + * @return 结果 + */ + public int updateQualityRefundsExchangesUnqualified(QualityRefundsExchangesUnqualified qualityRefundsExchangesUnqualified); + + /** + * 删除品质管理退换货不合格分类 + * + * @param refundsExchangesUnqualifiedId 品质管理退换货不合格分类ID + * @return 结果 + */ + public int deleteQualityRefundsExchangesUnqualifiedById(Long refundsExchangesUnqualifiedId); + + /** + * 批量删除品质管理退换货不合格分类 + * + * @param refundsExchangesUnqualifiedIds 需要删除的数据ID + * @return 结果 + */ + public int deleteQualityRefundsExchangesUnqualifiedByIds(String[] refundsExchangesUnqualifiedIds); + + /** + * 作废品质管理退换货不合格分类 + * + * @param refundsExchangesUnqualifiedId 品质管理退换货不合格分类ID + * @return 结果 + */ + public int cancelQualityRefundsExchangesUnqualifiedById(Long refundsExchangesUnqualifiedId); + + /** + * 恢复品质管理退换货不合格分类 + * + * @param refundsExchangesUnqualifiedId 品质管理退换货不合格分类ID + * @return 结果 + */ + public int restoreQualityRefundsExchangesUnqualifiedById(Long refundsExchangesUnqualifiedId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesUnqualifiedService.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesUnqualifiedService.java new file mode 100644 index 00000000..765ffe15 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesUnqualifiedService.java @@ -0,0 +1,75 @@ +package com.ruoyi.quality.service; + +import java.util.List; +import com.ruoyi.quality.domain.QualityRefundsExchangesUnqualified; + +/** + * 品质管理退换货不合格分类Service接口 + * + * @author 刘晓旭 + * @date 2024-05-24 + */ +public interface IQualityRefundsExchangesUnqualifiedService +{ + /** + * 查询品质管理退换货不合格分类 + * + * @param refundsExchangesUnqualifiedId 品质管理退换货不合格分类ID + * @return 品质管理退换货不合格分类 + */ + public QualityRefundsExchangesUnqualified selectQualityRefundsExchangesUnqualifiedById(Long refundsExchangesUnqualifiedId); + + /** + * 查询品质管理退换货不合格分类列表 + * + * @param qualityRefundsExchangesUnqualified 品质管理退换货不合格分类 + * @return 品质管理退换货不合格分类集合 + */ + public List selectQualityRefundsExchangesUnqualifiedList(QualityRefundsExchangesUnqualified qualityRefundsExchangesUnqualified); + + /** + * 新增品质管理退换货不合格分类 + * + * @param qualityRefundsExchangesUnqualified 品质管理退换货不合格分类 + * @return 结果 + */ + public int insertQualityRefundsExchangesUnqualified(QualityRefundsExchangesUnqualified qualityRefundsExchangesUnqualified); + + /** + * 修改品质管理退换货不合格分类 + * + * @param qualityRefundsExchangesUnqualified 品质管理退换货不合格分类 + * @return 结果 + */ + public int updateQualityRefundsExchangesUnqualified(QualityRefundsExchangesUnqualified qualityRefundsExchangesUnqualified); + + /** + * 批量删除品质管理退换货不合格分类 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteQualityRefundsExchangesUnqualifiedByIds(String ids); + + /** + * 删除品质管理退换货不合格分类信息 + * + * @param refundsExchangesUnqualifiedId 品质管理退换货不合格分类ID + * @return 结果 + */ + public int deleteQualityRefundsExchangesUnqualifiedById(Long refundsExchangesUnqualifiedId); + + /** + * 作废品质管理退换货不合格分类 + * @param refundsExchangesUnqualifiedId 品质管理退换货不合格分类ID + * @return + */ + int cancelQualityRefundsExchangesUnqualifiedById(Long refundsExchangesUnqualifiedId); + + /** + * 恢复品质管理退换货不合格分类 + * @param refundsExchangesUnqualifiedId 品质管理退换货不合格分类ID + * @return + */ + int restoreQualityRefundsExchangesUnqualifiedById(Long refundsExchangesUnqualifiedId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesUnqualifiedServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesUnqualifiedServiceImpl.java new file mode 100644 index 00000000..93a7c26e --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesUnqualifiedServiceImpl.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.QualityRefundsExchangesUnqualifiedMapper; +import com.ruoyi.quality.domain.QualityRefundsExchangesUnqualified; +import com.ruoyi.quality.service.IQualityRefundsExchangesUnqualifiedService; +import com.ruoyi.common.core.text.Convert; + +/** + * 品质管理退换货不合格分类Service业务层处理 + * + * @author 刘晓旭 + * @date 2024-05-24 + */ +@Service +public class QualityRefundsExchangesUnqualifiedServiceImpl implements IQualityRefundsExchangesUnqualifiedService +{ + @Autowired + private QualityRefundsExchangesUnqualifiedMapper qualityRefundsExchangesUnqualifiedMapper; + + /** + * 查询品质管理退换货不合格分类 + * + * @param refundsExchangesUnqualifiedId 品质管理退换货不合格分类ID + * @return 品质管理退换货不合格分类 + */ + @Override + public QualityRefundsExchangesUnqualified selectQualityRefundsExchangesUnqualifiedById(Long refundsExchangesUnqualifiedId) + { + return qualityRefundsExchangesUnqualifiedMapper.selectQualityRefundsExchangesUnqualifiedById(refundsExchangesUnqualifiedId); + } + + /** + * 查询品质管理退换货不合格分类列表 + * + * @param qualityRefundsExchangesUnqualified 品质管理退换货不合格分类 + * @return 品质管理退换货不合格分类 + */ + @Override + public List selectQualityRefundsExchangesUnqualifiedList(QualityRefundsExchangesUnqualified qualityRefundsExchangesUnqualified) + { + return qualityRefundsExchangesUnqualifiedMapper.selectQualityRefundsExchangesUnqualifiedList(qualityRefundsExchangesUnqualified); + } + + /** + * 新增品质管理退换货不合格分类 + * + * @param qualityRefundsExchangesUnqualified 品质管理退换货不合格分类 + * @return 结果 + */ + @Override + public int insertQualityRefundsExchangesUnqualified(QualityRefundsExchangesUnqualified qualityRefundsExchangesUnqualified) + { + String loginName = ShiroUtils.getLoginName(); + qualityRefundsExchangesUnqualified.setCreateBy(loginName); + qualityRefundsExchangesUnqualified.setCreateTime(DateUtils.getNowDate()); + return qualityRefundsExchangesUnqualifiedMapper.insertQualityRefundsExchangesUnqualified(qualityRefundsExchangesUnqualified); + } + + /** + * 修改品质管理退换货不合格分类 + * + * @param qualityRefundsExchangesUnqualified 品质管理退换货不合格分类 + * @return 结果 + */ + @Override + public int updateQualityRefundsExchangesUnqualified(QualityRefundsExchangesUnqualified qualityRefundsExchangesUnqualified) + { + String loginName = ShiroUtils.getLoginName(); + qualityRefundsExchangesUnqualified.setUpdateBy(loginName); + qualityRefundsExchangesUnqualified.setUpdateTime(DateUtils.getNowDate()); + return qualityRefundsExchangesUnqualifiedMapper.updateQualityRefundsExchangesUnqualified(qualityRefundsExchangesUnqualified); + } + + /** + * 删除品质管理退换货不合格分类对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteQualityRefundsExchangesUnqualifiedByIds(String ids) + { + return qualityRefundsExchangesUnqualifiedMapper.deleteQualityRefundsExchangesUnqualifiedByIds(Convert.toStrArray(ids)); + } + + /** + * 删除品质管理退换货不合格分类信息 + * + * @param refundsExchangesUnqualifiedId 品质管理退换货不合格分类ID + * @return 结果 + */ + @Override + public int deleteQualityRefundsExchangesUnqualifiedById(Long refundsExchangesUnqualifiedId) + { + return qualityRefundsExchangesUnqualifiedMapper.deleteQualityRefundsExchangesUnqualifiedById(refundsExchangesUnqualifiedId); + } + + /** + * 作废品质管理退换货不合格分类 + * + * @param refundsExchangesUnqualifiedId 品质管理退换货不合格分类ID + * @return 结果 + */ + @Override + public int cancelQualityRefundsExchangesUnqualifiedById(Long refundsExchangesUnqualifiedId) + { + return qualityRefundsExchangesUnqualifiedMapper.cancelQualityRefundsExchangesUnqualifiedById(refundsExchangesUnqualifiedId); + } + + /** + * 恢复品质管理退换货不合格分类信息 + * + * @param refundsExchangesUnqualifiedId 品质管理退换货不合格分类ID + * @return 结果 + */ + @Override + public int restoreQualityRefundsExchangesUnqualifiedById(Long refundsExchangesUnqualifiedId) + { + return qualityRefundsExchangesUnqualifiedMapper.restoreQualityRefundsExchangesUnqualifiedById(refundsExchangesUnqualifiedId); + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesUnqualifiedMapper.xml b/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesUnqualifiedMapper.xml new file mode 100644 index 00000000..f0588810 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesUnqualifiedMapper.xml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + select refunds_exchanges_unqualified_id, refunds_exchanges_code, material_no, material_name, process_bad_classification, process_bad_grade, process_bad_num, unqualified_report_url, inspection_time, remark, create_by, create_time, update_by, update_time from quality_refunds_exchanges_unqualified + + + + + + + + insert into quality_refunds_exchanges_unqualified + + refunds_exchanges_code, + material_no, + material_name, + process_bad_classification, + process_bad_grade, + process_bad_num, + unqualified_report_url, + inspection_time, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{refundsExchangesCode}, + #{materialNo}, + #{materialName}, + #{processBadClassification}, + #{processBadGrade}, + #{processBadNum}, + #{unqualifiedReportUrl}, + #{inspectionTime}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update quality_refunds_exchanges_unqualified + + refunds_exchanges_code = #{refundsExchangesCode}, + material_no = #{materialNo}, + material_name = #{materialName}, + process_bad_classification = #{processBadClassification}, + process_bad_grade = #{processBadGrade}, + process_bad_num = #{processBadNum}, + unqualified_report_url = #{unqualifiedReportUrl}, + inspection_time = #{inspectionTime}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where refunds_exchanges_unqualified_id = #{refundsExchangesUnqualifiedId} + + + + delete from quality_refunds_exchanges_unqualified where refunds_exchanges_unqualified_id = #{refundsExchangesUnqualifiedId} + + + + delete from quality_refunds_exchanges_unqualified where refunds_exchanges_unqualified_id in + + #{refundsExchangesUnqualifiedId} + + + + + update quality_refunds_exchanges_unqualified set del_flag = '1' where refunds_exchanges_unqualified_id = #{refundsExchangesUnqualifiedId} + + + + update quality_refunds_exchanges_unqualified set del_flag = '0' where refunds_exchanges_unqualified_id = #{refundsExchangesUnqualifiedId} + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/add.html b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/add.html index a3b4a6a5..c152022e 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/add.html +++ b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/add.html @@ -214,11 +214,14 @@ } - /*检验报告*/ - function checkoutReport(materialNo){ - var makeNo = $('#makeNo').val(); //获取生产编号下拉框元素 - var url = ctx + 'quality/manufacturingCheckout/checkoutReport/' + materialNo+'/'+makeNo; - $.modal.open("制程检验报告",url); + /*品质报告*/ + function qualityReport(materialNo, supplierCode) { + var queryParams = new URLSearchParams(); + queryParams.append('materialNo', materialNo); + queryParams.append('supplierCode', encodeURIComponent(supplierCode)); + + var url = ctx + 'quality/qualityOrder/qualityReport?' + queryParams.toString(); + $.modal.open("品质报告", url); } diff --git a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/qualityOrderReport.html b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/qualityOrderReport.html new file mode 100644 index 00000000..98780931 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/qualityOrderReport.html @@ -0,0 +1,258 @@ + + + + + + + +
+
+ +
+ +
+
+
+ 不合格数 + + 添加 + +
+
+
+
+
+
+
+
+ +
+ + +
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+
+ + + + + + \ No newline at end of file