diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductController.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductController.java index b8c174956..3bcec06f1 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductController.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/ErpProductController.java @@ -124,7 +124,8 @@ public class ErpProductController { .setName(product.getName()).setBarCode(product.getBarCode()) .setCategoryId(product.getCategoryId()).setCategoryName(product.getCategoryName()) .setUnitId(product.getUnitId()).setUnitName(product.getUnitName()) - .setPurchasePrice(product.getPurchasePrice()).setSalePrice(product.getSalePrice()).setMinPrice(product.getMinPrice()))); + .setPurchasePrice(product.getPurchasePrice()).setSalePrice(product.getSalePrice()) + .setMinPrice(product.getMinPrice()).setImages(product.getImages()))); } @GetMapping("/simple-list-product") @Operation(summary = "获得产品精简列表", description = "只包含被开启的产品,主要用于前端的下拉选项") @@ -137,7 +138,8 @@ public class ErpProductController { .setName(product.getName()).setBarCode(product.getBarCode()) .setCategoryId(product.getCategoryId()).setCategoryName(product.getCategoryName()) .setUnitId(product.getUnitId()).setUnitName(product.getUnitName()) - .setPurchasePrice(product.getPurchasePrice()).setSalePrice(product.getSalePrice()).setMinPrice(product.getMinPrice()))); + .setPurchasePrice(product.getPurchasePrice()).setSalePrice(product.getSalePrice()) + .setMinPrice(product.getMinPrice()).setImages(product.getImages()))); } @GetMapping("/simple-list-item") @Operation(summary = "获得原料精简列表", description = "只包含被开启的原料,主要用于前端的下拉选项") @@ -147,7 +149,8 @@ public class ErpProductController { .setName(product.getName()).setBarCode(product.getBarCode()) .setCategoryId(product.getCategoryId()).setCategoryName(product.getCategoryName()) .setUnitId(product.getUnitId()).setUnitName(product.getUnitName()) - .setPurchasePrice(product.getPurchasePrice()).setSalePrice(product.getSalePrice()).setMinPrice(product.getMinPrice()))); + .setPurchasePrice(product.getPurchasePrice()).setSalePrice(product.getSalePrice()) + .setMinPrice(product.getMinPrice()).setImages(product.getImages()))); } @Resource private ErpProductCategoryService productCategoryService; @@ -169,7 +172,8 @@ public class ErpProductController { .setName(product.getName()).setBarCode(product.getBarCode()) .setCategoryId(product.getCategoryId()).setCategoryName(product.getCategoryName()) .setUnitId(product.getUnitId()).setUnitName(product.getUnitName()) - .setPurchasePrice(product.getPurchasePrice()).setSalePrice(product.getSalePrice()).setMinPrice(product.getMinPrice()))); + .setPurchasePrice(product.getPurchasePrice()).setSalePrice(product.getSalePrice()) + .setMinPrice(product.getMinPrice()).setImages(product.getImages()))); } @GetMapping("/simple-list-component") @Operation(summary = "获得备件精简列表", description = "用于前端的下拉选项") @@ -179,7 +183,8 @@ public class ErpProductController { .setName(product.getName()).setBarCode(product.getBarCode()) .setCategoryId(product.getCategoryId()).setCategoryName(product.getCategoryName()) .setUnitId(product.getUnitId()).setUnitName(product.getUnitName()) - .setPurchasePrice(product.getPurchasePrice()).setSalePrice(product.getSalePrice()).setMinPrice(product.getMinPrice()))); + .setPurchasePrice(product.getPurchasePrice()).setSalePrice(product.getSalePrice()) + .setMinPrice(product.getMinPrice()).setImages(product.getImages()))); } @GetMapping("/export-excel") @Operation(summary = "导出产品 Excel") diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/vo/product/ErpProductRespVO.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/vo/product/ErpProductRespVO.java index ad3452d73..f8a2f54a2 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/vo/product/ErpProductRespVO.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/vo/product/ErpProductRespVO.java @@ -114,6 +114,10 @@ public class ErpProductRespVO extends ErpProductDO { @Schema(description = "型号", example = "6205-2RS") private String model; + @Schema(description = "图片", example = "https://xxx.com/a.png") + @ExcelProperty("图片") + private String images; + @Schema(description = "二维码地址", example = "") private String qrcodeUrl; // diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/vo/product/ProductSaveReqVO.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/vo/product/ProductSaveReqVO.java index 6b7d42820..38806f10a 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/vo/product/ProductSaveReqVO.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/product/vo/product/ProductSaveReqVO.java @@ -82,6 +82,9 @@ public class ProductSaveReqVO { @Schema(description = "型号", example = "6205-2RS") private String model; + @Schema(description = "图片", example = "https://xxx.com/a.png") + private String images; + @Schema(description = "关联设备ID列表", example = "[11,15,23]") private List deviceIds; diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/dataobject/product/ErpProductDO.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/dataobject/product/ErpProductDO.java index a435159de..7e29b3df3 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/dataobject/product/ErpProductDO.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/dal/dataobject/product/ErpProductDO.java @@ -140,6 +140,11 @@ public class ErpProductDO extends BaseDO { */ private String model; + /** + * 图片 + */ + private String images; + /** * 二维码 */