| | |
| | | private CoreCommonService commonService; |
| | | |
| | | private static final String KEY_API_PHONE_TOKEN = "KEY_API_PHONE_TOKEN"; |
| | | |
| | | /** |
| | | * 创建缓存Key |
| | | * |
| | | * @param token |
| | | * @return |
| | | */ |
| | | public static String createKey(String token){ |
| | | public static String createKey(String token) { |
| | | return Constant.APP_NAME + ":" + KEY_API_PHONE_TOKEN + ":" + token; |
| | | } |
| | | |
| | | /** |
| | | * 获取出入库流程名称 |
| | | * |
| | | * @param companyId |
| | | * @param progress |
| | | * @return |
| | | */ |
| | | public String getProgressName(String companyId,String progress){ |
| | | public String getProgressName(String companyId, String progress) { |
| | | List<DicTrigger> list = triggerService.getCacheDicByParent( |
| | | companyId, "PROCESS_STATUS_"); |
| | | String progressName = ""; |
| | | for (DicTrigger dicTrigger : list) { |
| | | if(dicTrigger.getCode().equals(progress)){ |
| | | if (dicTrigger.getCode().equals(progress)) { |
| | | progressName = dicTrigger.getName(); |
| | | break; |
| | | } |
| | |
| | | |
| | | /** |
| | | * 获取仓库名称 |
| | | * |
| | | * @param companyId |
| | | * @param depotId |
| | | * @return |
| | | */ |
| | | public String getDepotName(String companyId,String depotId){ |
| | | public String getDepotName(String companyId, String depotId) { |
| | | List<Depot> depotList = commonService.getCacheDepotList(companyId); |
| | | String depotName = ""; |
| | | if(depotList != null && depotList.size() > 0){ |
| | | if (depotList != null && depotList.size() > 0) { |
| | | for (Depot depot : depotList) { |
| | | if(depot.getId().equals(depotId)){ |
| | | if (depot.getId().equals(depotId)) { |
| | | depotName = depot.getName(); |
| | | break; |
| | | } |
| | |
| | | } |
| | | return depotName; |
| | | } |
| | | |
| | | /** |
| | | * 获取指定仓库的信息 |
| | | * |
| | | * @param companyId |
| | | * @param depotId |
| | | * @return |
| | | */ |
| | | public Depot getDepot(String companyId, String depotId) { |
| | | List<Depot> depotList = commonService.getCacheDepotList(companyId); |
| | | Depot depots = new Depot(); |
| | | if (depotList != null && depotList.size() > 0) { |
| | | for (Depot depot : depotList) { |
| | | if (depot.getId().equals(depotId)) { |
| | | depots = depot; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | return depots; |
| | | } |
| | | } |