Преглед на файлове

Merge remote-tracking branch 'origin/master'

chenr преди 2 месеца
родител
ревизия
c8878d6874

+ 5 - 0
blade-service/blade-meter/src/main/java/org/springblade/meter/controller/TaskController.java

@@ -1479,6 +1479,7 @@ public class TaskController extends BladeController {
                         } else {
                             middleMeterApplyTaskVO.setIsComment(0);
                         }
+                        middleMeterApplyTaskVO.setMeterMoney(middleMeterApplyTaskVO.getMeterMoney().setScale(0,BigDecimal.ROUND_HALF_UP));
                     }
                     vo.setTaskCenterDataInfo(middleMeterApplyTaskVOS);
 
@@ -1723,10 +1724,14 @@ public class TaskController extends BladeController {
                     ContractMeterPeriod contractMeterPeriod = contractMeterPeriodService.getById(middleMeterApplyTaskVO.getContractPeriodId());
                     if (contractMeterPeriod != null) {
                         middleMeterApplyTaskVO.setContractPeriodIdName(contractMeterPeriod.getPeriodNumber());
+                        middleMeterApplyTaskVO.setMeterMoney(middleMeterApplyTaskVO.getMeterMoney().setScale(0,BigDecimal.ROUND_HALF_UP));
                         vo.setBasicsInfo(middleMeterApplyTaskVO);
 
                         /*清单信息*/
                         List<MeterInventoryVO> formToTask = middleMeterApplyMapper.getFormCopy(Long.parseLong(dataId), middleMeterApplyTask.getContractId(), middleMeterApplyTask.getContractUnitId());
+                        for (MeterInventoryVO inventoryVO : formToTask) {
+                            inventoryVO.setCurrentMeterMoney(inventoryVO.getCurrentMeterMoney().setScale(0,BigDecimal.ROUND_HALF_UP));
+                        }
                         vo.setAssociatedDataInfoList(formToTask);
                     }
                 }

+ 3 - 3
blade-service/blade-meter/src/main/java/org/springblade/meter/service/impl/MeterTreeContractServiceImpl.java

@@ -2208,9 +2208,9 @@ public class MeterTreeContractServiceImpl extends BaseServiceImpl<MeterTreeContr
             throw new ServiceException("请检查支付比例是否在规定范围");
         }
         //如果计算式有值,就同步去修改所有中间计量申请的
-        if (StringUtils.isNotBlank(dto.getCalculateFormula())){
-            baseMapper.updateMiddleMeter(dto);
-        }
+//        if (StringUtils.isNotBlank(dto.getCalculateFormula())){
+//            baseMapper.updateMiddleMeter(dto);
+//        }
         boolean b = this.updateById(dto);
         return b;
     }

+ 24 - 24
blade-service/blade-meter/src/main/java/org/springblade/meter/service/impl/MiddleMeterApplyServiceImpl.java

@@ -304,18 +304,18 @@ public class MiddleMeterApplyServiceImpl extends BaseServiceImpl<MiddleMeterAppl
              throw new ServiceException("请添加需要计量的清单");
          }
         this.save(apply);
-         if (StringUtils.isNotBlank(apply.getCalculateFormula())) {
-             //如果存在计算式,每次同步修改所有期的当前节点计算式
-             this.update(new LambdaUpdateWrapper<MiddleMeterApply>()
-                    .eq(MiddleMeterApply::getContractId,dto.getContractId())
-                    .eq(MiddleMeterApply::getContractUnitId,dto.getContractUnitId())
-                    .set(MiddleMeterApply::getCalculateFormula,dto.getCalculateFormula()));
-             //再同步修改合同计量单元当前节点的计算式
-             meterTreeContractService.update(new LambdaUpdateWrapper<MeterTreeContract>()
-                    .eq(MeterTreeContract::getId,dto.getContractUnitId())
-                    .set(MeterTreeContract::getCalculateFormula,dto.getCalculateFormula()));
-
-         }
+//         if (StringUtils.isNotBlank(apply.getCalculateFormula())) {
+//             //如果存在计算式,每次同步修改所有期的当前节点计算式
+//             this.update(new LambdaUpdateWrapper<MiddleMeterApply>()
+//                    .eq(MiddleMeterApply::getContractId,dto.getContractId())
+//                    .eq(MiddleMeterApply::getContractUnitId,dto.getContractUnitId())
+//                    .set(MiddleMeterApply::getCalculateFormula,dto.getCalculateFormula()));
+//             //再同步修改合同计量单元当前节点的计算式
+//             meterTreeContractService.update(new LambdaUpdateWrapper<MeterTreeContract>()
+//                    .eq(MeterTreeContract::getId,dto.getContractUnitId())
+//                    .set(MeterTreeContract::getCalculateFormula,dto.getCalculateFormula()));
+//
+//         }
 
 
     }
@@ -503,18 +503,18 @@ public class MiddleMeterApplyServiceImpl extends BaseServiceImpl<MiddleMeterAppl
             inventoryFormApplyService.saveBatch(formApplies);
         }
         this.updateById(apply);
-        if (StringUtils.isNotBlank(apply.getCalculateFormula())) {
-            //如果存在计算式,每次同步修改所有期的当前节点计算式
-            this.update(new LambdaUpdateWrapper<MiddleMeterApply>()
-                    .eq(MiddleMeterApply::getContractId,dto.getContractId())
-                    .eq(MiddleMeterApply::getContractUnitId,dto.getContractUnitId())
-                    .set(MiddleMeterApply::getCalculateFormula,dto.getCalculateFormula()));
-            //再同步修改合同计量单元当前节点的计算式
-            meterTreeContractService.update(new LambdaUpdateWrapper<MeterTreeContract>()
-                    .eq(MeterTreeContract::getId,dto.getContractUnitId())
-                    .set(MeterTreeContract::getCalculateFormula,dto.getCalculateFormula()));
-
-        }
+//        if (StringUtils.isNotBlank(apply.getCalculateFormula())) {
+//            //如果存在计算式,每次同步修改所有期的当前节点计算式
+//            this.update(new LambdaUpdateWrapper<MiddleMeterApply>()
+//                    .eq(MiddleMeterApply::getContractId,dto.getContractId())
+//                    .eq(MiddleMeterApply::getContractUnitId,dto.getContractUnitId())
+//                    .set(MiddleMeterApply::getCalculateFormula,dto.getCalculateFormula()));
+//            //再同步修改合同计量单元当前节点的计算式
+//            meterTreeContractService.update(new LambdaUpdateWrapper<MeterTreeContract>()
+//                    .eq(MeterTreeContract::getId,dto.getContractUnitId())
+//                    .set(MeterTreeContract::getCalculateFormula,dto.getCalculateFormula()));
+//
+//        }
 
     }