lifang 1 ماه پیش
والد
کامیت
570eba47b2

+ 2 - 1
nb-service/web-service/src/main/java/com/nb/web/service/bus/service/LocalBusPatientService.java

@@ -635,7 +635,8 @@ public class LocalBusPatientService extends BaseService<BusPatientMapper, BusPat
 
     public BusPatientEntity findByOriginCode(String patientCode, String tenantId) {
         return this.getOne(new QueryWrapper<BusPatientEntity>().lambda().eq(BusPatientEntity::getOriginCode, patientCode)
-                .eq(StrUtil.isNotBlank(tenantId), BusPatientEntity::getTenantId, tenantId));
+                .eq(StrUtil.isNotBlank(tenantId), BusPatientEntity::getTenantId, tenantId)
+                .last("limit 1"));
     }
 
     @Override