From fd027087a5b800e31e563fbcf758a60147da07dd Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Mon, 27 May 2024 16:07:01 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=E5=93=81=E8=B4=A8=E7=AE=A1=E7=90=86:=20?= =?UTF-8?q?=E9=80=80=E6=8D=A2=E8=B4=A7=20=E4=BF=AE=E6=94=B9=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=93=81=E8=B4=A8=E6=8A=A5=E5=91=8A=E4=B8=8D=E5=90=88?= =?UTF-8?q?=E6=A0=BC=E5=88=86=E7=B1=BB=E7=9A=84=E6=8F=92=E5=85=A5=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=EF=BC=8C=E4=B8=8D=E5=90=88=E6=A0=BC=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=9A=84=E6=97=B6=E5=80=99=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E4=B8=AD=E4=B8=8D=E9=9C=80=E8=A6=81=E6=96=B0=E5=A2=9E=20?= =?UTF-8?q?=E9=80=80=E6=8D=A2=E8=B4=A7=E8=AF=A6=E6=83=85=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E7=9B=B8=E5=85=B3=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=20=E9=80=80=E6=8D=A2=E8=B4=A7=E6=96=B0=E5=A2=9E=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E7=B1=BB=E5=9E=8B=E5=AD=97=E6=AE=B5=20=E9=80=80?= =?UTF-8?q?=E6=8D=A2=E8=B4=A7=E6=96=B0=E5=A2=9E=E5=85=A5=E5=BA=93=E5=89=8D?= =?UTF-8?q?=E9=80=80=E8=B4=A7=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2returnBef?= =?UTF-8?q?oreStorageDetail.html=20=E9=80=80=E6=8D=A2=E8=B4=A7=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=85=A5=E5=BA=93=E5=89=8D=E9=80=80=E8=B4=A7=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E5=92=8C=E5=AF=B9=E5=BA=94=E5=90=8E=E7=AB=AF=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../QualityRefundsExchangesController.java | 47 ++++- .../domain/QualityRefundsExchanges.java | 13 ++ .../domain/QualityRefundsExchangesDetail.java | 68 ++++++ .../QualityRefundsExchangesDetailMapper.java | 8 + ...IQualityRefundsExchangesDetailService.java | 10 + .../IQualityRefundsExchangesService.java | 3 + ...lityRefundsExchangesDetailServiceImpl.java | 15 +- .../QualityRefundsExchangesServiceImpl.java | 7 + .../QualityRefundsExchangesDetailMapper.xml | 31 ++- .../quality/QualityRefundsExchangesMapper.xml | 6 +- .../refundsExchanges/refundsExchanges.html | 13 ++ .../returnBeforeStorageDetail.html | 195 ++++++++++++++++++ 12 files changed, 405 insertions(+), 11 deletions(-) create mode 100644 ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/returnBeforeStorageDetail.html 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