wu hai 1 semana
pai
achega
bd457653ab
Modificáronse 1 ficheiros con 14 adicións e 0 borrados
  1. 14 0
      src/custom/restcontroller/prsx/trial/trial.java

+ 14 - 0
src/custom/restcontroller/prsx/trial/trial.java

@@ -5,6 +5,7 @@ import beans.datacontrllog.DataContrlLog;
 import beans.dataextend.DataExtend;
 import beans.datateam.DataTeam;
 import beans.enterprise.Enterprise;
+import beans.recycle.Recycle;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import common.Controller;
@@ -179,6 +180,18 @@ public class trial extends Controller {
             }
 
         }
+        //  1:我负责的;2:我参与的;3:我下属负责的;4:我下属参与的
+        String tablename = "sa_trial";
+        int type = content.getIntValue("type");
+        String where2 = " 1=1 ";
+
+        if (type == 0) {
+            where2 = DataTeam.getDataWhereStr(this, tablename, "t1", 1)
+                    + " or " + DataTeam.getDataWhereStr(this, tablename, "t1", 2);
+        } else {
+            where2 = DataTeam.getDataWhereStr(this, tablename, "t1", type);
+        }
+
 
         QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sa_trial", "*")
                 .setTableAlias("t1");
@@ -197,6 +210,7 @@ public class trial extends Controller {
         querySQL.addQueryFields("hospitalname", "t3.enterprisename");
         querySQL.addQueryFields("agentname", "t5.enterprisename");
         querySQL.setWhere(where);
+        querySQL.setWhere(where2);
         querySQL.setSiteid(siteid);
         if (pageSorting.equals("''")) {
             pageSorting = "t1.createdate desc";