Refactor billing options retrieval to include data permissions and add effective date handling for product imports
This commit is contained in:
+9
-4
@@ -1,5 +1,6 @@
|
||||
package com.bms.price.task;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -30,12 +31,14 @@ public class BmsProductImportAsyncRunner
|
||||
|
||||
/** Background all-country (Weishi catalog) import. */
|
||||
@Async("threadPoolTaskExecutor")
|
||||
public void runImportAll(String taskId, byte[] bytes, String filename, boolean updateSupport, String operName)
|
||||
public void runImportAll(String taskId, byte[] bytes, String filename, boolean updateSupport, String operName,
|
||||
Date effectiveDate)
|
||||
{
|
||||
try
|
||||
{
|
||||
put(taskId, BmsProductImportTask.STATUS_RUNNING, 5, "parsing excel", null);
|
||||
String message = productService.importProductExcel(bytes, filename, updateSupport, operName, taskId);
|
||||
String message = productService.importProductExcel(bytes, filename, updateSupport, operName, taskId,
|
||||
effectiveDate);
|
||||
put(taskId, BmsProductImportTask.STATUS_SUCCESS, 100, message, null);
|
||||
log.info("async product import done, taskId={}", taskId);
|
||||
}
|
||||
@@ -48,12 +51,14 @@ public class BmsProductImportAsyncRunner
|
||||
|
||||
/** Background single-country cost-sheet import. */
|
||||
@Async("threadPoolTaskExecutor")
|
||||
public void runImportCountry(String taskId, byte[] bytes, String filename, String countryCode, String operName)
|
||||
public void runImportCountry(String taskId, byte[] bytes, String filename, String countryCode, String operName,
|
||||
Date effectiveDate)
|
||||
{
|
||||
try
|
||||
{
|
||||
put(taskId, BmsProductImportTask.STATUS_RUNNING, 5, "parsing excel", null);
|
||||
String message = productService.importCountryProductExcel(bytes, filename, countryCode, operName, taskId);
|
||||
String message = productService.importCountryProductExcel(bytes, filename, countryCode, operName, taskId,
|
||||
effectiveDate);
|
||||
put(taskId, BmsProductImportTask.STATUS_SUCCESS, 100, message, null);
|
||||
log.info("async product country import done, taskId={}, country={}", taskId, countryCode);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user