1.public static String getUserId(Context ctx) {
        UserInfo userInfo = ContextUtil.getCurrentUserInfo(ctx);
        String userId = (userInfo != null) ? userInfo.getId().toString()
                : (String) ctx.get("userID");
        return userId;
    }

重点关注ContextUtil

2.重点关注HRManagerUtil

public static String getLocal(Context ctx) {String local = (ctx.getLocale() != null) ? ctx.getLocale().toString(): "l2";return local;}

-----

参考HREmpFacadeControllerBean中的getEmpTopicStructure

public static String rate(double d1, double d2) {
        if (d2 != 0.0D) {
            BigDecimal b1 = new BigDecimal(d1);
            BigDecimal b2 = new BigDecimal(d2);
            double result = b1.divide(b2, 4, 4).doubleValue();
            return round(mul(result, 100.0D), 2) + "%";
        }
        return "0%";
    }

    public static void getPercent(List<Map> list, int headcount) {
        getPercent(list, headcount, "count");
    }

    public static void getPercent(List<Map> list, int headcount,
            String calculateName) {
        int i = 0;
        for (int size = list.size(); i < size; ++i) {
            Map map = (Map) list.get(i);
            int count = ((Integer) map.get(calculateName)).intValue();
            String percent = rate(count, headcount);
            map.put("percent", percent);
        }
    }

阅读即可

------

3.临时表名

public static String getTempTableName(Context ctx) throws Exception {
        TempTablePool pool = TempTablePool.getInstance(ctx);
        String tempTableName = pool.createTempTableName();
        return tempTableName;
    }

Context ctx=ContextUtils.getConextfromSession()

动态列表设置:select * from t_bd_dynamiclistsetting

视图配置的表 select * from s_bs_uiview

最新文章

  1. python限定类属性的类属性:__slots__
  2. C#传递参数
  3. windows 下rabbitmq 安装---转载
  4. shell获取系统时间
  5. Coursera课程 Programming Languages, Part B 总结
  6. 小白的Python之路 day5 logging模块
  7. 如何使用 libqr 库生成二维码?
  8. 常见爬虫/BOT对抗技术介绍(一)
  9. LeetCode - 503. Next Greater Element II
  10. python之类与类之间的关系
  11. 安装fastdfs文件系统
  12. 20155325 Exp4 恶意代码分析
  13. [转]uboot中SPI Flash Booting配置
  14. android 使用lint + studio ,排查客户端无用string,drawable,layout资源
  15. html和css入门 (二)
  16. Machine Learning In Action
  17. Go的接口总结
  18. kotlin语法
  19. HDU 1029 Ignatius and the Princess IV (map的使用)
  20. ab工具测试 swoole 和 ngixn+php-fpm 的并发对比

热门文章

  1. Node.js躬行记(26)——接口拦截和页面回放实验
  2. [论文总结] kmeans聚类和WGCNA
  3. 为测试管理正名,华为云CodeArts TestPlan的守护之道
  4. Java基础篇——常用类
  5. Java学习笔记:2022年1月7日
  6. P7914 [CSP-S 2021] 括号序列
  7. 题解 CF1579G Minimal Coverage
  8. Java入门与进阶P-4.3+P-4.4
  9. 定时调度插件------FluentScheduler
  10. Google Guice 用户指南 - Ⅰ:概览