修改采购联系单
This commit is contained in:
@ -210,11 +210,10 @@ public class BusPurchaseDocServiceImpl extends ServiceImpl<BusPurchaseDocMapper,
|
|||||||
BusPurchaseDoc update = MapstructUtils.convert(bo, BusPurchaseDoc.class);
|
BusPurchaseDoc update = MapstructUtils.convert(bo, BusPurchaseDoc.class);
|
||||||
validEntityBeforeSave(update);
|
validEntityBeforeSave(update);
|
||||||
|
|
||||||
planDocAssociationService.remove(Wrappers.<BusPlanDocAssociation>lambdaQuery()
|
|
||||||
.eq(BusPlanDocAssociation::getProjectId, update.getProjectId())
|
|
||||||
.eq(BusPlanDocAssociation::getDocId, update.getId()));
|
|
||||||
|
|
||||||
if (CollectionUtil.isNotEmpty(bo.getAssociationList())) {
|
if (CollectionUtil.isNotEmpty(bo.getAssociationList())) {
|
||||||
|
planDocAssociationService.remove(Wrappers.<BusPlanDocAssociation>lambdaQuery()
|
||||||
|
.eq(BusPlanDocAssociation::getProjectId, update.getProjectId())
|
||||||
|
.eq(BusPlanDocAssociation::getDocId, update.getId()));
|
||||||
List<BusPlanDocAssociation> convert = MapstructUtils.convert(bo.getAssociationList(), BusPlanDocAssociation.class);
|
List<BusPlanDocAssociation> convert = MapstructUtils.convert(bo.getAssociationList(), BusPlanDocAssociation.class);
|
||||||
convert.forEach(item -> {
|
convert.forEach(item -> {
|
||||||
item.setProjectId(update.getProjectId());
|
item.setProjectId(update.getProjectId());
|
||||||
@ -505,6 +504,7 @@ public class BusPurchaseDocServiceImpl extends ServiceImpl<BusPurchaseDocMapper,
|
|||||||
BeanUtils.copyProperties(item, itemDto);
|
BeanUtils.copyProperties(item, itemDto);
|
||||||
itemDto.setNum(i);
|
itemDto.setNum(i);
|
||||||
itemDto.setChildName(item.getName());
|
itemDto.setChildName(item.getName());
|
||||||
|
itemDto.setDemandQuantity(item.getDemandQuantity() != null ? item.getDemandQuantity().longValue() : null);
|
||||||
dtoItems.add(itemDto);
|
dtoItems.add(itemDto);
|
||||||
}
|
}
|
||||||
dto.setItems(dtoItems);
|
dto.setItems(dtoItems);
|
||||||
|
Reference in New Issue
Block a user