导入批量修改价格明细
This commit is contained in:
@@ -76,6 +76,30 @@ public class PrcPriceSetSaveAsyncRunner
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** Background import of quote Excel into package detail prices. */
|
||||
@Async("threadPoolTaskExecutor")
|
||||
public void runImportPrices(String taskId, Long priceSetId, Long psvId, byte[] bytes, String filename, String operName)
|
||||
{
|
||||
try
|
||||
{
|
||||
put(taskId, PrcPriceSetSaveTask.STATUS_RUNNING, 10, "parsing excel", priceSetId, null);
|
||||
String message = priceSetService.importDetailPrices(priceSetId, psvId, bytes, filename, operName, taskId);
|
||||
put(taskId, PrcPriceSetSaveTask.STATUS_SUCCESS, 100, message, priceSetId, null);
|
||||
log.info("async import prices done, taskId={}, priceSetId={}", taskId, priceSetId);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.error("async import prices failed, taskId={}, priceSetId={}", taskId, priceSetId, e);
|
||||
String msg = e.getMessage();
|
||||
if (StringUtils.isEmpty(msg))
|
||||
{
|
||||
msg = e.getClass().getSimpleName();
|
||||
}
|
||||
put(taskId, PrcPriceSetSaveTask.STATUS_FAIL, 100, "failed", priceSetId, msg);
|
||||
}
|
||||
}
|
||||
|
||||
public void put(String taskId, String status, int percent, String message, Long priceSetId, String error)
|
||||
{
|
||||
PrcPriceSetSaveTask task = new PrcPriceSetSaveTask();
|
||||
|
||||
Reference in New Issue
Block a user