|
@ -21,16 +21,14 @@ import java.util.*;
|
|
|
*/
|
|
|
public class PatientDiseaseToLabel implements Runnable {
|
|
|
|
|
|
long start = 0;
|
|
|
long end = 0;
|
|
|
long start = 1;
|
|
|
|
|
|
PatientDiseaseDao diseaseDao;
|
|
|
SignPatientLabelInfoDao labelInfoDao;
|
|
|
JpaTransactionManager transactionManager;
|
|
|
|
|
|
public PatientDiseaseToLabel(Long start, Long end) {
|
|
|
public PatientDiseaseToLabel(Long start) {
|
|
|
this.start = start;
|
|
|
this.end = end;
|
|
|
this.diseaseDao = Application.ctx.getBean(PatientDiseaseDao.class);
|
|
|
this.labelInfoDao = Application.ctx.getBean(SignPatientLabelInfoDao.class);
|
|
|
this.transactionManager = Application.ctx.getBean(JpaTransactionManager.class);
|
|
@ -43,7 +41,7 @@ public class PatientDiseaseToLabel implements Runnable {
|
|
|
while (flag) {
|
|
|
|
|
|
PageRequest pageRequest = new PageRequest(0, 500);
|
|
|
Page<PatientDisease> diseases = diseaseDao.findByIdRange(start,end,pageRequest);
|
|
|
Page<PatientDisease> diseases = diseaseDao.findByIdRange(start,pageRequest);
|
|
|
|
|
|
if (diseases != null && diseases.getContent().size() < 500) {
|
|
|
flag = false;
|