Browse Source

1.干线-导入数据逻辑更新

dev-pushdata-important
zhenghaoyu 1 year ago
parent
commit
c9626e0656
  1. 12
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

12
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

@ -1004,9 +1004,9 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
List<ImportCustomizedOuPaiDTO> importCustomizedOuPaiDTOS = EasyExcel.read(inputStream).head(ImportCustomizedOuPaiDTO.class).sheet(0).headRowNumber(1).doReadSync();
Map<String, List<ImportCustomizedOuPaiDTO>> listMap = importCustomizedOuPaiDTOS.parallelStream().collect(Collectors.groupingBy(a -> a.getOrderCode() + "-" + a.getTrainNumber()));
Map<String, List<ImportCustomizedOuPaiDTO>> listMap = importCustomizedOuPaiDTOS.parallelStream().collect(Collectors.groupingBy(a -> a.getOrderCode() + "&" + a.getTrainNumber()));
listMap.remove("null-null");
listMap.remove("null&null");
Set<String> set = listMap.keySet();
@ -1015,7 +1015,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
for (String str : set) {
List<ImportCustomizedOuPaiDTO> paiDTOList = listMap.get(str);
ImportCustomizedOuPaiDTO importCustomizedOuPaiDTO = paiDTOList.get(0);
String[] split = str.split("-");
String[] split = str.split("&");
String orderCode = split[0];
String trainNumber = split[1];
List<String> orderPackageCodes = new ArrayList<>();
@ -1116,9 +1116,9 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
InputStream inputStream = file.getInputStream();
List<ImportStandardOuPaiDTO> importStandardOuPaiDTOS = EasyExcel.read(inputStream).head(ImportStandardOuPaiDTO.class).sheet(0).headRowNumber(1).doReadSync();
Map<String, List<ImportStandardOuPaiDTO>> listMap = importStandardOuPaiDTOS.parallelStream().collect(Collectors.groupingBy(a -> a.getOrderCode() + "-" + a.getTrainNumber()));
Map<String, List<ImportStandardOuPaiDTO>> listMap = importStandardOuPaiDTOS.parallelStream().collect(Collectors.groupingBy(a -> a.getOrderCode() + "&" + a.getTrainNumber()));
listMap.remove("null-null");
listMap.remove("null&null");
Set<String> set = listMap.keySet();
@ -1126,7 +1126,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
for (String str : set) {
List<ImportStandardOuPaiDTO> paiDTOList = listMap.get(str);
ImportStandardOuPaiDTO importStandardOuPaiDTO = paiDTOList.get(0);
String[] split = str.split("-");
String[] split = str.split("&");
String orderCode = split[0];
String trainNumber = split[1];
List<String> orderPackageCodes = new ArrayList<>();

Loading…
Cancel
Save