Implement product Excel file import functionality, including new service methods for handling Excel attachments. Update the ProductController to list imported Excel files by product code. Enhance BmsProduct and related entities to store references to the imported Excel files. Update front-end components to support displaying and managing Excel file attachments for products.

This commit is contained in:
wuweihua
2026-10-09 16:46:52 +08:00
parent 853187ad58
commit 533d360cdc
21 changed files with 589 additions and 31 deletions
@@ -33,6 +33,8 @@ public class BmsProduct extends BaseEntity
public static final String STATUS_EXPIRED = "2";
private String status;
private String sourceSheet;
/** FK prc_price_excel_file.pef_id */
private Long pefId;
private Long tmsId;
private Integer countryCount;
private Integer surchargeCount;
@@ -0,0 +1,35 @@
package com.bms.price.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.bms.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* Import quote Excel attachment: prc_price_excel_file
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class PrcPriceExcelFile extends BaseEntity
{
private static final long serialVersionUID = 1L;
public static final String TYPE_PRODUCT = "PRODUCT";
public static final String TYPE_REDLINE = "REDLINE";
public static final String TYPE_SALES = "SALES";
private Long pefId;
/** PRODUCT / REDLINE / SALES */
private String excelType;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date effectiveTime;
private String fileName;
private String filePath;
private Long fileSize;
private String contentType;
private String fileExtension;
private String ossId;
/** Comma-separated sheet names (optional) */
private String sheetNames;
}
@@ -48,4 +48,9 @@ public class PrcPriceSet extends BaseEntity
private String pullFromLibrary;
/** Y: even if version already has details, delete+re-pull from library */
private String forcePullLibrary;
/**
* Request-only: stamp this Excel attachment id onto prc_price_set_product.pef_id
* when saving IMPORT details (not a column on prc_price_set).
*/
private Long pefId;
}
@@ -37,6 +37,8 @@ public class PrcPriceSetProduct implements Serializable
private Long sourceProductId;
/** 来源Excel sheet */
private String sourceSheet;
/** 关联导入价表Excel附件 prc_price_excel_file.pef_id */
private Long pefId;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")