src/main/java/com/whyc/pojo/ProductBomHistory.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/ProductBomHistoryMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/whyc/pojo/ProductBomHistory.java
@@ -64,6 +64,18 @@ @ApiModelProperty(value = "关联的物料集合") private List<ProductSoftware> softwares; @TableField(exist = false) @ApiModelProperty(value = "母料编号") private String parentCode; @TableField(exist = false) @ApiModelProperty(value = "定制单号") private String customCode; @TableField(exist = false) @ApiModelProperty(value = "母料编号") private String parentModel; public Integer getId() { return id; } @@ -239,4 +251,28 @@ public void setSoftwares(List<ProductSoftware> softwares) { this.softwares = softwares; } public String getParentCode() { return parentCode; } public void setParentCode(String parentCode) { this.parentCode = parentCode; } public String getCustomCode() { return customCode; } public void setCustomCode(String customCode) { this.customCode = customCode; } public String getParentModel() { return parentModel; } public void setParentModel(String parentModel) { this.parentModel = parentModel; } } src/main/resources/mapper/ProductBomHistoryMapper.xml
@@ -31,11 +31,12 @@ <result property="dwgUrl" column="dwg_url"></result> <collection property="materials" javaType="java.util.ArrayList" ofType="com.whyc.pojo.Material" column="{parentCode=parent_code,customCode=custom_code,subCode=sub_code,version=version}" select="selectMaterial"> </collection> <collection property="softwares" javaType="java.util.ArrayList" ofType="com.whyc.pojo.ProductSoftware" column="{parentCode=parent_code}" select="selectSoftware"> <collection property="softwares" javaType="java.util.ArrayList" ofType="com.whyc.pojo.ProductSoftware" column="{parentModel=parent_model}" select="selectSoftware"> </collection> </resultMap> <select id="getBomHistoryAndMaterial" resultMap="BomHistoryList"> select distinct tb_product_bom_history.* ,tb_product_history.parent_model ,tb_product_history.parent_code,tb_product_history.custom_code ,tb_Material.dwg_url,tb_Material.file_url,tb_Material.picture_url from db_doc.tb_product_bom_history,db_doc.tb_product_history,tb_Material @@ -62,7 +63,7 @@ </select> <select id="selectSoftware" resultType="com.whyc.pojo.ProductSoftware"> select DISTINCT tb_product_software.* FROM db_doc.tb_product_software where ttb_product_software.parent_code=#{parentCode} where ttb_product_software.parent_model=#{parentModel} </select>