Przeglądaj źródła

供需信息字段调整

沈静伟 4 lat temu
rodzic
commit
9d428daf3f

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

@@ -6,6 +6,7 @@ t1.ftitle,
 t1.fcontent,
 t1.fstatus,
 t1.createby,
+t1.checkby,
 t1.checkdate,
 t1.fenddate,
 t2.fagentname,

+ 1 - 1
src/dsb/com/cnd3b/restcontroller/customer/supplyanddemand/SQL/供需详情查询.sql

@@ -1,5 +1,5 @@
 select t1.tsupplyanddemandid, t1.ftitle,t1.fissupply,
-       t1.ftype, t1.fstatus,t1.createby, t1.checkdate,
+       t1.ftype, t1.fstatus,t1.createby,t1.checkby, t1.checkdate,
        t1.fenddate,t1.tcooperationagentsid,t2.fagentname,t3.fname,t3.fphonenumber,
        t1.fcontent,t1.tenterprise_userid,
        t1.freadtimes,

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

@@ -5,6 +5,8 @@ t1.ftype,
 t1.ftitle,
 t1.fcontent,
 t1.fstatus,
+t1.createby,
+t1.checkby,
 t1.checkdate,
 t1.fenddate,
 t2.fagentname,

+ 1 - 1
src/dsb/com/cnd3b/restcontroller/customer/supplyanddemand/SQL/我的供需详情查询.sql

@@ -1,5 +1,5 @@
 select t1.tsupplyanddemandid, t1.ftitle,t1.fissupply,
-       t1.ftype, t1.fstatus, t1.checkdate,
+       t1.ftype, t1.fstatus,t1.creayeby,t1.checkby, t1.checkdate,
        t1.fenddate,t1.tcooperationagentsid,
        t1.fcontent,t4.fagentname as fcooperationagentname,
        t1.tenterprise_userid,

+ 19 - 5
src/dsb/com/cnd3b/restcontroller/enterprise/supplyanddemand/SQL/供需列表查询.sql

@@ -1,9 +1,23 @@
-select t1.tsupplyanddemandid, t1.ftitle,t1.fissupply,
-       t1.ftype, t1.fstatus, t1.checkby, t1.checkdate,
-       t1.fenddate,t1.tcooperationagentsid,t2.fagentname,t3.fname,t3.fphonenumber,t1.tagentsid,
-       t4.fagentname as fcooperationagentname,10 as fcommunicationtimes
+select
+t1.tsupplyanddemandid,
+t1.fissupply,
+t1.ftype,
+t1.ftitle,
+t1.fcontent,
+t1.fstatus,
+t1.createby,
+t1.checkby,
+t1.checkdate,
+t1.fenddate,
+t1.tcooperationagentsid,
+t2.fagentname,
+t3.fname,
+t3.fphonenumber,
+t1.tagentsid,
+t4.fagentname as fcooperationagentname,
+(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 tagents t4 on t1.siteid=t4.siteid and t1.tcooperationagentsid=t4.tagentsid
-where t1.siteid=$siteid$ and $where$
+where t1.siteid=$siteid$ and t1.fstatus not in ('н¨')  and $where$

+ 1 - 1
src/dsb/com/cnd3b/restcontroller/enterprise/supplyanddemand/SQL/供需详情查询.sql

@@ -1,7 +1,7 @@
 select t1.tsupplyanddemandid, t1.ftitle,t1.fissupply,
        t1.ftype, t1.fstatus, t1.checkby, t1.checkdate,
        t1.fenddate,t1.tcooperationagentsid,t2.fagentname,t3.fname,t3.fphonenumber,
-       t4.fagentname as fcooperationagentname,10 as fcommunicationtimes,t1.fcontent,t1.tenterprise_userid
+       t4.fagentname as fcooperationagentname, (select count(0) from timdialog where siteid=t1.siteid and ownertable='tsupplyanddemand' and ownerid=t1.tsupplyanddemandid) as fcommunicationtimes,t1.fcontent,t1.tenterprise_userid
 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

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

@@ -1,9 +1,16 @@
-select t1.tsupplyanddemandid, t1.ftitle,t1.fissupply,
-       t1.ftype, t1.fstatus, t1.checkby, t1.checkdate,
-       t1.fenddate,t1.tcooperationagentsid,t2.fagentname,t3.fname,t3.fphonenumber,t1.tagentsid,
-       t4.fagentname as fcooperationagentname,10 as fcommunicationtimes
+select
+t1.tsupplyanddemandid,
+t1.fissupply,
+t1.ftype,
+t1.ftitle,
+t1.fcontent,
+t1.fstatus,
+t1.createby,
+t1.checkby,
+t1.checkdate,
+t1.fenddate,
+t2.fagentname,
+t1.tagentsid
 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 tagents t4 on t1.siteid=t4.siteid and t1.tcooperationagentsid=t4.tagentsid
-where t1.siteid=$siteid$ and $where$
+where t1.siteid=$siteid$ and t1.fstatus not in ('н¨') and $where$

+ 2 - 4
src/dsb/com/cnd3b/restcontroller/publicmethod/homepage/SQL/供需详情查询.sql

@@ -1,9 +1,7 @@
 select t1.tsupplyanddemandid, t1.ftitle,t1.fissupply,
-       t1.ftype, t1.fstatus, t1.checkby, t1.checkdate,
+       t1.ftype, t1.fstatus, t1.checkby,t1.createby, t1.checkdate,
        t1.fenddate,t1.tcooperationagentsid,t2.fagentname,t3.fname,t3.fphonenumber,
-       t4.fagentname as fcooperationagentname,10 as fcommunicationtimes,t1.fcontent
+       t1.fcontent
 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 tagents t4 on t1.siteid=t4.siteid and t1.tcooperationagentsid=t4.tagentsid
 where t1.siteid=$siteid$ and t1.tagentsid=$tagentsid$ and tsupplyanddemandid=$tsupplyanddemandid$