|
|
@@ -1,5 +1,6 @@
|
|
|
package com.uas.platform.b2c.prod.commodity.service.impl;
|
|
|
|
|
|
+import com.uas.platform.b2c.common.account.service.EnterpriseService;
|
|
|
import com.uas.platform.b2c.common.base.dao.CommonDao;
|
|
|
import com.uas.platform.b2c.core.config.SysConf;
|
|
|
import com.uas.platform.b2c.core.constant.IntegerConstant;
|
|
|
@@ -57,6 +58,7 @@ import com.uas.platform.b2c.prod.store.service.StoreInService;
|
|
|
import com.uas.platform.b2c.trade.order.StringConstant.Currency;
|
|
|
import com.uas.platform.b2c.trade.presale.model.TradeDeliveryDelayTime;
|
|
|
import com.uas.platform.b2c.trade.presale.service.TradeDeliveryDelayTimeService;
|
|
|
+import com.uas.platform.b2c.trade.support.CodeType;
|
|
|
import com.uas.platform.b2c.trade.support.ResultMap;
|
|
|
import com.uas.platform.b2c.trade.util.BoundedExecutor;
|
|
|
import com.uas.platform.core.exception.IllegalOperatorException;
|
|
|
@@ -173,6 +175,9 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
@Autowired
|
|
|
private InOutboundDetailService inOutboundDetailService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private EnterpriseService enterpriseService;
|
|
|
+
|
|
|
/**
|
|
|
* 控制任务提交速度的线程池
|
|
|
*/
|
|
|
@@ -462,6 +467,13 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
if (rowNum > ModifyConstant.EXCEL_MAX_ROW) {
|
|
|
throw new IllegalOperatorException("您上传的信息超过2000条,请拆分成2000以再在上传");
|
|
|
}
|
|
|
+ ResultMap currencyResultMap = enterpriseService.getCurrencyByRegisterAddress();
|
|
|
+ String currency = "";
|
|
|
+ if (currencyResultMap.getCode() == CodeType.OK.code()) {
|
|
|
+ currency = (String) currencyResultMap.getData();
|
|
|
+ } else {
|
|
|
+ throw new IllegalOperatorException(currencyResultMap.getMessage());
|
|
|
+ }
|
|
|
List<ReleaseProductByBatch> batchList = new ArrayList<>(rowNum);
|
|
|
List<ReleaseProductByBatch> repeatBatchList = new ArrayList<>(rowNum);
|
|
|
String batch = createNumberService.getTimeNumber("product$goods", 8, rowNum);
|
|
|
@@ -471,6 +483,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
for (int r = 2; r <= rowNum; r++) {
|
|
|
Row row = sheet.getRow(r);
|
|
|
ReleaseProductByBatch aBatch = new ReleaseProductByBatch();
|
|
|
+ aBatch.setCurrency(currency);
|
|
|
Object skuObj = readWorkBookCell(row.getCell(ModifyConstant.SKU_CODE), Cell.CELL_TYPE_STRING,
|
|
|
r, ModifyConstant.SKU_CODE);
|
|
|
aBatch.setBatchCodeByExcel(skuObj);
|