|
|
@@ -49,6 +49,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
|
|
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
import java.util.Collections;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Optional;
|
|
|
import java.util.concurrent.CompletableFuture;
|
|
|
@@ -69,6 +70,7 @@ public class LocalBusHospitalService extends BaseService<BusHospitalMapper, BusH
|
|
|
|
|
|
private ConfigStorage nameCache;
|
|
|
|
|
|
+ private HashMap<String,String> codeMap=new HashMap<>();
|
|
|
@Autowired
|
|
|
@Lazy
|
|
|
private LocalBusConMixService conMixService;
|
|
|
@@ -256,7 +258,7 @@ public class LocalBusHospitalService extends BaseService<BusHospitalMapper, BusH
|
|
|
this.baseMapper.updateById(entity);
|
|
|
});
|
|
|
configService.saveDefaultConfig();
|
|
|
- list.parallelStream().forEach(hospital-> hospitalManagerRegister.refresh(hospital.getId(),true,true,true,true));
|
|
|
+// list.parallelStream().forEach(hospital-> hospitalManagerRegister.refresh(hospital.getId(),true,true,true,true));
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -343,6 +345,13 @@ public class LocalBusHospitalService extends BaseService<BusHospitalMapper, BusH
|
|
|
|
|
|
@Override
|
|
|
public String selectHospitalCode(String id) {
|
|
|
- return getName(id);
|
|
|
+ return codeMap.computeIfAbsent(id,k->{
|
|
|
+ BusHospitalEntity busHospitalEntity = hospitalMapper.selectById(id);
|
|
|
+ if(busHospitalEntity==null){
|
|
|
+ return "";
|
|
|
+ }else {
|
|
|
+ return busHospitalEntity.getCode();
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
}
|