merge:编码生成通过HTTP调用、下发任务时去掉1S的睡眠时间
This commit is contained in:
@@ -26,10 +26,11 @@ public class CodeUtil {
|
|||||||
try {
|
try {
|
||||||
if (tryLock) {
|
if (tryLock) {
|
||||||
String flag = "1";
|
String flag = "1";
|
||||||
HashMap<String, String> map = new HashMap<>();
|
String code = HttpUtil.get("http://127.0.0.1:8013/api/codeDetail/getNewCode?code=" + ruleCode + "&flag=" + flag);
|
||||||
map.put("flag", flag);
|
if (code.contains("status")){
|
||||||
map.put("code", ruleCode);
|
throw new BadRequestException(code);
|
||||||
return SpringContextHolder.getBean(ISysCodeRuleService.class).codeDemo(map);
|
}
|
||||||
|
return code;
|
||||||
} else {
|
} else {
|
||||||
throw new BadRequestException("系统繁忙,稍后在试!");
|
throw new BadRequestException("系统繁忙,稍后在试!");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,11 +126,6 @@ public abstract class AbstractAcsTask {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public JSONObject immediateNotifyAcs(String task_id) {
|
public JSONObject immediateNotifyAcs(String task_id) {
|
||||||
try {
|
|
||||||
Thread.sleep(1000);
|
|
||||||
}catch (Exception ex){
|
|
||||||
|
|
||||||
}
|
|
||||||
List<AcsTaskDto> taskList = this.schedule();
|
List<AcsTaskDto> taskList = this.schedule();
|
||||||
if (ObjectUtil.isNotEmpty(taskList)) {
|
if (ObjectUtil.isNotEmpty(taskList)) {
|
||||||
JSONArray arr = JSONArray.parseArray(JSON.toJSONString(taskList));
|
JSONArray arr = JSONArray.parseArray(JSON.toJSONString(taskList));
|
||||||
|
|||||||
Reference in New Issue
Block a user