|
|
@@ -447,7 +447,8 @@
|
|
447
|
447
|
a.lsdj,
|
|
448
|
448
|
sum(a.srsl) as srsl,
|
|
449
|
449
|
sum(a.zcsl) as zcsl,
|
|
450
|
|
- a.kcsl
|
|
|
450
|
+ a.kcsl,
|
|
|
451
|
+ c.depot_id isJz
|
|
451
|
452
|
from (SELECT * from business_agent_bgmxz WHERE 1=1 AND SUBSTR(house_id,1,2)!='YG' ORDER BY fssj DESC) a
|
|
452
|
453
|
LEFT JOIN business_agent b ON b.id=a.agent_id
|
|
453
|
454
|
LEFT JOIN business_agent_depot c ON c.id=a.szlk_org_id
|
|
|
@@ -472,7 +473,8 @@
|
|
472
|
473
|
a.lsdj,
|
|
473
|
474
|
sum(a.srsl) as srsl,
|
|
474
|
475
|
sum(a.zcsl) as zcsl,
|
|
475
|
|
- a.kcsl
|
|
|
476
|
+ a.kcsl,
|
|
|
477
|
+ c.depot_id isJz
|
|
476
|
478
|
from (SELECT * from business_agent_bgmxz WHERE 1=1 AND SUBSTR(house_id,1,2)='YG' AND sjly=1 ORDER BY fssj DESC) a
|
|
477
|
479
|
LEFT JOIN business_agent b ON b.id=a.agent_id
|
|
478
|
480
|
LEFT JOIN business_agent_depot c ON c.id=a.szlk_org_id
|
|
|
@@ -496,7 +498,8 @@
|
|
496
|
498
|
a.lsdj,
|
|
497
|
499
|
sum(a.srsl) as srsl,
|
|
498
|
500
|
sum(a.zcsl) as zcsl,
|
|
499
|
|
- a.kcsl
|
|
|
501
|
+ a.kcsl,
|
|
|
502
|
+ c.depot_id isJz
|
|
500
|
503
|
from (SELECT * from business_agent_bgmxz WHERE 1=1 AND SUBSTR(house_id,1,2)='YG' AND sjly=0 ORDER BY fssj DESC) a
|
|
501
|
504
|
LEFT JOIN business_agent b ON b.id=a.agent_id
|
|
502
|
505
|
LEFT JOIN business_agent_depot c ON c.id=a.szlk_org_id
|