Explorar o código

计量-修改中间计量申请的上报总金额

qianxb hai 2 meses
pai
achega
62c3efc873

+ 1 - 1
blade-service/blade-meter/src/main/java/org/springblade/meter/controller/MiddleMeterApplyController.java

@@ -220,7 +220,7 @@ public class MiddleMeterApplyController extends BladeController {
             @ApiImplicitParam(name = "contractPeriodId", value = "合同计量期id", required = true)
     })
     public R<BigDecimal> getCurrentMeterMoney(MiddleMeterApply middleMeterApply) {
-        return R.data(middleMeterApplyService.getCurrentMeterMoney(middleMeterApply));
+        return R.data(middleMeterApplyService.getCurrentMeterMoney(middleMeterApply,"小计"));
     }
 
     @GetMapping("/test")

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

@@ -2611,7 +2611,7 @@ public class TaskController extends BladeController {
                     MiddleMeterApply middleMeterApply = new MiddleMeterApply();
                     middleMeterApply.setContractId(Func.toLong(task.getContractId()));
                     middleMeterApply.setContractPeriodId(Func.toLong(task.getFormDataId()));
-                    BigDecimal currentMeterMoney = middleMeterApplyService.getCurrentMeterMoney(middleMeterApply);
+                    BigDecimal currentMeterMoney = middleMeterApplyService.getCurrentMeterMoney(middleMeterApply,"实际支付金额");
 
                     InterimPayCertificate inData = interimPayCertificateService.getBaseMapper().selectOne(Wrappers.<InterimPayCertificate>lambdaQuery().eq(InterimPayCertificate::getContractId, task.getContractId()).eq(InterimPayCertificate::getContractPeriodId, task.getFormDataId()));
                     if (inData == null || Func.isNull(inData)) {

+ 1 - 1
blade-service/blade-meter/src/main/java/org/springblade/meter/mapper/MiddleMeterApplyMapper.java

@@ -72,7 +72,7 @@ public interface MiddleMeterApplyMapper extends BaseMapper<MiddleMeterApply> {
 
     List<Long> getNodeOtherFormId(@Param("middleId") Long id,@Param("contractId") Long contractId,@Param("contractPeriodId") Long contractPeriodId,@Param("nodeId") Long nodeId);
 
-    BigDecimal getCurrentMeterMoney(@Param("contractId") Long contractId,@Param("contractPeriodId") Long contractPeriodId);
+    BigDecimal getCurrentMeterMoney(@Param("contractId") Long contractId,@Param("contractPeriodId") Long contractPeriodId,@Param("seq") String seq);
 
     List<MiddleMeterApply> getAllAPPly(@Param("contractId") Long contractId,@Param("contractPeriodId") Long contractPeriodId);
 

+ 1 - 1
blade-service/blade-meter/src/main/java/org/springblade/meter/mapper/MiddleMeterApplyMapper.xml

@@ -223,7 +223,7 @@
 
     <select id="getCurrentMeterMoney" resultType="java.math.BigDecimal">
         select current_period_pay
-        from s_interim_pay_certificate_item where  chapter_seq='实际支付' and is_deleted = 0
+        from s_interim_pay_certificate_item where  chapter_seq=#{seq} and is_deleted = 0
                                               and certificate_id =
                                                   (select id from s_interim_pay_certificate
                                                    WHERE contract_id = #{contractId} and contract_period_id = #{contractPeriodId} and is_deleted = 0

+ 1 - 1
blade-service/blade-meter/src/main/java/org/springblade/meter/service/IMiddleMeterApplyService.java

@@ -61,7 +61,7 @@ public interface IMiddleMeterApplyService extends BaseService<MiddleMeterApply>
 
     String getMeterNumber(MiddleMeterApply middleMeterApply);
 
-    BigDecimal getCurrentMeterMoney(MiddleMeterApply middleMeterApply);
+    BigDecimal getCurrentMeterMoney(MiddleMeterApply middleMeterApply,String seq);
 
     //异步重新计算受变更影响的中间计量申请附件,ids为中间计量申请和清单表的id,需要重新获取
     void asyncCalculateMiddleMeter(List<Long> ids);

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

@@ -727,8 +727,8 @@ public class MiddleMeterApplyServiceImpl extends BaseServiceImpl<MiddleMeterAppl
      * 获取本期计量总金额
      */
     @Override
-    public BigDecimal getCurrentMeterMoney(MiddleMeterApply middleMeterApply) {
-        return baseMapper.getCurrentMeterMoney(middleMeterApply.getContractId(),middleMeterApply.getContractPeriodId());
+    public BigDecimal getCurrentMeterMoney(MiddleMeterApply middleMeterApply,String seq) {
+        return baseMapper.getCurrentMeterMoney(middleMeterApply.getContractId(),middleMeterApply.getContractPeriodId(),seq);
     }
 
     /**