| | |
| | | public static Map<String, String> contextUserDept = new HashMap<>(); |
| | | |
| | | /** |
| | | * 全局用于存放SN与组织编码的关系,例如分机SN和组织编码关系 |
| | | */ |
| | | public static Map<String, String> contextSnCompanyIdMap = new HashMap<>(); |
| | | |
| | | /** |
| | | * 生成顺序ID:年月日时分秒毫秒(17位) + 序列号(4位) = 21位 |
| | | * |
| | | * @return |
| | |
| | | } |
| | | return orderId; |
| | | } |
| | | |
| | | /** |
| | | * 存放SN与所属组织的关系 |
| | | * |
| | | * @param sn |
| | | * @param companyId |
| | | */ |
| | | public static void addSerCompany(String sn, String companyId) { |
| | | contextSnCompanyIdMap.put(sn, companyId); |
| | | } |
| | | |
| | | /** |
| | | * 通过SN获取当前SN所属的组织 |
| | | * |
| | | * @param sn |
| | | * @return |
| | | */ |
| | | public static String getCompanyIdBySn(String sn) { |
| | | return contextSnCompanyIdMap.get(sn); |
| | | } |
| | | } |