| | |
| | | package com.fzzy.protocol.fzzy.server; |
| | | |
| | | import com.fzzy.api.utils.ContextUtil; |
| | | import com.fzzy.gateway.data.BaseReqData; |
| | | import com.fzzy.gateway.data.BaseResp; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | |
| | | public class ServerUtils { |
| | | |
| | | private static Map<String, Integer> contextOrder = new HashMap<>(); |
| | | |
| | | /** |
| | | * 请求缓存 key = deviceId,value = requData |
| | | */ |
| | | private static Map<String, BaseReqData> contextSyncReqMap = new HashMap<>(); |
| | | |
| | | /** |
| | | * 将执行命令信息存放在缓存 |
| | | * |
| | | * @param depotId 仓库编码 |
| | | * @param reqData 请求参数信息 |
| | | */ |
| | | public static void addSyncReq2Map(String depotId, BaseReqData reqData) { |
| | | contextSyncReqMap.put(depotId, reqData); |
| | | } |
| | | |
| | | public static BaseReqData getSyncReq(String depotId) { |
| | | return contextSyncReqMap.get(depotId); |
| | | } |
| | | |
| | | |
| | | public static final String MSG_BEGIN = "<FZZY>"; |
| | |
| | | regDepotId = regDepotId.substring(regDepotId.length() - 4); |
| | | } |
| | | |
| | | return Integer.valueOf(regDepotId)+""; |
| | | return Integer.valueOf(regDepotId) + ""; |
| | | } |
| | | } |