Prechádzať zdrojové kódy

pms 保养 带出保养项物料时 标识 物料来源

zhangcl 1 týždeň pred
rodič
commit
20050c4f22

+ 3 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotdevicematerial/vo/IotDeviceMaterialRespVO.java

@@ -87,4 +87,7 @@ public class IotDeviceMaterialRespVO {
     @Schema(description = "库存地点名称", example = "华中项目部库")
     private String storageLocation;
 
+    @Schema(description = "物料类型", example = "本地库存 SAP库存 SAP主数据 手动添加")
+    private String materialSource;
+
 }

+ 3 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/iotdevicematerial/IotDeviceMaterialServiceImpl.java

@@ -352,6 +352,7 @@ public class IotDeviceMaterialServiceImpl implements IotDeviceMaterialService {
                         if (costCenterPair.containsKey(tempLockStock.getCostCenterId())) {
                             material.setCostCenter(costCenterPair.get(tempLockStock.getCostCenterId()));
                         }
+                        material.setMaterialSource("本地库存");
                     } else if (sapStockPair.containsKey(material.getCode())) {
                         // sap库存物料
                         IotSapStockDO tempSapStock = sapStockPair.get(material.getCode());
@@ -366,6 +367,7 @@ public class IotDeviceMaterialServiceImpl implements IotDeviceMaterialService {
                         if (storageLocationPair.containsKey(tempSapStock.getStorageLocationId())) {
                             material.setStorageLocation(storageLocationPair.get(tempSapStock.getStorageLocationId()));
                         }
+                        material.setMaterialSource("sap库存");
                     } else if (sapMasterDataPair.containsKey(material.getCode())) {
                         // sap主数据
                         IotMaterialDO tempMaterial = sapMasterDataPair.get(material.getCode());
@@ -378,6 +380,7 @@ public class IotDeviceMaterialServiceImpl implements IotDeviceMaterialService {
                         material.setFactory(StrUtil.EMPTY);
                         material.setStorageLocation(StrUtil.EMPTY);
                         material.setCostCenter(StrUtil.EMPTY);
+                        material.setMaterialSource("SAP主数据");
                     }
                 });
                 deviceMaterials.forEach(bomMaterial -> {