|
|
|
@ -74,7 +74,7 @@ public class IoStatMonthServiceImpl implements IoStatMonthService {
|
|
|
|
|
IoStatMonthEntity statData = getStatData(dataList, orderDetailResultEntity, lastMonth);
|
|
|
|
|
|
|
|
|
|
//查询此单是出库还是入库
|
|
|
|
|
IoOrderEntity order = orderDao.selectOne(new QueryWrapper<IoOrderEntity>().select("mainAction").eq("billNo", orderDetailResultEntity.getOrderIdFk()));
|
|
|
|
|
IoOrderEntity order = orderDao.selectOne(new QueryWrapper<IoOrderEntity>().select("mainAction").eq("billNo", orderDetailResultEntity.getOrderIdFk()).eq("deptCode",orderDetailResultEntity.getDeptCode()));
|
|
|
|
|
if (order.getMainAction().equals(ConstantType.TYPE_PUT)) {
|
|
|
|
|
//入库
|
|
|
|
|
statData.setInCount(orderDetailResultEntity.getReCount() + statData.getInCount());
|
|
|
|
@ -175,7 +175,7 @@ public class IoStatMonthServiceImpl implements IoStatMonthService {
|
|
|
|
|
|
|
|
|
|
if (CollUtil.isNotEmpty(dataList)) {
|
|
|
|
|
for (IoStatMonthEntity statDayEntity : dataList) {
|
|
|
|
|
if (Long.valueOf(statDayEntity.getRelIdFk()).equals(orderDetailResultEntity.getBindRlFk())) {
|
|
|
|
|
if (Long.valueOf(statDayEntity.getRelIdFk()).equals(orderDetailResultEntity.getBindRlFk()) && statDayEntity.getDeptCode().equals(orderDetailResultEntity.getDeptCode())) {
|
|
|
|
|
if ((StrUtil.isNotBlank(statDayEntity.getBatchNo()) && StrUtil.isNotBlank(orderDetailResultEntity.getBatchNo())) && statDayEntity.getBatchNo().equals(orderDetailResultEntity.getBatchNo())) {
|
|
|
|
|
return statDayEntity;
|
|
|
|
|
} else if (StrUtil.isBlank(statDayEntity.getBatchNo()) && StrUtil.isBlank(orderDetailResultEntity.getBatchNo())) {
|
|
|
|
@ -187,6 +187,7 @@ public class IoStatMonthServiceImpl implements IoStatMonthService {
|
|
|
|
|
|
|
|
|
|
IoStatMonthEntity statData = new IoStatMonthEntity();
|
|
|
|
|
statData.setYear(lastMonth.year());
|
|
|
|
|
statData.setDeptCode(orderDetailResultEntity.getDeptCode());
|
|
|
|
|
statData.setQuarter(lastMonth.quarter());
|
|
|
|
|
statData.setMonth(lastMonth.monthBaseOne());
|
|
|
|
|
statData.setRelIdFk(String.valueOf(orderDetailResultEntity.getBindRlFk()));
|
|
|
|
@ -268,7 +269,8 @@ public class IoStatMonthServiceImpl implements IoStatMonthService {
|
|
|
|
|
.filter(notComment -> {
|
|
|
|
|
List<IoStatMonthEntity> filtered = newIoStatDayEntity.stream().filter(all ->
|
|
|
|
|
Objects.equals(all.getBatchNo(), notComment.getBatchNo()) // 使用 Objects.equals 来进行非空判断
|
|
|
|
|
&& Objects.equals(all.getRelIdFk(), notComment.getRelIdFk()))
|
|
|
|
|
&& Objects.equals(all.getRelIdFk(), notComment.getRelIdFk())
|
|
|
|
|
&& Objects.equals(all.getDeptCode(), notComment.getDeptCode()))
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
return filtered.isEmpty();
|
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|