|
|
|
@ -55,8 +55,21 @@
|
|
|
|
|
l.*
|
|
|
|
|
FROM
|
|
|
|
|
asset_current a
|
|
|
|
|
LEFT JOIN ( SELECT asset_id, NAME, tyshxydm, lxr, lxdh, gyszcdz, sfwtc FROM asset_supply_chain WHERE type = 5
|
|
|
|
|
GROUP BY asset_id,NAME, tyshxydm, lxr, lxdh, gyszcdz, sfwtc ) b ON a.id = b.asset_id
|
|
|
|
|
LEFT JOIN (
|
|
|
|
|
SELECT
|
|
|
|
|
asset_id,
|
|
|
|
|
NAME,
|
|
|
|
|
tyshxydm,
|
|
|
|
|
lxr,
|
|
|
|
|
lxdh,
|
|
|
|
|
gyszcdz,
|
|
|
|
|
sfwtc,
|
|
|
|
|
ROW_NUMBER() OVER (PARTITION BY asset_id ORDER BY create_time) AS row_num
|
|
|
|
|
FROM
|
|
|
|
|
asset_supply_chain
|
|
|
|
|
WHERE
|
|
|
|
|
type = 5
|
|
|
|
|
) b ON a.id = b.asset_id AND b.row_num = 1
|
|
|
|
|
LEFT JOIN (
|
|
|
|
|
SELECT
|
|
|
|
|
asset_id,
|
|
|
|
@ -65,20 +78,13 @@
|
|
|
|
|
lxr AS lxr1,
|
|
|
|
|
lxdh AS lxdh1,
|
|
|
|
|
gyszcdz AS gyszcdz1,
|
|
|
|
|
sfwtc AS sfwtc1
|
|
|
|
|
sfwtc AS sfwtc1,
|
|
|
|
|
ROW_NUMBER() OVER (PARTITION BY asset_id ORDER BY create_time) AS row_num
|
|
|
|
|
FROM
|
|
|
|
|
asset_supply_chain
|
|
|
|
|
WHERE
|
|
|
|
|
type = 7
|
|
|
|
|
GROUP BY
|
|
|
|
|
asset_id,
|
|
|
|
|
NAME,
|
|
|
|
|
tyshxydm,
|
|
|
|
|
lxr,
|
|
|
|
|
lxdh,
|
|
|
|
|
gyszcdz,
|
|
|
|
|
sfwtc
|
|
|
|
|
) c ON a.id = c.asset_id
|
|
|
|
|
) c ON a.id = c.asset_id AND c.row_num = 1
|
|
|
|
|
LEFT JOIN (
|
|
|
|
|
SELECT
|
|
|
|
|
asset_id,
|
|
|
|
@ -91,18 +97,13 @@
|
|
|
|
|
yjxlh,
|
|
|
|
|
yjbbxx,
|
|
|
|
|
yjyt,
|
|
|
|
|
yjbsxx
|
|
|
|
|
yjbsxx,
|
|
|
|
|
ROW_NUMBER() OVER (PARTITION BY asset_id ORDER BY create_time) AS row_num
|
|
|
|
|
FROM
|
|
|
|
|
asset_basic_network
|
|
|
|
|
WHERE
|
|
|
|
|
type = 1
|
|
|
|
|
GROUP BY
|
|
|
|
|
asset_id,
|
|
|
|
|
sblx,
|
|
|
|
|
pp,
|
|
|
|
|
sb_ip,
|
|
|
|
|
czxt,czxtbb,yjxh,yjxlh,yjbbxx,yjyt,yjbsxx
|
|
|
|
|
) d ON a.id = d.asset_id
|
|
|
|
|
) d ON a.id = d.asset_id AND d.row_num = 1
|
|
|
|
|
LEFT JOIN (
|
|
|
|
|
SELECT
|
|
|
|
|
asset_id,
|
|
|
|
@ -113,26 +114,32 @@
|
|
|
|
|
yjxlh AS wlyjxlh,
|
|
|
|
|
yjbbxx AS wlyjbbxx,
|
|
|
|
|
yjyt AS wlyjyt,
|
|
|
|
|
yjbsxx AS wlyjbsxx
|
|
|
|
|
yjbsxx AS wlyjbsxx,
|
|
|
|
|
ROW_NUMBER() OVER (PARTITION BY asset_id ORDER BY create_time) AS row_num
|
|
|
|
|
FROM
|
|
|
|
|
asset_basic_network
|
|
|
|
|
WHERE
|
|
|
|
|
type = 2
|
|
|
|
|
GROUP BY
|
|
|
|
|
) e ON a.id = e.asset_id AND e.row_num = 1
|
|
|
|
|
LEFT JOIN (
|
|
|
|
|
SELECT
|
|
|
|
|
asset_id,
|
|
|
|
|
sblx,
|
|
|
|
|
pp,sb_ip,yjxh,yjxlh,yjbbxx,yjyt,yjbsxx
|
|
|
|
|
) e ON a.id = e.asset_id
|
|
|
|
|
LEFT JOIN ( SELECT
|
|
|
|
|
asset_id, sblx AS aqwlsblx, pp AS aqwlpp, sb_ip AS aqwlsbIp,
|
|
|
|
|
sblx AS aqwlsblx,
|
|
|
|
|
pp AS aqwlpp,
|
|
|
|
|
sb_ip AS aqwlsbIp,
|
|
|
|
|
yjxh AS aqyjxh,
|
|
|
|
|
yjxlh AS aqyjxlh,
|
|
|
|
|
yjbbxx AS aqyjbbxx,
|
|
|
|
|
yjyt AS aqyjyt,
|
|
|
|
|
yjbsxx AS aqyjbswz
|
|
|
|
|
FROM asset_basic_network WHERE type = 3 GROUP BY asset_id,sblx,pp,sb_ip,yjxh,yjxlh,yjbbxx,yjyt,yjbsxx ) l ON a.id = l.asset_id
|
|
|
|
|
yjbsxx AS aqyjbswz,
|
|
|
|
|
ROW_NUMBER() OVER (PARTITION BY asset_id ORDER BY create_time) AS row_num
|
|
|
|
|
FROM
|
|
|
|
|
asset_basic_network
|
|
|
|
|
WHERE
|
|
|
|
|
type = 3
|
|
|
|
|
) l ON a.id = l.asset_id AND l.row_num = 1
|
|
|
|
|
<where>
|
|
|
|
|
a.del_flag = '0' and a.isbf = '0'
|
|
|
|
|
a.del_flag = '0'
|
|
|
|
|
<if test="req.xtmc!=null and req.xtmc!='' ">
|
|
|
|
|
and a.xtmc like concat('%',#{req.xtmc},'%')
|
|
|
|
|
</if>
|
|
|
|
|