|
@@ -55,6 +55,7 @@ public class MeterTreeController extends BladeController {
|
|
|
private final IInventoryFormMeterService inventoryFormMeterService;
|
|
|
private final DataSourceTransactionManager transactionManager;
|
|
|
private final IMeterTreeLinkWbsTreeService meterTreeLinkWbsTreeService;
|
|
|
+ private final IMiddleMeterApplyService middleMeterApplyService;
|
|
|
|
|
|
@GetMapping("/template/detail")
|
|
|
@ApiOperationSupport(order = 1)
|
|
@@ -631,7 +632,7 @@ public class MeterTreeController extends BladeController {
|
|
|
try {
|
|
|
// b1 = meterTreeContractService.updateById(dto);
|
|
|
b1 = meterTreeContractService.contractUpdate(dto);
|
|
|
- b2 = inventoryFormMeterService.updateInfo(dto.getDecompositionList(), dto.getId(),dto.getUpPayRatio());
|
|
|
+ b2 = inventoryFormMeterService.updateInfo(dto);
|
|
|
transactionManager.commit(status);
|
|
|
}catch (Exception e){
|
|
|
transactionManager.rollback(status);
|
|
@@ -701,6 +702,15 @@ public class MeterTreeController extends BladeController {
|
|
|
.eq(MeterTreeContract::getContractId, basicInfo.getContractId())
|
|
|
.eq(MeterTreeContract::getParentId, basicInfo.getId()));
|
|
|
if (count == 0) {
|
|
|
+ //设置是否被计量
|
|
|
+ int total = Math.toIntExact(middleMeterApplyService.count(new LambdaQueryWrapper<MiddleMeterApply>()
|
|
|
+ .eq(MiddleMeterApply::getContractId, basicInfo.getContractId())
|
|
|
+ .eq(MiddleMeterApply::getContractUnitId, id)));
|
|
|
+ if (total == 0){
|
|
|
+ vo.setIsMeter(0);
|
|
|
+ }else {
|
|
|
+ vo.setIsMeter(1);
|
|
|
+ }
|
|
|
//设置清单
|
|
|
List<ContractFromVO> contrFormAllByContrId = contractInventoryFormService.getNodeResolveForm(basicInfo.getContractId(), basicInfo.getId());
|
|
|
vo.setDecompositionList(contrFormAllByContrId);
|