质控时间改为yml配置

3.2.4.44
宇宙皮皮娃 2 years ago
parent 17f903fdc8
commit 7ef833ddbd

@ -29,6 +29,7 @@ import com.docus.server.report.util.XmlUtil;
import com.docus.server.report.validate.CollectTaskValidation;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.w3c.dom.Node;
@ -72,6 +73,8 @@ public class ReportJob {
private ShunDePeopleBusinessService shunDePeopleBusinessService;
@Resource
RedisOps redisOps;
@Value("${docus.report.waittime}")
private int waittime;
/**
*
@ -272,7 +275,7 @@ public class ReportJob {
log.info("住院号:{},住院次数{},护理采集文件: {} 条", inpatientNo, admissTimes, collectFileCount);
// 设置一个redisKey,过期被监听处理
String redisKey = String.format(ReportDownloadWait.REPORT_DOWNLOAD_WAIT_KEY, reportQueryNurseInsertSugarCollectorId, patientId);
redisOps.setEx(redisKey, "0", ReportDownloadWait.REPORT_DOWNLOAD_WAIT_TIME);
redisOps.setEx(redisKey, "0", waittime*60);
}
}

@ -19,6 +19,7 @@ import com.docus.server.report.mapper.AfScanAssortMapper;
import com.docus.server.report.service.ShunDePeopleBusinessService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
@ -132,11 +133,13 @@ public class NisReportDownloadWaitHandler extends RedisKeyExpirationHandler {
}
}
@Value("${docus.report.waittime}")
private int waittime;
@Override
public void handleException(String expireRedisKey) {
// 异常主键重新推送
redisOps.setEx(expireRedisKey, "0", ReportDownloadWait.REPORT_DOWNLOAD_WAIT_TIME);
redisOps.setEx(expireRedisKey, "0", waittime*60);
}
/**

@ -102,6 +102,8 @@ docus:
defpwd: fd29cd53ec12616e5f36b77d4afffbff
report:
downurl: http://localhost:9291/api/downplatform/report
# 质控时间,分钟
waittime: 30
task:
getTaskUrl: http://localhost:9296/api/noviewtask/GetTask
taskCancelUrl: http://localhost:9296/api/collector/task/cancel

Loading…
Cancel
Save