|
|
|
@ -97,6 +97,23 @@ public class StockOrderDetailController {
|
|
|
|
|
List<StockOrderDetailEntity> stockOrderDetailEntityList
|
|
|
|
|
= stockOrderDetailService.filterStockOrderDetail(stockOrderDetailFilterRequest);
|
|
|
|
|
|
|
|
|
|
//计算实际数量
|
|
|
|
|
if (CollUtil.isNotEmpty(stockOrderDetailEntityList)) {
|
|
|
|
|
List<WarehouseEntity> codeList = codesService.findByReceiptId(stockOrderEntity.getOrderIdFk());
|
|
|
|
|
if (CollUtil.isNotEmpty(codeList)) {
|
|
|
|
|
stockOrderDetailEntityList.forEach(stockOrderDetailEntity -> {
|
|
|
|
|
codeList.forEach(codeEntity -> {
|
|
|
|
|
if (StrUtil.trimToEmpty(codeEntity.getRelId()).equals(StrUtil.trimToEmpty(stockOrderDetailEntity.getRelId())) && (StrUtil.trimToEmpty(codeEntity.getBatchNo()).equals(StrUtil.trimToEmpty(stockOrderDetailEntity.getBatchNo())))) {
|
|
|
|
|
int actCount = udiRelevanceService.getActCountByRelIdAndNameCode(stockOrderDetailEntity.getRelId(), codeEntity.getNameCode());
|
|
|
|
|
stockOrderDetailEntity.setReCount(String.valueOf(actCount));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BussinessLocalTypeEntity bussinessLocalTypeEntity = bussinessLocalTypeService.findBTByAction(stockOrderEntity.getBillType());
|
|
|
|
|
|
|
|
|
@ -129,7 +146,10 @@ public class StockOrderDetailController {
|
|
|
|
|
item.setCodeId(codeDetaiEntity.getId().intValue());
|
|
|
|
|
item.setSerialNo(codeDetaiEntity.getSerialNo());
|
|
|
|
|
item.setCount(codeDetaiEntity.getCount() + "");
|
|
|
|
|
item.setReCount(codeDetaiEntity.getCount() + "");
|
|
|
|
|
//item.setReCount(codeDetaiEntity.getCount() + "");
|
|
|
|
|
//计算实际数量
|
|
|
|
|
int actCount = udiRelevanceService.getActCountByRelIdAndNameCode(codeDetaiEntity.getRelId(), codeDetaiEntity.getNameCode());
|
|
|
|
|
item.setReCount(String.valueOf(actCount));
|
|
|
|
|
resultList.add(item);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|