Commit c7f87338 authored by 赵啸非's avatar 赵啸非

添加服务追踪

parent 84046cb8
......@@ -99,7 +99,7 @@ public class SyncAppointmentPersonTaskImpl implements ITaskExcuteService {
if (restTotal.getCode() == YesNoEnum.YES.getValue()) {
//同步今天预约用户
List<AppointmentDataItem> appointUserList = restTotal.getData().getData();
log.info("预约用户总数量:{}", appointUserList.size());
log.info("预约用户总数量:{},{}", appointUserList.size(), JSON.toJSONString(appointUserList));
if (!ObjectUtils.isEmpty(appointUserList)) {
//查询今天添加的预约 并删除
AppointmentPersonQuery appointmentPersonQuery = new AppointmentPersonQuery();
......@@ -110,8 +110,13 @@ public class SyncAppointmentPersonTaskImpl implements ITaskExcuteService {
appointmentPersonService.remove(ids, null);
}
List<AppointmentPersonEntity> newUserList = appointUserList.stream().map(user -> {
if (!ObjectUtils.isEmpty(user.getIdcardIDCardNo())) {
log.info("idCard is null . entity:{}", JSON.toJSONString(user));
return null;
}
AppointmentPersonEntity appointmentPersonEntity = new AppointmentPersonEntity();
appointmentPersonEntity.initAttrValue();
PersonEntity personCache = personService.getExtCache(user.getIdcardIDCardNo());
appointmentPersonEntity.setPersonId(personCache == null ? -1 : personCache.getId());
appointmentPersonEntity.setName(personCache == null ? "" : personCache.getName());
......@@ -127,7 +132,7 @@ public class SyncAppointmentPersonTaskImpl implements ITaskExcuteService {
appointmentPersonEntity.setCreateUserName("系统管理员");
appointmentPersonEntity.setCreateTime(new Date());
return appointmentPersonEntity;
}).collect(Collectors.toList());
}).filter(f -> f != null).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(newUserList)) {
log.info("预约用户新增,size:{}", newUserList.size());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment