|
@@ -1,8 +1,11 @@
|
|
|
select t1.tsupplyanddemandid, t1.ftitle,t1.fissupply,
|
|
select t1.tsupplyanddemandid, t1.ftitle,t1.fissupply,
|
|
|
t1.ftype, t1.fstatus, t1.checkby,t1.createby, t1.checkdate,
|
|
t1.ftype, t1.fstatus, t1.checkby,t1.createby, t1.checkdate,
|
|
|
t1.fenddate,t1.tcooperationagentsid,t2.fagentname,t3.fname,t3.fphonenumber,
|
|
t1.fenddate,t1.tcooperationagentsid,t2.fagentname,t3.fname,t3.fphonenumber,
|
|
|
- t1.fcontent
|
|
|
|
|
|
|
+ t1.fcontent,
|
|
|
|
|
+ t1.freadtimes,
|
|
|
|
|
+ (select count(0) from timdialog where siteid=t1.siteid and ownertable='tsupplyanddemand' and ownerid=t1.tsupplyanddemandid) as fcommunicationtimes
|
|
|
from tsupplyanddemand t1
|
|
from tsupplyanddemand t1
|
|
|
inner join tagents t2 on t1.siteid=t2.siteid and t1.tagentsid=t2.tagentsid
|
|
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
|
|
inner join tenterprise_users t3 on t1.siteid=t3.siteid and t1.tenterprise_userid=t3.tenterprise_userid
|
|
|
-where t1.siteid=$siteid$ and t1.tagentsid=$tagentsid$ and tsupplyanddemandid=$tsupplyanddemandid$
|
|
|
|
|
|
|
+where t1.siteid=$siteid$ and t1.tagentsid=$tagentsid$ and tsupplyanddemandid=$tsupplyanddemandid$
|
|
|
|
|
+
|