Explorar el Código

计量-中间计量申请最后一期计量全部金额

qianxb hace 7 meses
padre
commit
4d9e7a8527

+ 3 - 0
blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/vo/MeterInventoryVO.java

@@ -49,6 +49,9 @@ public class MeterInventoryVO {
     @ApiModelProperty(value = "累计计量数量")
     private BigDecimal allMeterTotal;
 
+    @ApiModelProperty(value = "累计计量金额")
+    private BigDecimal allMeterMoney;
+
     @ApiModelProperty(value = "其他计量期计量量")
     private BigDecimal otherMeterTotal;
 

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

@@ -44,7 +44,9 @@
                 IFNULL((select sum(change_build_picture_total) from s_inventory_form_meter where is_deleted = 0
                     and contract_meter_id = #{nodeId} and contract_form_id = cif.id),0) as ChangeTotal2,
                 IFNULL((select sum(current_meter_total) from s_inventory_form_apply where is_deleted = 0
-                    and contract_meter_id = #{nodeId} and contract_form_id = cif.id),0) as allMeterTotal
+                    and contract_meter_id = #{nodeId} and contract_form_id = cif.id),0) as allMeterTotal,
+                IFNULL((select sum(current_meter_money) from s_inventory_form_apply where is_deleted = 0
+                and contract_meter_id = #{nodeId} and contract_form_id = cif.id),0) as allMeterMoney
         from s_contract_inventory_form  cif where contract_id = #{contractId} and is_deleted = 0 and is_form_node = 1
             AND id in
             <foreach collection="ids" item="id" open="(" separator="," close=")">
@@ -65,7 +67,9 @@
                             and contract_meter_id = #{nodeId} and contract_form_id = cif.id),0) as resolveTotal,
                0 as currentMeterTotal,0 as containChangeTotal,0 as currentMeterMoney,
                (IFNULL((select sum(current_meter_total) from s_inventory_form_apply where is_deleted = 0
-                            and contract_meter_id = #{nodeId} and contract_form_id = cif.id),0)) as allMeterTotal
+                            and contract_meter_id = #{nodeId} and contract_form_id = cif.id),0)) as allMeterTotal,
+                (IFNULL((select sum(current_meter_money) from s_inventory_form_apply where is_deleted = 0
+                and contract_meter_id = #{nodeId} and contract_form_id = cif.id),0)) as allMeterMoney
         from s_contract_inventory_form  cif where contract_id = #{contractId} and is_deleted = 0 and is_form_node = 1
         AND id in
         <foreach collection="ids" item="id" open="(" separator="," close=")">