qianxb 1 éve
szülő
commit
daaa39df85

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

@@ -15,7 +15,7 @@
                             where sci.is_deleted=0 and sci.contract_id = #{contractId}
                                 and (sci.id = scif.id or FIND_IN_SET(scif.id,ancestors) > 0)) as change_money
         from s_contract_inventory_form scif
-        WHERE parent_id = (select id from s_contract_inventory_form
+        WHERE scif.is_deleted = 0 and parent_id = (select id from s_contract_inventory_form
                            WHERE contract_id = #{contractId} and parent_id = 0)
         order by -sort desc,create_time
     </select>

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

@@ -13,7 +13,7 @@
         select *,
                if((select count(1) from s_contract_meter_period cmp
                     where contract_id = #{contractId} and is_deleted = 0 and sfp.period_year = cmp.period_year
-                    and approve_status in (2,3))=0,0,1) as citeStatus
+                    and approve_status in (1,2))=0,0,1) as citeStatus
         from s_form_period sfp
         where is_deleted = 0 and contract_id = #{contractId}
         ORDER BY period_year
@@ -22,7 +22,7 @@
         select
                if((select count(1) from s_contract_meter_period cmp
                    where cmp.contract_id = sfp.contract_id and is_deleted = 0 and sfp.period_year = cmp.period_year
-                     and approve_status in (2,3))=0,0,1)
+                     and approve_status in (1,2))=0,0,1)
         from s_form_period sfp
         where id = #{id}
     </select>