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 2f12d859..e9a0fd9d 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,13 +1,13 @@ package com.ruoyi.quality.controller; import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; 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.QualityRefundsExchangesDetail; -import com.ruoyi.quality.domain.QualityRefundsExchangesUnqualified; +import com.ruoyi.quality.domain.*; import com.ruoyi.quality.domain.VO.CheckoutMaterialVO; import com.ruoyi.quality.service.IQualityRefundsExchangesDetailService; import com.ruoyi.quality.service.IQualityRefundsExchangesUnqualifiedService; @@ -20,7 +20,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; @@ -177,9 +176,6 @@ public class QualityRefundsExchangesController extends BaseController return toAjax(qualityRefundsExchangesService.updateRefundsExchangesStatus(qualityRefundsExchanges)); } - - - /** * 修改品质单报告不良分类 */ @@ -210,4 +206,41 @@ public class QualityRefundsExchangesController extends BaseController 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; + } + + } 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 92f059f9..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 @@ -58,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; @@ -309,6 +331,47 @@ public class QualityRefundsExchangesDetail extends BaseEntity 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; } @@ -330,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()) 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/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/impl/QualityRefundsExchangesDetailServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesDetailServiceImpl.java index 8c4304d9..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 @@ -54,6 +54,19 @@ public class QualityRefundsExchangesDetailServiceImpl implements IQualityRefunds return qualityRefundsExchangesDetailMapper.selectQualityRefundsExchangesDetailList(qualityRefundsExchangesDetail); } + /** + * 查询品质管理退换货单详情列表 + * + * @param refundsExchangesCode 退换货单号 + * @return 品质管理退换货单详情集合 + */ + @Override + public List selectRefundsExchangesDetailListByCode(String refundsExchangesCode) { + + return qualityRefundsExchangesDetailMapper.selectRefundsExchangesDetailListByCode(refundsExchangesCode); + } + + /** * 新增品质管理退换货单详情 * @@ -83,7 +96,7 @@ public class QualityRefundsExchangesDetailServiceImpl implements IQualityRefunds refundsExchangesUnqualified.setCreateTime(new Date()); unqualifiedMapper.insertQualityRefundsExchangesUnqualified(refundsExchangesUnqualified); } - return qualityRefundsExchangesDetailMapper.insertQualityRefundsExchangesDetail(qualityRefundsExchangesDetail); + 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 03349b95..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 @@ -173,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/resources/mapper/quality/QualityRefundsExchangesDetailMapper.xml b/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesDetailMapper.xml index 04917711..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" + + + + + @@ -35,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, 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 @@ -61,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, @@ -89,6 +106,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{qualityReturnNode}, #{materialTotal}, #{numTotal}, + #{supplierCode}, + #{supplierName}, + #{customerContact}, + #{contactNumber}, + #{supplierAddress}, #{materialNo}, #{materialName}, #{materialType}, @@ -121,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}, 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 +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ +
+
+
+ + + + + + + + \ No newline at end of file