From 41b3459f8b2e1a2b37f08c70f0c7b0f3a87281b7 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Tue, 10 Oct 2023 16:54:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BD=E5=9D=AF=E7=94=9F=E4=BA=A7=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/op/mes/domain/MesProcessReport.java | 20 +++++ .../main/resources/mapper/mes/MesMapper.xml | 16 ++-- .../mapper/mes/MesReportWorkMapper.xml | 75 ++++++++++--------- .../plan/controller/ProOrderController.java | 2 +- 4 files changed, 69 insertions(+), 44 deletions(-) diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesProcessReport.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesProcessReport.java index 48495db3..56edadb9 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesProcessReport.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesProcessReport.java @@ -36,6 +36,10 @@ public class MesProcessReport extends BaseEntity { private String processCode; @Excel(name = "工序名称") private String processName; + @Excel(name = "设备编码") + private String equCode; + @Excel(name = "设备名称") + private String equName; @Excel(name = "完成数量") private BigDecimal quantityFeedback; @Excel(name = "单位") @@ -43,6 +47,22 @@ public class MesProcessReport extends BaseEntity { private String productDateStart; private String productDateEnd; + public String getEquCode() { + return equCode; + } + + public void setEquCode(String equCode) { + this.equCode = equCode; + } + + public String getEquName() { + return equName; + } + + public void setEquName(String equName) { + this.equName = equName; + } + public String getProductDateStart() { return productDateStart; } diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesMapper.xml index 8c022eb1..785a10f5 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesMapper.xml @@ -71,21 +71,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select count(0) totalNum, equ.equipment_type_code equTypeCode, equ.equipment_type_name equTypeName - from pro_rfid_process_detail prpd - left join base_equipment equ on prpd.machine_code = equ.equipment_code - where CONVERT(varchar(10),prpd.create_time, 120) = #{ymd} + from mes_material_transfer_result mt + left join base_equipment equ on mt.equipmentCode = equ.equipment_code + where CONVERT(varchar(10),mt.create_time, 120) = #{ymd} and equ.equipment_name is not null group by equ.equipment_type_code, equ.equipment_type_name diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml index 6b11ab7d..1aca8c28 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml @@ -89,48 +89,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select pow.product_date productDate, pow.order_code orderCode, - pow.quantity_split quantity, + pow.quantity_split quantity, pow.product_code productCode, pow.product_name productName, pow.product_spc productSpc, - prpd.workorder_code workorderCode, - ps.process_code processCode, + pow.workorder_code workorderCode, + ps.process_code processCode, ps.process_name processName, count(0) quantityFeedback, - '车' unit - from pro_rfid_process_detail prpd - left join pro_order_workorder pow on pow.workorder_code = prpd.workorder_code - left join pro_process ps on ps.process_id = prpd.now_process_id + '车' unit, + mt.equipmentCode equCode, + equ.equipment_name equName + from mes_material_transfer_result mt + left join base_equipment equ on mt.equipmentCode = equ.equipment_code + left join pro_order_workorder pow on pow.workorder_id = mt.OrderCode + left join pro_process ps on ps.process_id = mt.now_process_id where pow.order_code is not null - - and pow.order_code like concat('%', #{orderCode}, '%') - - - and pow.product_code like concat('%', #{productCode}, '%') - - - and pow.product_name like concat('%', #{productName}, '%') - - - and pow.workorder_code like concat('%', #{workorderCode}, '%') - - - and pow.product_spc like concat('%', #{productSpc}, '%') - - and CONVERT(varchar(10),prpd.create_time, 120) >= #{productDateStart} - and #{productDateEnd} >= CONVERT(varchar(10),prpd.create_time, 120) + + and pow.order_code like concat('%', #{orderCode}, '%') + + + and pow.product_code like concat('%', #{productCode}, '%') + + + and pow.product_name like concat('%', #{productName}, '%') + + + and pow.workorder_code like concat('%', #{workorderCode}, '%') + + + and equ.equipment_name like concat('%', #{equName}, '%') + + and CONVERT(varchar(10),mt.create_time, 120) >= #{productDateStart} + and #{productDateEnd} >= CONVERT(varchar(10),mt.create_time, 120) group by - pow.order_code, - pow.product_date, - pow.product_code, - pow.product_name, - pow.product_spc, - pow.quantity_split, - prpd.workorder_code, - prpd.now_process_id, - ps.process_name, - ps.process_code - order by pow.product_date desc,prpd.workorder_code + pow.order_code, + pow.product_date, + pow.product_code, + pow.product_name, + pow.product_spc, + pow.quantity_split, + pow.workorder_code, + mt.now_process_id, + ps.process_name, + ps.process_code, + mt.equipmentCode, + equ.equipment_name + order by pow.product_date desc,pow.workorder_code