Bladeren bron

半月报添加详情

Signed-off-by: tangsong <86121657@qq.com>
tangsong 1 jaar geleden
bovenliggende
commit
bda5fbfb09
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      src/main/java/com/chinaitop/depot/rp/mapper/BusinessRpBiweeklyReportMapper.xml

+ 2 - 2
src/main/java/com/chinaitop/depot/rp/mapper/BusinessRpBiweeklyReportMapper.xml

@@ -332,7 +332,7 @@
332 332
                         where m4.jhdID = c.id and m4.lspz = f.grain_variety_id and m1.rq BETWEEN #{startDate} and #{endDate}   -- 计划id+粮食品种+ 指定时间
333 333
 
334 334
                     )  as "outCurrentQuantity", -- 轮出-本期-数量
335
-                    (SELECT SUM(out_current_quantity) FROM business_rp_biweekly_report_grain m1 where m1.rp_report_id = c.id and m1.grain_variety_id = f.grain_variety_id) as "outSumQuantity", -- 轮出-累计-数量
335
+                    (SELECT IFNULL(SUM(out_current_quantity),0.0) FROM business_rp_biweekly_report_grain m1 where m1.rp_report_id = c.id and m1.grain_variety_id = f.grain_variety_id) as "outSumQuantity", -- 轮出-累计-数量
336 336
 
337 337
                     (   SELECT
338 338
                      IFNULL(sum(m1.srsl),0.0) as "rksl"
@@ -343,7 +343,7 @@
343 343
                         INNER JOIN crk_qh.data_crkyw_tzdxx_default m4 on m3.tzdbh = m4.tzdbh
344 344
                         where m4.jhdID = c.id and m4.lspz = f.grain_variety_id and m1.rq BETWEEN #{startDate} and #{endDate} -- 计划id+粮食品种+ 指定时间
345 345
                     )  as "inCurrentQuantity", -- 轮入-本期-数量
346
-                    (SELECT SUM(in_current_quantity) FROM business_rp_biweekly_report_grain m1 where m1.rp_report_id = c.id and m1.grain_variety_id = f.grain_variety_id) as "inSumQuantity" -- 轮入-累计-数量
346
+                    (SELECT  IFNULL(SUM(in_current_quantity),0.0) FROM business_rp_biweekly_report_grain m1 where m1.rp_report_id = c.id and m1.grain_variety_id = f.grain_variety_id) as "inSumQuantity" -- 轮入-累计-数量
347 347
             FROM
348 348
              depot_qh.business_rp_report c
349 349
             LEFT JOIN depot_qh.business_rp_outbound f ON c.id = f.rp_report_id