From 20742eac2116b937df0c9c6465648a7b62a80665 Mon Sep 17 00:00:00 2001 From: sunyugang Date: Fri, 29 Aug 2025 14:52:50 +0800 Subject: [PATCH] =?UTF-8?q?0829-=E9=9C=80=E6=B1=82=E5=8F=98=E6=9B=B4?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ktg/mes/wm/domain/WmIssueHeader.java | 5 ++ .../ktg/mes/wm/vo/WmIssueHeaderExportVo.java | 9 ++ .../mapper/pro/ProWorkorderMapper.xml | 83 ++++++++++--------- .../mapper/wm/WmIssueHeaderMapper.xml | 64 ++++++++------ 4 files changed, 96 insertions(+), 65 deletions(-) diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmIssueHeader.java b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmIssueHeader.java index 42ccc69..b562bca 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmIssueHeader.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmIssueHeader.java @@ -7,6 +7,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ktg.common.annotation.Excel; import com.ktg.common.core.domain.BaseEntity; +import org.springframework.data.annotation.Transient; /** * 生产领料单头对象 wm_issue_header @@ -162,4 +163,8 @@ public class WmIssueHeader extends BaseEntity */ @Excel(name = "撤销原因") private String cancelRemark; + + @Transient + @Excel(name = "产品规格") + private String productSpc; } diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/vo/WmIssueHeaderExportVo.java b/ktg-mes/src/main/java/com/ktg/mes/wm/vo/WmIssueHeaderExportVo.java index ae87d17..598bfbd 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/vo/WmIssueHeaderExportVo.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/vo/WmIssueHeaderExportVo.java @@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; import com.ktg.common.annotation.Excel; import com.ktg.common.core.domain.BaseEntity; import lombok.Data; +import org.springframework.data.annotation.Transient; import java.math.BigDecimal; import java.util.Date; @@ -17,6 +18,14 @@ import java.util.Date; @Data public class WmIssueHeaderExportVo { + + @Transient + @Excel(name = "产品规格") + private String productSpc; + + @Excel(name = "炉号") + private String machineryNo; + /** 产品物料编码 */ @Excel(name = "产品物料编码") private String itemCode; diff --git a/ktg-mes/src/main/resources/mapper/pro/ProWorkorderMapper.xml b/ktg-mes/src/main/resources/mapper/pro/ProWorkorderMapper.xml index 0569134..1d56905 100644 --- a/ktg-mes/src/main/resources/mapper/pro/ProWorkorderMapper.xml +++ b/ktg-mes/src/main/resources/mapper/pro/ProWorkorderMapper.xml @@ -178,62 +178,69 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order by create_time desc - + select wih.issue_id, wih.issue_code, wih.issue_name, wih.workstation_id, wih.workstation_code, + wih.workstation_name, wih.workorder_id, + wih.workorder_code, wih.task_id, wih.task_code, wih.client_id, wih.client_code, + wih.client_name, wih.client_nick, wih.warehouse_id, wih.warehouse_code, wih.warehouse_name, + wih.location_id, wih.location_code, wih.location_name, wih.area_id, wih.area_code, wih.area_name, + wih.issue_date, wih.status, wih.remark,wih.cancel_remark, wih.attr1, wih.attr2, wih.attr3, wih.attr4, + wih.create_by, wih.create_time, wih.update_by, wih.update_time, wih.machinery_id, wih.machinery_code, + wih.machinery_name, wih.machinery_no, wih.team_id, wih.team_code, wih.team_name,pw.product_spc from wm_issue_header wih + left join pro_workorder pw on pw.workorder_id = wih.workorder_id - and issue_code = #{issueCode} - and issue_name like concat('%', #{issueName}, '%') - and workstation_id = #{workstationId} - and workstation_code = #{workstationCode} - and workstation_name = #{workstationName} - and workorder_id = #{workorderId} - and workorder_code = #{workorderCode} - and task_id = #{taskId} - and task_code = #{taskCode} - and client_id = #{clientId} - and client_code = #{clientCode} - and client_name like concat('%', #{clientName}, '%') - and client_nick = #{clientNick} - and warehouse_id = #{warehouseId} - and warehouse_code = #{warehouseCode} - and warehouse_name like concat('%', #{warehouseName}, '%') - and location_id = #{locationId} - and location_code = #{locationCode} - and location_name like concat('%', #{locationName}, '%') - and area_id = #{areaId} - and area_code = #{areaCode} - and area_name like concat('%', #{areaName}, '%') - and status = #{status} + and wih.issue_code = #{issueCode} + and wih.issue_name like concat('%', #{issueName}, '%') + and wih.workstation_id = #{workstationId} + and wih.workstation_code = #{workstationCode} + and wih.workstation_name = #{workstationName} + and wih.workorder_id = #{workorderId} + and wih.workorder_code = #{workorderCode} + and wih.task_id = #{taskId} + and wih.task_code = #{taskCode} + and wih.client_id = #{clientId} + and wih.client_code = #{clientCode} + and wih.client_name like concat('%', #{clientName}, '%') + and wih.client_nick = #{clientNick} + and wih.warehouse_id = #{warehouseId} + and wih.warehouse_code = #{warehouseCode} + and wih.warehouse_name like concat('%', #{warehouseName}, '%') + and wih.location_id = #{locationId} + and wih.location_code = #{locationCode} + and wih.location_name like concat('%', #{locationName}, '%') + and wih.area_id = #{areaId} + and wih.area_code = #{areaCode} + and wih.area_name like concat('%', #{areaName}, '%') + and wih.status = #{status} - AND date_format(issue_date,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') + AND date_format(wih.issue_date,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') - AND date_format(issue_date,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') + AND date_format(wih.issue_date,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') order by create_time desc