Преглед изворни кода

供需列表返回fphonenumber

吴志根 пре 3 година
родитељ
комит
4e11cf3134

+ 2 - 1
src/dsb/com/cnd3b/restcontroller/customer/supplyanddemand/SQL/供需列表查询.sql

@@ -11,7 +11,7 @@ t1.checkdate,
 t1.fenddate,
 t2.fagentname,
 t2.faddress,
-t2.fphonenumber,
+t3.fphonenumber,
 t1.freadtimes,
 t1.fsharetimes,
 t1.fphonetimes,
@@ -21,6 +21,7 @@ t1.tagentsid,
 (select count(0) from timdialog where siteid=t1.siteid and ownertable='tsupplyanddemand' and ownerid=t1.tsupplyanddemandid) as fcommunicationtimes
 from tsupplyanddemand t1
 inner join tagents t2 on t1.siteid=t2.siteid and t1.tagentsid=t2.tagentsid
+inner join tenterprise_users t3 on t1.siteid=t3.siteid and t1.tenterprise_userid=t3.tenterprise_userid
 left join (SELECT t5.timdialogid,t5.createdate FROM timdialogmessage as t5
            WHERE t5.timdialogmessageid in (select MAX(timdialogmessageid)timdialogmessageid from timdialogmessage where siteid=$siteid$ and timdialogid=t5.timdialogid group by timdialogid)) t4 on   t1.TIMDIALOGID_TALKING=t4.timdialogid
 where t1.siteid=$siteid$ and t1.fstatus not in ('н¨') and $where$

+ 2 - 1
src/dsb/com/cnd3b/restcontroller/customer/supplyanddemand/SQL/供需列表查询_对接中.sql

@@ -11,7 +11,7 @@ select
     t1.fenddate,
     t2.fagentname,
     t2.faddress,
-    t2.fphonenumber,
+    t4.fphonenumber,
     t1.freadtimes,
     t1.fsharetimes,
     t1.fphonetimes,
@@ -22,6 +22,7 @@ select
 from tsupplyanddemand t1
          inner join tagents t2 on t1.siteid=t2.siteid and t1.tagentsid=t2.tagentsid
          inner join timdialogusers t3 on t3.TENTERPRISE_USERID= $userid$ and t1.TIMDIALOGID_TALKING=t3.timdialogid
+         inner join tenterprise_users t4 on t1.siteid=t4.siteid and t1.tenterprise_userid=t4.tenterprise_userid
          left join (SELECT t5.timdialogid,t5.createdate FROM timdialogmessage as t5
                     WHERE t5.timdialogmessageid in (select MAX(timdialogmessageid)timdialogmessageid from timdialogmessage where siteid=$siteid$ and timdialogid=t5.timdialogid group by timdialogid)) t4 on   t1.TIMDIALOGID_TALKING=t4.timdialogid
 where t1.siteid=$siteid$ and t1.fstatus not in ('н¨') and $where$

+ 2 - 1
src/dsb/com/cnd3b/restcontroller/publicmethod/homepage/SQL/供需列表查询.sql

@@ -10,7 +10,7 @@ t1.checkby,
 t1.checkdate,
 t1.fenddate,
 t2.fagentname,
-t2.fphonenumber,
+t3.fphonenumber,
 t2.faddress,
 t1.tagentsid,
 t1.tenterprise_userid,
@@ -21,4 +21,5 @@ t1.tposition,
 (select count(0) from timdialog where siteid=t1.siteid and ownertable='tsupplyanddemand' and ownerid=t1.tsupplyanddemandid) as fcommunicationtimes
 from tsupplyanddemand t1
 inner join tagents t2 on t1.siteid=t2.siteid and t1.tagentsid=t2.tagentsid
+inner join tenterprise_users t3 on t1.siteid=t3.siteid and t1.tenterprise_userid=t3.tenterprise_userid
 where t1.siteid=$siteid$ and t1.fstatus not in ('н¨') and $where$