opt: 修改线上测试环境代码
This commit is contained in:
@@ -53,35 +53,35 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl<EasOutInBillDetai
|
||||
.eq(ObjectUtil.isNotEmpty(params), EasOutInBillDetail::getDjid, params.getDjid())
|
||||
);
|
||||
List<EasOutInBillDetail> easOutInBillDetailList = result.getRecords();
|
||||
List<InventoryInfo> inventoryInfoList = queryInventoryInfoList(easOutInBillDetailList);
|
||||
easOutInBillDetailList.forEach(bill -> {
|
||||
//查询库存信息
|
||||
List<InventoryInfo> matchedInventory = inventoryInfoList.stream()
|
||||
.filter(inventory -> {
|
||||
boolean isMatched = true;
|
||||
if (bill.getZzbm() != null && !bill.getZzbm().isEmpty()) {
|
||||
isMatched &= Objects.equals(inventory.getZzbm(), bill.getZzbm());
|
||||
}
|
||||
if (bill.getCkbm() != null && !bill.getCkbm().isEmpty()) {
|
||||
isMatched &= Objects.equals(inventory.getCkbm(), bill.getCkbm());
|
||||
}
|
||||
if (bill.getWlbm() != null && !bill.getWlbm().isEmpty()) {
|
||||
isMatched &= Objects.equals(inventory.getWlbm(), bill.getWlbm());
|
||||
}
|
||||
// 批次
|
||||
if (bill.getPc() != null && !bill.getPc().isEmpty()) {
|
||||
isMatched &= Objects.equals(inventory.getPc(), bill.getPc());
|
||||
}
|
||||
// 跟踪号
|
||||
if (bill.getTrackno() != null && !bill.getTrackno().isEmpty()) {
|
||||
isMatched &= Objects.equals(inventory.getTrackno(), bill.getTrackno());
|
||||
}
|
||||
if (bill.getKwbm() != null && !bill.getKwbm().isEmpty()) {
|
||||
isMatched &= Objects.equals(inventory.getKwbm(), bill.getKwbm());
|
||||
}
|
||||
return isMatched;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
// List<InventoryInfo> inventoryInfoList = queryInventoryInfoList(easOutInBillDetailList);
|
||||
// easOutInBillDetailList.forEach(bill -> {
|
||||
// //查询库存信息
|
||||
// List<InventoryInfo> matchedInventory = inventoryInfoList.stream()
|
||||
// .filter(inventory -> {
|
||||
// boolean isMatched = true;
|
||||
// if (bill.getZzbm() != null && !bill.getZzbm().isEmpty()) {
|
||||
// isMatched &= Objects.equals(inventory.getZzbm(), bill.getZzbm());
|
||||
// }
|
||||
// if (bill.getCkbm() != null && !bill.getCkbm().isEmpty()) {
|
||||
// isMatched &= Objects.equals(inventory.getCkbm(), bill.getCkbm());
|
||||
// }
|
||||
// if (bill.getWlbm() != null && !bill.getWlbm().isEmpty()) {
|
||||
// isMatched &= Objects.equals(inventory.getWlbm(), bill.getWlbm());
|
||||
// }
|
||||
// // 批次
|
||||
// if (bill.getPc() != null && !bill.getPc().isEmpty()) {
|
||||
// isMatched &= Objects.equals(inventory.getPc(), bill.getPc());
|
||||
// }
|
||||
// // 跟踪号
|
||||
// if (bill.getTrackno() != null && !bill.getTrackno().isEmpty()) {
|
||||
// isMatched &= Objects.equals(inventory.getTrackno(), bill.getTrackno());
|
||||
// }
|
||||
// if (bill.getKwbm() != null && !bill.getKwbm().isEmpty()) {
|
||||
// isMatched &= Objects.equals(inventory.getKwbm(), bill.getKwbm());
|
||||
// }
|
||||
// return isMatched;
|
||||
// })
|
||||
// .collect(Collectors.toList());
|
||||
// List<InventoryInfo> matchedInventory = inventoryInfoList.stream()
|
||||
// .filter(inventory -> Objects.equals(inventory.getZzbm(), bill.getZzbm())
|
||||
// && Objects.equals(inventory.getCkbm(), bill.getCkbm())
|
||||
@@ -91,12 +91,12 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl<EasOutInBillDetai
|
||||
// && Objects.equals(inventory.getKwbm(), bill.getKwbm()))
|
||||
// .collect(Collectors.toList());
|
||||
//将库存数量赋值给单据
|
||||
Optional<InventoryInfo> minKcsl = matchedInventory.stream()
|
||||
.min(Comparator.comparing(InventoryInfo::getKcsl));
|
||||
minKcsl.ifPresent(m -> {
|
||||
bill.setKcsl(m.getKcsl());
|
||||
});
|
||||
});
|
||||
// Optional<InventoryInfo> minKcsl = matchedInventory.stream()
|
||||
// .min(Comparator.comparing(InventoryInfo::getKcsl));
|
||||
// minKcsl.ifPresent(m -> {
|
||||
// bill.setKcsl(m.getKcsl());
|
||||
// });
|
||||
// });
|
||||
result.setRecords(easOutInBillDetailList);
|
||||
return CommonPage.getPage(result);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class EasBillSchedule {
|
||||
* eas单据数据同步
|
||||
*/
|
||||
@Async("taskExecutor")
|
||||
@Scheduled(cron = "0/30 * * * * *")
|
||||
//@Scheduled(cron = "0/30 * * * * *")
|
||||
public void getEasOutInBills() {
|
||||
// 获取eas视图查询未提交的单据
|
||||
List<EasOutInBillDetail> easOutInBillDetails = easOutInBillDetailMapper.selectPageWithInventory();
|
||||
|
||||
@@ -4,7 +4,7 @@ server:
|
||||
relaxed-path-chars: [ '|','{','}','[',']' ] #字符问题: https://blog.csdn.net/weixin_41996632/article/details/90715118
|
||||
spring:
|
||||
profiles:
|
||||
active: prod
|
||||
active: dev
|
||||
datasource:
|
||||
druid:
|
||||
initial-size: 5 #初始化时建立物理连接的个数
|
||||
|
||||
Reference in New Issue
Block a user