|
|
@ -193,11 +193,13 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl<EasOutInBillDetai |
|
|
|
if (CollectionUtils.isNotEmpty(entityList)) { |
|
|
|
List<EasOutInBillDetailVO> entityLists = entityList.stream().filter(r -> StringUtils.isNotEmpty(r.getKwbm())).collect(Collectors.toList()); |
|
|
|
Set<String> ids = entityLists.stream().map(EasOutInBillDetailVO::getFlid).collect(Collectors.toSet()); |
|
|
|
//需求变更为不可多次审核,否则EAS库存不准确
|
|
|
|
//ieasOutInBillService.audit(ids,false);
|
|
|
|
//单据明细为相同规格相同物料批量出入库
|
|
|
|
if (ids.size() == entityList.size() && ids.size() > 1) { |
|
|
|
entityList.forEach(r -> { |
|
|
|
UpdateWrapper<EasOutInBillDetail> updateWrapper = new UpdateWrapper<>(); |
|
|
|
//updateWrapper.set("djzt", "审核");
|
|
|
|
updateWrapper.set("djzt", "审核"); |
|
|
|
updateWrapper.eq("flid", r.getFlid()); |
|
|
|
updateWrapper.set("czsl", r.getSl()); |
|
|
|
updateWrapper.set("sysl", 0); |
|
|
@ -213,7 +215,6 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl<EasOutInBillDetai |
|
|
|
.map(EasOutInBillDetailVO::getSysl) |
|
|
|
.reduce(BigDecimal.ZERO, BigDecimal::add) |
|
|
|
.compareTo(BigDecimal.ZERO) == 0; |
|
|
|
|
|
|
|
if (isValid) { |
|
|
|
throw new BadRequestException("请检查库位和数量信息"); |
|
|
|
} |
|
|
@ -227,7 +228,9 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl<EasOutInBillDetai |
|
|
|
throw new BadRequestException("请检查库位和数量信息"); |
|
|
|
} |
|
|
|
UpdateWrapper<EasOutInBillDetail> updateWrapper = new UpdateWrapper<>(); |
|
|
|
//updateWrapper.set("djzt", "审核");
|
|
|
|
if(sysl.compareTo(BigDecimal.ZERO)==0) { |
|
|
|
updateWrapper.set("djzt", "审核"); |
|
|
|
} |
|
|
|
updateWrapper.eq("flid", entityList.get(0).getFlid()); |
|
|
|
updateWrapper.set("czsl", czsl); |
|
|
|
updateWrapper.set("sysl", sysl); |
|
|
|