Просмотр исходного кода

管理员管理,查询部门成员列表

吴志根 4 лет назад
Родитель
Сommit
dac6425edf
22 измененных файлов с 191 добавлено и 437 удалено
  1. 0 1
      src/dsb/com/cnd3b/restcontroller/enterprise/system/SQL/供需分类删除.sql
  2. 0 5
      src/dsb/com/cnd3b/restcontroller/enterprise/system/SQL/供需分类查询.sql
  3. 0 1
      src/dsb/com/cnd3b/restcontroller/enterprise/system/SQL/投诉板块删除.sql
  4. 0 3
      src/dsb/com/cnd3b/restcontroller/enterprise/system/SQL/投诉板块查询.sql
  5. 0 14
      src/dsb/com/cnd3b/restcontroller/enterprise/system/SQL/招商管理列表.sql
  6. 0 1
      src/dsb/com/cnd3b/restcontroller/enterprise/system/SQL/经营类目删除.sql
  7. 0 5
      src/dsb/com/cnd3b/restcontroller/enterprise/system/SQL/经营类目查询.sql
  8. 0 1
      src/dsb/com/cnd3b/restcontroller/enterprise/system/SQL/通告板块删除.sql
  9. 0 5
      src/dsb/com/cnd3b/restcontroller/enterprise/system/SQL/通告板块查询.sql
  10. 0 49
      src/dsb/com/cnd3b/restcontroller/enterprise/system/business.java
  11. 0 80
      src/dsb/com/cnd3b/restcontroller/enterprise/system/complaint.java
  12. 0 87
      src/dsb/com/cnd3b/restcontroller/enterprise/system/notice.java
  13. 0 84
      src/dsb/com/cnd3b/restcontroller/enterprise/system/prodclass.java
  14. 0 94
      src/dsb/com/cnd3b/restcontroller/enterprise/system/supplyanddemand.java
  15. 15 0
      src/dsb/com/cnd3b/restcontroller/enterprise/tadministrators/SQL/查询管理员列表.sql
  16. 130 0
      src/dsb/com/cnd3b/restcontroller/enterprise/tadministrators/tadministrators.java
  17. 1 2
      src/dsb/com/cnd3b/restcontroller/enterprise/tagentauth/SQL/经销商授权列表.sql
  18. 2 2
      src/dsb/com/cnd3b/restcontroller/enterprise/tagentauth/tagentauth.java
  19. 0 1
      src/dsb/com/cnd3b/restcontroller/enterprise/tagents/SQL/经销商档案列表.sql
  20. 2 2
      src/dsb/com/cnd3b/restcontroller/enterprise/tagents/tagents.java
  21. 10 0
      src/dsb/com/cnd3b/restcontroller/enterprise/tuser/SQL/部门成员列表.sql
  22. 31 0
      src/dsb/com/cnd3b/restcontroller/enterprise/tuser/tuser.java

+ 0 - 1
src/dsb/com/cnd3b/restcontroller/enterprise/system/SQL/供需分类删除.sql

@@ -1 +0,0 @@
-delete from ttypedetail where ftype='¹©Ðè·ÖÀà' and siteid=$siteid$ and ttypedetailid=$ttypedetailid$

+ 0 - 5
src/dsb/com/cnd3b/restcontroller/enterprise/system/SQL/供需分类查询.sql

@@ -1,5 +0,0 @@
-select ttypedetailid, siteid, fvalue as ftype,fisused
-from ttypedetail
-where ftype = '¹©Ðè·ÖÀà'
-  and siteid =$siteid$
-order by sequence

+ 0 - 1
src/dsb/com/cnd3b/restcontroller/enterprise/system/SQL/投诉板块删除.sql

@@ -1 +0,0 @@
-delete from ttypedetail where ftype='ͶËß°å¿é' and siteid=$siteid$ and ttypedetailid=$ttypedetailid$

+ 0 - 3
src/dsb/com/cnd3b/restcontroller/enterprise/system/SQL/投诉板块查询.sql

@@ -1,3 +0,0 @@
-select ttypedetailid,siteid,fvalue as ftype,fisused from ttypedetail
-where ftype='ͶËß°å¿é'and siteid=$siteid$
-order by sequence

+ 0 - 14
src/dsb/com/cnd3b/restcontroller/enterprise/system/SQL/招商管理列表.sql

@@ -1,14 +0,0 @@
-SELECT t1.fname,
-       t1.fphone,
-       t1.address,
-       t1.city,
-       t1.county,
-       t1.createdate,
-       t1.province,
-       t1.tbusinessid,
-       t1.fnote
-FROM tbusiness AS t1
-
-
-
-

+ 0 - 1
src/dsb/com/cnd3b/restcontroller/enterprise/system/SQL/经营类目删除.sql

@@ -1 +0,0 @@
-delete from ttypedetail where ftype='¾­ÓªÀàÄ¿' and siteid=$siteid$ and ttypedetailid=$ttypedetailid$

+ 0 - 5
src/dsb/com/cnd3b/restcontroller/enterprise/system/SQL/经营类目查询.sql

@@ -1,5 +0,0 @@
-select ttypedetailid, siteid, fvalue as ftype,fisused
-from ttypedetail
-where ftype = '¾­ÓªÀàÄ¿'
-  and siteid =$siteid$
-order by sequence

+ 0 - 1
src/dsb/com/cnd3b/restcontroller/enterprise/system/SQL/通告板块删除.sql

@@ -1 +0,0 @@
-delete from ttypedetail where ftype='ͨ¸æ°å¿é' and siteid=$siteid$ and ttypedetailid=$ttypedetailid$

+ 0 - 5
src/dsb/com/cnd3b/restcontroller/enterprise/system/SQL/通告板块查询.sql

@@ -1,5 +0,0 @@
-select ttypedetailid, siteid, fvalue as ftype,fisused
-from ttypedetail
-where ftype = 'ͨ¸æ°å¿é'
-  and siteid =$siteid$
-order by sequence

+ 0 - 49
src/dsb/com/cnd3b/restcontroller/enterprise/system/business.java

@@ -1,49 +0,0 @@
-package com.cnd3b.restcontroller.enterprise.system;
-
-import com.alibaba.fastjson.JSONObject;
-import com.cnd3b.common.Controller;
-import com.cnd3b.common.data.Rows;
-import com.cnd3b.common.data.SQLFactory;
-
-public class business extends Controller {
-    /**
-     * 构造函数
-     *
-     * @param content
-     */
-    public business(JSONObject content) {
-        super(content);
-    }
-
-
-    /**
-     * 招商管理列表
-     *
-     * @return
-     */
-    public String getBusinessList() {
-        SQLFactory sqlFactory = new SQLFactory(this, "招商管理列表", pageSize, pageNumber, "t1.createdate DESC");
-        Rows rows = dbConnect.runSqlQuery(sqlFactory.getSQL());
-        return getSucReturnObject().setDataByPaging(rows).preloading(1).toString();
-    }
-
-    /**
-     * 招商管理-删除
-     *
-     * @return
-     */
-    public String deleteBusiness() {
-        String tbusinessid = content.getString("tbusinessid");
-        String sql = "DELETE FROM tbusiness WHERE tbusinessid = '" + tbusinessid + "'";
-
-        String response = dbConnect.runSqlUpdate(sql);
-        if (response.equals("true")) {
-            return getSucReturnObject().toString();
-        } else {
-            return getErrReturnObject().toString();
-        }
-
-
-    }
-
-}

+ 0 - 80
src/dsb/com/cnd3b/restcontroller/enterprise/system/complaint.java

@@ -1,80 +0,0 @@
-package com.cnd3b.restcontroller.enterprise.system;
-
-import com.alibaba.fastjson.JSONObject;
-import com.cnd3b.common.Controller;
-import com.cnd3b.common.D3bException;
-import com.cnd3b.common.data.Rows;
-import com.cnd3b.common.data.SQLFactory;
-import p2.pao.PaoRemote;
-import p2.pao.PaoSetRemote;
-import p2.util.P2Exception;
-
-/**
- * 投诉
- */
-public class complaint extends Controller {
-    public complaint(JSONObject content) {
-        super(content);
-    }
-
-    /**
-     * 投诉板块列表查询
-     *
-     * @return
-     */
-    public String query_typeList() {
-        SQLFactory sql = new SQLFactory(this, "投诉板块查询");
-        sql.addParameter("siteid", siteid);
-        Rows rows = dbConnect.runSqlQuery(sql.getSQL());
-        return getSucReturnObject().setData(rows).saveToDataPool().toString();
-    }
-
-    /**
-     * 投诉板块新增修改
-     *
-     * @return
-     */
-    public String insert_modify_type() throws D3bException, P2Exception {
-        String ttypedetailid = content.getString("ttypedetailid");//新增为0
-        String ftype = content.getString("ftype", "ttypedetail.fvalue", "板块名称");
-        String fisused = content.getString("fisused");
-
-        Rows rows = dbConnect.runSqlQuery("select * from ttypedetail where siteid='" + siteid + "' and ftype='投诉板块' and fvalue='" + ftype + "'");
-        if (!rows.isEmpty() && !rows.get(0).getString("ttypedetailid").equals(ttypedetailid)) {
-            return getErrReturnObject().setErrMsg("投诉板块不可重复").toString();
-        }
-
-        PaoSetRemote ttypedetailSet = getP2ServerSystemPaoSet("ttypedetail", "siteid='" + siteid + "' and ttypedetailid='" + ttypedetailid + "'");
-        PaoRemote ttypedetail = null;
-        if (ttypedetailSet.isEmpty()) {
-            ttypedetail = ttypedetailSet.addAtEnd();
-            ttypedetail.setValue("siteid", siteid, 11L);//企业ID
-            ttypedetail.setValue("ftype", "投诉板块", 11L);
-        } else {
-            ttypedetail = ttypedetailSet.getPao(0);
-        }
-        ttypedetail.setValue("fvalue", ftype, 11L);
-        ttypedetail.setValue("fisused", fisused, 11L);
-
-        ttypedetailSet.save();
-
-        return getSucReturnObject().toString();
-    }
-
-    /**
-     * 投诉板块删除
-     *
-     * @return
-     */
-    public String delete_type() {
-        SQLFactory sqlFactory = new SQLFactory(this, "投诉板块删除");
-        sqlFactory.addParameter("siteid", siteid);
-        sqlFactory.addParameter("ttypedetailid", content.getString("ttypedetailid"));
-        String result = dbConnect.runSqlUpdate(sqlFactory.getSQL());
-        if ("true".equals(result)) {
-            return getSucReturnObject().toString();
-        } else {
-            return getErrReturnObject().setErrMsg(result).toString();
-        }
-    }
-}

+ 0 - 87
src/dsb/com/cnd3b/restcontroller/enterprise/system/notice.java

@@ -1,87 +0,0 @@
-package com.cnd3b.restcontroller.enterprise.system;
-
-import com.alibaba.fastjson.JSONObject;
-import com.cnd3b.common.Controller;
-import com.cnd3b.common.D3bException;
-import com.cnd3b.common.data.Rows;
-import com.cnd3b.common.data.SQLFactory;
-import p2.pao.PaoRemote;
-import p2.pao.PaoSetRemote;
-import p2.util.P2Exception;
-
-/**
- * 通告板块管理
- */
-public class notice extends Controller {
-    public notice(JSONObject content) {
-        super(content);
-    }
-
-    /**
-     * 通告板块列表查询
-     *
-     * @return
-     */
-    public String query_typeList() {
-        SQLFactory sql = new SQLFactory(this, "通告板块查询");
-        sql.addParameter("siteid", siteid);
-        Rows rows = dbConnect.runSqlQuery(sql.getSQL());
-        return getSucReturnObject().setData(rows).saveToDataPool().toString();
-    }
-
-    /**
-     * 通告板块新增修改
-     *
-     * @return
-     */
-    public String insert_modify_type() throws D3bException, P2Exception {
-        long ttypedetailid = content.getLongValue("ttypedetailid");//新增为0
-        String ftype = content.getString("ftype", "ttypedetail.fvalue", "板块名称");
-        boolean fisused = content.getBoolean("fisused");
-
-        Rows rows = dbConnect.runSqlQuery("select * from ttypedetail where siteid='" + siteid + "' and ftype='通告板块' and fvalue='" + ftype + "'");
-        if (!rows.isEmpty() && rows.get(0).getLong("ttypedetailid") != ttypedetailid) {
-            return getErrReturnObject().setErrMsg("通告板块不可重复").toString();
-        }
-        PaoSetRemote ttypedetailSet = getP2ServerSystemPaoSet("ttypedetail", "siteid='" + siteid + "' and ttypedetailid='" + ttypedetailid + "'");
-        PaoRemote ttypedetail = null;
-        if (ttypedetailSet.isEmpty()) {
-            ttypedetail = ttypedetailSet.addAtEnd();
-            ttypedetail.setValue("siteid", siteid, 11L);//企业ID
-            ttypedetail.setValue("ftype", "通告板块", 11L);
-        } else {
-            ttypedetail = ttypedetailSet.getPao(0);
-        }
-        ttypedetail.setValue("fvalue", ftype, 11L);
-        ttypedetail.setValue("fisused", fisused, 11L);
-        ttypedetailSet.save();
-        return getSucReturnObject().toString();
-    }
-
-    /**
-     * 通告板块删除
-     *
-     * @return
-     */
-    public String delete_type() {
-        SQLFactory sqlFactory = new SQLFactory(this, "通告板块删除");
-        sqlFactory.addParameter("siteid", siteid);
-        sqlFactory.addParameter("ttypedetailid", content.getString("ttypedetailid"));
-        String result = dbConnect.runSqlUpdate(sqlFactory.getSQL());
-        if ("true".equals(result)) {
-            return getSucReturnObject().toString();
-        } else {
-            return getErrReturnObject().setErrMsg(result).toString();
-        }
-    }
-
-    /**
-     * 通告分类选择查询
-     *
-     * @return
-     */
-    public String query_typeselectList() {
-        Rows rows = dbConnect.runSqlQuery("select fvalue as ftype from ttypedetail where ftype = '通告板块' and siteid ='" + siteid + "' and fisused=1 order by sequence");
-        return getSucReturnObject().setData(rows.toArray("ftype")).toString();
-    }
-}

+ 0 - 84
src/dsb/com/cnd3b/restcontroller/enterprise/system/prodclass.java

@@ -1,84 +0,0 @@
-package com.cnd3b.restcontroller.enterprise.system;
-
-import com.alibaba.fastjson.JSONObject;
-import com.cnd3b.common.Controller;
-import com.cnd3b.common.D3bException;
-import com.cnd3b.common.data.Rows;
-import com.cnd3b.common.data.SQLFactory;
-import p2.pao.PaoRemote;
-import p2.pao.PaoSetRemote;
-import p2.util.P2Exception;
-
-public class prodclass extends Controller {
-    public prodclass(JSONObject content) {
-        super(content);
-    }
-
-    /**
-     * 经营类目列表查询
-     *
-     * @return
-     */
-    public String query_typeList() {
-        SQLFactory sql = new SQLFactory(this, "经营类目查询");
-        sql.addParameter("siteid", siteid);
-        Rows rows = dbConnect.runSqlQuery(sql.getSQL());
-        return getSucReturnObject().setData(rows).saveToDataPool().toString();
-    }
-
-    /**
-     * 经营类目新增修改
-     *
-     * @return
-     */
-    public String insert_modify_type() throws D3bException, P2Exception {
-        long ttypedetailid = content.getLongValue("ttypedetailid");//新增为0
-        String ftype = content.getString("ftype", "ttypedetail.fvalue", "经营类目");
-        boolean fisused = content.getBoolean("fisused");
-
-        Rows rows = dbConnect.runSqlQuery("select * from ttypedetail where siteid='" + siteid + "' and ftype='经营类目' and fvalue='" + ftype + "'");
-        if (!rows.isEmpty() && rows.get(0).getLong("ttypedetailid") != ttypedetailid) {
-            return getErrReturnObject().setErrMsg("经营类目不可重复").toString();
-        }
-        PaoSetRemote ttypedetailSet = getP2ServerSystemPaoSet("ttypedetail", "siteid='" + siteid + "' and ttypedetailid='" + ttypedetailid + "'");
-        PaoRemote ttypedetail = null;
-        if (ttypedetailSet.isEmpty()) {
-            ttypedetail = ttypedetailSet.addAtEnd();
-            ttypedetail.setValue("siteid", siteid, 11L);//企业ID
-            ttypedetail.setValue("ftype", "经营类目", 11L);
-        } else {
-            ttypedetail = ttypedetailSet.getPao(0);
-        }
-        ttypedetail.setValue("fvalue", ftype, 11L);
-        ttypedetail.setValue("fisused", fisused, 11L);
-        ttypedetailSet.save();
-        return getSucReturnObject().toString();
-    }
-
-    /**
-     * 经营类目删除
-     *
-     * @return
-     */
-    public String delete_type() {
-        SQLFactory sqlFactory = new SQLFactory(this, "经营类目删除");
-        sqlFactory.addParameter("siteid", siteid);
-        sqlFactory.addParameter("ttypedetailid", content.getString("ttypedetailid"));
-        String result = dbConnect.runSqlUpdate(sqlFactory.getSQL());
-        if ("true".equals(result)) {
-            return getSucReturnObject().toString();
-        } else {
-            return getErrReturnObject().setErrMsg(result).toString();
-        }
-    }
-
-    /**
-     * 经营类目选择查询
-     *
-     * @return
-     */
-    public String query_typeselectList() {
-        Rows rows = dbConnect.runSqlQuery("select fvalue as ftype from ttypedetail where ftype = '经营类目' and siteid ='" + siteid + "' and fisused=1 order by sequence");
-        return getSucReturnObject().setData(rows.toArray("ftype")).toString();
-    }
-}

+ 0 - 94
src/dsb/com/cnd3b/restcontroller/enterprise/system/supplyanddemand.java

@@ -1,94 +0,0 @@
-package com.cnd3b.restcontroller.enterprise.system;
-
-import com.alibaba.fastjson.JSONObject;
-import com.cnd3b.common.Controller;
-import com.cnd3b.common.D3bException;
-import com.cnd3b.common.data.Row;
-import com.cnd3b.common.data.Rows;
-import com.cnd3b.common.data.RowsMap;
-import com.cnd3b.common.data.SQLFactory;
-import p2.pao.PaoRemote;
-import p2.pao.PaoSetRemote;
-import p2.util.P2Exception;
-
-public class supplyanddemand extends Controller {
-    public supplyanddemand(JSONObject content) {
-        super(content);
-    }
-
-    /**
-     * 供需分类列表查询
-     *
-     * @return
-     */
-    public String query_typeList() {
-        SQLFactory sql = new SQLFactory(this, "供需分类查询");
-        sql.addParameter("siteid", siteid);
-        Rows rows = dbConnect.runSqlQuery(sql.getSQL());
-        RowsMap map = getAttachmentUrl("ttypedetail", rows.toArrayList("ttypedetailid"));
-        for (Row row : rows) {
-            row.put("attinfos", map.get(row.getString("ttypedetailid")));
-        }
-        return getSucReturnObject().setData(rows).saveToDataPool().toString();
-    }
-
-    /**
-     * 供需分类新增修改
-     *
-     * @return
-     */
-    public String insert_modify_type() throws D3bException, P2Exception {
-        long ttypedetailid = content.getLongValue("ttypedetailid");//新增为0
-        String ftype = content.getString("ftype", "ttypedetail.fvalue", "供需分类");
-        boolean fisused = content.getBoolean("fisused");
-
-        Rows rows = dbConnect.runSqlQuery("select * from ttypedetail where siteid='" + siteid + "' and ftype='供需分类' and fvalue='" + ftype + "'");
-        if (!rows.isEmpty() && rows.get(0).getLong("ttypedetailid") != ttypedetailid) {
-            return getErrReturnObject().setErrMsg("供需分类不可重复").toString();
-        }
-        PaoSetRemote ttypedetailSet = getP2ServerSystemPaoSet("ttypedetail", "siteid='" + siteid + "' and ttypedetailid='" + ttypedetailid + "'");
-        PaoRemote ttypedetail = null;
-        if (ttypedetailSet.isEmpty()) {
-            ttypedetail = ttypedetailSet.addAtEnd();
-            ttypedetail.setValue("siteid", siteid, 11L);//企业ID
-            ttypedetail.setValue("ftype", "供需分类", 11L);
-        } else {
-            ttypedetail = ttypedetailSet.getPao(0);
-        }
-        ttypedetail.setValue("fvalue", ftype, 11L);
-        ttypedetail.setValue("fisused", fisused, 11L);
-        ttypedetailSet.save();
-        return getSucReturnObject().toString();
-    }
-
-    /**
-     * 供需分类删除
-     *
-     * @return
-     */
-    public String delete_type() {
-        SQLFactory sqlFactory = new SQLFactory(this, "供需分类删除");
-        sqlFactory.addParameter("siteid", siteid);
-        sqlFactory.addParameter("ttypedetailid", content.getString("ttypedetailid"));
-        String result = dbConnect.runSqlUpdate(sqlFactory.getSQL());
-        if ("true".equals(result)) {
-            return getSucReturnObject().toString();
-        } else {
-            return getErrReturnObject().setErrMsg(result).toString();
-        }
-    }
-
-    /**
-     * 供需分类选择查询
-     *
-     * @return
-     */
-    public String query_typeselectList() {
-        Rows rows = dbConnect.runSqlQuery("select ttypedetailid,fvalue as ftype from ttypedetail where ftype = '供需分类' and siteid ='" + siteid + "' and fisused=1 order by sequence");
-        RowsMap map = getAttachmentUrl("ttypedetail", rows.toArrayList("ttypedetailid"));
-        for (Row row : rows) {
-            row.put("attinfos", map.get(row.getString("ttypedetailid")));
-        }
-        return getSucReturnObject().setData(rows).toString();
-    }
-}

+ 15 - 0
src/dsb/com/cnd3b/restcontroller/enterprise/tadministrators/SQL/查询管理员列表.sql

@@ -0,0 +1,15 @@
+SELECT t1.tadministratorsid,
+       t1.tuserid,
+       t1.fisagent,
+       t1.fissaler,
+       t1.fissysadministrator,
+       t1.fispxxx,
+       t1.fiszl,
+       t2.wechat_name,
+       t2.wechat_mobile,
+       t2.wechat_position,
+       t2.fusertype,
+       t2.wechat_open_userid
+FROM tadministrators t1
+         LEFT JOIN tuser t2
+                   ON t1.tuserid = t2.tuserid

+ 130 - 0
src/dsb/com/cnd3b/restcontroller/enterprise/tadministrators/tadministrators.java

@@ -0,0 +1,130 @@
+package com.cnd3b.restcontroller.enterprise.tadministrators;
+
+import com.alibaba.fastjson.JSONObject;
+import com.cnd3b.common.Controller;
+import com.cnd3b.common.data.Rows;
+import com.cnd3b.common.data.SQLFactory;
+import com.cnd3b.utility.DigitUppercase;
+import oracle.net.aso.MD5;
+import org.apache.commons.codec.digest.DigestUtils;
+import p2.pao.PaoRemote;
+import p2.pao.PaoSetRemote;
+import p2.util.P2Exception;
+
+public class tadministrators extends Controller {
+    /**
+     * 构造函数
+     *
+     * @param content
+     */
+    public tadministrators(JSONObject content) {
+        super(content);
+    }
+
+    /**
+     * 新增管理员
+     *
+     * @return
+     */
+    public String inseretTadministrators() throws P2Exception {
+
+        String tuserid = content.getString("tuserid");
+        //管理员密码
+        String fpassword = content.getString("fpassword");
+        //经销商管理权限
+        int fisagent = content.getIntValue("fisagent");
+        //业务员管理权限
+        int fissaler = content.getIntValue("fissaler");
+        //是否总管理
+        int fissysadministrator = content.getIntValue("fissysadministrator");
+        //培训学习管理权限
+        int fispxxx = content.getIntValue("fispxxx");
+        //资料管理权限
+        int fiszl = content.getIntValue("fiszl");
+
+        //新增体系
+        PaoSetRemote paoSetRemote = getP2ServerSystemPaoSet("tadministrators");
+        PaoRemote paoRemote = paoSetRemote.addAtEnd();
+        paoRemote.setValue("tuserid", tuserid, 11L);
+        paoRemote.setValue("fpassword", DigestUtils.md5Hex(fpassword.getBytes()), 11L);
+        paoRemote.setValue("fisagent", fisagent, 11L);
+        paoRemote.setValue("fissaler", fissaler, 11L);
+        paoRemote.setValue("fissysadministrator", fissysadministrator, 11L);
+        paoRemote.setValue("fispxxx", fispxxx, 11L);
+        paoRemote.setValue("fiszl", fiszl, 11L);
+        paoSetRemote.save();
+        return getSucReturnObject().toString();
+    }
+
+    /**
+     * 更新管理员
+     *
+     * @return
+     */
+    public String updateTadministrators() throws P2Exception {
+        String tadministratorsid = content.getString("tadministratorsid");
+
+        String tuserid = content.getString("tuserid");
+        //管理员密码
+        String fpassword = content.getString("fpassword");
+        //经销商管理权限
+        int fisagent = content.getIntValue("fisagent");
+        //业务员管理权限
+        int fissaler = content.getIntValue("fissaler");
+        //是否总管理
+        int fissysadministrator = content.getIntValue("fissysadministrator");
+        //培训学习管理权限
+        int fispxxx = content.getIntValue("fispxxx");
+        //资料管理权限
+        int fiszl = content.getIntValue("fiszl");
+
+        //新增体系
+        PaoSetRemote paoSetRemote = getP2ServerSystemPaoSet("tadministrators", "tadministratorsid = '" + tadministratorsid + "'");
+        if (!paoSetRemote.isEmpty()) {
+            PaoRemote paoRemote = paoSetRemote.getPao(0);
+            paoRemote.setValue("tuserid", tuserid, 11L);
+            paoRemote.setValue("fpassword", DigestUtils.md5Hex(fpassword.getBytes()), 11L);
+            paoRemote.setValue("fisagent", fisagent, 11L);
+            paoRemote.setValue("fissaler", fissaler, 11L);
+            paoRemote.setValue("fissysadministrator", fissysadministrator, 11L);
+            paoRemote.setValue("fispxxx", fispxxx, 11L);
+            paoRemote.setValue("fiszl", fiszl, 11L);
+            paoSetRemote.save();
+        } else {
+            return getErrReturnObject().setErrMsg("未找到更新记录").toString();
+        }
+        return getSucReturnObject().toString();
+    }
+
+    /**
+     * 删除管理员
+     *
+     * @return
+     */
+    public String deleteTadministrators() throws P2Exception {
+        String tadministratorsid = content.getString("tadministratorsid");
+        PaoSetRemote paoSetRemote = getP2ServerSystemPaoSet("tadministrators", "tadministratorsid = '" + tadministratorsid + "'");
+        if (!paoSetRemote.isEmpty()) {
+            PaoRemote paoRemote = paoSetRemote.getPao(0);
+            paoRemote.delete();
+            paoSetRemote.save();
+        } else {
+            return getErrReturnObject().setErrMsg("未找到要删除的记录").toString();
+        }
+        return getSucReturnObject().toString();
+    }
+
+    /**
+     * 查询管理员列表
+     *
+     * @return
+     */
+    public String selectTadministratorsList() {
+
+        SQLFactory sqlFactory = new SQLFactory(this, "查询管理员列表", pageSize, pageNumber, "t1.createdate DESC");
+        Rows rows = sqlFactory.runSqlQuery();
+        return getSucReturnObject().setDataByPaging(rows).preloading(1).toString();
+    }
+
+
+}

+ 1 - 2
src/dsb/com/cnd3b/restcontroller/enterprise/tagentauth/SQL/经销商授权列表.sql

@@ -8,5 +8,4 @@ SELECT t1.tagentauthid,
        t2.wechat_depid
 FROM tagentauth t1
          LEFT JOIN tagents t2
-                   ON t1.tagentsid = t2.tagentsid
-ORDER BY t1.createdate DESC
+                   ON t1.tagentsid = t2.tagentsid

+ 2 - 2
src/dsb/com/cnd3b/restcontroller/enterprise/tagentauth/tagentauth.java

@@ -106,8 +106,8 @@ public class tagentauth extends Controller {
      * @return
      */
     public String selectTagentauthList() {
-        SQLFactory sqlFactory = new SQLFactory(this, "¾­ÏúÉÌÊÚȨÁбí");
+        SQLFactory sqlFactory = new SQLFactory(this, "¾­ÏúÉÌÊÚȨÁбí", pageSize, pageNumber, "t1.createdate DESC");
         Rows rows = sqlFactory.runSqlQuery();
-        return getSucReturnObject().setData(rows).toString();
+        return getSucReturnObject().setDataByPaging(rows).preloading(1).toString();
     }
 }

+ 0 - 1
src/dsb/com/cnd3b/restcontroller/enterprise/tagents/SQL/经销商档案列表.sql

@@ -6,4 +6,3 @@ SELECT t1.tagentsid,
        t1.fphonenumber,
        t1.wechat_depid
 FROM tagents t1
-ORDER BY t1.createdate desc

+ 2 - 2
src/dsb/com/cnd3b/restcontroller/enterprise/tagents/tagents.java

@@ -23,10 +23,10 @@ public class tagents extends Controller {
      */
     public String selectTagentsList() {
 
-        SQLFactory sqlFactory = new SQLFactory(this, "쒔饋�도갭죗깊");
+        SQLFactory sqlFactory = new SQLFactory(this, "쒔饋�도갭죗깊", pageSize, pageNumber, "t1.createdate desc");
         Rows rows = dbConnect.runSqlQuery(sqlFactory.getSQL());
 
-        return getSucReturnObject().setData(rows).toString();
+        return getSucReturnObject().setDataByPaging(rows).preloading(1).toString();
     }
 
 

+ 10 - 0
src/dsb/com/cnd3b/restcontroller/enterprise/tuser/SQL/部门成员列表.sql

@@ -0,0 +1,10 @@
+SELECT t1.tuserid,
+       t1.wechat_depid,
+       t1.wechat_userid,
+       t1.wechat_name,
+       t1.wechat_open_userid,
+       t1.wechat_mobile,
+       t1.wechat_position,
+       t1.fusertype
+FROM tuser t1
+WHERE t1.fusertype = $fusertype$

+ 31 - 0
src/dsb/com/cnd3b/restcontroller/enterprise/tuser/tuser.java

@@ -0,0 +1,31 @@
+package com.cnd3b.restcontroller.enterprise.tuser;
+
+import com.alibaba.fastjson.JSONObject;
+import com.cnd3b.common.Controller;
+import com.cnd3b.common.data.Rows;
+import com.cnd3b.common.data.SQLFactory;
+
+public class tuser extends Controller {
+    /**
+     * 构造函数
+     *
+     * @param content
+     */
+    public tuser(JSONObject content) {
+        super(content);
+    }
+
+    /**
+     * 查询部门成员列表
+     *
+     * @return
+     */
+    public String selectTuserList() {
+        String fusertype = content.getString("fusertype");
+        SQLFactory sqlFactory = new SQLFactory(this, "部门成员列表", pageSize, pageNumber, "t1.createdate DESC");
+        sqlFactory.addParameter("fusertype", fusertype);
+        Rows rows = dbConnect.runSqlQuery(sqlFactory.getSQL());
+        return getSucReturnObject().setDataByPaging(rows).preloading(1).toString();
+    }
+
+}