Commit 94feeb9ab04c493acfe85c34f897cc3620bc9c87
1 parent
08fafd8a55
Exists in
master
and in
6 other branches
增加日志
Showing 1 changed file with 8 additions and 4 deletions
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
View file @
94feeb9
| ... | ... | @@ -12,6 +12,8 @@ |
| 12 | 12 | import com.lyms.platform.query.*; |
| 13 | 13 | import org.apache.commons.collections.CollectionUtils; |
| 14 | 14 | import org.apache.commons.lang.StringUtils; |
| 15 | +import org.slf4j.Logger; | |
| 16 | +import org.slf4j.LoggerFactory; | |
| 15 | 17 | import org.springframework.beans.factory.annotation.Autowired; |
| 16 | 18 | import org.springframework.data.domain.Sort; |
| 17 | 19 | import org.springframework.stereotype.Service; |
| ... | ... | @@ -24,7 +26,7 @@ |
| 24 | 26 | */ |
| 25 | 27 | @Service |
| 26 | 28 | public class PatientsService { |
| 27 | - | |
| 29 | + private Logger logger = LoggerFactory.getLogger("SIEVE-JOB"); | |
| 28 | 30 | @Autowired |
| 29 | 31 | private IPatientDao iPatientDao; |
| 30 | 32 | @Autowired |
| ... | ... | @@ -175,7 +177,7 @@ |
| 175 | 177 | List<Patients> patientses = iPatientDao.queryPatient(patientsQuery.convertToQuery()); |
| 176 | 178 | int batchSize = 200; |
| 177 | 179 | if (CollectionUtils.isNotEmpty(patientses)) { |
| 178 | - LogUtil.taskInfo("add sieve form patent job size:" + patientses.size()); | |
| 180 | + logger.info("add sieve form patent job size:" + patientses.size()); | |
| 179 | 181 | int end = 0; |
| 180 | 182 | List<Patients> patient; |
| 181 | 183 | for (int i = 0; i < patientses.size(); ) { |
| ... | ... | @@ -508,6 +510,7 @@ |
| 508 | 510 | } |
| 509 | 511 | |
| 510 | 512 | private class PatientWorker extends Thread { |
| 513 | + | |
| 511 | 514 | private List<Patients> patientses; |
| 512 | 515 | private long startTime; |
| 513 | 516 | |
| 514 | 517 | |
| ... | ... | @@ -518,13 +521,14 @@ |
| 518 | 521 | |
| 519 | 522 | @Override |
| 520 | 523 | public void run() { |
| 521 | - LogUtil.taskInfo("add sieve PatientWorker job :" + getName() + " start."); | |
| 524 | + logger.info("add sieve PatientWorker job :" + getName() + " start."); | |
| 522 | 525 | SieveQuery sieveQuery = new SieveQuery(); |
| 523 | 526 | sieveQuery.setYn(YnEnums.YES.getId()); |
| 524 | 527 | for (Patients patient : patientses) { |
| 525 | 528 | sieveQuery.setParentId(patient.getId()); |
| 526 | 529 | List<SieveModel> list = sieveDao.queryList(sieveQuery.convertToQuery()); |
| 527 | 530 | if (CollectionUtils.isEmpty(list)) { |
| 531 | + logger.info("find sieve empty parentid:"+patient.getId()); | |
| 528 | 532 | SieveModel sieveModel = convertToModel(patient); |
| 529 | 533 | sieveModel.setFrom("0"); |
| 530 | 534 | SieveApplyOrderQuery sieveApplyOrderQuery=new SieveApplyOrderQuery(); |
| ... | ... | @@ -546,7 +550,7 @@ |
| 546 | 550 | sieveDao.addChanQianSieve(sieveModel); |
| 547 | 551 | } |
| 548 | 552 | } |
| 549 | - LogUtil.taskInfo("add sieve PatientWorker job :" + getName() + " end.costTime :" + (System.currentTimeMillis() - startTime) + " ms."); | |
| 553 | + logger.info("add sieve PatientWorker job :" + getName() + " end.costTime :" + (System.currentTimeMillis() - startTime) + " ms."); | |
| 550 | 554 | } |
| 551 | 555 | } |
| 552 | 556 | } |