merge:编码生成通过HTTP调用、下发任务时去掉1S的睡眠时间

This commit is contained in:
zhouz
2025-12-03 16:53:26 +08:00
parent 7d675af65c
commit 50cfe783e4
2 changed files with 5 additions and 9 deletions

View File

@@ -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("系统繁忙,稍后在试!");
} }

View File

@@ -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));