From b241cfe5420d502a2e1d6abb2a428bd53d3f5a3b Mon Sep 17 00:00:00 2001 From: A0010407 Date: Fri, 15 Sep 2023 13:58:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E7=A1=80=E4=BF=A1=E6=81=AFBOM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/op/wms/domain/BaseBom.java | 133 ++++++++++++++++++ .../resources/mapper/wms/BaseBomMapper.xml | 62 +++++--- 2 files changed, 175 insertions(+), 20 deletions(-) diff --git a/op-modules/op-wms/src/main/java/com/op/wms/domain/BaseBom.java b/op-modules/op-wms/src/main/java/com/op/wms/domain/BaseBom.java index 18f75e09..747eda37 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/domain/BaseBom.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/domain/BaseBom.java @@ -94,6 +94,51 @@ public class BaseBom extends BaseEntity { @Excel(name = "是否在用") private String currentVersion; + //虚拟字段 + /** 物料编码 */ + @Excel(name = "产品编码") + private String productCode; + + /** 物料编码 */ + @Excel(name = "产品名称") + private String productDescZh; + + /** 物料编码 */ + @Excel(name = "组件名称") + private String componentDescZh; + + /** 组件上层物料编码 */ + @Excel(name = "组件上层物料编码") + private String cumc; + + /** 组件编码 */ + @Excel(name = "组件编码") + private String component; + + /** BOM层次 */ + @Excel(name = "BOM层次") + private String bomHierarchy; + + /** 项目编号 */ + @Excel(name = "项目编号") + private String projectNo; + + /** 标准用量 */ + @Excel(name = "标准用量") + private Long standardDosage; + + /** 损耗率 */ + @Excel(name = "损耗率") + private Long lossRate; + + /** 损耗额 */ + @Excel(name = "损耗额") + private Long lossAmount; + + /** 含损耗用量 */ + @Excel(name = "含损耗用量") + private Long cilosses; + public void setFactoryCode(String factoryCode) { this.factoryCode = factoryCode; } @@ -229,6 +274,83 @@ public class BaseBom extends BaseEntity { return currentVersion; } + public void setComponentDescZh(String componentDescZh) { + this.componentDescZh = componentDescZh; + } + public String getComponentDescZh() { + return componentDescZh; + } + + public void setProductDescZh(String productDescZh) { + this.productDescZh = productDescZh; + } + public String getProductDescZh() { + return productDescZh; + } + + public void setProductCode(String productCode) { + this.productCode = productCode; + } + public String getProductCode() { + return productCode; + } + + public void setCumc(String cumc) { + this.cumc = cumc; + } + + public String getCumc() { + return cumc; + } + public void setComponent(String component) { + this.component = component; + } + + public String getComponent() { + return component; + } + public void setBomHierarchy(String bomHierarchy) { + this.bomHierarchy = bomHierarchy; + } + + public String getBomHierarchy() { + return bomHierarchy; + } + public void setProjectNo(String projectNo) { + this.projectNo = projectNo; + } + + public String getProjectNo() { + return projectNo; + } + public void setStandardDosage(Long standardDosage) { + this.standardDosage = standardDosage; + } + + public Long getStandardDosage() { + return standardDosage; + } + public void setLossRate(Long lossRate) { + this.lossRate = lossRate; + } + + public Long getLossRate() { + return lossRate; + } + public void setLossAmount(Long lossAmount) { + this.lossAmount = lossAmount; + } + + public Long getLossAmount() { + return lossAmount; + } + public void setCilosses(Long cilosses) { + this.cilosses = cilosses; + } + + public Long getCilosses() { + return cilosses; + } @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) @@ -256,6 +378,17 @@ public class BaseBom extends BaseEntity { .append("updateTime", getUpdateTime()) .append("remark", getRemark()) .append("currentVersion", getCurrentVersion()) + .append("productCode", getProductCode()) + .append("productDescZh", getProductDescZh()) + .append("componentDescZh", getComponentDescZh()) + .append("cumc", getCumc()) + .append("component", getComponent()) + .append("bomHierarchy", getBomHierarchy()) + .append("projectNo", getProjectNo()) + .append("standardDosage", getStandardDosage()) + .append("lossRate", getLossRate()) + .append("lossAmount", getLossAmount()) + .append("cilosses", getCilosses()) .toString(); } } diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/BaseBomMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/BaseBomMapper.xml index 6a956aae..04f2ec81 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/BaseBomMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/BaseBomMapper.xml @@ -35,28 +35,50 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select factory_code, production_version, bom_code, optional_bom, optional_bom_text, pvvd, pved, bom_calculate_number, bom_calculate_unit, bom_base_number, bom_base_unit, component_unit, component_pro_flag, msi, sanka, attr1, attr2, attr3, create_by, create_time, update_by, update_time, remark, current_version from base_bom - + select + bb.factory_code as factoryCode, + bb.production_version as productionVersion, + bb.bom_code as bomCode, + bb.optional_bom as optionalBom, + bb.optional_bom_text as optionalBomText, + bb.pvvd as pvvd, + bb.pved as pved, + bb.bom_calculate_number as bomCalculateNumber, + bb.bom_calculate_unit as bomCalculateUnit, + bb.bom_base_number as bomBaseNumber, + bb.bom_base_unit as bomBaseUnit, + bb.component_unit as componentUnit, + bb.component_pro_flag as componentProFlag, + bb.msi as msi, + bb.sanka as sanka, + bb.attr1 as attr1, + bb.attr2 as attr2, + bb.attr3 as attr3, + bb.create_by as createBy, + bb.create_time as createTime, + bb.update_by as updateBy, + bb.update_time, + bb.remark as remark, + bb.current_version as currentVersion, + bbc.product_code as productCode, + b1.product_desc_zh as productDescZh, + bp.product_desc_zh as componentDescZh, + bbc.cumc as cumc, + bbc.component as component, + bbc.bom_hierarchy as bomHierarchy, + bbc.project_no as projectNo, + bbc.standard_dosage as standardDosage, + bbc.loss_rate as lossRate, + bbc.loss_amount as lossAmount, + bbc.cilosses as cilosses + from base_bom bb + left join base_bom_component bbc on bb.bom_code = bbc.bom_code + left join base_product b1 on right(b1.product_code,11) = bbc.product_code + left join base_product bp on right(bp.product_code,11) = bbc.component + and factory_code = #{factoryCode} - and production_version = #{productionVersion} and bom_code = #{bomCode} - and optional_bom = #{optionalBom} - and optional_bom_text = #{optionalBomText} - and pvvd = #{pvvd} - and pved = #{pved} - and bom_calculate_number = #{bomCalculateNumber} - and bom_calculate_unit = #{bomCalculateUnit} - and bom_base_number = #{bomBaseNumber} - and bom_base_unit = #{bomBaseUnit} - and component_unit = #{componentUnit} - and component_pro_flag = #{componentProFlag} - and msi = #{msi} - and sanka = #{sanka} - and attr1 = #{attr1} - and attr2 = #{attr2} - and attr3 = #{attr3} - and current_version = #{currentVersion}