fix:产品添加图片字段

main
HuangHuiKang 1 week ago
parent 4c60ac4563
commit 16ebe147af

@ -124,7 +124,8 @@ public class ErpProductController {
.setName(product.getName()).setBarCode(product.getBarCode()) .setName(product.getName()).setBarCode(product.getBarCode())
.setCategoryId(product.getCategoryId()).setCategoryName(product.getCategoryName()) .setCategoryId(product.getCategoryId()).setCategoryName(product.getCategoryName())
.setUnitId(product.getUnitId()).setUnitName(product.getUnitName()) .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") @GetMapping("/simple-list-product")
@Operation(summary = "获得产品精简列表", description = "只包含被开启的产品,主要用于前端的下拉选项") @Operation(summary = "获得产品精简列表", description = "只包含被开启的产品,主要用于前端的下拉选项")
@ -137,7 +138,8 @@ public class ErpProductController {
.setName(product.getName()).setBarCode(product.getBarCode()) .setName(product.getName()).setBarCode(product.getBarCode())
.setCategoryId(product.getCategoryId()).setCategoryName(product.getCategoryName()) .setCategoryId(product.getCategoryId()).setCategoryName(product.getCategoryName())
.setUnitId(product.getUnitId()).setUnitName(product.getUnitName()) .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") @GetMapping("/simple-list-item")
@Operation(summary = "获得原料精简列表", description = "只包含被开启的原料,主要用于前端的下拉选项") @Operation(summary = "获得原料精简列表", description = "只包含被开启的原料,主要用于前端的下拉选项")
@ -147,7 +149,8 @@ public class ErpProductController {
.setName(product.getName()).setBarCode(product.getBarCode()) .setName(product.getName()).setBarCode(product.getBarCode())
.setCategoryId(product.getCategoryId()).setCategoryName(product.getCategoryName()) .setCategoryId(product.getCategoryId()).setCategoryName(product.getCategoryName())
.setUnitId(product.getUnitId()).setUnitName(product.getUnitName()) .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 @Resource
private ErpProductCategoryService productCategoryService; private ErpProductCategoryService productCategoryService;
@ -169,7 +172,8 @@ public class ErpProductController {
.setName(product.getName()).setBarCode(product.getBarCode()) .setName(product.getName()).setBarCode(product.getBarCode())
.setCategoryId(product.getCategoryId()).setCategoryName(product.getCategoryName()) .setCategoryId(product.getCategoryId()).setCategoryName(product.getCategoryName())
.setUnitId(product.getUnitId()).setUnitName(product.getUnitName()) .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") @GetMapping("/simple-list-component")
@Operation(summary = "获得备件精简列表", description = "用于前端的下拉选项") @Operation(summary = "获得备件精简列表", description = "用于前端的下拉选项")
@ -179,7 +183,8 @@ public class ErpProductController {
.setName(product.getName()).setBarCode(product.getBarCode()) .setName(product.getName()).setBarCode(product.getBarCode())
.setCategoryId(product.getCategoryId()).setCategoryName(product.getCategoryName()) .setCategoryId(product.getCategoryId()).setCategoryName(product.getCategoryName())
.setUnitId(product.getUnitId()).setUnitName(product.getUnitName()) .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") @GetMapping("/export-excel")
@Operation(summary = "导出产品 Excel") @Operation(summary = "导出产品 Excel")

@ -114,6 +114,10 @@ public class ErpProductRespVO extends ErpProductDO {
@Schema(description = "型号", example = "6205-2RS") @Schema(description = "型号", example = "6205-2RS")
private String model; private String model;
@Schema(description = "图片", example = "https://xxx.com/a.png")
@ExcelProperty("图片")
private String images;
@Schema(description = "二维码地址", example = "") @Schema(description = "二维码地址", example = "")
private String qrcodeUrl; private String qrcodeUrl;
// //

@ -82,6 +82,9 @@ public class ProductSaveReqVO {
@Schema(description = "型号", example = "6205-2RS") @Schema(description = "型号", example = "6205-2RS")
private String model; private String model;
@Schema(description = "图片", example = "https://xxx.com/a.png")
private String images;
@Schema(description = "关联设备ID列表", example = "[11,15,23]") @Schema(description = "关联设备ID列表", example = "[11,15,23]")
private List<Long> deviceIds; private List<Long> deviceIds;

@ -140,6 +140,11 @@ public class ErpProductDO extends BaseDO {
*/ */
private String model; private String model;
/**
*
*/
private String images;
/** /**
* *
*/ */

Loading…
Cancel
Save