diff --git a/os-mes/src/main/java/com/os/mes/base/domain/BaseDeviceLedger.java b/os-mes/src/main/java/com/os/mes/base/domain/BaseDeviceLedger.java index 02ff51f..e8ee3a5 100644 --- a/os-mes/src/main/java/com/os/mes/base/domain/BaseDeviceLedger.java +++ b/os-mes/src/main/java/com/os/mes/base/domain/BaseDeviceLedger.java @@ -61,10 +61,14 @@ public class BaseDeviceLedger extends BaseEntity @Excel(name = "启用日期", width = 30, dateFormat = "yyyy-MM-dd") private Date enableDate; - /** 所属工位 */ - @Excel(name = "所属工位") + /** 所属工位编号 */ + @Excel(name = "所属工位编号") private String productLineCode; + /** 所属工位名称 */ + @Excel(name = "所属工位名称") + private String productLineName; + /** 启用标识 */ @Excel(name = "启用标识") private String isFlag; @@ -81,7 +85,15 @@ public class BaseDeviceLedger extends BaseEntity @Excel(name = "资产编号") private String assetCode; - public void setObjId(Long objId) + public String getProductLineName() { + return productLineName; + } + + public void setProductLineName(String productLineName) { + this.productLineName = productLineName; + } + + public void setObjId(Long objId) { this.objId = objId; } diff --git a/os-mes/src/main/java/com/os/mes/prod/domain/ProdBomInfo.java b/os-mes/src/main/java/com/os/mes/prod/domain/ProdBomInfo.java index d548a6f..d606a02 100644 --- a/os-mes/src/main/java/com/os/mes/prod/domain/ProdBomInfo.java +++ b/os-mes/src/main/java/com/os/mes/prod/domain/ProdBomInfo.java @@ -117,6 +117,34 @@ public class ProdBomInfo extends BaseEntity { @Excel(name = "是否标识") private String isFlag; + /** + * 物料版本 + */ + @Excel(name = "物料版本") + private String materialDesc; + + /** + * BOM全称 + */ + @Excel(name = "BOM全称") + private String materialAll; + + public String getMaterialAll() { + return materialAll; + } + + public void setMaterialAll(String materialAll) { + this.materialAll = materialAll; + } + + public String getMaterialDesc() { + return materialDesc; + } + + public void setMaterialDesc(String materialDesc) { + this.materialDesc = materialDesc; + } + public String getMaterialUnit() { return materialUnit; } diff --git a/os-mes/src/main/java/com/os/mes/prod/service/impl/ProdBomInfoServiceImpl.java b/os-mes/src/main/java/com/os/mes/prod/service/impl/ProdBomInfoServiceImpl.java index efa9968..4db8bfc 100644 --- a/os-mes/src/main/java/com/os/mes/prod/service/impl/ProdBomInfoServiceImpl.java +++ b/os-mes/src/main/java/com/os/mes/prod/service/impl/ProdBomInfoServiceImpl.java @@ -76,7 +76,7 @@ public class ProdBomInfoServiceImpl implements IProdBomInfoService { public int insertProdBomInfo(ProdBomInfo prodBomInfo) { List baseBomInfos = prodBomInfoMapper.selectProdBomInfoList(prodBomInfo); if (baseBomInfos.size() > 0) { - throw new BaseException("该物料编号:" + prodBomInfo.getMaterialCode() + "已存在!"); + throw new BaseException("该物料BOM:" + prodBomInfo.getMaterialCode() + "已存在!"); } ProdBomInfo info = prodBomInfoMapper.selectProdBomInfoByObjId(prodBomInfo.getParentId()); if (StringUtils.isNull(info)) { diff --git a/os-mes/src/main/resources/mapper/mes/base/BaseDeviceLedgerMapper.xml b/os-mes/src/main/resources/mapper/mes/base/BaseDeviceLedgerMapper.xml index fd95df4..c8d9f3f 100644 --- a/os-mes/src/main/resources/mapper/mes/base/BaseDeviceLedgerMapper.xml +++ b/os-mes/src/main/resources/mapper/mes/base/BaseDeviceLedgerMapper.xml @@ -1,62 +1,87 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - select obj_id, device_code, device_name, device_model, device_type, device_address, device_status, used_department, cost_center, manufacturer, enable_date, product_line_code, is_flag, create_by, create_time, update_by, update_time, factory_code, team_code, asset_code from base_device_ledger + select bdl.obj_id, + bdl.device_code, + bdl.device_name, + bdl.device_model, + bdl.device_type, + bdl.device_address, + bdl.device_status, + bdl.used_department, + bdl.cost_center, + bdl.manufacturer, + bdl.enable_date, + bdl.product_line_code, + bpl.product_line_name, + bdl.is_flag, + bdl.create_by, + bdl.create_time, + bdl.update_by, + bdl.update_time, + bdl.factory_code, + bdl.team_code, + bdl.asset_code + from base_device_ledger bdl + left join base_product_line bpl on bpl.product_line_code = bdl.product_line_code - + - + insert into base_device_ledger @@ -79,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" factory_code, team_code, asset_code, - + #{deviceCode}, #{deviceName}, @@ -100,7 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{factoryCode}, #{teamCode}, #{assetCode}, - + @@ -130,11 +155,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from base_device_ledger where obj_id = #{objId} + delete + from base_device_ledger + where obj_id = #{objId} - delete from base_device_ledger where obj_id in + delete from base_device_ledger where obj_id in #{objId} diff --git a/os-mes/src/main/resources/mapper/mes/prod/ProdBomInfoMapper.xml b/os-mes/src/main/resources/mapper/mes/prod/ProdBomInfoMapper.xml index 18c4e7c..14b0cfd 100644 --- a/os-mes/src/main/resources/mapper/mes/prod/ProdBomInfoMapper.xml +++ b/os-mes/src/main/resources/mapper/mes/prod/ProdBomInfoMapper.xml @@ -26,6 +26,8 @@ + + @@ -43,6 +45,8 @@ pbi.vbeln, pbi.vbpos, pbi.ancestors, + pbi.material_desc, + pbi.material_name + ',' + pbi.material_desc materialAll, pbi.is_flag, pbi.create_by, pbi.create_time, @@ -63,6 +67,7 @@ '%') and pbi.material_type = #{materialType} + and pbi.material_desc = #{materialDesc} and pbi.standard_amount = #{standardAmount} and pbi.parent_id = #{parentId} and pbi.parent_name like concat('%', #{parentName}, '%') @@ -90,6 +95,7 @@ bom_code, material_code, + material_desc, material_name, material_type, standard_amount, @@ -109,6 +115,7 @@ #{bomCode}, #{materialCode}, + #{materialDesc}, #{materialName}, #{materialType}, #{standardAmount}, @@ -132,6 +139,7 @@ bom_code = #{bomCode}, material_code = #{materialCode}, + material_desc = #{materialDesc}, material_name = #{materialName}, material_type = #{materialType}, standard_amount = #{standardAmount},