进度大屏
This commit is contained in:
@ -73,9 +73,8 @@ public class ProgressBigScreenController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 获取材料进度详情
|
* 获取材料进度详情
|
||||||
*/
|
*/
|
||||||
@GetMapping("/materialProgress/detail/{projectId}")
|
@GetMapping("/materialProgress/detail")
|
||||||
public R<List<MaterialProgressDetailVo>> getMaterialProgressDetail(@NotNull(message = "项目主键不能为空")
|
public R<List<MaterialProgressDetailVo>> getMaterialProgressDetail(Long project, String name, String specification) {
|
||||||
@PathVariable Long projectId) {
|
return R.ok(progressBigScreenService.getMaterialProgressDetail(project, name, specification));
|
||||||
return R.ok(progressBigScreenService.getMaterialProgressDetail(projectId));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,6 +44,11 @@ public class MaterialProgressDetailVo implements Serializable {
|
|||||||
|
|
||||||
// region 接收单数据
|
// region 接收单数据
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表单编号
|
||||||
|
*/
|
||||||
|
private String formCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 合同名称
|
* 合同名称
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -55,7 +55,7 @@ public interface ProgressBigScreenService {
|
|||||||
* @param projectId 项目 id
|
* @param projectId 项目 id
|
||||||
* @return 物料进度详情
|
* @return 物料进度详情
|
||||||
*/
|
*/
|
||||||
List<MaterialProgressDetailVo> getMaterialProgressDetail(Long projectId);
|
List<MaterialProgressDetailVo> getMaterialProgressDetail(Long projectId, String name, String specification);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取物资进度
|
* 获取物资进度
|
||||||
|
|||||||
@ -21,6 +21,7 @@ import org.dromara.materials.domain.MatMaterialReceive;
|
|||||||
import org.dromara.materials.domain.MatMaterialReceiveItem;
|
import org.dromara.materials.domain.MatMaterialReceiveItem;
|
||||||
import org.dromara.materials.service.IMatMaterialReceiveItemService;
|
import org.dromara.materials.service.IMatMaterialReceiveItemService;
|
||||||
import org.dromara.materials.service.IMatMaterialReceiveService;
|
import org.dromara.materials.service.IMatMaterialReceiveService;
|
||||||
|
import org.dromara.materials.service.IMatMaterialsService;
|
||||||
import org.dromara.progress.constant.PgsProgressCategoryConstant;
|
import org.dromara.progress.constant.PgsProgressCategoryConstant;
|
||||||
import org.dromara.progress.domain.PgsConstructionSchedulePlan;
|
import org.dromara.progress.domain.PgsConstructionSchedulePlan;
|
||||||
import org.dromara.progress.domain.PgsProgressCategory;
|
import org.dromara.progress.domain.PgsProgressCategory;
|
||||||
@ -88,6 +89,9 @@ public class ProgressBigScreenServiceImpl implements ProgressBigScreenService {
|
|||||||
@Resource
|
@Resource
|
||||||
private IBusMrpBaseService mrpBaseService;
|
private IBusMrpBaseService mrpBaseService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IMatMaterialsService matMaterialsService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取项目总进度
|
* 获取项目总进度
|
||||||
*
|
*
|
||||||
@ -336,20 +340,19 @@ public class ProgressBigScreenServiceImpl implements ProgressBigScreenService {
|
|||||||
* @return 物料进度详情
|
* @return 物料进度详情
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<MaterialProgressDetailVo> getMaterialProgressDetail(Long projectId) {
|
public List<MaterialProgressDetailVo> getMaterialProgressDetail(Long projectId, String name, String specification) {
|
||||||
List<MatMaterialReceive> receiveList = materialReceiveService.lambdaQuery()
|
// 根据名称 规格获取材料
|
||||||
.eq(MatMaterialReceive::getProjectId, projectId)
|
|
||||||
.list();
|
|
||||||
if (CollUtil.isEmpty(receiveList)) {
|
|
||||||
return List.of();
|
|
||||||
}
|
|
||||||
List<Long> ids = receiveList.stream().map(MatMaterialReceive::getId).toList();
|
|
||||||
List<MatMaterialReceiveItem> itemList = materialReceiveItemService.lambdaQuery()
|
List<MatMaterialReceiveItem> itemList = materialReceiveItemService.lambdaQuery()
|
||||||
.in(MatMaterialReceiveItem::getReceiveId, ids)
|
.eq(MatMaterialReceiveItem::getName, name)
|
||||||
|
.eq(MatMaterialReceiveItem::getSpecification, specification)
|
||||||
.list();
|
.list();
|
||||||
if (CollUtil.isEmpty(itemList)) {
|
if (CollUtil.isEmpty(itemList)) {
|
||||||
return List.of();
|
return List.of();
|
||||||
}
|
}
|
||||||
|
Set<Long> ids = itemList.stream().map(MatMaterialReceiveItem::getReceiveId).collect(Collectors.toSet());
|
||||||
|
List<MatMaterialReceive> receiveList = materialReceiveService.lambdaQuery()
|
||||||
|
.in(MatMaterialReceive::getId, ids)
|
||||||
|
.list();
|
||||||
Map<Long, MatMaterialReceive> receiveMap = receiveList.stream()
|
Map<Long, MatMaterialReceive> receiveMap = receiveList.stream()
|
||||||
.collect(Collectors.toMap(MatMaterialReceive::getId, receive -> receive));
|
.collect(Collectors.toMap(MatMaterialReceive::getId, receive -> receive));
|
||||||
return itemList.stream().map(item -> {
|
return itemList.stream().map(item -> {
|
||||||
@ -364,6 +367,7 @@ public class ProgressBigScreenServiceImpl implements ProgressBigScreenService {
|
|||||||
vo.setQuantity(item.getQuantity());
|
vo.setQuantity(item.getQuantity());
|
||||||
vo.setAcceptedQuantity(item.getAcceptedQuantity());
|
vo.setAcceptedQuantity(item.getAcceptedQuantity());
|
||||||
vo.setShortageQuantity(item.getShortageQuantity());
|
vo.setShortageQuantity(item.getShortageQuantity());
|
||||||
|
vo.setFormCode(receive.getFormCode());
|
||||||
vo.setContractName(receive.getContractName());
|
vo.setContractName(receive.getContractName());
|
||||||
vo.setOrderingUnit(receive.getOrderingUnit());
|
vo.setOrderingUnit(receive.getOrderingUnit());
|
||||||
vo.setSupplierUnit(receive.getSupplierUnit());
|
vo.setSupplierUnit(receive.getSupplierUnit());
|
||||||
@ -380,6 +384,20 @@ public class ProgressBigScreenServiceImpl implements ProgressBigScreenService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<wzxqysjdhdbVo> getMaterialProgress(Long projectId) {
|
public List<wzxqysjdhdbVo> getMaterialProgress(Long projectId) {
|
||||||
return mrpBaseService.wzxqysjdhdb(projectId);
|
List<wzxqysjdhdbVo> wzxqysjdhdb = mrpBaseService.wzxqysjdhdb(projectId);
|
||||||
|
Map<String, List<wzxqysjdhdbVo>> map = wzxqysjdhdb.stream()
|
||||||
|
.collect(Collectors.groupingBy(o -> o.getName() + o.getSpecification()));
|
||||||
|
List<wzxqysjdhdbVo> wzxqysjdhdbList = new ArrayList<>();
|
||||||
|
map.forEach((k, v) -> {
|
||||||
|
wzxqysjdhdbVo vo = new wzxqysjdhdbVo();
|
||||||
|
vo.setName(v.getFirst().getName());
|
||||||
|
vo.setSpecification(v.getFirst().getSpecification());
|
||||||
|
BigDecimal design = v.stream().map(wzxqysjdhdbVo::getDesignTotalPrices).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
vo.setDesignTotalPrices(design);
|
||||||
|
BigDecimal arrival = v.stream().map(wzxqysjdhdbVo::getArrivalTotalPrices).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
vo.setArrivalTotalPrices(arrival);
|
||||||
|
wzxqysjdhdbList.add(vo);
|
||||||
|
});
|
||||||
|
return wzxqysjdhdbList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,21 +4,30 @@ import cn.hutool.core.bean.BeanUtil;
|
|||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.dromara.bigscreen.domain.vo.designAndArrivalComparisonVo;
|
import org.dromara.bigscreen.domain.vo.designAndArrivalComparisonVo;
|
||||||
import org.dromara.bigscreen.domain.vo.wzxqysjdhdbVo;
|
import org.dromara.bigscreen.domain.vo.wzxqysjdhdbVo;
|
||||||
import org.dromara.cailiaoshebei.domain.BusMaterialbatchdemandplan;
|
import org.dromara.cailiaoshebei.domain.BusMaterialbatchdemandplan;
|
||||||
|
import org.dromara.cailiaoshebei.domain.BusMrpBase;
|
||||||
import org.dromara.cailiaoshebei.domain.BusPlanDocAssociation;
|
import org.dromara.cailiaoshebei.domain.BusPlanDocAssociation;
|
||||||
import org.dromara.cailiaoshebei.domain.bo.BusMaterialbatchdemandplanBo;
|
import org.dromara.cailiaoshebei.domain.bo.BusMaterialbatchdemandplanBo;
|
||||||
|
import org.dromara.cailiaoshebei.domain.bo.BusMrpBaseBo;
|
||||||
import org.dromara.cailiaoshebei.domain.bo.BusMrpBaseReq;
|
import org.dromara.cailiaoshebei.domain.bo.BusMrpBaseReq;
|
||||||
import org.dromara.cailiaoshebei.domain.dto.BusMaterialbatchdemandplanExportDto;
|
import org.dromara.cailiaoshebei.domain.dto.BusMaterialbatchdemandplanExportDto;
|
||||||
import org.dromara.cailiaoshebei.domain.dto.BusMrpDto;
|
import org.dromara.cailiaoshebei.domain.dto.BusMrpDto;
|
||||||
import org.dromara.cailiaoshebei.domain.dto.BusMrpExportDto;
|
import org.dromara.cailiaoshebei.domain.dto.BusMrpExportDto;
|
||||||
import org.dromara.cailiaoshebei.domain.vo.BusMaterialbatchdemandplanVo;
|
import org.dromara.cailiaoshebei.domain.vo.BusMaterialbatchdemandplanVo;
|
||||||
|
import org.dromara.cailiaoshebei.domain.vo.BusMrpBaseVo;
|
||||||
import org.dromara.cailiaoshebei.domain.vo.BusMrpVo;
|
import org.dromara.cailiaoshebei.domain.vo.BusMrpVo;
|
||||||
|
import org.dromara.cailiaoshebei.mapper.BusMrpBaseMapper;
|
||||||
import org.dromara.cailiaoshebei.service.IBusMaterialbatchdemandplanService;
|
import org.dromara.cailiaoshebei.service.IBusMaterialbatchdemandplanService;
|
||||||
|
import org.dromara.cailiaoshebei.service.IBusMrpBaseService;
|
||||||
import org.dromara.cailiaoshebei.service.IBusPlanDocAssociationService;
|
import org.dromara.cailiaoshebei.service.IBusPlanDocAssociationService;
|
||||||
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||||
import org.dromara.common.core.domain.event.ProcessEvent;
|
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||||
@ -27,15 +36,9 @@ import org.dromara.common.core.enums.BusinessStatusEnum;
|
|||||||
import org.dromara.common.core.exception.ServiceException;
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.dromara.common.utils.excel.ExcelDynamicReader;
|
import org.dromara.common.utils.excel.ExcelDynamicReader;
|
||||||
import org.dromara.design.domain.BusBillofquantities;
|
|
||||||
import org.dromara.design.service.IBusBillofquantitiesService;
|
|
||||||
import org.dromara.materials.domain.MatMaterialReceiveItem;
|
import org.dromara.materials.domain.MatMaterialReceiveItem;
|
||||||
import org.dromara.materials.service.IMatMaterialReceiveItemService;
|
import org.dromara.materials.service.IMatMaterialReceiveItemService;
|
||||||
import org.dromara.tender.domain.BusBillofquantitiesLimitList;
|
import org.dromara.tender.domain.BusBillofquantitiesLimitList;
|
||||||
@ -47,11 +50,6 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.context.event.EventListener;
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.dromara.cailiaoshebei.domain.bo.BusMrpBaseBo;
|
|
||||||
import org.dromara.cailiaoshebei.domain.vo.BusMrpBaseVo;
|
|
||||||
import org.dromara.cailiaoshebei.domain.BusMrpBase;
|
|
||||||
import org.dromara.cailiaoshebei.mapper.BusMrpBaseMapper;
|
|
||||||
import org.dromara.cailiaoshebei.service.IBusMrpBaseService;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@ -84,7 +82,6 @@ public class BusMrpBaseServiceImpl extends ServiceImpl<BusMrpBaseMapper, BusMrpB
|
|||||||
private IMatMaterialReceiveItemService matMaterialReceiveItemService;
|
private IMatMaterialReceiveItemService matMaterialReceiveItemService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询物资-批次需求计划基础信息
|
* 查询物资-批次需求计划基础信息
|
||||||
*
|
*
|
||||||
@ -262,7 +259,7 @@ public class BusMrpBaseServiceImpl extends ServiceImpl<BusMrpBaseMapper, BusMrpB
|
|||||||
.findFirst()
|
.findFirst()
|
||||||
.map(item -> {
|
.map(item -> {
|
||||||
String name = item.getName() != null ? item.getName() : "";
|
String name = item.getName() != null ? item.getName() : "";
|
||||||
return "名称:“"+name + "”";
|
return "名称:“" + name + "”";
|
||||||
})
|
})
|
||||||
.orElse("未知物料");
|
.orElse("未知物料");
|
||||||
throw new ServiceException(itemName + "超出数量");
|
throw new ServiceException(itemName + "超出数量");
|
||||||
@ -312,7 +309,7 @@ public class BusMrpBaseServiceImpl extends ServiceImpl<BusMrpBaseMapper, BusMrpB
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> remaining(Long projectId, Long limitListId,Long mrpBaseId) {
|
public Map<String, Object> remaining(Long projectId, Long limitListId, Long mrpBaseId) {
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
List<BusTenderPlanningLimitList> busTenderPlanningLimitLists = tenderPlanningLimitListService.getBaseMapper()
|
List<BusTenderPlanningLimitList> busTenderPlanningLimitLists = tenderPlanningLimitListService.getBaseMapper()
|
||||||
.selectList(new LambdaQueryWrapper<BusTenderPlanningLimitList>()
|
.selectList(new LambdaQueryWrapper<BusTenderPlanningLimitList>()
|
||||||
@ -326,23 +323,23 @@ public class BusMrpBaseServiceImpl extends ServiceImpl<BusMrpBaseMapper, BusMrpB
|
|||||||
// 获取数据库中已有的数量
|
// 获取数据库中已有的数量
|
||||||
List<BusMaterialbatchdemandplan> existingList = planservice.list(
|
List<BusMaterialbatchdemandplan> existingList = planservice.list(
|
||||||
Wrappers.lambdaQuery(BusMaterialbatchdemandplan.class)
|
Wrappers.lambdaQuery(BusMaterialbatchdemandplan.class)
|
||||||
.eq(BusMaterialbatchdemandplan::getSuppliespriceId ,limitListId)
|
.eq(BusMaterialbatchdemandplan::getSuppliespriceId, limitListId)
|
||||||
.ne(mrpBaseId!=null,BusMaterialbatchdemandplan::getMrpBaseId, mrpBaseId)// 排除当前批次
|
.ne(mrpBaseId != null, BusMaterialbatchdemandplan::getMrpBaseId, mrpBaseId)// 排除当前批次
|
||||||
);
|
);
|
||||||
BigDecimal reduce = BigDecimal.ZERO;
|
BigDecimal reduce = BigDecimal.ZERO;
|
||||||
if(CollectionUtil.isNotEmpty(existingList)){
|
if (CollectionUtil.isNotEmpty(existingList)) {
|
||||||
reduce = existingList.stream()
|
reduce = existingList.stream()
|
||||||
.map(BusMaterialbatchdemandplan::getDemandQuantity)
|
.map(BusMaterialbatchdemandplan::getDemandQuantity)
|
||||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
}
|
}
|
||||||
map.put("remainingQuantity",quantity.subtract(reduce));
|
map.put("remainingQuantity", quantity.subtract(reduce));
|
||||||
map.put("suppliespriceId",limitListId);
|
map.put("suppliespriceId", limitListId);
|
||||||
if (busBillofquantities != null) {
|
if (busBillofquantities != null) {
|
||||||
map.put("specification",busBillofquantities.getSpecification());
|
map.put("specification", busBillofquantities.getSpecification());
|
||||||
map.put("unit",busBillofquantities.getUnit());
|
map.put("unit", busBillofquantities.getUnit());
|
||||||
map.put("unitPrice",busBillofquantities.getUnitPrice());
|
map.put("unitPrice", busBillofquantities.getUnitPrice());
|
||||||
map.put("remark",busBillofquantities.getRemark());
|
map.put("remark", busBillofquantities.getRemark());
|
||||||
map.put("name",busBillofquantities.getName());
|
map.put("name", busBillofquantities.getName());
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
@ -357,7 +354,7 @@ public class BusMrpBaseServiceImpl extends ServiceImpl<BusMrpBaseMapper, BusMrpB
|
|||||||
.like(BusMaterialbatchdemandplan::getName, req.getName()));
|
.like(BusMaterialbatchdemandplan::getName, req.getName()));
|
||||||
Iterator<BusMaterialbatchdemandplan> iterator = busMaterialbatchdemandplans.iterator();
|
Iterator<BusMaterialbatchdemandplan> iterator = busMaterialbatchdemandplans.iterator();
|
||||||
Set<Long> mrpIds = new HashSet<>();
|
Set<Long> mrpIds = new HashSet<>();
|
||||||
while (iterator.hasNext()){
|
while (iterator.hasNext()) {
|
||||||
BusMaterialbatchdemandplan next = iterator.next();
|
BusMaterialbatchdemandplan next = iterator.next();
|
||||||
List<BusPlanDocAssociation> busPlanDocAssociations = planDocAssociationService.getBaseMapper().selectList(new LambdaQueryWrapper<BusPlanDocAssociation>()
|
List<BusPlanDocAssociation> busPlanDocAssociations = planDocAssociationService.getBaseMapper().selectList(new LambdaQueryWrapper<BusPlanDocAssociation>()
|
||||||
.eq(BusPlanDocAssociation::getProjectId, req.getProjectId())
|
.eq(BusPlanDocAssociation::getProjectId, req.getProjectId())
|
||||||
@ -368,15 +365,15 @@ public class BusMrpBaseServiceImpl extends ServiceImpl<BusMrpBaseMapper, BusMrpB
|
|||||||
});
|
});
|
||||||
if (demandQuantity.compareTo(next.getDemandQuantity()) >= 0) {
|
if (demandQuantity.compareTo(next.getDemandQuantity()) >= 0) {
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
}else {
|
} else {
|
||||||
mrpIds.add(next.getMrpBaseId());
|
mrpIds.add(next.getMrpBaseId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mrpIds.isEmpty()){
|
if (mrpIds.isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return baseMapper.selectVoList(new LambdaQueryWrapper<BusMrpBase>()
|
return baseMapper.selectVoList(new LambdaQueryWrapper<BusMrpBase>()
|
||||||
.eq(BusMrpBase::getStatus,BusinessStatusEnum.FINISH.getStatus()).in(BusMrpBase::getId,mrpIds));
|
.eq(BusMrpBase::getStatus, BusinessStatusEnum.FINISH.getStatus()).in(BusMrpBase::getId, mrpIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -411,14 +408,14 @@ public class BusMrpBaseServiceImpl extends ServiceImpl<BusMrpBaseMapper, BusMrpB
|
|||||||
Set<Long> planIds = matMaterialReceiveItems.stream()
|
Set<Long> planIds = matMaterialReceiveItems.stream()
|
||||||
.map(MatMaterialReceiveItem::getPlanId)
|
.map(MatMaterialReceiveItem::getPlanId)
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
if (CollUtil.isEmpty(planIds)){
|
if (CollUtil.isEmpty(planIds)) {
|
||||||
return new HashMap<>();
|
return new HashMap<>();
|
||||||
}
|
}
|
||||||
Map<Long, BigDecimal> planMap = matMaterialReceiveItems.stream()
|
Map<Long, BigDecimal> planMap = matMaterialReceiveItems.stream()
|
||||||
.filter(matMaterialReceiveItem -> matMaterialReceiveItem.getPlanId() != null)
|
.filter(matMaterialReceiveItem -> matMaterialReceiveItem.getPlanId() != null)
|
||||||
.collect(Collectors.groupingBy(
|
.collect(Collectors.groupingBy(
|
||||||
MatMaterialReceiveItem::getPlanId,
|
MatMaterialReceiveItem::getPlanId,
|
||||||
Collectors.reducing(BigDecimal.ZERO, MatMaterialReceiveItem::getQuantity, BigDecimal::add)
|
Collectors.reducing(BigDecimal.ZERO, MatMaterialReceiveItem::getAcceptedQuantity, BigDecimal::add)
|
||||||
));
|
));
|
||||||
// 根据入库数据反查批次需求计划数据 bus_materialbatchdemandplan
|
// 根据入库数据反查批次需求计划数据 bus_materialbatchdemandplan
|
||||||
List<BusMaterialbatchdemandplan> materialbatchdemandplans = planservice.getBaseMapper().selectList(new LambdaQueryWrapper<BusMaterialbatchdemandplan>()
|
List<BusMaterialbatchdemandplan> materialbatchdemandplans = planservice.getBaseMapper().selectList(new LambdaQueryWrapper<BusMaterialbatchdemandplan>()
|
||||||
|
|||||||
Reference in New Issue
Block a user