|
@@ -217,22 +217,22 @@ public class TravelCostServiceImpl implements TravelCostService {
|
|
|
// 更新
|
|
|
TravelCostDO updateObj = TravelCostConvert.INSTANCE.convert(updateReqVO);
|
|
|
travelCostDao.updateById(updateObj);
|
|
|
+ Set<String> idList = convertSet(travelCostBoatCarService.getListByTravelCostId(updateObj.getId()), TravelCostBoatCarDO::getId);
|
|
|
+ if (CollectionUtil.isNotEmpty(idList)) {
|
|
|
+ travelCostBoatCarDao.deleteBatchIds(idList);
|
|
|
+ }
|
|
|
if (CollectionUtil.isNotEmpty(updateReqVO.getBoatCarList())) {
|
|
|
- Set<String> idList = convertSet(travelCostBoatCarService.getListByTravelCostId(updateObj.getId()), TravelCostBoatCarDO::getId);
|
|
|
- if (CollectionUtil.isNotEmpty(idList)) {
|
|
|
- travelCostBoatCarDao.deleteBatchIds(idList);
|
|
|
- }
|
|
|
List<TravelCostBoatCarDO> boatCarList = updateReqVO.getBoatCarList();
|
|
|
boatCarList.forEach(boatCarDO -> {
|
|
|
boatCarDO.setTravelCostId(updateObj.getId());
|
|
|
});
|
|
|
travelCostBoatCarDao.insertBatch(boatCarList);
|
|
|
}
|
|
|
+ Set<String> otherIdList = convertSet(travelCostOtherService.getListByTravelCostId(updateObj.getId()), TravelCostOtherDO::getId);
|
|
|
+ if (CollectionUtil.isNotEmpty(otherIdList)) {
|
|
|
+ travelCostOtherDao.deleteBatchIds(otherIdList);
|
|
|
+ }
|
|
|
if (CollectionUtil.isNotEmpty(updateReqVO.getOtherList())) {
|
|
|
- Set<String> idList = convertSet(travelCostOtherService.getListByTravelCostId(updateObj.getId()), TravelCostOtherDO::getId);
|
|
|
- if (CollectionUtil.isNotEmpty(idList)) {
|
|
|
- travelCostOtherDao.deleteBatchIds(idList);
|
|
|
- }
|
|
|
List<TravelCostOtherDO> otherList = updateReqVO.getOtherList();
|
|
|
otherList.forEach(otherDO -> {
|
|
|
otherDO.setTravelCostId(updateObj.getId());
|