|
|
@@ -530,7 +530,7 @@
|
|
530
|
530
|
a.cph as cphm, b.sjcfbh as cf, b.sjhwbh as hw, c.enumname as lspz, d.enumname scnf,
|
|
531
|
531
|
b.cpzsj as rq, b.xzklhjz as rksl, e.enumname lsdj, sf.sf, rz.rz, zzzl.zzzl,
|
|
532
|
532
|
kwz.kwz, wjzz.wjzz, yjzz.yjzz, sxw.sxw, bwslzl.bwslzl, csl.csl, bblzl.bblzl, hpl.hpl,
|
|
533
|
|
- cmbl.cmbl, psl.psl, syl.syl, sml.sml, szqw.szqw, ydzs.ydzs, substr(be.enumname,0,2) ccfs
|
|
|
533
|
+ cmbl.cmbl, psl.psl, syl.syl, sml.sml, szqw.szqw, ydzs.ydzs, rssl.rssl, substr(be.enumname,0,2) ccfs
|
|
534
|
534
|
FROM (select * from (select *,row_number() over(partition by BizNo order by 1) rn
|
|
535
|
535
|
from data_crkyw_rmdj_default)t1 where t1.rn = 1) a
|
|
536
|
536
|
inner JOIN data_crkyw_cpz_default b ON a.BizNo = b.BizNo
|
|
|
@@ -711,6 +711,16 @@
|
|
711
|
711
|
and jyxx.unitid = #{orgId}
|
|
712
|
712
|
</if>
|
|
713
|
713
|
) ydzs on ydzs.bizno = a.bizno
|
|
|
714
|
+ left join(
|
|
|
715
|
+ select jyxx.bizno,flt.jyz as rssl
|
|
|
716
|
+ from (select * from (select *,row_number() over(partition by BizNo order by 1) rn
|
|
|
717
|
+ from data_crkyw_jyxx_default)t1 where t1.rn = 1) jyxx
|
|
|
718
|
+ left join data_crkyw_jyxx_flt_001 flt on jyxx.DataID = flt.maindataid
|
|
|
719
|
+ where flt.zbxmc = '402882e87318022e017318e470090045'
|
|
|
720
|
+ <if test="orgId != null">
|
|
|
721
|
+ and jyxx.unitid = #{orgId}
|
|
|
722
|
+ </if>
|
|
|
723
|
+ ) rssl on rssl.bizno = a.bizno
|
|
714
|
724
|
WHERE nvl(a.BizNo,'-1') != '-1' and a.lspz = '3164'
|
|
715
|
725
|
<if test="orgId != null">
|
|
716
|
726
|
and jyxx.unitid = #{orgId}
|
|
|
@@ -733,7 +743,7 @@
|
|
733
|
743
|
select wheat.clbh cphm,wheat.cfmc cf,wheat.hwmc hw,wheat.pzmc lspz,wheat.scnd scnf,
|
|
734
|
744
|
wheat.rkrq rq,wheat.rksl*1000 rksl,wheat.dj lsdj,wheat.sf,wheat.rz,wheat.zzzl,
|
|
735
|
745
|
wheat.zzkwz kwz,wheat.wjzz,wheat.yjzz, wheat.sxw, wheat.bwslzl,wheat.csl,wheat.bblzl,wheat.hpl,
|
|
736
|
|
- wheat.cmbl,wheat.psl,wheat.syl,wheat.sml,wheat.szqw,wheat.ydzs,wheat.ccfs
|
|
|
746
|
+ wheat.cmbl,wheat.psl,wheat.syl,wheat.sml,wheat.szqw,wheat.ydzs, wheat.rssl, wheat.ccfs
|
|
737
|
747
|
from depot:record_wheat_info wheat
|
|
738
|
748
|
left join depot:basic_storehouse storehouse on storehouse.org_id = wheat.org_id and storehouse.del_flag = 1
|
|
739
|
749
|
and storehouse.library_type = 0 and storehouse.storehouse_name = wheat.cfmc
|
|
|
@@ -1446,70 +1456,67 @@
|
|
1446
|
1456
|
inner JOIN data_crkyw_cpz_default b ON a.BizNo = b.BizNo
|
|
1447
|
1457
|
LEFT JOIN depot:basic_enum c on a.lspz = c.enumid
|
|
1448
|
1458
|
LEFT JOIN depot:basic_enum d on a.scnf = d.enumid
|
|
1449
|
|
- <!-- left join (select * from (select *,row_number() over(partition by BizNo order by 1) rn
|
|
1450
|
|
- from data_crkyw_jyxx_default)t1 where t1.rn = 1) jyxx on jyxx.bizno = a.bizno -->
|
|
1451
|
|
- <!-- left join depot:basic_tank bs on bs.id = b.sjchID -->
|
|
1452
|
1459
|
left join(
|
|
1453
|
1460
|
select jyxx.bizno,flt.jyz as qwzw
|
|
1454
|
|
- from (select * from (select *,row_number() over(partition by BizNo order by 1) rn
|
|
|
1461
|
+ from (select * from (select dataid, bizno, unitid, row_number() over(partition by BizNo order by modifydate desc) rn
|
|
1455
|
1462
|
from data_crkyw_jyxx_default)t1 where t1.rn = 1) jyxx
|
|
1456
|
1463
|
left join data_crkyw_jyxx_flt_001 flt on jyxx.DataID = flt.maindataid
|
|
1457
|
|
- where flt.zbxmc = '402882e87321dc72017321f9314f000e'
|
|
|
1464
|
+ where flt.zbxmc = 'cf5b3dabd8b511ec81ac00ff2bc9e548'
|
|
1458
|
1465
|
<if test="orgId != null">
|
|
1459
|
1466
|
and jyxx.unitid = #{orgId}
|
|
1460
|
1467
|
</if>
|
|
1461
|
1468
|
) qwzw on qwzw.bizno = a.bizno
|
|
1462
|
1469
|
left join(
|
|
1463
|
1470
|
select jyxx.bizno,flt.jyz as sfhfw
|
|
1464
|
|
- from (select * from (select *,row_number() over(partition by BizNo order by 1) rn
|
|
|
1471
|
+ from (select * from (select dataid, bizno, unitid, row_number() over(partition by BizNo order by modifydate desc) rn
|
|
1465
|
1472
|
from data_crkyw_jyxx_default)t1 where t1.rn = 1) jyxx
|
|
1466
|
1473
|
left join data_crkyw_jyxx_flt_001 flt on jyxx.DataID = flt.maindataid
|
|
1467
|
|
- where flt.zbxmc = 'c8baedcc732711eabc7300ff188bbfa4'
|
|
|
1474
|
+ where flt.zbxmc = 'cf5b37a3d8b511ec81ac00ff2bc9e548'
|
|
1468
|
1475
|
<if test="orgId != null">
|
|
1469
|
1476
|
and jyxx.unitid = #{orgId}
|
|
1470
|
1477
|
</if>
|
|
1471
|
1478
|
) sfhfw on sfhfw.bizno = a.bizno
|
|
1472
|
1479
|
left join(
|
|
1473
|
1480
|
select jyxx.bizno,flt.jyz as brxzz
|
|
1474
|
|
- from (select * from (select *,row_number() over(partition by BizNo order by 1) rn
|
|
|
1481
|
+ from (select * from (select dataid, bizno, unitid, row_number() over(partition by BizNo order by modifydate desc) rn
|
|
1475
|
1482
|
from data_crkyw_jyxx_default)t1 where t1.rn = 1) jyxx
|
|
1476
|
1483
|
left join data_crkyw_jyxx_flt_001 flt on jyxx.DataID = flt.maindataid
|
|
1477
|
|
- where flt.zbxmc = 'c8bdddc4732711eabc7300ff188bbfa4'
|
|
|
1484
|
+ where flt.zbxmc = 'cf5b3864d8b511ec81ac00ff2bc9e548'
|
|
1478
|
1485
|
<if test="orgId != null">
|
|
1479
|
1486
|
and jyxx.unitid = #{orgId}
|
|
1480
|
1487
|
</if>
|
|
1481
|
1488
|
) brxzz on brxzz.bizno = a.bizno
|
|
1482
|
1489
|
left join(
|
|
1483
|
1490
|
select jyxx.bizno,flt.jyz as sj
|
|
1484
|
|
- from (select * from (select *,row_number() over(partition by BizNo order by 1) rn
|
|
|
1491
|
+ from (select * from (select dataid, bizno, unitid, row_number() over(partition by BizNo order by modifydate desc) rn
|
|
1485
|
1492
|
from data_crkyw_jyxx_default)t1 where t1.rn = 1) jyxx
|
|
1486
|
1493
|
left join data_crkyw_jyxx_flt_001 flt on jyxx.DataID = flt.maindataid
|
|
1487
|
|
- where flt.zbxmc = 'c8c0bbf7732711eabc7300ff188bbfa4'
|
|
|
1494
|
+ where flt.zbxmc = 'cf5b392ed8b511ec81ac00ff2bc9e548'
|
|
1488
|
1495
|
<if test="orgId != null">
|
|
1489
|
1496
|
and jyxx.unitid = #{orgId}
|
|
1490
|
1497
|
</if>
|
|
1491
|
1498
|
) sj on sj.bizno = a.bizno
|
|
1492
|
1499
|
left join(
|
|
1493
|
1500
|
select jyxx.bizno,flt.jyz as gyhz
|
|
1494
|
|
- from (select * from (select *,row_number() over(partition by BizNo order by 1) rn
|
|
|
1501
|
+ from (select * from (select dataid, bizno, unitid, row_number() over(partition by BizNo order by modifydate desc) rn
|
|
1495
|
1502
|
from data_crkyw_jyxx_default)t1 where t1.rn = 1) jyxx
|
|
1496
|
1503
|
left join data_crkyw_jyxx_flt_001 flt on jyxx.DataID = flt.maindataid
|
|
1497
|
|
- where flt.zbxmc = 'c8c3c8f4732711eabc7300ff188bbfa4'
|
|
|
1504
|
+ where flt.zbxmc = 'cf5b39d6d8b511ec81ac00ff2bc9e548'
|
|
1498
|
1505
|
<if test="orgId != null">
|
|
1499
|
1506
|
and jyxx.unitid = #{orgId}
|
|
1500
|
1507
|
</if>
|
|
1501
|
1508
|
) gyhz on gyhz.bizno = a.bizno
|
|
1502
|
1509
|
left join(
|
|
1503
|
1510
|
select jyxx.bizno,flt.jyz as rjcll
|
|
1504
|
|
- from (select * from (select *,row_number() over(partition by BizNo order by 1) rn
|
|
|
1511
|
+ from (select * from (select dataid, bizno, unitid, row_number() over(partition by BizNo order by modifydate desc) rn
|
|
1505
|
1512
|
from data_crkyw_jyxx_default)t1 where t1.rn = 1) jyxx
|
|
1506
|
1513
|
left join data_crkyw_jyxx_flt_001 flt on jyxx.DataID = flt.maindataid
|
|
1507
|
|
- where flt.zbxmc = 'c8c3c8f4732711eabc7300ff188bbfa5'
|
|
|
1514
|
+ where flt.zbxmc = 'cf5b3a79d8b511ec81ac00ff2bc9e548'
|
|
1508
|
1515
|
<if test="orgId != null">
|
|
1509
|
1516
|
and jyxx.unitid=#{orgId}
|
|
1510
|
1517
|
</if>
|
|
1511
|
1518
|
) rjcll on rjcll.bizno = a.bizno
|
|
1512
|
|
- WHERE nvl(a.BizNo,'-1') != '-1' and a.lspz = '7052'
|
|
|
1519
|
+ WHERE nvl(a.BizNo,'-1') != '-1' and a.lspz = '7144'
|
|
1513
|
1520
|
<if test="orgId != null">
|
|
1514
|
1521
|
and a.unitid = #{orgId}
|
|
1515
|
1522
|
</if>
|