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