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