| | |
| | | public enum RedisKeyType { |
| | | |
| | | QUEUE_TASK("queue_task_"), |
| | | IN_TASK_LOCK("in_task_lock"), |
| | | IN_TASK_LOCK("in_task_lock_"), |
| | | ; |
| | | |
| | | public String key; |
| | |
| | | requestParam.put("wcsStatus", 0);//成功 |
| | | } |
| | | |
| | | String response = ""; |
| | | String response = "None"; |
| | | Boolean success = false; |
| | | try { |
| | | Object object = redisUtil.get(RedisKeyType.IN_TASK_LOCK.key); |
| | | Object object = redisUtil.get(RedisKeyType.IN_TASK_LOCK.key + inSta.getStaNo()); |
| | | if(object != null) { |
| | | continue; |
| | | } |
| | |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | redisUtil.set(RedisKeyType.IN_TASK_LOCK.key, "lock", 5); |
| | | redisUtil.set(RedisKeyType.IN_TASK_LOCK.key + inSta.getStaNo(), "lock", 5); |
| | | if (jsonObject.getInteger("code") == 200) { |
| | | |
| | | } else if (jsonObject.getInteger("code") == 500) { |