sjw 4 лет назад
Родитель
Сommit
1512cd80ac
24 измененных файлов с 4 добавлено и 839 удалено
  1. 0 58
      src/dsb/com/cnd3b/common/Controller.java
  2. 0 306
      src/dsb/com/cnd3b/common/actionscore/ActionScore.java
  3. 0 166
      src/dsb/com/cnd3b/common/actionscore/AgentActionScore.java
  4. 0 163
      src/dsb/com/cnd3b/common/actionscore/EnterpriseActionScore.java
  5. 0 3
      src/dsb/com/cnd3b/common/actionscore/SQL/企业_下载智库素材查询.sql
  6. 0 3
      src/dsb/com/cnd3b/common/actionscore/SQL/企业_下载通告附件查询.sql
  7. 0 3
      src/dsb/com/cnd3b/common/actionscore/SQL/企业_今日签到查询.sql
  8. 0 3
      src/dsb/com/cnd3b/common/actionscore/SQL/企业_智库分享查询.sql
  9. 0 3
      src/dsb/com/cnd3b/common/actionscore/SQL/企业_通告评分查询.sql
  10. 0 3
      src/dsb/com/cnd3b/common/actionscore/SQL/企业_通告阅读查询.sql
  11. 0 3
      src/dsb/com/cnd3b/common/actionscore/SQL/经销商_下载智库素材查询.sql
  12. 0 3
      src/dsb/com/cnd3b/common/actionscore/SQL/经销商_下载通告附件查询.sql
  13. 0 3
      src/dsb/com/cnd3b/common/actionscore/SQL/经销商_今日签到查询.sql
  14. 0 3
      src/dsb/com/cnd3b/common/actionscore/SQL/经销商_智库分享查询.sql
  15. 0 3
      src/dsb/com/cnd3b/common/actionscore/SQL/经销商_通告评分查询.sql
  16. 0 3
      src/dsb/com/cnd3b/common/actionscore/SQL/经销商_通告阅读查询.sql
  17. 1 7
      src/dsb/com/cnd3b/common/restful/SQL/手机账号列表查询.sql
  18. 1 7
      src/dsb/com/cnd3b/common/restful/SQL/持久化账号列表查询.sql
  19. 1 7
      src/dsb/com/cnd3b/common/restful/SQL/账号列表查询.sql
  20. 0 3
      src/dsb/com/cnd3b/restcontroller/customer/webclient/notice/notice.java
  21. 0 48
      src/dsb/com/cnd3b/restcontroller/customer/webclient/usercenter/signin/SignIn.java
  22. 0 5
      src/dsb/com/cnd3b/restcontroller/customer/wechatclient/notice/notice.java
  23. 1 20
      src/dsb/com/cnd3b/restcontroller/customer/wechatclient/usercenter/signin/SignIn.java
  24. 0 13
      src/dsb/com/cnd3b/restcontroller/system/system/docManage.java

+ 0 - 58
src/dsb/com/cnd3b/common/Controller.java

@@ -2,9 +2,6 @@ package com.cnd3b.common;
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
-import com.cnd3b.common.actionscore.ActionScore;
-import com.cnd3b.common.actionscore.AgentActionScore;
-import com.cnd3b.common.actionscore.EnterpriseActionScore;
 import com.cnd3b.common.data.Rows;
 import com.cnd3b.common.data.RowsMap;
 import com.cnd3b.common.data.SQLFactory;
@@ -41,8 +38,6 @@ public class Controller extends BaseClass {
 
     public long userid = 0L;
     public String username = "";
-    public String tstoreid = "";
-    public long tstoreId = 0L;
     public String siteid = "";
     public String tagentsid = "";
     public long tagentsId = 0L;
@@ -51,8 +46,6 @@ public class Controller extends BaseClass {
     public DBConnect dbConnect = null;
     public boolean fissysadministrator = false;
     public boolean fisadministrator = false;
-    public boolean fispromoters = false;//是否二级推广人
-    public boolean fissingleagent = false;//是否独立经销商
     public String hostipport;//访问地址url 如http://localhost:8080 http://127.0.0.1:8080
     public Date sysdate;
 
@@ -99,19 +92,13 @@ public class Controller extends BaseClass {
             Row row = parameter.userIdList.get(userid);
             siteid = row.getString("siteid");
             tagentsid = row.getString("tagentsid");
-            tstoreid = row.getString("tstoreid");
             fusertype = row.getString("fusertype");
             username = row.getString("fname");
             fphonenumber = row.getString("fphonenumber");
             fissysadministrator = row.getBoolean("fissysadministrator");
             fisadministrator = row.getBoolean("fisadministrator");
-            fispromoters = "PROMOTERS".equalsIgnoreCase(siteid);
-            fissingleagent = "AGENTS".equalsIgnoreCase(siteid);
             createRequestLog();
         }
-        if (!"".equals(tstoreid)) {
-            tstoreId = Long.parseLong(tstoreid);
-        }
         if (!"".equals(tagentsid)) {
             tagentsId = Long.parseLong(tagentsid);
         }
@@ -230,51 +217,6 @@ public class Controller extends BaseClass {
     }
 
 
-    /**
-     * 增加行动力值
-     *
-     * @param fsourcetype 行动累类型
-     * @param fsourceid   来源ID
-     * @param fnotes      加分备注
-     */
-    public void addActionScore(ActionScore.fsourcetype fsourcetype, long fsourceid, String fnotes) {
-        new Thread() {
-            @Override
-            public void run() {
-                switch (fusertype) {
-                    case "经销商":
-                        new AgentActionScore(siteid, tagentsid, userid, username, fsourcetype, fsourceid, fnotes).add();
-                        break;
-                    case "企业":
-                        new EnterpriseActionScore(siteid, userid, username, fsourcetype, fsourceid, fnotes).add();
-                        break;
-                    default:
-                        break;
-                }
-            }
-
-        }.start();
-    }
-
-    /**
-     * 增加行动力值
-     *
-     * @param fsourcetype 行动累类型
-     * @param fsourceid   来源ID
-     * @param fnotes      加分备注
-     */
-    public void addActionScore(ActionScore.fsourcetype fsourcetype, long userid, String username, long fsourceid, String fnotes) {
-        new Thread() {
-            @Override
-            public void run() {
-                if ("企业".equals(fusertype)) {
-                    new EnterpriseActionScore(siteid, userid, username, fsourcetype, fsourceid, fnotes).add();
-                }
-            }
-
-        }.start();
-    }
-
 
     //userid:tuserrequestlogid
     public static HashMap<Long, Long> userRequestLogMap = new HashMap<>();

+ 0 - 306
src/dsb/com/cnd3b/common/actionscore/ActionScore.java

@@ -1,306 +0,0 @@
-package com.cnd3b.common.actionscore;
-
-import com.cnd3b.common.BaseClass;
-import p2.pao.PaoRemote;
-import p2.pao.PaoSetRemote;
-
-import java.util.HashMap;
-
-/**
- * 行动力计算系统
- */
-public class ActionScore extends BaseClass {
-
-    String siteid = null;
-    String createby = null;
-    long userid = 0;
-    String tagentsid = null;
-    String fusertype = null;
-    long fsourceid = 0L;
-    String fnotes = null;
-    fsourcetype fsourcetype = null;
-    /**
-     * 经销商行动力值 key:tagentsid,value:tactionscoreid
-     */
-    protected static HashMap<String, Long> agentactionscoremap = new HashMap<>();
-    /**
-     * 企业用户行动力值 key:userid,value:tactionscoreid
-     */
-    protected static HashMap<Long, Long> usertactionscoremap = new HashMap<>();
-
-
-    /**
-     * 创建行动力值
-     */
-    protected long getActionScoreID() {
-        if ("企业".equals(fusertype) && usertactionscoremap.containsKey(userid)) {
-            return usertactionscoremap.get(userid);
-        } else if ("经销商".equals(fusertype) && agentactionscoremap.containsKey(tagentsid)) {
-            return agentactionscoremap.get(tagentsid);
-        }
-
-        PaoSetRemote tactionscoreSet = null;
-        PaoRemote tactionscore = null;
-        try {
-            if ("企业".equals(fusertype)) {
-                tactionscoreSet = getP2ServerSystemPaoSet("tactionscore", "siteid='" + siteid + "' and fusertype='企业' and tenterprise_userid='" + userid + "'");
-                if (tactionscoreSet.isEmpty()) {
-                    tactionscore = tactionscoreSet.addAtEnd();
-                    tactionscore.setValue("tenterprise_userid", userid, 11L);
-                    tactionscore.setValue("fscore", 0, 11L);
-                    tactionscore.setValue("fsitescore", 0, 11L);
-                    tactionscore.setValue("fsysscore", 0, 11L);
-                    tactionscore.setValue("fusertype", fusertype, 11L);
-                    tactionscore.setValue("siteid", siteid, 11L);
-                    tactionscoreSet.save();
-                } else {
-                    tactionscore = tactionscoreSet.getPao(0);
-                }
-                usertactionscoremap.put(userid, tactionscore.getUniqueIDValue());
-            } else if ("经销商".equals(fusertype)) {
-                tactionscoreSet = getP2ServerSystemPaoSet("tactionscore", "siteid='" + siteid + "' and fusertype='经销商' and tagentsid='" + tagentsid + "'");
-                if (tactionscoreSet.isEmpty()) {
-                    tactionscore = tactionscoreSet.addAtEnd();
-                    tactionscore.setValue("tagentsid", tagentsid, 11L);
-                    tactionscore.setValue("fscore", 0, 11L);
-                    tactionscore.setValue("fsitescore", 0, 11L);
-                    tactionscore.setValue("fsysscore", 0, 11L);
-                    tactionscore.setValue("fusertype", fusertype, 11L);
-                    tactionscore.setValue("siteid", siteid, 11L);
-                    tactionscoreSet.save();
-                } else {
-                    tactionscore = tactionscoreSet.getPao(0);
-                }
-                agentactionscoremap.put(tagentsid, tactionscore.getUniqueIDValue());
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        } finally {
-            try {
-                tactionscoreSet.close();
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-        }
-        if ("企业".equals(fusertype)) {
-            return usertactionscoremap.get(userid);
-        } else if ("经销商".equals(fusertype)) {
-            return agentactionscoremap.get(tagentsid);
-        }
-        return 0L;
-    }
-
-
-    /**
-     * 增加经销商行动力
-     *
-     * @param fscore 分值
-     */
-    protected void actionScore_Add(int fscore) {
-        if (fscore == 0) {
-            return;
-        }
-        long tactionscoreid = getActionScoreID();
-        PaoSetRemote tactionscoreSet = null;
-        try {
-            tactionscoreSet = getP2ServerSystemPaoSet("tactionscore", "siteid='" + siteid + "' and tactionscoreid=" + tactionscoreid);
-            if (!tactionscoreSet.isEmpty()) {
-                PaoRemote tactionscore = tactionscoreSet.getPao(0);
-                tactionscore.setValue("fscore", tactionscore.getInt("fscore") + fscore, 11L);
-                tactionscore.setValue("fsysscore", tactionscore.getInt("fsysscore") + fscore, 11L);
-                tactionscore.setValue("fsitescore", tactionscore.getInt("fsitescore") + fscore, 11L);
-                PaoSetRemote tactionscoremxSet = tactionscore.getPaoSet("$tactionscoremx", "tactionscoremx");
-                String[] ftypemxs = new String[]{"个人", "企业", "平台"};
-                for (String ftypemx : ftypemxs) {
-                    PaoRemote tactionscoremx = tactionscoremxSet.addAtEnd();
-                    tactionscoremx.setValue("siteid", siteid, 11L);
-                    tactionscoremx.setValue("ftype", "收入", 11L);
-                    tactionscoremx.setValue("ftypemx", ftypemx, 11L);
-                    tactionscoremx.setValue("fscore", fscore, 11L);
-                    tactionscoremx.setValue("fnotes", fnotes, 11L);
-                    tactionscoremx.setValue("tactionscoreid", tactionscoreid, 11L);
-                    tactionscoremx.setValue("createby", createby, 11L);
-                    tactionscoremx.setValue("createdate", getDateTime(), 11L);
-                    tactionscoremx.setValue("fsourcetype", fsourcetype.toString(), 11L);
-                    tactionscoremx.setValue("fsourceid", fsourceid, 11L);
-                }
-                tactionscoreSet.save();
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        } finally {
-            if (tactionscoreSet != null) {
-                try {
-                    tactionscoreSet.close();
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-        }
-    }
-
-
-    /**
-     * 扣减行动力
-     *
-     * @param ftypemx  企业、平台
-     * @param fscore   分值
-     * @param fnotes   收支说明
-     * @param fremarks 备注
-     */
-    protected boolean actionScore_Sub(String ftypemx, int fscore, String fnotes, String fremarks) {
-        long tactionscoreid = getActionScoreID();
-        PaoSetRemote tactionscoreSet = null;
-        try {
-            tactionscoreSet = getP2ServerSystemPaoSet("tactionscore", "siteid='" + siteid + "' and tactionscoreid=" + tactionscoreid);
-            if (!tactionscoreSet.isEmpty()) {
-                PaoRemote tactionscore = tactionscoreSet.getPao(0);
-                switch (ftypemx) {
-                    case "个人":
-                        tactionscore.setValue("fscore", tactionscore.getInt("fscore") - fscore, 11L);
-                        break;
-                    case "企业":
-                        tactionscore.setValue("fsitescore", tactionscore.getInt("fsitescore") - fscore, 11L);
-                        break;
-                    case "平台":
-                        tactionscore.setValue("fsysscore", tactionscore.getInt("fsysscore") - fscore, 11L);
-                        break;
-                    default:
-                        break;
-                }
-
-                PaoSetRemote tactionscoremxSet = tactionscore.getPaoSet("$tactionscoremx", "tactionscoremx");
-
-                PaoRemote tactionscoremx = tactionscoremxSet.addAtEnd();
-                tactionscoremx.setValue("siteid", siteid, 11L);
-                tactionscoremx.setValue("ftype", "支出", 11L);
-                tactionscoremx.setValue("ftypemx", ftypemx, 11L);
-                tactionscoremx.setValue("fscore", fscore, 11L);
-                tactionscoremx.setValue("fnotes", fnotes, 11L);
-                tactionscoremx.setValue("fremarks", fremarks, 11L);
-                tactionscoremx.setValue("tactionscoreid", tactionscoreid, 11L);
-                tactionscoremx.setValue("createby", createby, 11L);
-                tactionscoremx.setValue("createdate", getDateTime(), 11L);
-
-                tactionscoreSet.save();
-                return true;
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        } finally {
-            if (tactionscoreSet != null) {
-                try {
-                    tactionscoreSet.close();
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-
-        }
-        return false;
-    }
-
-    public enum fsourcetype {
-        /**
-         * fsourceid为经销商档案ID
-         */
-        每日签到,
-        /**
-         * fsourceid为客户接待录入ID
-         */
-        意向客户录入,
-        /**
-         * fsourceid为客户销售录入ID
-         */
-        销售录入,
-        /**
-         * fsourceid为费用录入ID
-         */
-        费用录入,
-        /**
-         * fsourceid为事件录入ID
-         */
-        事件录入,
-        /**
-         * fsourceid为智库ID
-         */
-        智库分享,
-        /**
-         * fsourceid为通告ID
-         */
-        阅读通告,
-        /**
-         * fsourceid为通告ID
-         */
-        通告评分,
-        /**
-         * fsourceid为通告ID
-         */
-        下载通告附件,
-        /**
-         * fsourceid为智库ID
-         */
-        下载营销智库,
-        标准工作录入,
-        自选工作录入,
-        行程评优,
-        店铺录入
-    }
-
-    public int getScore() {
-        if ("经销商".equals(fusertype)) {
-            switch (fsourcetype) {
-                case 每日签到:
-                    return 10;
-                case 意向客户录入:
-                    return 5;
-                case 销售录入:
-                    return 10;
-                case 费用录入:
-                    return 5;
-                case 事件录入:
-                    return 50;
-                case 智库分享:
-                    return 50;
-                case 阅读通告:
-                    return 5;
-                case 通告评分:
-                    return 10;
-                case 下载通告附件:
-                    return 5;
-                case 下载营销智库:
-                    return 5;
-
-                default:
-                    break;
-            }
-        } else if ("企业".equals(fusertype)) {
-            switch (fsourcetype) {
-                case 每日签到:
-                    return 10;
-                case 标准工作录入:
-                    return 10;
-                case 自选工作录入:
-                    return 5;
-                case 行程评优:
-                    return 50;
-                case 销售录入:
-                    return 50;
-                case 店铺录入:
-                    return 10;
-                case 阅读通告:
-                    return 5;
-                case 通告评分:
-                    return 10;
-                case 下载通告附件:
-                    return 5;
-                case 下载营销智库:
-                    return 5;
-                default:
-                    break;
-            }
-        }
-
-        return 0;
-    }
-}

+ 0 - 166
src/dsb/com/cnd3b/common/actionscore/AgentActionScore.java

@@ -1,166 +0,0 @@
-package com.cnd3b.common.actionscore;
-
-import com.cnd3b.common.Controller;
-import com.cnd3b.common.data.SQLFactory;
-import com.cnd3b.common.data.Rows;
-import com.cnd3b.common.data.db.DBConnect;
-
-/**
- * 经销商行动力计算系统
- */
-public class AgentActionScore extends ActionScore {
-    /**
-     * 经销商构造函数
-     *
-     * @param siteid    站点
-     * @param tagentsid
-     * @param createby
-     */
-    public AgentActionScore(String siteid, String tagentsid, long userid, String createby, ActionScore.fsourcetype fsourcetype, long fsourceid, String fnotes) {
-        this.siteid = siteid;
-        this.createby = createby;
-        this.tagentsid = tagentsid;
-        this.userid = userid;
-        this.fusertype = "经销商";
-        this.fsourcetype = fsourcetype;
-        this.fsourceid = fsourceid;
-        this.fnotes = fnotes;
-    }
-
-    /**
-     * 经销商构造函数1
-     */
-    public AgentActionScore(Controller controller, ActionScore.fsourcetype fsourcetype, long fsourceid, String fnotes) {
-        this.siteid = controller.siteid;
-        this.createby = controller.username;
-        this.tagentsid = controller.tagentsid;
-        this.userid = controller.userid;
-        this.fusertype = "经销商";
-        this.fsourcetype = fsourcetype;
-        this.fsourceid = fsourceid;
-        this.fnotes = fnotes;
-    }
-
-
-    /**
-     * 增加行动值
-     */
-    public void add() {
-        synchronized (AgentActionScore.class) {
-            super.actionScore_Add(addValidate());
-        }
-    }
-
-    /**
-     * 对需要验证的行动值增加验证,并返回行动得分
-     *
-     * @return
-     */
-    private int addValidate() {
-
-        boolean isaddscore = true;
-        switch (fsourcetype) {
-            case 每日签到: {
-                /**
-                 * 规避当日重复签到,重复记分
-                 */
-                SQLFactory sqlFactory = new SQLFactory(this, "经销商_今日签到查询");
-                sqlFactory.addParameter("siteid", siteid);
-                sqlFactory.addParameter("tagentsid", tagentsid);
-                Rows rows = new DBConnect().runSqlQuery(sqlFactory.getSQL());
-                isaddscore = rows.isEmpty();
-                break;
-            }
-            case 意向客户录入: {
-                /**
-                 * 同一条数据不会重复录入,无需考虑重复记录
-                 */
-                isaddscore = true;
-                break;
-            }
-            case 销售录入: {
-                /**
-                 * 同一条数据不会重复录入,无需考虑重复记录
-                 */
-                isaddscore = true;
-                break;
-            }
-            case 费用录入: {
-                /**
-                 * 同一条数据不会重复录入,无需考虑重复记录
-                 */
-                isaddscore = true;
-                break;
-            }
-            case 事件录入: {
-                isaddscore = true;
-                break;
-            }
-            case 智库分享: {
-                SQLFactory sqlFactory = new SQLFactory(this, "经销商_智库分享查询");
-                sqlFactory.addParameter("siteid", siteid);
-                sqlFactory.addParameter("tagentsid", tagentsid);
-                sqlFactory.addParameter("fsourceid", fsourceid);
-                Rows rows = new DBConnect().runSqlQuery(sqlFactory.getSQL());
-                isaddscore = rows.isEmpty();
-                break;
-            }
-            case 阅读通告: {
-                /**
-                 * 规避重复阅读通告,重复记分
-                 */
-                SQLFactory sqlFactory = new SQLFactory(this, "经销商_通告阅读查询");
-                sqlFactory.addParameter("siteid", siteid);
-                sqlFactory.addParameter("tagentsid", tagentsid);
-                sqlFactory.addParameter("fsourceid", fsourceid);
-                Rows rows = new DBConnect().runSqlQuery(sqlFactory.getSQL());
-                isaddscore = rows.isEmpty();
-                break;
-            }
-            case 通告评分: {
-                /**
-                 * 规避重复评分通告,重复记分
-                 */
-                SQLFactory sqlFactory = new SQLFactory(this, "经销商_通告评分查询");
-                sqlFactory.addParameter("siteid", siteid);
-                sqlFactory.addParameter("tagentsid", tagentsid);
-                sqlFactory.addParameter("fsourceid", fsourceid);
-                Rows rows = new DBConnect().runSqlQuery(sqlFactory.getSQL());
-                isaddscore = rows.isEmpty();
-                break;
-            }
-            case 下载通告附件: {
-                /**
-                 * 规避重复下载通告附件,重复记分
-                 */
-                SQLFactory sqlFactory = new SQLFactory(this, "经销商_下载通告附件查询");
-                sqlFactory.addParameter("siteid", siteid);
-                sqlFactory.addParameter("tagentsid", tagentsid);
-                sqlFactory.addParameter("fsourceid", fsourceid);
-                Rows rows = new DBConnect().runSqlQuery(sqlFactory.getSQL());
-                isaddscore = rows.isEmpty();
-                break;
-            }
-            case 下载营销智库: {
-                /**
-                 * 规避重复下载通告附件,重复记分
-                 */
-                SQLFactory sqlFactory = new SQLFactory(this, "经销商_下载智库素材查询");
-                sqlFactory.addParameter("siteid", siteid);
-                sqlFactory.addParameter("tagentsid", tagentsid);
-                sqlFactory.addParameter("fsourceid", fsourceid);
-                Rows rows = new DBConnect().runSqlQuery(sqlFactory.getSQL());
-                isaddscore = rows.isEmpty();
-                break;
-            }
-            default:break;
-        }
-        if (isaddscore) {
-            return getScore();
-        } else {
-            return 0;
-        }
-    }
-
-
-}

+ 0 - 163
src/dsb/com/cnd3b/common/actionscore/EnterpriseActionScore.java

@@ -1,163 +0,0 @@
-package com.cnd3b.common.actionscore;
-
-import com.cnd3b.common.Controller;
-import com.cnd3b.common.data.SQLFactory;
-import com.cnd3b.common.data.Rows;
-import com.cnd3b.common.data.db.DBConnect;
-
-/**
- * 企业账号行动力计算系统
- */
-public class EnterpriseActionScore extends ActionScore {
-    /**
-     * 经销商构造函数
-     *
-     * @param siteid   站点
-     * @param createby
-     */
-    public EnterpriseActionScore(String siteid, long userid, String createby, ActionScore.fsourcetype fsourcetype, long fsourceid, String fnotes) {
-        this.siteid = siteid;
-        this.userid = userid;
-        this.createby = createby;
-        this.fusertype = "企业";
-        this.fsourcetype = fsourcetype;
-        this.fsourceid = fsourceid;
-        this.fnotes = fnotes;
-    }
-
-    /**
-     * 经销商构造函数
-     */
-    public EnterpriseActionScore(Controller controller, ActionScore.fsourcetype fsourcetype, long fsourceid, String fnotes) {
-        this.siteid = controller.siteid;
-        this.createby = controller.username;
-        this.userid = controller.userid;
-        this.fusertype = "企业";
-        this.fsourcetype = fsourcetype;
-        this.fsourceid = fsourceid;
-        this.fnotes = fnotes;
-    }
-
-
-    /**
-     * 增加行动值
-     */
-    public void add() {
-        synchronized (EnterpriseActionScore.class) {
-            super.actionScore_Add(addValidate());
-        }
-    }
-
-    /**
-     * 对需要验证的行动值增加验证,并返回行动得分
-     *
-     * @return
-     */
-    private int addValidate() {
-
-        boolean isaddscore = true;
-        switch (fsourcetype) {
-            case 每日签到: {
-                /**
-                 * 规避当日重复签到,重复记分
-                 */
-                SQLFactory sqlFactory = new SQLFactory(this, "企业_今日签到查询");
-                sqlFactory.addParameter("siteid", siteid);
-                sqlFactory.addParameter("tenterprise_userid", userid);
-                Rows rows = new DBConnect().runSqlQuery(sqlFactory.getSQL());
-                isaddscore = rows.isEmpty();
-                break;
-            }
-            case 意向客户录入: {
-                /**
-                 * 同一条数据不会重复录入,无需考虑重复记录
-                 */
-                isaddscore = true;
-                break;
-            }
-            case 销售录入: {
-                /**
-                 * 同一条数据不会重复录入,无需考虑重复记录
-                 */
-                isaddscore = true;
-                break;
-            }
-            case 费用录入: {
-                /**
-                 * 同一条数据不会重复录入,无需考虑重复记录
-                 */
-                isaddscore = true;
-                break;
-            }
-            case 事件录入: {
-                isaddscore = true;
-                break;
-            }
-            case 智库分享: {
-                SQLFactory sqlFactory = new SQLFactory(this, "企业_智库分享查询");
-                sqlFactory.addParameter("siteid", siteid);
-                sqlFactory.addParameter("tenterprise_userid", userid);
-                sqlFactory.addParameter("fsourceid", fsourceid);
-                Rows rows = new DBConnect().runSqlQuery(sqlFactory.getSQL());
-                isaddscore = rows.isEmpty();
-                break;
-            }
-            case 阅读通告: {
-                /**
-                 * 规避重复阅读通告,重复记分
-                 */
-                SQLFactory sqlFactory = new SQLFactory(this, "企业_通告阅读查询");
-                sqlFactory.addParameter("siteid", siteid);
-                sqlFactory.addParameter("tenterprise_userid", userid);
-                sqlFactory.addParameter("fsourceid", fsourceid);
-                Rows rows = new DBConnect().runSqlQuery(sqlFactory.getSQL());
-                isaddscore = rows.isEmpty();
-                break;
-            }
-            case 通告评分: {
-                /**
-                 * 规避重复评分通告,重复记分
-                 */
-                SQLFactory sqlFactory = new SQLFactory(this, "企业_通告评分查询");
-                sqlFactory.addParameter("siteid", siteid);
-                sqlFactory.addParameter("tenterprise_userid", userid);
-                sqlFactory.addParameter("fsourceid", fsourceid);
-                Rows rows = new DBConnect().runSqlQuery(sqlFactory.getSQL());
-                isaddscore = rows.isEmpty();
-                break;
-            }
-            case 下载通告附件: {
-                /**
-                 * 规避重复下载通告附件,重复记分
-                 */
-                SQLFactory sqlFactory = new SQLFactory(this, "企业_下载通告附件查询");
-                sqlFactory.addParameter("siteid", siteid);
-                sqlFactory.addParameter("tenterprise_userid", userid);
-                sqlFactory.addParameter("fsourceid", fsourceid);
-                Rows rows = new DBConnect().runSqlQuery(sqlFactory.getSQL());
-                isaddscore = rows.isEmpty();
-                break;
-            }
-            case 下载营销智库: {
-                /**
-                 * 规避重复下载通告附件,重复记分
-                 */
-                SQLFactory sqlFactory = new SQLFactory(this, "企业_下载智库素材查询");
-                sqlFactory.addParameter("siteid", siteid);
-                sqlFactory.addParameter("tenterprise_userid", userid);
-                sqlFactory.addParameter("fsourceid", fsourceid);
-                Rows rows = new DBConnect().runSqlQuery(sqlFactory.getSQL());
-                isaddscore = rows.isEmpty();
-                break;
-            }
-            default:break;
-        }
-        if (isaddscore) {
-            return getScore();
-        } else {
-            return 0;
-        }
-    }
-
-
-}

+ 0 - 3
src/dsb/com/cnd3b/common/actionscore/SQL/企业_下载智库素材查询.sql

@@ -1,3 +0,0 @@
-select t2.tactionscoremxid from tactionscore t1
-inner join tactionscoremx t2 on t1.siteid=t2.siteid and t1.tactionscoreid=t2.tactionscoreid and t2.fsourcetype='ÏÂÔØÓªÏúÖÇ¿â' and t2.fsourceid=$fsourceid$
-where t1.siteid =$siteid$ and t1.tenterprise_userid=$tenterprise_userid$

+ 0 - 3
src/dsb/com/cnd3b/common/actionscore/SQL/企业_下载通告附件查询.sql

@@ -1,3 +0,0 @@
-select t2.tactionscoremxid from tactionscore t1
-inner join tactionscoremx t2 on t1.siteid=t2.siteid and t1.tactionscoreid=t2.tactionscoreid and t2.fsourcetype='ÏÂÔØÍ¨¸æ¸½¼þ' and t2.fsourceid=$fsourceid$
-where t1.siteid =$siteid$ and t1.tenterprise_userid=$tenterprise_userid$

+ 0 - 3
src/dsb/com/cnd3b/common/actionscore/SQL/企业_今日签到查询.sql

@@ -1,3 +0,0 @@
-select t2.tactionscoremxid from tactionscore t1
-inner join tactionscoremx t2 on t1.siteid=t2.siteid and t1.tactionscoreid=t2.tactionscoreid and t2.fsourcetype='ÿÈÕÇ©µ½' and convert (varchar (10), t2.createdate, 120)=getdate()
-where t1.siteid =$siteid$ and t1.tenterprise_userid=$tenterprise_userid$

+ 0 - 3
src/dsb/com/cnd3b/common/actionscore/SQL/企业_智库分享查询.sql

@@ -1,3 +0,0 @@
-select t2.tactionscoremxid from tactionscore t1
-inner join tactionscoremx t2 on t1.siteid=t2.siteid and t1.tactionscoreid=t2.tactionscoreid and t2.fsourcetype='ÖÇ¿â·ÖÏí' and t2.fsourceid=$fsourceid$
-where t1.siteid =$siteid$ and t1.tenterprise_userid=$tenterprise_userid$

+ 0 - 3
src/dsb/com/cnd3b/common/actionscore/SQL/企业_通告评分查询.sql

@@ -1,3 +0,0 @@
-select t2.tactionscoremxid from tactionscore t1
-inner join tactionscoremx t2 on t1.siteid=t2.siteid and t1.tactionscoreid=t2.tactionscoreid and t2.fsourcetype='ͨ¸æÆÀ·Ö' and t2.fsourceid=$fsourceid$
-where t1.siteid =$siteid$ and t1.tenterprise_userid=$tenterprise_userid$

+ 0 - 3
src/dsb/com/cnd3b/common/actionscore/SQL/企业_通告阅读查询.sql

@@ -1,3 +0,0 @@
-select t2.tactionscoremxid from tactionscore t1
-inner join tactionscoremx t2 on t1.siteid=t2.siteid and t1.tactionscoreid=t2.tactionscoreid and t2.fsourcetype='ÔĶÁͨ¸æ' and t2.fsourceid=$fsourceid$
-where t1.siteid =$siteid$ and t1.tenterprise_userid=$tenterprise_userid$

+ 0 - 3
src/dsb/com/cnd3b/common/actionscore/SQL/经销商_下载智库素材查询.sql

@@ -1,3 +0,0 @@
-select t2.tactionscoremxid from tactionscore t1
-inner join tactionscoremx t2 on t1.siteid=t2.siteid and t1.tactionscoreid=t2.tactionscoreid and t2.fsourcetype='ÏÂÔØÓªÏúÖÇ¿â' and t2.fsourceid=$fsourceid$
-where t1.siteid =$siteid$ and t1.tagentsid=$tagentsid$

+ 0 - 3
src/dsb/com/cnd3b/common/actionscore/SQL/经销商_下载通告附件查询.sql

@@ -1,3 +0,0 @@
-select t2.tactionscoremxid from tactionscore t1
-inner join tactionscoremx t2 on t1.siteid=t2.siteid and t1.tactionscoreid=t2.tactionscoreid and t2.fsourcetype='ÏÂÔØÍ¨¸æ¸½¼þ' and t2.fsourceid=$fsourceid$
-where t1.siteid =$siteid$ and t1.tagentsid=$tagentsid$

+ 0 - 3
src/dsb/com/cnd3b/common/actionscore/SQL/经销商_今日签到查询.sql

@@ -1,3 +0,0 @@
-select t2.tactionscoremxid from tactionscore t1
-inner join tactionscoremx t2 on t1.siteid=t2.siteid and t1.tactionscoreid=t2.tactionscoreid and t2.fsourcetype='ÿÈÕÇ©µ½' and convert (varchar (10), t2.createdate, 120)=getdate()
-where t1.siteid =$siteid$ and t1.tagentsid=$tagentsid$

+ 0 - 3
src/dsb/com/cnd3b/common/actionscore/SQL/经销商_智库分享查询.sql

@@ -1,3 +0,0 @@
-select t2.tactionscoremxid from tactionscore t1
-inner join tactionscoremx t2 on t1.siteid=t2.siteid and t1.tactionscoreid=t2.tactionscoreid and t2.fsourcetype='ÖÇ¿â·ÖÏí' and t2.fsourceid=$fsourceid$
-where t1.siteid =$siteid$ and t1.tagentsid=$tagentsid$

+ 0 - 3
src/dsb/com/cnd3b/common/actionscore/SQL/经销商_通告评分查询.sql

@@ -1,3 +0,0 @@
-select t2.tactionscoremxid from tactionscore t1
-inner join tactionscoremx t2 on t1.siteid=t2.siteid and t1.tactionscoreid=t2.tactionscoreid and t2.fsourcetype='ͨ¸æÆÀ·Ö' and t2.fsourceid=$fsourceid$
-where t1.siteid =$siteid$ and t1.tagentsid=$tagentsid$

+ 0 - 3
src/dsb/com/cnd3b/common/actionscore/SQL/经销商_通告阅读查询.sql

@@ -1,3 +0,0 @@
-select t2.tactionscoremxid from tactionscore t1
-inner join tactionscoremx t2 on t1.siteid=t2.siteid and t1.tactionscoreid=t2.tactionscoreid and t2.fsourcetype='ÔĶÁͨ¸æ' and t2.fsourceid=$fsourceid$
-where t1.siteid =$siteid$ and t1.tagentsid=$tagentsid$

+ 1 - 7
src/dsb/com/cnd3b/common/restful/SQL/手机账号列表查询.sql

@@ -3,19 +3,14 @@ select t1.tenterprise_userid
        t1.faccountno,
        t1.siteid,
        t1.tagentsid,
-       t1.tstoreid,
-       case when t1.siteid = 'AGENTS'or t1.fusertype='¹¤ÈË' then t3.fagentname else t2.fcompshortname end as fcompname,
+       t3.fagentname,
        t3.fagentnum,
        t3.fagentname,
-       t4.fstorenum,
-       t4.fstorename,
        t1.fusertype,
        t1.frole,
        t1.fname,
        t1.fisadministrator,
        t1.fissysadministrator,
-       t1.fcanreadagentanalysis,
-       t1.fdatamodify,
        case
            when t1.fusertype = '¾­ÏúÉÌ' and t3.tagentsid IS not null and t3.fappmodel is not null then t3.fappmodel
            else t5.fappmodel end                                                     as fappmodel,
@@ -37,7 +32,6 @@ select t1.tenterprise_userid
 from tenterprise_users t1
          inner join tenterprise t2 on t1.siteid = t2.siteid and (fenddate is null or fenddate > getdate())
          left join tagents t3 on t1.siteid = t3.siteid and t1.tagentsid = t3.tagentsid
-         left join tstore t4 on t1.siteid = t4.siteid and t1.tagentsid = t4.tagentsid and t1.tstoreid = t4.tstoreid
          inner join tappmodelauth t5 on t1.siteid = t5.siteid and t5.fisdefault = 1
          left join tpayinfo t6 on t1.siteid = t6.siteid and ((t1.fusertype = '¾­ÏúÉÌ' and t1.tagentsid = t6.tagentsid) or
                                                              (t1.fusertype = 'ÆóÒµ' and t1.tenterprise_userid = t6.tenterprise_userid)) and

+ 1 - 7
src/dsb/com/cnd3b/common/restful/SQL/持久化账号列表查询.sql

@@ -3,19 +3,14 @@ select t1.tenterprise_userid
        t1.faccountno,
        t1.siteid,
        t1.tagentsid,
-       t1.tstoreid,
-       case when t1.siteid = 'AGENTS'or t1.fusertype='¹¤ÈË' then t3.fagentname else t2.fcompshortname end as fcompname,
+       t3.fagentname,
        t3.fagentnum,
        t3.fagentname,
-       t4.fstorenum,
-       t4.fstorename,
        t1.fusertype,
        t1.frole,
        t1.fname,
        t1.fisadministrator,
        t1.fissysadministrator,
-       t1.fcanreadagentanalysis,
-       t1.fdatamodify,
        case
            when t1.fusertype = '¾­ÏúÉÌ' and t3.tagentsid IS not null and t3.fappmodel is not null then t3.fappmodel
            else t5.fappmodel end                                                    as fappmodel,
@@ -38,7 +33,6 @@ select t1.tenterprise_userid
 from tenterprise_users t1
          inner join tenterprise t2 on t1.siteid = t2.siteid and (fenddate is null or fenddate > getdate())
          left join tagents t3 on t1.siteid = t3.siteid and t1.tagentsid = t3.tagentsid
-         left join tstore t4 on t1.siteid = t4.siteid and t1.tagentsid = t4.tagentsid and t1.tstoreid = t4.tstoreid
          inner join tappmodelauth t5 on t1.siteid = t5.siteid and t5.fisdefault = 1
          left join tpayinfo t6 on t1.siteid = t6.siteid and ((t1.fusertype = '¾­ÏúÉÌ' and t1.tagentsid = t6.tagentsid) or
                                                              (t1.fusertype = 'ÆóÒµ' and t1.tenterprise_userid = t6.tenterprise_userid)) and

+ 1 - 7
src/dsb/com/cnd3b/common/restful/SQL/账号列表查询.sql

@@ -3,19 +3,14 @@ select t1.tenterprise_userid
        t1.faccountno,
        t1.siteid,
        t1.tagentsid,
-       t1.tstoreid,
-       case when t1.siteid = 'AGENTS'or t1.fusertype='¹¤ÈË' then t3.fagentname else t2.fcompshortname end as fcompname,
+       t3.fagentname,
        t3.fagentnum,
        t3.fagentname,
-       t4.fstorenum,
-       t4.fstorename,
        t1.fusertype,
        t1.frole,
        t1.fname,
        t1.fisadministrator,
        t1.fissysadministrator,
-       t1.fcanreadagentanalysis,
-       t1.fdatamodify,
        case
            when t1.fusertype = '¾­ÏúÉÌ' and t3.tagentsid IS not null and t3.fappmodel is not null then t3.fappmodel
            else t5.fappmodel end                                                     as fappmodel,
@@ -37,7 +32,6 @@ select t1.tenterprise_userid
 from tenterprise_users t1
          inner join tenterprise t2 on t1.siteid = t2.siteid and (fenddate is null or fenddate > getdate())
          left join tagents t3 on t1.siteid = t3.siteid and t1.tagentsid = t3.tagentsid
-         left join tstore t4 on t1.siteid = t4.siteid and t1.tagentsid = t4.tagentsid and t1.tstoreid = t4.tstoreid
          inner join tappmodelauth t5 on t1.siteid = t5.siteid and t5.fisdefault = 1
          left join tpayinfo t6 on t1.siteid = t6.siteid and ((t1.fusertype = '¾­ÏúÉÌ' and t1.tagentsid = t6.tagentsid) or
                                                              (t1.fusertype = 'ÆóÒµ' and t1.tenterprise_userid = t6.tenterprise_userid)) and

+ 0 - 3
src/dsb/com/cnd3b/restcontroller/customer/webclient/notice/notice.java

@@ -3,7 +3,6 @@ package com.cnd3b.restcontroller.customer.webclient.notice;
 import com.alibaba.fastjson.JSONObject;
 import com.cnd3b.common.Controller;
 import com.cnd3b.common.D3bException;
-import com.cnd3b.common.actionscore.ActionScore;
 import com.cnd3b.common.data.Row;
 import com.cnd3b.common.data.Rows;
 import com.cnd3b.common.data.RowsMap;
@@ -169,7 +168,6 @@ public class notice extends Controller {
         tnotice_userdataSet.save();
 
         dbConnect.runSqlUpdate("update tnotice_users set flastreadtime=getdate() where siteid='" + siteid + "' and tnoticeid='" + tnoticeid + "' and tenterprise_userid='" + userid + "'");
-        addActionScore(ActionScore.fsourcetype.阅读通告, tnoticeid, "阅读通告");
 
         return getSucReturnObject().setData(rows).toString();
     }
@@ -211,7 +209,6 @@ public class notice extends Controller {
             tnotice_users.setValue("changedate", getDateTime(), 11L);
         }
         tnotice_usersSet.save();
-        addActionScore(ActionScore.fsourcetype.通告评分, tnoticeid, "通告评分");
         return getSucReturnObject().toString();
     }
 }

+ 0 - 48
src/dsb/com/cnd3b/restcontroller/customer/webclient/usercenter/signin/SignIn.java

@@ -1,48 +0,0 @@
-package com.cnd3b.restcontroller.customer.webclient.usercenter.signin;
-
-import com.alibaba.fastjson.JSONObject;
-import com.cnd3b.common.Controller;
-import com.cnd3b.common.actionscore.ActionScore;
-import com.cnd3b.common.data.Rows;
-import p2.pao.PaoRemote;
-import p2.pao.PaoSetRemote;
-import p2.util.P2Exception;
-
-public class SignIn extends Controller {
-
-    public SignIn(JSONObject content) {
-        super(content);
-    }
-
-    /**
-     * 签到
-     *
-     * @return
-     */
-    public String signin() throws P2Exception {
-        PaoSetRemote tsigninSet = getP2ServerSystemPaoSet("tsignin", "siteid='" + siteid + "' and tenterprise_userid='" + userid + "' and convert(varchar(10),FDATE,120)=convert(varchar(10),getdate(),120)");
-        if (tsigninSet.isEmpty()) {
-            PaoRemote pao = tsigninSet.addAtEnd();
-            pao.setValue("siteid", siteid, 11L);
-            pao.setValue("tenterprise_userid", userid, 11L);
-            pao.setValue("fdate", getDateTime(), 11L);
-            tsigninSet.save();
-            addActionScore(ActionScore.fsourcetype.每日签到, Long.parseLong(tagentsid), "每日签到");
-        } else {
-            return getErrReturnObject().setErrMsg("今日已签到!").toString();
-        }
-        return getSucReturnObject().setData("签到成功!").toString();
-    }
-
-    /**
-     * 获取本月签到记录
-     *
-     * @return
-     */
-    public String query_signinlog() {
-        String sql = "select convert(varchar(10),fdate,120)fdate from tsignin where siteid='" + siteid + "' and tenterprise_userid='" + userid + "' and MONTH(fdate)=MONTH(GETDATE())";
-        Rows rows = dbConnect.runSqlQuery(sql);
-        return getSucReturnObject().setData(rows.toJsonArray("fdate")).saveToDataPool().toString();
-    }
-
-}

+ 0 - 5
src/dsb/com/cnd3b/restcontroller/customer/wechatclient/notice/notice.java

@@ -3,7 +3,6 @@ package com.cnd3b.restcontroller.customer.wechatclient.notice;
 import com.alibaba.fastjson.JSONObject;
 import com.cnd3b.common.Controller;
 import com.cnd3b.common.D3bException;
-import com.cnd3b.common.actionscore.ActionScore;
 import com.cnd3b.common.data.Row;
 import com.cnd3b.common.data.Rows;
 import com.cnd3b.common.data.RowsMap;
@@ -157,9 +156,6 @@ public class notice extends Controller {
         tnotice_userdata.setValue("closedate", calendar.getTime(), 11L);
         tnotice_userdataSet.save();
 
-        dbConnect.runSqlUpdate("update tnotice_users set flastreadtime=getdate() where siteid='" + siteid + "' and tnoticeid='" + tnoticeid + "' and tenterprise_userid='" + userid + "'");
-        addActionScore(ActionScore.fsourcetype.阅读通告, Long.parseLong(tnoticeid), "阅读通告");
-
         return getSucReturnObject().setData(rows).toString();
     }
 
@@ -200,7 +196,6 @@ public class notice extends Controller {
             tnotice_users.setValue("changedate", getDateTime(), 11L);
         }
         tnotice_usersSet.save();
-        addActionScore(ActionScore.fsourcetype.通告评分, Long.parseLong(tnoticeid), "通告评分");
        
         return getSucReturnObject().toString();
     }

+ 1 - 20
src/dsb/com/cnd3b/restcontroller/customer/wechatclient/usercenter/signin/SignIn.java

@@ -2,7 +2,6 @@ package com.cnd3b.restcontroller.customer.wechatclient.usercenter.signin;
 
 import com.alibaba.fastjson.JSONObject;
 import com.cnd3b.common.Controller;
-import com.cnd3b.common.actionscore.ActionScore;
 import com.cnd3b.common.data.Rows;
 import p2.pao.PaoRemote;
 import p2.pao.PaoSetRemote;
@@ -14,25 +13,7 @@ public class SignIn extends Controller {
         super(content);
     }
 
-    /**
-     * 签到
-     *
-     * @return
-     */
-    public String signin() throws P2Exception {
-        PaoSetRemote tsigninSet = getP2ServerSystemPaoSet("tsignin", "siteid='" + siteid + "' and tenterprise_userid='" + userid + "' and convert(varchar(10),FDATE,120)=convert(varchar(10),getdate(),120)");
-        if (tsigninSet.isEmpty()) {
-            PaoRemote pao = tsigninSet.addAtEnd();
-            pao.setValue("siteid", siteid, 11L);
-            pao.setValue("tenterprise_userid", userid, 11L);
-            pao.setValue("fdate", getDateTime(), 11L);
-            tsigninSet.save();
-            addActionScore(ActionScore.fsourcetype.每日签到, Long.parseLong(tagentsid), "每日签到");
-        } else {
-            return getErrReturnObject().setErrMsg("今日已签到!").toString();
-        }
-        return getSucReturnObject().setData("签到成功!").toString();
-    }
+
 
     /**
      * 获取本月签到记录

+ 0 - 13
src/dsb/com/cnd3b/restcontroller/system/system/docManage.java

@@ -2,7 +2,6 @@ package com.cnd3b.restcontroller.system.system;
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
-import com.cnd3b.common.actionscore.ActionScore;
 import com.cnd3b.common.data.Rows;
 import com.cnd3b.common.data.SQLFactory;
 import com.cnd3b.utility.Math;
@@ -670,18 +669,6 @@ public class docManage extends Controller {
             tattachment_downlog.setValue("tattachmentid", tattachmentid, 11L);
             tattachment_downlog.setValue("tenterprise_userid", userid, 11L);
             tattachment_downlogSet.save();
-
-            Rows rows = dbConnect.runSqlQuery("select *from tattachment where siteid='" + siteid + "' and tattachmentid='" + tattachmentid + "'");
-            if (!rows.isEmpty()) {
-                Row row = rows.get(0);
-                String ownertable = row.getString("ownertable");
-                String ownerid = row.getString("ownerid");
-                if ("tarchives".equalsIgnoreCase(ownertable)) {
-                    addActionScore(ActionScore.fsourcetype.下载营销智库, Long.parseLong(ownerid), "下载营销智库");
-                } else if ("tnotice".equalsIgnoreCase(ownertable)) {
-                    addActionScore(ActionScore.fsourcetype.下载通告附件, Long.parseLong(ownerid), "下载通告附件");
-                }
-            }
         } catch (Exception e) {
             e.printStackTrace();
         } finally {