From ad4b2306b1af29ed80b9970d69df1ccb0de4a555 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Sat, 1 Jun 2024 12:03:34 +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=E6=96=B0=E5=A2=9E*=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E5=90=8E=E9=80=80=E8=B4=A7-=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86-=E6=97=A0=E4=BE=9B=E5=BA=94?= =?UTF-8?q?=E5=95=86*afterNoConfirmSupplier.html=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E9=80=80=E6=8D=A2=E8=B4=A7=E7=A1=AE=E8=AE=A4=E4=BE=9B=E5=BA=94?= =?UTF-8?q?=E5=95=86=E6=8C=89=E9=92=AE=20=E6=96=B0=E5=A2=9E=E5=90=8E?= =?UTF-8?q?=E7=AB=AF=E9=80=80=E6=8D=A2=E8=B4=A7=E7=A1=AE=E8=AE=A4=E4=BE=9B?= =?UTF-8?q?=E5=BA=94=E5=95=86=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../QualityRefundsExchangesController.java | 39 ++++ .../domain/QualityRefundsExchangesDetail.java | 28 ++- .../IQualityRefundsExchangesService.java | 6 + .../QualityRefundsExchangesServiceImpl.java | 34 +++ .../QualityRefundsExchangesDetailMapper.xml | 6 +- .../afterNoConfirmSupplier.html | 220 ++++++++++++++++++ .../refundsExchanges/refundsExchanges.html | 15 +- 7 files changed, 338 insertions(+), 10 deletions(-) create mode 100644 ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterNoConfirmSupplier.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 f34df9e6..c42a71ab 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 @@ -352,4 +352,43 @@ public class QualityRefundsExchangesController extends BaseController return toAjax(qualityRefundsExchangesService.returnBeforeStorageDetail(qualityRefundsExchanges)); } + + + + /** + * 入库后退货-选择供应商-无供应商 + */ + @GetMapping("/afterNoConfirmSupplier/{refundsExchangesId}") + public String afterNoConfirmSupplier(@PathVariable("refundsExchangesId") Long refundsExchangesId, ModelMap mmap) + { + QualityRefundsExchanges qualityRefundsExchanges = qualityRefundsExchangesService.selectQualityRefundsExchangesById(refundsExchangesId); + mmap.put("qualityRefundsExchanges", qualityRefundsExchanges); + return prefix + "/afterNoConfirmSupplier"; + } + + /** + * 保存入库后退货-选择供应商-无供应商 + */ + @RequiresPermissions("quality:refundsExchanges:afterNoConfirmSupplier") + @Log(title = "品质管理退换货单", businessType = BusinessType.UPDATE) + @PostMapping("/afterNoConfirmSupplier") + @ResponseBody + public AjaxResult afterNoConfirmSupplierSave(@RequestBody QualityRefundsExchanges qualityRefundsExchanges) + { + return toAjax(qualityRefundsExchangesService.updateAfterNoConfirmSupplier(qualityRefundsExchanges)); + } + + /** + * 入库后退货-选择供应商-无供应商 物料列表信息 + * */ + @ResponseBody + @PostMapping("/getAfterMaterialListByCode") + public TableDataInfo getAfterMaterialListByCode(QualityRefundsExchanges qualityRefundsExchanges){ + startPage(); + List list = refundsExchangesDetailService.selectRefundsExchangesDetailListByCode(qualityRefundsExchanges.getRefundsExchangesCode()); + return getDataTable(list); + } + + + } 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 9cb117bf..21e87de8 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 @@ -114,7 +114,12 @@ public class QualityRefundsExchangesDetail extends BaseEntity /** 退换货数 */ @Excel(name = "退换货数") - private Long refundsExchangesNum; + private Integer refundsExchangesNum; + + /** 品质不合格数 */ + @Excel(name = "品质不合格数") + private Integer qualityUnqualifiedNum; + /** 交付质检时间 */ @JsonFormat(pattern = "yyyy-MM-dd") @@ -295,16 +300,24 @@ public class QualityRefundsExchangesDetail extends BaseEntity { return materialProcessMethod; } - public void setRefundsExchangesNum(Long refundsExchangesNum) - { + + public Integer getRefundsExchangesNum() { + return refundsExchangesNum; + } + + public void setRefundsExchangesNum(Integer refundsExchangesNum) { this.refundsExchangesNum = refundsExchangesNum; } - public Long getRefundsExchangesNum() - { - return refundsExchangesNum; + public Integer getQualityUnqualifiedNum() { + return qualityUnqualifiedNum; } - public void setDeliveryInspectionTime(Date deliveryInspectionTime) + + public void setQualityUnqualifiedNum(Integer qualityUnqualifiedNum) { + this.qualityUnqualifiedNum = qualityUnqualifiedNum; + } + + public void setDeliveryInspectionTime(Date deliveryInspectionTime) { this.deliveryInspectionTime = deliveryInspectionTime; } @@ -407,6 +420,7 @@ public class QualityRefundsExchangesDetail extends BaseEntity .append("materialDescribe", getMaterialDescribe()) .append("materialProcessMethod", getMaterialProcessMethod()) .append("refundsExchangesNum", getRefundsExchangesNum()) + .append("qualityUnqualifiedNum",getQualityUnqualifiedNum()) .append("deliveryInspectionTime", getDeliveryInspectionTime()) .append("inspectionTime", getInspectionTime()) .append("qualityRemark", getQualityRemark()) 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 da4082d8..410365e1 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 @@ -78,4 +78,10 @@ public interface IQualityRefundsExchangesService /*入库前退换货详情*/ int returnBeforeStorageDetail(QualityRefundsExchanges qualityRefundsExchanges); + + + /** + * 保存入库后退货-选择供应商-无供应商 + */ + int updateAfterNoConfirmSupplier(QualityRefundsExchanges qualityRefundsExchanges); } 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 67310eb2..e82dc68d 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 @@ -18,6 +18,7 @@ import com.ruoyi.quality.mapper.QualityRefundsExchangesMapper; import com.ruoyi.quality.domain.QualityRefundsExchanges; import com.ruoyi.quality.service.IQualityRefundsExchangesService; import com.ruoyi.common.core.text.Convert; +import org.springframework.transaction.annotation.Transactional; /** * 品质管理退换货单Service业务层处理 @@ -180,6 +181,39 @@ public class QualityRefundsExchangesServiceImpl implements IQualityRefundsExchan return 1; } + /** + * 保存入库后退货-选择供应商-无供应商 + */ + @Transactional + @Override + public int updateAfterNoConfirmSupplier(QualityRefundsExchanges qualityRefundsExchanges) { + String loginName = ShiroUtils.getLoginName(); + List refundsExchangesDetails = qualityRefundsExchanges.getRefundsExchangesDetails(); + if (StringUtils.isEmpty(refundsExchangesDetails)){ + log.warn("退款换货单[{}]无关联的物料详情信息", qualityRefundsExchanges.getRefundsExchangesCode()); + } + + int updateRows = 0; + for (QualityRefundsExchangesDetail refundsExchangesDetail : refundsExchangesDetails) { + refundsExchangesDetail.setRefundsExchangesCode(qualityRefundsExchanges.getRefundsExchangesCode()); + refundsExchangesDetail.setDeliveryInspectionTime(qualityRefundsExchanges.getDeliveryInspectionTime()); + refundsExchangesDetail.setQualityRemark(qualityRefundsExchanges.getQualityRemark()); +// refundsExchangesDetail.setSupplierCode(tempRefundsExchangesDetail.getSupplierCode()); +// refundsExchangesDetail.setSupplierName(tempRefundsExchangesDetail.getSupplierName()); +// refundsExchangesDetail.setCustomerContact(tempRefundsExchangesDetail.getCustomerContact()); +// refundsExchangesDetail.setContactNumber(tempRefundsExchangesDetail.getContactNumber()); +// refundsExchangesDetail.setSupplierAddress(tempRefundsExchangesDetail.getSupplierAddress()); +// refundsExchangesDetail.setQualityUnqualifiedNum(tempRefundsExchangesDetail.getQualityUnqualifiedNum()); + refundsExchangesDetail.setUpdateBy(loginName); + refundsExchangesDetail.setUpdateTime(new Date()); + + //更新数据库记录 + updateRows += refundsExchangesDetailMapper.updateQualityRefundsExchangesDetail(refundsExchangesDetail); + + } + return updateRows; + } + /** *退换货单号: diff --git a/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesDetailMapper.xml b/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesDetailMapper.xml index 2ab29598..18a547ba 100644 --- a/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesDetailMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesDetailMapper.xml @@ -29,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -40,7 +41,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, 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 + 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, quality_unqualified_num ,delivery_inspection_time, inspection_time ,quality_remark, remark, create_by, create_time, update_by, update_time from quality_refunds_exchanges_detail + + +
+ +
+ +
+
+
+ +
+ +
+
+ +
+
+
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/refundsExchanges.html b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/refundsExchanges.html index 871e1231..c6865a8c 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/refundsExchanges.html +++ b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/refundsExchanges.html @@ -85,7 +85,7 @@ var returnAfterStorageDetailFlag = [[${@permission.hasPermi('quality:refundsExchanges:returnAfterStorageDetail')}]]; var beforeHasConfirmSupplierFlag = [[${@permission.hasPermi('quality:refundsExchanges:beforeHasConfirmSupplier')}]]; - + var afterNoConfirmSupplierFlag = [[${@permission.hasPermi('quality:refundsExchanges:afterNoConfirmSupplier')}]]; var refundsExchangesStatusDatas = [[${@dict.getType('refunds_exchanges_status')}]]; var qualityWarehouseStatusDatas = [[${@dict.getType('quality_warehouse_status')}]]; @@ -206,6 +206,11 @@ actions.push('确认供应商 '); } + /*入库后退货-确认供应商-没有供应商*/ + if (row.qualityReturnNode == 1){ + actions.push('确认供应商 '); + } + return actions.join(''); } }] @@ -253,12 +258,18 @@ }; - /*入库前退货-确认供应商-已经-有供应商*/ + /*入库前退货-确认供应商-已经有供应商*/ function beforeHasConfirmSupplier(refundsExchangesId){ var url = ctx + 'quality/refundsExchanges/beforeHasConfirmSupplier/' + refundsExchangesId; $.modal.open("确认供应商",url); } + /*入库后退货-确认供应商-没有供应商*/ + function afterNoConfirmSupplier(refundsExchangesId){ + var url = ctx + 'quality/refundsExchanges/afterNoConfirmSupplier/' + refundsExchangesId; + $.modal.open("确认供应商",url); + } + \ No newline at end of file