增加建立新版本
This commit is contained in:
@@ -29,7 +29,10 @@ public class PrcPriceSetVersion extends BaseEntity
|
||||
/** 0 draft / 3 pending / 1 active / 2 expired */
|
||||
private String status;
|
||||
/**
|
||||
* Create-price mode for this version: PULL = from product library, IMPORT = Excel.
|
||||
* Create-price mode for this version:
|
||||
* PULL = from product library,
|
||||
* IMPORT = Excel with prior version preload,
|
||||
* IMPORT_FRESH = Excel without prior version data.
|
||||
* Column: price_build_mode
|
||||
*/
|
||||
private String priceBuildMode;
|
||||
|
||||
+3
-1
@@ -3361,9 +3361,10 @@ public class PrcPriceSetServiceImpl implements IPrcPriceSetService
|
||||
}
|
||||
|
||||
/**
|
||||
* Draft only: when priceBuildMode changes (PULL/IMPORT), delete this version's
|
||||
* Draft only: when priceBuildMode changes (PULL/IMPORT/IMPORT_FRESH), delete this version's
|
||||
* product / detail / SALES surcharge rel rows. Same mode or non-draft: no-op.
|
||||
* IMPORT: after wipe, copy products+details from latest prior version (if any).
|
||||
* IMPORT_FRESH: wipe only, do not copy prior version (blank Excel build).
|
||||
*/
|
||||
private void clearDraftVersionChildrenIfBuildModeChanged(PrcPriceSetVersion db, PrcPriceSetVersion incoming)
|
||||
{
|
||||
@@ -3387,6 +3388,7 @@ public class PrcPriceSetServiceImpl implements IPrcPriceSetService
|
||||
}
|
||||
Long psvId = db.getPsvId();
|
||||
wipeVersionChildren(psvId, db.getStatus());
|
||||
// IMPORT inherits prior version; IMPORT_FRESH starts empty for Excel import
|
||||
if ("IMPORT".equalsIgnoreCase(newMode))
|
||||
{
|
||||
copyLatestPriorVersionChildren(db.getPriceSetId(), psvId);
|
||||
|
||||
Reference in New Issue
Block a user