|
@@ -605,7 +605,7 @@ public class MeterTreeController extends BladeController {
|
|
|
/*最底层节点修改*/
|
|
|
dto.setUpdateStatus(1); //编辑
|
|
|
boolean b1 = meterTreeContractService.updateById(dto);
|
|
|
- boolean b2 = inventoryFormMeterService.updateInfo(dto.getDecompositionList(), dto.getId());//TODO 修改分解清单列表信息ContractFromVO
|
|
|
+ boolean b2 = inventoryFormMeterService.updateInfo(dto.getDecompositionList(), dto.getId());
|
|
|
if (b1 && b2) {
|
|
|
return R.success("操作成功");
|
|
|
}
|
|
@@ -666,7 +666,6 @@ public class MeterTreeController extends BladeController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //TODO 此处为分解列表信息,查询赋值
|
|
|
List<ContractFromVO> contrFormAllByContrId = contractInventoryFormService.getContrFormAllByContrId(basicInfo.getContractId(), "", 2, basicInfo.getId());
|
|
|
vo.setDecompositionList(contrFormAllByContrId);
|
|
|
return R.data(vo);
|
|
@@ -740,13 +739,17 @@ public class MeterTreeController extends BladeController {
|
|
|
.eq(MeterTreeContract::getProjectId, obj.getProjectId())
|
|
|
.eq(MeterTreeContract::getContractId, obj.getContractId())
|
|
|
.eq(MeterTreeContract::getStatus, 1)
|
|
|
- .like(MeterTreeContract::getAncestor, id)
|
|
|
- );
|
|
|
+ .like(MeterTreeContract::getAncestor, id));
|
|
|
if (countChild > 0) {
|
|
|
throw new ServiceException("该节点下存在子节点,无法删除");
|
|
|
}
|
|
|
|
|
|
- //TODO 判断分解清单列表引用情况,是否确认要删除
|
|
|
+ /*清单判断*/
|
|
|
+ Long inventoryFormMeterCount = inventoryFormMeterService.getBaseMapper().selectCount(Wrappers.<InventoryFormMeter>lambdaQuery()
|
|
|
+ .eq(InventoryFormMeter::getContractMeterId, id));
|
|
|
+ if (inventoryFormMeterCount != null && inventoryFormMeterCount > 0) {
|
|
|
+ throw new ServiceException("该节点下存在清单信息,无法删除");
|
|
|
+ }
|
|
|
|
|
|
return R.data(meterTreeContractService.removeById(id));
|
|
|
}
|