From acfd56c9cc4a2395facc6c6881c7084f28f5142f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=99=93=E8=BF=AA?= <2596750866@qq.com> Date: Sat, 23 Nov 2024 09:54:27 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=20=E5=93=81=E8=B4=A8=E7=AE=A1=E7=90=86?= =?UTF-8?q?=20=E5=93=81=E8=B4=A8=E5=8D=95=20=E4=BF=AE=E6=94=B9=E5=93=81?= =?UTF-8?q?=E8=B4=A8=E5=8D=95=E8=B7=B3=E8=BD=AC=E6=9D=A5=E6=96=99=E5=93=81?= =?UTF-8?q?=E8=B4=A8=E5=8D=95=E5=BC=80=E5=A7=8B=E5=93=81=E8=B4=A8=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2controller=EF=BC=9B=20=E4=BF=AE=E6=94=B9=E5=93=81?= =?UTF-8?q?=E8=B4=A8=E6=8A=A5=E5=91=8A=E5=AE=9E=E4=BD=93=E7=B1=BB=EF=BC=8C?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AF=BC=E5=87=BA=E5=AD=97=E6=AE=B5=EF=BC=8C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E8=A7=A3=EF=BC=9B=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=93=81=E8=B4=A8=E6=8A=A5=E5=91=8A=E6=8C=89=E5=8D=95?= =?UTF-8?q?=E5=8F=B7=E6=89=B9=E9=87=8F=E6=9F=A5=E8=AF=A2=E5=93=81=E8=B4=A8?= =?UTF-8?q?=E6=8A=A5=E5=91=8Amapper=E5=92=8Cservice=E6=96=B9=E6=B3=95?= =?UTF-8?q?=EF=BC=9B=20=E4=BF=AE=E6=94=B9=E5=93=81=E8=B4=A8=E6=8A=A5?= =?UTF-8?q?=E5=91=8A=E5=AF=BC=E5=87=BAcontroller=EF=BC=8C=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=E5=A4=9A=E9=80=89=E5=92=8C=E5=85=A8=E9=83=A8=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/QualityOrderController.java | 6 +- .../QualityOrderReportController.java | 18 +++- .../quality/domain/QualityOrderReport.java | 85 ++++++++++++++----- .../mapper/QualityOrderReportMapper.java | 5 ++ .../service/IQualityOrderReportService.java | 5 ++ .../impl/QualityOrderReportServiceImpl.java | 7 ++ .../quality/QualityOrderReportMapper.xml | 10 ++- 7 files changed, 107 insertions(+), 29 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityOrderController.java index ff011215..686bcdb6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityOrderController.java @@ -160,13 +160,15 @@ public class QualityOrderController extends BaseController } /** - * 品质单开始品质 + * 来料品质单开始品质 */ @GetMapping("/startingQuality/{qualityOrderId}") public String startingQuality(@PathVariable("qualityOrderId") Long qualityOrderId, ModelMap mmap) { QualityOrder qualityOrder = qualityOrderService.selectQualityOrderById(qualityOrderId); - mmap.put("qualityOrder", qualityOrder); + QualityOrderDetail qualityOrderDetail = detailService.selectQualityOrderDetailByCode(qualityOrder.getQualityOrderCode()); + mmap.put("qualityOrderDetail",qualityOrderDetail); +// mmap.put("qualityOrder", qualityOrder); return prefix + "/startingQuality"; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityOrderReportController.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityOrderReportController.java index 232f2824..5ce02dec 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityOrderReportController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityOrderReportController.java @@ -1,5 +1,6 @@ package com.ruoyi.quality.controller; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -11,6 +12,7 @@ import com.ruoyi.quality.service.IQualityOrderReportUnqualifiedService; import com.ruoyi.quality.service.IQualityShippingDeviceService; import com.ruoyi.system.domain.Vo.BaseEmpRequisiteOrderVO; import com.ruoyi.system.service.ISysRoleService; +import com.ruoyi.warehouse.domain.WarehouseInventoryReportDamageChild; import com.ruoyi.warehouse.service.IWarehouseOutOrderService; import org.activiti.engine.RuntimeService; import org.activiti.engine.TaskService; @@ -22,6 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.transaction.annotation.Transactional; import org.springframework.ui.ModelMap; +import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.enums.BusinessType; @@ -108,11 +111,18 @@ public class QualityOrderReportController extends BaseController @Log(title = "品质管理品质单报告", businessType = BusinessType.EXPORT) @PostMapping("/export") @ResponseBody - public AjaxResult export(QualityOrderReportVO qualityOrderReport) + public AjaxResult export(QualityOrderReportVO qualityOrderReport,String ids) { - List list = qualityOrderReportService.selectQualityOrderReportList(qualityOrderReport); - ExcelUtil util = new ExcelUtil(QualityOrderReportVO.class); - return util.exportExcel(list, "品质管理品质单报告数据"); + if (StringUtils.isEmpty(ids)){ + List list = qualityOrderReportService.selectQualityOrderReportListByQualityCOde(qualityOrderReport); + ExcelUtil util = new ExcelUtil(QualityOrderReportVO.class); + return util.exportExcel(list, "品质报告单数据"); + }else { + String[] reportCodes = ids.split(","); + List list = qualityOrderReportService.selectQualityOrderReportListByCodes(reportCodes); + ExcelUtil util = new ExcelUtil(QualityOrderReportVO.class); + return util.exportExcel(list, ids); + } } /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityOrderReport.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityOrderReport.java index 0141d4b1..91aa28e7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityOrderReport.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityOrderReport.java @@ -32,89 +32,79 @@ public class QualityOrderReport extends BaseEntity private String qualityOrderReportType; /** 品质单号 */ - @Excel(name = "品质单号") + @Excel(name = "品质单号",sort = 1) private String qualityOrderCode; /** 供应商Id */ - @Excel(name = "供应商Id") private String supplierCode; /** 供应商名称 */ - @Excel(name = "供应商名称") private String supplierName; /** 料号 */ - @Excel(name = "料号") + @Excel(name = "料号",sort = 6) private String materialNo; /** 物料名称 */ - @Excel(name = "物料名称") + @Excel(name = "物料名称",sort = 7) private String materialName; /** 生产订单数 */ - @Excel(name = "生产订单数") private Integer makeTotal; /** 原实际到货数量 */ - @Excel(name = "检验数") + @Excel(name = "检验数",sort = 8) private int checkNum; //交付质检时间 @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "交检时间",sort = 11,dateFormat = "yyyy-MM-dd") private Date deliveryInspectionTime; /** 入库单号 */ - @Excel(name = "入库单号") + @Excel(name = "入库单号",sort = 3) private String inStorageCode; /** 品质单订单类型 */ - @Excel(name = "品质单订单类型") + @Excel(name = "订单类型",sort = 4,dictType = "quality_order_type") private String qualityOrderType; /** 品质单入库类型 */ - @Excel(name = "品质单入库类型") + @Excel(name = "入库类型",sort = 5,dictType = "quality_storage_status") private String qualityStorageStatus; /** 品质已合格数 */ - @Excel(name = "合格数") + @Excel(name = "合格数",sort = 9) private Integer qualityHasqualifiedNum; /** ok允收数 */ - @Excel(name = "ok允收数") private Integer okAcceptedNum; /** ok报告图片 */ - @Excel(name = "ok报告图片") private String okReportUrl; /** 特采/让步数 */ - @Excel(name = "特采/让步数") private Integer specialConcessionsNum; /** 特采报告图片 */ - @Excel(name = "特采报告图片") private String specialReportUrl; /** 检验完成时间 */ @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "检验完成时间", width = 30, dateFormat = "yyyy-MM-dd") private Date checkoutCompletionTime; /** 不良分类 */ - @Excel(name = "不良分类") private String processBadClassification; /** 不良等级 */ - @Excel(name = "不良等级") private String processBadGrade; /** 不良数量 */ - @Excel(name = "不良数") + @Excel(name = "不良数",sort = 10) private Integer processBadNum; /** 不合格报告url */ - @Excel(name = "不合格报告url") private String unqualifiedReportUrl; /*不合格数集合*/ @@ -123,10 +113,9 @@ public class QualityOrderReport extends BaseEntity //品质报告单包含出货设备ID集合 List qualityReportDeviceIds; - @Excel(name = "使用状态") private String useStatus; - @Excel(name = "审核状态") + @Excel(name = "审核状态",sort = 2,dictType = "auditStatus") private String auditStatus; /** 流程实例ID */ @@ -154,6 +143,18 @@ public class QualityOrderReport extends BaseEntity @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date applyTime; + @Excel(name = "录入人",sort = 12) + private String createBy; + + @Excel(name = "录入时间",sort = 13,dateFormat = "yyyy-MM-dd") + private Date createTime; + + @Excel(name = "更新人",sort = 14) + private String updateBy; + + @Excel(name = "更新时间",sort = 15,dateFormat = "yyyy-MM-dd") + private Date updateTime; + public void setQualityOrderReportId(Long qualityOrderReportId) { this.qualityOrderReportId = qualityOrderReportId; @@ -471,6 +472,46 @@ public class QualityOrderReport extends BaseEntity this.qualityOrderReportType = qualityOrderReportType; } + @Override + public String getCreateBy() { + return createBy; + } + + @Override + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + @Override + public Date getCreateTime() { + return createTime; + } + + @Override + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + @Override + public String getUpdateBy() { + return updateBy; + } + + @Override + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + @Override + public Date getUpdateTime() { + return updateTime; + } + + @Override + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityOrderReportMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityOrderReportMapper.java index 2adc449a..916129ae 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityOrderReportMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityOrderReportMapper.java @@ -95,4 +95,9 @@ public interface QualityOrderReportMapper * */ QualityOrderReportVO selectMakeInOrderReportByNoAndCode(QualityOrderReportVO qualityOrderReportVO); + /* + * 按单号批量查询品质报告 + * */ + List selectQualityOrderReportListByCodes(String[] ids); + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityOrderReportService.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityOrderReportService.java index ad72465c..fc977e04 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityOrderReportService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityOrderReportService.java @@ -35,6 +35,11 @@ public interface IQualityOrderReportService * 查询品质报告单列表*/ List selectQualityOrderReportListByQualityCOde(QualityOrderReportVO qualityReportVO); + /* + * 按单号批量查询品质报告 + * */ + List selectQualityOrderReportListByCodes(String[] ids); + /** * 新增品质管理品质单报告 * diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderReportServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderReportServiceImpl.java index 6b7c5419..b3a184c1 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderReportServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderReportServiceImpl.java @@ -200,6 +200,13 @@ public class QualityOrderReportServiceImpl implements IQualityOrderReportService return qualityOrderReportMapper.selectQualityOrderReportList(qualityReportVO); } + /* + * 按单号批量查询品质报告 + * */ + @Override + public List selectQualityOrderReportListByCodes(String[] ids){ + return qualityOrderReportMapper.selectQualityOrderReportListByCodes(ids); + } /** * 新增生产成品品质单报告 * diff --git a/ruoyi-admin/src/main/resources/mapper/quality/QualityOrderReportMapper.xml b/ruoyi-admin/src/main/resources/mapper/quality/QualityOrderReportMapper.xml index 55a8c159..5c274afe 100644 --- a/ruoyi-admin/src/main/resources/mapper/quality/QualityOrderReportMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/quality/QualityOrderReportMapper.xml @@ -70,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and quality_order_report_type = #{qualityOrderReportType} and material_name like concat('%', #{materialName}, '%') and quality_storage_status = #{qualityStorageStatus} - and create_time between #{params.beginCreateTime} and #{params.endCreateTime} + and Date(create_time) between #{params.beginCreateTime} and #{params.endCreateTime} and audit_status = #{auditStatus} and apply_user = #{applyUser} @@ -293,4 +293,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update quality_order_report set del_flag = '0' where quality_order_report_id = #{qualityOrderReportId} + + \ No newline at end of file