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 44c236a9..a1fc5c66 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 @@ -1,11 +1,19 @@ package com.ruoyi.quality.controller; import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import com.ruoyi.aftersales.domain.AftersalesComplaintNoticeDetail; +import com.ruoyi.aftersales.domain.vo.AftersalesMaterialVO; +import com.ruoyi.common.utils.StringUtils; import com.ruoyi.erp.domain.ErpMaterialVo; import com.ruoyi.erp.service.IErpMaterialService; -import com.ruoyi.quality.domain.QualityOrderReport; +import com.ruoyi.quality.domain.*; import com.ruoyi.quality.domain.VO.CheckoutMaterialVO; +import com.ruoyi.quality.service.IQualityRefundsExchangesDetailService; +import com.ruoyi.quality.service.IQualityRefundsExchangesUnqualifiedService; +import lombok.extern.slf4j.Slf4j; import org.apache.poi.ss.formula.functions.T; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; @@ -14,7 +22,6 @@ import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.*; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.quality.domain.QualityRefundsExchanges; import com.ruoyi.quality.service.IQualityRefundsExchangesService; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; @@ -27,6 +34,7 @@ import com.ruoyi.common.core.page.TableDataInfo; * @author 刘晓旭 * @date 2024-05-23 */ +@Slf4j @Controller @RequestMapping("/quality/refundsExchanges") public class QualityRefundsExchangesController extends BaseController @@ -39,6 +47,12 @@ public class QualityRefundsExchangesController extends BaseController @Autowired private IErpMaterialService erpMaterialService; + @Autowired + private IQualityRefundsExchangesUnqualifiedService refundsExchangesUnqualifiedService; + + @Autowired + private IQualityRefundsExchangesDetailService refundsExchangesDetailService; + @RequiresPermissions("quality:refundsExchanges:view") @GetMapping() public String refundsExchanges() @@ -76,9 +90,10 @@ public class QualityRefundsExchangesController extends BaseController /** * 新增品质管理退换货单 */ - @GetMapping("/add") - public String add() + @GetMapping("/add/{refundsExchangesCode}") + public String add(@PathVariable("refundsExchangesCode") String refundsExchangesCode,ModelMap mmap) { + mmap.put("refundsExchangesCode", refundsExchangesCode); return prefix + "/add"; } @@ -163,4 +178,106 @@ public class QualityRefundsExchangesController extends BaseController return toAjax(qualityRefundsExchangesService.updateRefundsExchangesStatus(qualityRefundsExchanges)); } + /** + * 新增品质单报告不合格数 + */ + @GetMapping("/qualityReport") + public String qualityReport( @RequestParam("materialNo") String materialNo, + @RequestParam("refundsExchangesCode") String refundsExchangesCode, ModelMap mmap) + { + if (StringUtils.isEmpty(materialNo)){ + log.warn("物料号为空:{}",materialNo); + } + if (StringUtils.isEmpty(refundsExchangesCode)){ + log.warn("退换货号为空:{}",refundsExchangesCode); + } + mmap.put("materialNo",materialNo); + mmap.put("refundsExchangesCode",refundsExchangesCode); + return prefix + "/qualityOrderReport"; + } + + /** + * 新增保存品质单报告不合格数 + */ + @Log(title = "品质管理品质单", businessType = BusinessType.INSERT) + @PostMapping("/qualityReport") + @ResponseBody + public AjaxResult qualityReportSave(@RequestBody QualityRefundsExchangesDetail refundsExchangesDetail) + { + return toAjax(refundsExchangesDetailService.insertQualityRefundsExchangesDetail(refundsExchangesDetail)); + } + + /** + * 入库前退换货单详情 + */ + @GetMapping("/returnBeforeStorageDetail/{refundsExchangesId}") + public String returnBeforeStorageDetail(@PathVariable("refundsExchangesId") Long refundsExchangesId, ModelMap mmap) + { + QualityRefundsExchanges qualityRefundsExchanges = qualityRefundsExchangesService.selectQualityRefundsExchangesById(refundsExchangesId); + mmap.put("qualityRefundsExchanges", qualityRefundsExchanges); + return prefix + "/returnBeforeStorageDetail"; + } + + /** + * 保存入库前退换货单详情 + */ + @RequiresPermissions("quality:refundsExchanges:returnBeforeStorageDetail") + @Log(title = "品质管理退换货单", businessType = BusinessType.UPDATE) + @PostMapping("/returnBeforeStorageDetail") + @ResponseBody + public AjaxResult returnBeforeStorageDetailSave(QualityRefundsExchanges qualityRefundsExchanges) + { + return toAjax(qualityRefundsExchangesService.returnBeforeStorageDetail(qualityRefundsExchanges)); + } + + + /** + * 入库前退货详情物料和供应商列表 + */ + @ResponseBody + @RequestMapping("/detailListGroupedBySupplier") + public Map> detailListGroupedBySupplier(String refundsExchangesCode) { + List allDetails = refundsExchangesDetailService.selectRefundsExchangesDetailListByCode(refundsExchangesCode); + Map> groupedDetails = allDetails.stream() + .collect(Collectors.groupingBy(QualityRefundsExchangesDetail::getSupplierCode)); + return groupedDetails; + } + + + + /** + * 入库前退换货单详情 + */ + @GetMapping("/returnAfterStorageDetail/{refundsExchangesId}") + public String returnAfterStorageDetail(@PathVariable("refundsExchangesId") Long refundsExchangesId, ModelMap mmap) + { + QualityRefundsExchanges qualityRefundsExchanges = qualityRefundsExchangesService.selectQualityRefundsExchangesById(refundsExchangesId); + mmap.put("qualityRefundsExchanges", qualityRefundsExchanges); + return prefix + "/returnAfterStorageDetail"; + } + + /** + * 保存入库前退换货单详情 + */ + @RequiresPermissions("quality:refundsExchanges:returnAfterStorageDetail") + @Log(title = "品质管理退换货单", businessType = BusinessType.UPDATE) + @PostMapping("/returnAfterStorageDetail") + @ResponseBody + public AjaxResult returnAfterStorageDetailSave(QualityRefundsExchanges qualityRefundsExchanges) + { + return toAjax(qualityRefundsExchangesService.returnBeforeStorageDetail(qualityRefundsExchanges)); + } + + /** + * 入库后退货详情物料信息列表 + * */ + @ResponseBody + @PostMapping("/getMaterialListByRefundsExchangesCode") + public TableDataInfo getMaterialListByRefundsExchangesCode(QualityRefundsExchanges qualityRefundsExchanges){ + startPage(); + List list = refundsExchangesDetailService.selectRefundsExchangesDetailListByCode(qualityRefundsExchanges.getRefundsExchangesCode()); + return getDataTable(list); + } + + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchanges.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchanges.java index 672feaf1..aa42ff63 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchanges.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchanges.java @@ -46,6 +46,10 @@ public class QualityRefundsExchanges extends BaseEntity @Excel(name = "入库单号") private String inStorageCode; + /** 入库类型 */ + @Excel(name = "入库类型") + private String warehouseStorageType; + /** 退货节点 */ @Excel(name = "退货节点") private String qualityReturnNode; @@ -180,6 +184,14 @@ public class QualityRefundsExchanges extends BaseEntity return qualityRemark; } + public String getWarehouseStorageType() { + return warehouseStorageType; + } + + public void setWarehouseStorageType(String warehouseStorageType) { + this.warehouseStorageType = warehouseStorageType; + } + public List getRefundsExchangesDetails() { return refundsExchangesDetails; } @@ -198,6 +210,7 @@ public class QualityRefundsExchanges extends BaseEntity .append("qualityPurchaseStatus", getQualityPurchaseStatus()) .append("relatedOrderCode", getRelatedOrderCode()) .append("inStorageCode", getInStorageCode()) + .append("warehouseStorageType", getWarehouseStorageType()) .append("qualityReturnNode", getQualityReturnNode()) .append("materialTotal", getMaterialTotal()) .append("numTotal", getNumTotal()) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchangesDetail.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchangesDetail.java index 0f75ed65..9cb117bf 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchangesDetail.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchangesDetail.java @@ -1,6 +1,8 @@ package com.ruoyi.quality.domain; import java.util.Date; +import java.util.List; + import com.fasterxml.jackson.annotation.JsonFormat; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; @@ -56,6 +58,28 @@ public class QualityRefundsExchangesDetail extends BaseEntity @Excel(name = "数量合计") private Long numTotal; + + /** 供应商Id */ + @Excel(name = "供应商Id") + private String supplierCode; + + /** 供应商名称 */ + @Excel(name = "供应商名称") + private String supplierName; + + /** 联系人 */ + @Excel(name = "联系人") + private String customerContact; + + /** 联系电话 */ + @Excel(name = "联系电话") + private String contactNumber; + + /** 公司地址 */ + @Excel(name = "公司地址") + private String supplierAddress; + + /** 料号 */ @Excel(name = "料号") private String materialNo; @@ -97,10 +121,18 @@ public class QualityRefundsExchangesDetail extends BaseEntity @Excel(name = "交付质检时间", width = 30, dateFormat = "yyyy-MM-dd") private Date deliveryInspectionTime; + /** 检验完成时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "检验完成时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date inspectionTime; + /** 品质备注 */ @Excel(name = "品质备注") private String qualityRemark; + /*不合格分类列表*/ + private List refundsExchangesUnqualifieds; + public void setRefundsExchangesDetailId(Long refundsExchangesDetailId) { this.refundsExchangesDetailId = refundsExchangesDetailId; @@ -291,6 +323,63 @@ public class QualityRefundsExchangesDetail extends BaseEntity return qualityRemark; } + public Date getInspectionTime() { + return inspectionTime; + } + + public void setInspectionTime(Date inspectionTime) { + this.inspectionTime = inspectionTime; + } + + + public String getSupplierCode() { + return supplierCode; + } + + public void setSupplierCode(String supplierCode) { + this.supplierCode = supplierCode; + } + + public String getSupplierName() { + return supplierName; + } + + public void setSupplierName(String supplierName) { + this.supplierName = supplierName; + } + + public String getCustomerContact() { + return customerContact; + } + + public void setCustomerContact(String customerContact) { + this.customerContact = customerContact; + } + + public String getContactNumber() { + return contactNumber; + } + + public void setContactNumber(String contactNumber) { + this.contactNumber = contactNumber; + } + + public String getSupplierAddress() { + return supplierAddress; + } + + public void setSupplierAddress(String supplierAddress) { + this.supplierAddress = supplierAddress; + } + + public List getRefundsExchangesUnqualifieds() { + return refundsExchangesUnqualifieds; + } + + public void setRefundsExchangesUnqualifieds(List refundsExchangesUnqualifieds) { + this.refundsExchangesUnqualifieds = refundsExchangesUnqualifieds; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) @@ -304,6 +393,11 @@ public class QualityRefundsExchangesDetail extends BaseEntity .append("qualityReturnNode", getQualityReturnNode()) .append("materialTotal", getMaterialTotal()) .append("numTotal", getNumTotal()) + .append("supplierCode", getSupplierCode()) + .append("supplierName", getSupplierName()) + .append("customerContact", getCustomerContact()) + .append("contactNumber", getContactNumber()) + .append("supplierAddress", getSupplierAddress()) .append("materialNo", getMaterialNo()) .append("materialName", getMaterialName()) .append("materialType", getMaterialType()) @@ -314,12 +408,14 @@ public class QualityRefundsExchangesDetail extends BaseEntity .append("materialProcessMethod", getMaterialProcessMethod()) .append("refundsExchangesNum", getRefundsExchangesNum()) .append("deliveryInspectionTime", getDeliveryInspectionTime()) + .append("inspectionTime", getInspectionTime()) .append("qualityRemark", getQualityRemark()) .append("remark", getRemark()) .append("createBy", getCreateBy()) .append("createTime", getCreateTime()) .append("updateBy", getUpdateBy()) .append("updateTime", getUpdateTime()) + .append("refundsExchangesUnqualifieds",getRefundsExchangesUnqualifieds()) .toString(); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityRefundsExchangesDetailMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityRefundsExchangesDetailMapper.java index d76accdc..2402ca44 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityRefundsExchangesDetailMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityRefundsExchangesDetailMapper.java @@ -74,4 +74,12 @@ public interface QualityRefundsExchangesDetailMapper * @return 结果 */ public int restoreQualityRefundsExchangesDetailById(Long refundsExchangesDetailId); + + /** + * 查询品质管理退换货单详情列表 + * + * @param refundsExchangesCode 退换货单号 + * @return 品质管理退换货单详情集合 + */ + List selectRefundsExchangesDetailListByCode(String refundsExchangesCode); } 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 index fb1f8d1d..17f2de56 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityRefundsExchangesUnqualifiedMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityRefundsExchangesUnqualifiedMapper.java @@ -74,4 +74,12 @@ public interface QualityRefundsExchangesUnqualifiedMapper * @return 结果 */ public int restoreQualityRefundsExchangesUnqualifiedById(Long refundsExchangesUnqualifiedId); + + /** + * 查询品质管理退换货不合格分类 + * + * @param refundsExchangesUnqualified 品质管理退换货不合格分类 + * @return 品质管理退换货不合格分类 + */ + QualityRefundsExchangesUnqualified selectRefundsExchangesUnqualifiedByNoAndCode(QualityRefundsExchangesUnqualified refundsExchangesUnqualified); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesDetailService.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesDetailService.java index 55eee25e..aa603d7f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesDetailService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesDetailService.java @@ -27,6 +27,15 @@ public interface IQualityRefundsExchangesDetailService */ public List selectQualityRefundsExchangesDetailList(QualityRefundsExchangesDetail qualityRefundsExchangesDetail); + + /** + * 查询品质管理退换货单详情列表 + * + * @param refundsExchangesCode 退换货单号 + * @return 品质管理退换货单详情集合 + */ + public List selectRefundsExchangesDetailListByCode(String refundsExchangesCode); + /** * 新增品质管理退换货单详情 * @@ -72,4 +81,5 @@ public interface IQualityRefundsExchangesDetailService * @return */ int restoreQualityRefundsExchangesDetailById(Long refundsExchangesDetailId); + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesService.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesService.java index bf8aabcf..da4082d8 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesService.java @@ -75,4 +75,7 @@ public interface IQualityRefundsExchangesService /*修改退换货状态*/ int updateRefundsExchangesStatus(QualityRefundsExchanges qualityRefundsExchanges); + + /*入库前退换货详情*/ + int returnBeforeStorageDetail(QualityRefundsExchanges qualityRefundsExchanges); } 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 index 765ffe15..799f11e5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesUnqualifiedService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesUnqualifiedService.java @@ -72,4 +72,18 @@ public interface IQualityRefundsExchangesUnqualifiedService * @return */ int restoreQualityRefundsExchangesUnqualifiedById(Long refundsExchangesUnqualifiedId); + + + /** + * 查询品质管理退换货不合格分类 + * + * @param refundsExchangesUnqualified 品质管理退换货不合格分类 + * @return 品质管理退换货不合格分类 + */ + public QualityRefundsExchangesUnqualified selectRefundsExchangesUnqualifiedByNoAndCode(QualityRefundsExchangesUnqualified refundsExchangesUnqualified); + + /** + * 新增保存品质单报告不良分类 + */ + int addRefundsExchangesUnqualified(QualityRefundsExchangesUnqualified refundsExchangesUnqualified); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesDetailServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesDetailServiceImpl.java index e008cf5c..d14cba8f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesDetailServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesDetailServiceImpl.java @@ -1,14 +1,19 @@ package com.ruoyi.quality.service.impl; +import java.util.Date; import java.util.List; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.ShiroUtils; +import com.ruoyi.quality.domain.QualityRefundsExchangesUnqualified; +import com.ruoyi.quality.mapper.QualityOrderReportUnqualifiedMapper; +import com.ruoyi.quality.mapper.QualityRefundsExchangesUnqualifiedMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.quality.mapper.QualityRefundsExchangesDetailMapper; import com.ruoyi.quality.domain.QualityRefundsExchangesDetail; import com.ruoyi.quality.service.IQualityRefundsExchangesDetailService; import com.ruoyi.common.core.text.Convert; +import org.springframework.transaction.annotation.Transactional; /** * 品质管理退换货单详情Service业务层处理 @@ -22,6 +27,9 @@ public class QualityRefundsExchangesDetailServiceImpl implements IQualityRefunds @Autowired private QualityRefundsExchangesDetailMapper qualityRefundsExchangesDetailMapper; + @Autowired + private QualityRefundsExchangesUnqualifiedMapper unqualifiedMapper; + /** * 查询品质管理退换货单详情 * @@ -46,19 +54,49 @@ public class QualityRefundsExchangesDetailServiceImpl implements IQualityRefunds return qualityRefundsExchangesDetailMapper.selectQualityRefundsExchangesDetailList(qualityRefundsExchangesDetail); } + /** + * 查询品质管理退换货单详情列表 + * + * @param refundsExchangesCode 退换货单号 + * @return 品质管理退换货单详情集合 + */ + @Override + public List selectRefundsExchangesDetailListByCode(String refundsExchangesCode) { + + return qualityRefundsExchangesDetailMapper.selectRefundsExchangesDetailListByCode(refundsExchangesCode); + } + + /** * 新增品质管理退换货单详情 * * @param qualityRefundsExchangesDetail 品质管理退换货单详情 * @return 结果 */ + @Transactional @Override public int insertQualityRefundsExchangesDetail(QualityRefundsExchangesDetail qualityRefundsExchangesDetail) { String loginName = ShiroUtils.getLoginName(); qualityRefundsExchangesDetail.setCreateBy(loginName); qualityRefundsExchangesDetail.setCreateTime(DateUtils.getNowDate()); - return qualityRefundsExchangesDetailMapper.insertQualityRefundsExchangesDetail(qualityRefundsExchangesDetail); + + //获取前端不合格分类列表 + List refundsExchangesUnqualifieds = qualityRefundsExchangesDetail.getRefundsExchangesUnqualifieds(); + for (QualityRefundsExchangesUnqualified temp : refundsExchangesUnqualifieds) { + QualityRefundsExchangesUnqualified refundsExchangesUnqualified = new QualityRefundsExchangesUnqualified(); + refundsExchangesUnqualified.setRefundsExchangesCode(qualityRefundsExchangesDetail.getRefundsExchangesCode()); + refundsExchangesUnqualified.setMaterialNo(qualityRefundsExchangesDetail.getMaterialNo()); + refundsExchangesUnqualified.setInspectionTime(qualityRefundsExchangesDetail.getInspectionTime()); + refundsExchangesUnqualified.setProcessBadClassification(temp.getProcessBadClassification()); + refundsExchangesUnqualified.setProcessBadGrade(temp.getProcessBadGrade()); + refundsExchangesUnqualified.setProcessBadNum(temp.getProcessBadNum()); + refundsExchangesUnqualified.setRemark(temp.getRemark()); + refundsExchangesUnqualified.setCreateBy(loginName); + refundsExchangesUnqualified.setCreateTime(new Date()); + unqualifiedMapper.insertQualityRefundsExchangesUnqualified(refundsExchangesUnqualified); + } + return 1; } /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesServiceImpl.java index 17573b23..67310eb2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesServiceImpl.java @@ -69,6 +69,11 @@ public class QualityRefundsExchangesServiceImpl implements IQualityRefundsExchan public int insertQualityRefundsExchanges(QualityRefundsExchanges qualityRefundsExchanges) { + String refundsExchangesCode = qualityRefundsExchanges.getRefundsExchangesCode(); + + if (StringUtils.isEmpty(refundsExchangesCode)){ + log.warn("退换货单号为空:{}",refundsExchangesCode); + } String loginName = ShiroUtils.getLoginName(); List refundsExchangesDetails = qualityRefundsExchanges.getRefundsExchangesDetails(); if (StringUtils.isEmpty(refundsExchangesDetails)){ @@ -76,9 +81,9 @@ public class QualityRefundsExchangesServiceImpl implements IQualityRefundsExchan } for (QualityRefundsExchangesDetail tempDetail : refundsExchangesDetails) { QualityRefundsExchangesDetail refundsExchangesDetail = new QualityRefundsExchangesDetail(); - refundsExchangesDetail.setRefundsExchangesCode(tempDetail.getRefundsExchangesCode()); - refundsExchangesDetail.setDeliveryInspectionTime(tempDetail.getDeliveryInspectionTime()); - refundsExchangesDetail.setQualityRemark(tempDetail.getQualityRemark()); + refundsExchangesDetail.setRefundsExchangesCode(refundsExchangesCode); + refundsExchangesDetail.setDeliveryInspectionTime(qualityRefundsExchanges.getDeliveryInspectionTime()); + refundsExchangesDetail.setQualityRemark(qualityRefundsExchanges.getQualityRemark()); refundsExchangesDetail.setMaterialNo(tempDetail.getMaterialNo()); refundsExchangesDetail.setMaterialName(tempDetail.getMaterialName()); refundsExchangesDetail.setMaterialBrand(tempDetail.getMaterialBrand()); @@ -168,6 +173,13 @@ public class QualityRefundsExchangesServiceImpl implements IQualityRefundsExchan return qualityRefundsExchangesMapper.updateQualityRefundsExchanges(qualityRefundsExchanges); } + /*入库前退换货详情*/ + @Override + public int returnBeforeStorageDetail(QualityRefundsExchanges qualityRefundsExchanges) { + + return 1; + } + /** *退换货单号: 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 index 93a7c26e..8c54e285 100644 --- 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 @@ -123,4 +123,29 @@ public class QualityRefundsExchangesUnqualifiedServiceImpl implements IQualityRe { return qualityRefundsExchangesUnqualifiedMapper.restoreQualityRefundsExchangesUnqualifiedById(refundsExchangesUnqualifiedId); } + + + /** + * 查询品质管理退换货不合格分类 + * + * @param refundsExchangesUnqualified 品质管理退换货不合格分类 + * @return 品质管理退换货不合格分类 + */ + @Override + public QualityRefundsExchangesUnqualified selectRefundsExchangesUnqualifiedByNoAndCode(QualityRefundsExchangesUnqualified refundsExchangesUnqualified) { + + return qualityRefundsExchangesUnqualifiedMapper.selectRefundsExchangesUnqualifiedByNoAndCode(refundsExchangesUnqualified); + } + + /** + * 新增保存品质单报告不良分类 + */ + @Override + public int addRefundsExchangesUnqualified(QualityRefundsExchangesUnqualified refundsExchangesUnqualified) { + + String loginName = ShiroUtils.getLoginName(); + refundsExchangesUnqualified.setUpdateBy(loginName); + refundsExchangesUnqualified.setUpdateTime(DateUtils.getNowDate()); + return qualityRefundsExchangesUnqualifiedMapper.insertQualityRefundsExchangesUnqualified(refundsExchangesUnqualified); + } } diff --git a/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesDetailMapper.xml b/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesDetailMapper.xml index 0ed8e0eb..9b38a313 100644 --- a/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesDetailMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesDetailMapper.xml @@ -15,6 +15,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + @@ -25,6 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -34,7 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select refunds_exchanges_detail_id, refunds_exchanges_code, refunds_exchanges_status, quality_warehouse_status, quality_purchase_status, related_order_code, in_storage_code, quality_return_node, material_total, num_total, material_no, material_name, material_type, material_photoUrl, material_brand, material_unit, material_describe, material_process_method, refunds_exchanges_num, delivery_inspection_time, quality_remark, remark, create_by, create_time, update_by, update_time from quality_refunds_exchanges_detail + select refunds_exchanges_detail_id, refunds_exchanges_code, refunds_exchanges_status, quality_warehouse_status, quality_purchase_status, related_order_code, in_storage_code, quality_return_node, material_total, num_total, supplier_code, supplier_name, customer_contact, contact_number, supplier_address, material_no, material_name, material_type, material_photoUrl, material_brand, material_unit, material_describe, material_process_method, refunds_exchanges_num, delivery_inspection_time, inspection_time ,quality_remark, remark, create_by, create_time, update_by, update_time from quality_refunds_exchanges_detail - + + + + + insert into quality_refunds_exchanges_detail @@ -60,6 +73,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" quality_return_node, material_total, num_total, + supplier_code, + supplier_name, + customer_contact, + contact_number, + supplier_address, material_no, material_name, material_type, @@ -70,6 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" material_process_method, refunds_exchanges_num, delivery_inspection_time, + inspection_time, quality_remark, remark, create_by, @@ -87,6 +106,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{qualityReturnNode}, #{materialTotal}, #{numTotal}, + #{supplierCode}, + #{supplierName}, + #{customerContact}, + #{contactNumber}, + #{supplierAddress}, #{materialNo}, #{materialName}, #{materialType}, @@ -97,6 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{materialProcessMethod}, #{refundsExchangesNum}, #{deliveryInspectionTime}, + #{inspectionTime}, #{qualityRemark}, #{remark}, #{createBy}, @@ -118,6 +143,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" quality_return_node = #{qualityReturnNode}, material_total = #{materialTotal}, num_total = #{numTotal}, + supplier_code = #{supplierCode}, + supplier_name = #{supplierName}, + customer_contact = #{customerContact}, + contact_number = #{contactNumber}, + supplier_address = #{supplierAddress}, material_no = #{materialNo}, material_name = #{materialName}, material_type = #{materialType}, @@ -128,6 +158,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" material_process_method = #{materialProcessMethod}, refunds_exchanges_num = #{refundsExchangesNum}, delivery_inspection_time = #{deliveryInspectionTime}, + inspection_time = #{inspectionTime}, quality_remark = #{qualityRemark}, remark = #{remark}, create_by = #{createBy}, diff --git a/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesMapper.xml b/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesMapper.xml index 58d25f11..67c3f3db 100644 --- a/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesMapper.xml @@ -12,6 +12,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -25,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select refunds_exchanges_id, refunds_exchanges_code, refunds_exchanges_status, quality_warehouse_status, quality_purchase_status, related_order_code, in_storage_code, quality_return_node, material_total, num_total, delivery_inspection_time, quality_remark, remark, create_by, create_time, update_by, update_time from quality_refunds_exchanges + select refunds_exchanges_id, refunds_exchanges_code, refunds_exchanges_status, quality_warehouse_status, quality_purchase_status, related_order_code, in_storage_code, warehouse_storage_type ,quality_return_node, material_total, num_total, delivery_inspection_time, quality_remark, remark, create_by, create_time, update_by, update_time from quality_refunds_exchanges - + + + + + insert into quality_refunds_exchanges_unqualified 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 c152022e..5cceb476 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/add.html +++ b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/add.html @@ -8,7 +8,7 @@
- +
@@ -17,7 +17,7 @@
- +
@@ -45,6 +45,9 @@ \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/returnAfterStorageDetail.html b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/returnAfterStorageDetail.html new file mode 100644 index 00000000..0181c90c --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/returnAfterStorageDetail.html @@ -0,0 +1,224 @@ + + + + + + + +
+ + +
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/returnBeforeStorageDetail.html b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/returnBeforeStorageDetail.html new file mode 100644 index 00000000..39fdd039 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/returnBeforeStorageDetail.html @@ -0,0 +1,195 @@ + + + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ +
+
+
+
+
+ + + + + + \ No newline at end of file