mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
excel、xml异步导入移除解析配件入配件库操作
This commit is contained in:
+14
-14
@@ -113,7 +113,7 @@ public class DefaultExcelOrderImportFactory {
|
||||
private List<PlateGoodDO> plateGoodDOS = ListUtils.newArrayListWithExpectedSize(BATCH_THRESHOLD_NUMBER);
|
||||
private List<OrderModelDO> orderModelDOS = ListUtils.newArrayListWithExpectedSize(BATCH_THRESHOLD_NUMBER);
|
||||
private List<OrderPartsRemark> orderPartsRemarks = ListUtils.newArrayListWithExpectedSize(BATCH_THRESHOLD_NUMBER);
|
||||
private List<PartsDO> partsDOS = ListUtils.newArrayListWithExpectedSize(BATCH_THRESHOLD_NUMBER);
|
||||
// private List<PartsDO> partsDOS = ListUtils.newArrayListWithExpectedSize(BATCH_THRESHOLD_NUMBER);
|
||||
|
||||
private static final String EMPTY_STRING = new String();
|
||||
private static final BigDecimal BIG_ZERO = new BigDecimal(0);
|
||||
@@ -389,7 +389,7 @@ public class DefaultExcelOrderImportFactory {
|
||||
}
|
||||
// 最后批量插入orderParts一次,避免最后一页小于BATCH_THRESHOLD_NUMBER漏插入
|
||||
orderInfoBatchInsertWithinThreshold(orderPartsMapper, orderPartsDOS, true);
|
||||
orderInfoBatchInsertWithinThreshold(partsMapper, partsDOS, true);
|
||||
// orderInfoBatchInsertWithinThreshold(partsMapper, partsDOS, true);
|
||||
// 批量插入配件备注
|
||||
orderPartsRemarksBatchInsertWithinThreshold(true);
|
||||
}
|
||||
@@ -414,7 +414,7 @@ public class DefaultExcelOrderImportFactory {
|
||||
orderParts.setGoodsId(EMPTY_STRING);
|
||||
}
|
||||
// 解析配件商品
|
||||
analyzePartsGoods(orderParts);
|
||||
// analyzePartsGoods(orderParts);
|
||||
// 批量插入orderParts
|
||||
orderPartsDOS.add(orderParts);
|
||||
orderInfoBatchInsertWithinThreshold(orderPartsMapper, orderPartsDOS, false);
|
||||
@@ -1350,16 +1350,16 @@ public class DefaultExcelOrderImportFactory {
|
||||
* @param partsDO
|
||||
* @return
|
||||
*/
|
||||
private void analyzePartsGoods(OrderPartsDO partsDO) {
|
||||
if (partsDO.getGoodsId() != null && !partsDO.getGoodsId().isEmpty()) { // 有goodsId
|
||||
PartsDO parts = partsMapper.selectByGoodID(partsDO.getGoodsId(), OrganContextHolder.getOrganId());
|
||||
if (ObjectUtil.isNull(parts)) { // 不存在记录,存入数据库
|
||||
// 批量插入parts
|
||||
partsDOS.add(BeanUtils.toBean(partsDO, PartsDO.class).setOrganId(organId));
|
||||
orderInfoBatchInsertWithinThreshold(partsMapper, partsDOS, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
// private void analyzePartsGoods(OrderPartsDO partsDO) {
|
||||
// if (partsDO.getGoodsId() != null && !partsDO.getGoodsId().isEmpty()) { // 有goodsId
|
||||
// PartsDO parts = partsMapper.selectByGoodID(partsDO.getGoodsId(), OrganContextHolder.getOrganId());
|
||||
// if (ObjectUtil.isNull(parts)) { // 不存在记录,存入数据库
|
||||
// // 批量插入parts
|
||||
// partsDOS.add(BeanUtils.toBean(partsDO, PartsDO.class).setOrganId(organId));
|
||||
// orderInfoBatchInsertWithinThreshold(partsMapper, partsDOS, false);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* 清空所有列表
|
||||
@@ -1375,7 +1375,7 @@ public class DefaultExcelOrderImportFactory {
|
||||
plateGoodDOS.clear();
|
||||
orderModelDOS.clear();
|
||||
orderPartsRemarks.clear();
|
||||
partsDOS.clear();
|
||||
// partsDOS.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+15
-15
@@ -150,7 +150,7 @@ public class DefaultXmlOrderImportFactory {
|
||||
private List<PlateGoodDO> plateGoodDOS = ListUtils.newArrayListWithExpectedSize(BATCH_THRESHOLD_NUMBER);
|
||||
private List<OrderModelDO> orderModelDOS = ListUtils.newArrayListWithExpectedSize(BATCH_THRESHOLD_NUMBER);
|
||||
private List<OrderPartsRemark> orderPartsRemarks = ListUtils.newArrayListWithExpectedSize(BATCH_THRESHOLD_NUMBER);
|
||||
private List<PartsDO> partsDOS = ListUtils.newArrayListWithExpectedSize(BATCH_THRESHOLD_NUMBER);
|
||||
// private List<PartsDO> partsDOS = ListUtils.newArrayListWithExpectedSize(BATCH_THRESHOLD_NUMBER);
|
||||
|
||||
private static final String EMPTY_STRING = new String();
|
||||
private static final BigDecimal BIG_ZERO = new BigDecimal(0);
|
||||
@@ -1365,7 +1365,7 @@ public class DefaultXmlOrderImportFactory {
|
||||
orderPartsDO.setRemark(partRemark);
|
||||
|
||||
// 解析配件商品
|
||||
analyzePartsGoods(orderPartsDO);
|
||||
// analyzePartsGoods(orderPartsDO);
|
||||
// 批量插入orderParts
|
||||
orderPartsDOS.add(orderPartsDO);
|
||||
// 缓存配件
|
||||
@@ -1492,7 +1492,7 @@ public class DefaultXmlOrderImportFactory {
|
||||
orderPartsDO.setRemark(partRemark);
|
||||
|
||||
// 解析配件商品
|
||||
analyzePartsGoods(orderPartsDO);
|
||||
// analyzePartsGoods(orderPartsDO);
|
||||
// 批量插入orderParts
|
||||
orderPartsDOS.add(orderPartsDO);
|
||||
// 缓存配件
|
||||
@@ -1617,7 +1617,7 @@ public class DefaultXmlOrderImportFactory {
|
||||
orderPartsDO.setRemark(partRemark);
|
||||
|
||||
// 解析配件商品
|
||||
analyzePartsGoods(orderPartsDO);
|
||||
// analyzePartsGoods(orderPartsDO);
|
||||
// 批量插入orderParts
|
||||
orderPartsDOS.add(orderPartsDO);
|
||||
// 缓存配件
|
||||
@@ -1938,16 +1938,16 @@ public class DefaultXmlOrderImportFactory {
|
||||
* @param partsDO
|
||||
* @return
|
||||
*/
|
||||
private void analyzePartsGoods(OrderPartsDO partsDO) {
|
||||
if (partsDO.getGoodsId() != null && !partsDO.getGoodsId().isEmpty()) { // 有goodsId
|
||||
PartsDO parts = partsMapper.selectByGoodID(partsDO.getGoodsId(), OrganContextHolder.getOrganId());
|
||||
if (ObjectUtil.isNull(parts)) { // 不存在记录,存入数据库
|
||||
// 批量插入parts
|
||||
partsDOS.add(BeanUtils.toBean(partsDO, PartsDO.class).setOrganId(organId));
|
||||
orderInfoBatchInsertWithinThreshold(partsMapper, partsDOS, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
// private void analyzePartsGoods(OrderPartsDO partsDO) {
|
||||
// if (partsDO.getGoodsId() != null && !partsDO.getGoodsId().isEmpty()) { // 有goodsId
|
||||
// PartsDO parts = partsMapper.selectByGoodID(partsDO.getGoodsId(), OrganContextHolder.getOrganId());
|
||||
// if (ObjectUtil.isNull(parts)) { // 不存在记录,存入数据库
|
||||
// // 批量插入parts
|
||||
// partsDOS.add(BeanUtils.toBean(partsDO, PartsDO.class).setOrganId(organId));
|
||||
// orderInfoBatchInsertWithinThreshold(partsMapper, partsDOS, false);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* 清空所有列表
|
||||
@@ -1963,7 +1963,7 @@ public class DefaultXmlOrderImportFactory {
|
||||
plateGoodDOS.clear();
|
||||
orderModelDOS.clear();
|
||||
orderPartsRemarks.clear();
|
||||
partsDOS.clear();
|
||||
// partsDOS.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user