何为数据字典?数据字典就是管理系统常用的分类数据或者一些固定数据,例如:省市区三级联动数据、民族数据、行业数据、学历数据等,由于该系统大量使用这种数据,所以我们要做一个数据管理方便管理系统数据,一般系统基本都会做数据管理。
service下创建service_cmn模块,将dict表逆向工程,配置分页以及swagger
数据库字典分析
parent_id:
上级id,通过id与parent_id构建上下级关系,例如:我们要获取所有行业数据,那么只需要查询parent_id=20000的数据
name:名称,例如:填写用户信息,我们要select标签选择民族,“汉族”就是数据字典的名称
value:值,例如:填写用户信息,我们要select标签选择民族,“1”(汉族的标识)就是数据字典的值
dict_code:编码,编码是我们自定义的,全局唯一,例如:我们要获取行业数据,我们可以通过parent_id获取,但是parent_id是不确定的,所以我们可以根据编码来获取行业数据
假如要获取民族的数据,dict_code = “民族”
element ui 树形表格数据
二、数据字典
这里只写service 实现类
@Service
public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> implements DictService {
@Autowired
private DictMapper dictMapper;
//根据数据id查询子数据列表
@Override
@Cacheable(value = "dict",keyGenerator = "keyGenerator") //添加缓存
public List<Dict> findChildData(Long id) {
QueryWrapper<Dict> wrapper = new QueryWrapper<>();
wrapper.eq("parent_id", id);
List<Dict> dictList = baseMapper.selectList(wrapper);
//向list每个dict对象中设置hasChildren值
for (Dict dict : dictList) {
Long dictId = dict.getId();
boolean ischild = this.ischildren(dictId);
dict.setHasChildren(ischild);
}
return dictList;
}
//判断id下面是否有子节点
private boolean ischildren(Long id) {
QueryWrapper<Dict> wrapper = new QueryWrapper<>();
wrapper.eq("parent_id", id);
Integer count = baseMapper.selectCount(wrapper);
return count > 0;
}
//导出数据字典接口
@Override
public void exportDictData(HttpServletResponse response) {
//设置下载信息
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf-8");
String fileName = "dict";
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
//查询数据库
List<Dict> dictList = baseMapper.selectList(null);
//把Dict对象转换成DictEeVo对象
List<DictEeVo> dictVoList = new ArrayList<>(dictList.size());
for(Dict dict :dictList){
DictEeVo dictEeVo = new DictEeVo();
BeanUtils.copyProperties(dict,dictEeVo);
dictVoList.add(dictEeVo);
}
//调用方法进行写操作
try {
EasyExcel.write(response.getOutputStream(), DictEeVo.class)
.sheet("dict")
.doWrite(dictVoList);
} catch (IOException e) {
e.printStackTrace();
}
}
//导入数据字典
@Override
@CacheEvict(value = "dict", allEntries=true) //表示清空缓存中的所有内容
public void importDictData(MultipartFile file) {
try {
EasyExcel.read(file.getInputStream(),DictEeVo.class,new DictListener(dictMapper))
.sheet().doRead();
} catch (IOException e) {
e.printStackTrace();
}
}
//查询名称
@Override
public String getDictName(String dictCode, String value) {
//如果dictCode为空,直接根据value查询
if(StringUtils.isEmpty(dictCode)){
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("value",value);
Dict dict = dictMapper.selectOne(queryWrapper);
return dict.getName();
}else{//如果dictCode不为空,根据dictCode和value查询
//根据dictcode查询dict对象,目的是得到dict的id值,在根据此id值查询此id下的子id
QueryWrapper<Dict> queryWrapper1 = new QueryWrapper();
queryWrapper1.eq("dict_code",dictCode);
Dict codeDict = dictMapper.selectOne(queryWrapper1);
Long parent_id = codeDict.getId();
//根据parentId和value值进行查询
QueryWrapper<Dict> queryWrapper2 = new QueryWrapper();
queryWrapper2.eq("parent_id",parent_id).eq("value",value);
Dict finalDict = baseMapper.selectOne(queryWrapper2);
return finalDict.getName();
}
}
//根据dictcode查询查询子节点
@Override
public List<Dict> findByDictCode(String dictCode) {
//根据dictcode获取对应的id
QueryWrapper<Dict> queryWrapper1 = new QueryWrapper();
queryWrapper1.eq("dict_code",dictCode);
Dict codeDict = dictMapper.selectOne(queryWrapper1);
//根据id获取子节点
List<Dict> childData = this.findChildData(codeDict.getId());
return childData;
}
Spring Cache 是一个非常优秀的缓存组件。自Spring 3.1起,提供了类似于@Transactional注解事务的注解Cache支持,且提供了Cache抽象,方便切换各种底层Cache(如:redis)
使用Spring Cache的好处:
1,提供基本的Cache抽象,方便切换各种底层Cache;
2,通过注解Cache可以实现类似于事务一样,缓存逻辑透明的应用到我们的业务代码上,且只需要更少的代码就可以完成;
3,提供事务回滚时也自动回滚缓存;
4,支持比较复杂的缓存逻辑;
service_util配置redis
package com.atguigu.yygh.common.config;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.interceptor.KeyGenerator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.cache.RedisCacheConfiguration;
import org.springframework.data.redis.cache.RedisCacheManager;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.RedisSerializationContext;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import java.lang.reflect.Method;
import java.time.Duration;
/**
* @author wangyihui
* @create 2021-04-25 15:40
*/
@Configuration
@EnableCaching // 开启缓存处理
public class RedisConfig {
private RedisCacheManager build;
/**
* 自定义key规则
*
* @return
*/
@Bean
public KeyGenerator keyGenerator() {
return new KeyGenerator() {
@Override
public Object generate(Object target, Method method, Object... params) {
StringBuilder sb = new StringBuilder();
sb.append(target.getClass().getName());
sb.append(method.getName());
for (Object obj : params) {
sb.append(obj.toString());
}
return sb.toString();
}
};
}
/**
* 设置RedisTemplate规则
*
* @param redisConnectionFactory
* @return
*/
@Bean
public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory redisConnectionFactory) {
RedisTemplate<Object, Object> redisTemplate = new RedisTemplate<>();
redisTemplate.setConnectionFactory(redisConnectionFactory);
Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class);
//解决查询缓存转换异常的问题
ObjectMapper om = new ObjectMapper();
// 指定要序列化的域,field,get和set,以及修饰符范围,ANY是都有包括private和public
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
// 指定序列化输入的类型,类必须是非final修饰的,final修饰的类,比如String,Integer等会跑出异常
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
jackson2JsonRedisSerializer.setObjectMapper(om);
//序列号key value
redisTemplate.setKeySerializer(new StringRedisSerializer());
redisTemplate.setValueSerializer(jackson2JsonRedisSerializer);
redisTemplate.setHashKeySerializer(new StringRedisSerializer());
redisTemplate.setHashValueSerializer(jackson2JsonRedisSerializer);
redisTemplate.afterPropertiesSet();
return redisTemplate;
}
/**
* 设置CacheManager缓存规则
*
* @param factory
* @return
*/
@Bean
public CacheManager cacheManager(RedisConnectionFactory factory) {
RedisSerializer<String> redisSerializer = new StringRedisSerializer();
Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class);
//解决查询缓存转换异常的问题
ObjectMapper om = new ObjectMapper();
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
jackson2JsonRedisSerializer.setObjectMapper(om);
// 配置序列化(解决乱码的问题),过期时间600秒
RedisCacheConfiguration config = RedisCacheConfiguration.defaultCacheConfig()
.entryTtl(Duration.ofSeconds(600))
.serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(redisSerializer))
.serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(jackson2JsonRedisSerializer))
.disableCachingNullValues();
RedisCacheManager cacheManager = RedisCacheManager.builder(factory)
.cacheDefaults(config)
.build();
return cacheManager;
}
}
Spring Cache相当于自动缓存,对于redis需要用RedisTemplate不需要手动set,get
常用注解
根据方法对其返回结果进行缓存,下次请求时,如果缓存存在,则直接读取缓存数据返回;如果缓存不存在,则执行方法,并把返回的结果存入缓存中。一般用在查询方法上。
使用该注解标志的方法,每次都会执行,并将结果存入指定的缓存中。其他方法可以直接从响应的缓存中读取缓存数据,而不需要再去查询数据库。一般用在新增方法上。
使用该注解标志的方法,会清空指定的缓存。
1、对于redis的缓存,springcache只支持String,其它的Hash、List、Set、Zset都不支持,所以对于Hash、List、Set、Zset只能用RedisTemplate
2、Spring cache 只支持单表的数据缓存,Redis支持多表的数据缓存
docker安装mongodb 这里不要配置用用户密码使用mongo
直接原生启动容器
docker run -d --restart=always -p 27017:27017 --name mymongo -v /data/db:/data/db -d mongo
配置mongodb连接,你的mongodb数据库没有yygh_hosp也可以配置连接
#mongodb
spring.data.mongodb.uri=mongodb://47.108.170.87:27017/yygh_hosp
**注意:**这里尽量别使用需要密码验证才能使用mongoDb数据库,不然你远程配置连接贼鸡儿烦
mongodb用来存储医院相关的数据信息
这里要自定义三个MongoDb的dao层,分别对应医院、科室、排版
@Repository
public interface HospitalRepository extends MongoRepository<Hospital,String> {
//判断是否存在数据
Hospital getHospitalByHoscode(String hoscode); //MongoRepository有一套规范,直接按照规范命名,会直接调用写好的方法
//根据医院名称查询
List<Hospital> findHospitalByHosnameLike(String hosname);
}
import com.wang.yygh.model.hosp.Department;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;
/**
* @author wangyihui
* @create 2021-11-11 10:03
*/
@Repository
public interface DepartmentRepository extends MongoRepository<Department,String> {
Department getDepartmentByHoscodeAndDepcode(String hoscode, String depcode);
}
import com.wang.yygh.model.hosp.Schedule;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;
import java.util.Date;
import java.util.List;
/**
* @author wangyihui
* @create 2021-11-11 15:51
*/
@Repository
public interface ScheduleRepository extends MongoRepository<Schedule,String> {
//根据医院编号和排班编号进行查询
Schedule getScheduleByHoscodeAndHosScheduleId(String hoscode, String hosScheduleId);
//根据医院编号、科室编号和工作日期,查询排班详情信息
List<Schedule> findScheduleByHoscodeAndDepcodeAndWorkDate(String hoscode, String depcode, Date toDate);
}
service impl
@Service
public class HospitalSevriceImpl implements HospitalService {
@Autowired
private HospitalRepository hospitalRepository;
@Autowired
private DictFeignClient dictFeignClient;
@Override
public void save(Map<String, Object> parapMap) {
//把参数的map集合转换成对象Hospital,方便操作
String mapString = JSONObject.toJSONString(parapMap); //先把map转换成字符串
Hospital hospital = JSONObject.parseObject(mapString, Hospital.class); // 把字符串转换成Hospital对象
//判断是否存在相同数据
String hoscode = hospital.getHoscode();
Hospital hospitalExist = hospitalRepository.getHospitalByHoscode(hoscode);
//如果存在,进行修改
if(hospitalExist != null){
hospital.setStatus(hospitalExist.getStatus());
hospital.setCreateTime(hospitalExist.getCreateTime());
hospital.setUpdateTime(new Date());
hospital.setIsDeleted(0);
hospitalRepository.save(hospital);
}else{
//如果不存在,进行添加
hospital.setStatus(0);
hospital.setCreateTime(new Date());
hospital.setUpdateTime(new Date());
hospital.setIsDeleted(0);
hospitalRepository.save(hospital);
}
}
//实现根据医院编号查询
@Override
public Hospital getByHoscode(String hoscode) {
Hospital hospital = hospitalRepository.getHospitalByHoscode(hoscode);
return hospital;
}
//医院列表(条件查询分页)
@Override
public Page<Hospital> selectHospPage(Integer page, Integer limit, HospitalQueryVo hospitalQueryVo) {
//创建pageable对象
Pageable pageable = PageRequest.of(page - 1,limit);
//创建条件匹配器
ExampleMatcher matcher = ExampleMatcher.matching()
.withStringMatcher(ExampleMatcher.StringMatcher.CONTAINING)
.withIgnoreCase(true);
//hospitalSetQueryVo转换成hospital对象
Hospital hospital = new Hospital();
BeanUtils.copyProperties(hospitalQueryVo,hospital);
//创建Example对象
Example<Hospital> example = Example.of(hospital,matcher);
//调用方法实现查询
Page<Hospital> pages = hospitalRepository.findAll(example, pageable);
//查询到所有医院集合并遍历,然后获取到医院等级信息
//采用流的方式
pages.getContent().stream().forEach(item -> {
this.setHospitalHosType(item);
});
return pages;
}
//更新医院的上线状态
@Override
public void updateStatus(String id, Integer status) {
//根据id查询医院信息
Hospital hospital = hospitalRepository.findById(id).get();
hospital.setStatus(status);
hospital.setUpdateTime(new Date());
hospitalRepository.save(hospital);
}
//查询医院详情
@Override
public Map<String, Object> getHospById(String id) {
Map<String, Object> result = new HashMap<>();
//根据id查询医院信息并将等级信息也封装进去
Hospital hospital = this.setHospitalHosType(hospitalRepository.findById(id).get());
result.put("hospital",hospital);
//单独处理更直观
result.put("bookingRule", hospital.getBookingRule());
//不需要重复返回
hospital.setBookingRule(null);
return result;
}
//获取医院名称
@Override
public String getHospName(String hoscode) {
Hospital hospital = hospitalRepository.getHospitalByHoscode(hoscode);
if(hospital != null){
return hospital.getHosname();
}
return null;
}
//根据医院名称查询
@Override
public List<Hospital> findByHosname(String hosname) {
List<Hospital> list = hospitalRepository.findHospitalByHosnameLike(hosname);
return list;
}
//根据医院编号获取预约挂号详情
@Override
public Map<String, Object> item(String hoscode) {
Map<String, Object> result = new HashMap<>();
//医院详情
Hospital hospital = this.setHospitalHosType(this.getByHoscode(hoscode));
result.put("hospital", hospital);
//预约规则
result.put("bookingRule", hospital.getBookingRule());
//不需要重复返回
hospital.setBookingRule(null);
return result;
}
//获取查询到的医院集合,遍历进行医院等级封装
private Hospital setHospitalHosType(Hospital hospital) {
//根据dictCode和value获取医院等级名称
String hostypeString = dictFeignClient.getName("Hostype", hospital.getHostype());
//查询省,市,地区
String provinceString = dictFeignClient.getName(hospital.getProvinceCode());
String cityString = dictFeignClient.getName(hospital.getCityCode());
String districtString = dictFeignClient.getName(hospital.getDistrictCode());
hospital.getParam().put("hostypeString",hostypeString);
hospital.getParam().put("fullAddress",provinceString + cityString + districtString);
return hospital;
}
}
@Service
public class DepartmentServiceImpl implements DepartmentService {
@Autowired
private DepartmentRepository departmentRepository;
//上传科室接口
@Override
public void save(Map<String, Object> parampMap) {
//parampMap转换成Department对象
String parampMapString = JSONObject.toJSONString(parampMap);
Department department = JSONObject.parseObject(parampMapString, Department.class);
//根据医院编号和科室信息进行查询
Department departmentExist = departmentRepository
.getDepartmentByHoscodeAndDepcode(department.getHoscode(),department.getDepcode()); //取名采取spring DATA规范
//判断科室是否存在
if(departmentExist != null){
//如果存在,做更改
departmentExist.setUpdateTime(new Date());
departmentExist.setIsDeleted(0);
departmentRepository.save(departmentExist);
}else{
department.setCreateTime(new Date());
department.setUpdateTime(new Date());
department.setIsDeleted(0);
departmentRepository.save(department);
}
}
//查询科室
@Override
public Page<Department> finPageDepartment(int page, int limit, DepartmentQueryVo departmentQueryVo) {
//MongoRepository开发CRUD
//创建Pageble对象,里面设置当前页和每页记录数
Pageable pageable = PageRequest.of(page - 1,limit); // 当前页从0开始,但是我们从1开始传的
//将departmentQueryVo对象转换为department对象
Department department = new Department();
BeanUtils.copyProperties(departmentQueryVo,department);
department.setIsDeleted(0);
//创建Example对象
ExampleMatcher matcher = ExampleMatcher.matching()
.withStringMatcher(ExampleMatcher.StringMatcher.CONTAINING)
.withIgnoreCase(true);
Example<Department> example = Example.of(department,matcher);
Page<Department> all = departmentRepository.findAll(example,pageable);
return all;
}
//删除科室
@Override
public void remove(String hoscode, String depcode) {
//根据医院编号和科室编号查询科室信息
Department department = departmentRepository.getDepartmentByHoscodeAndDepcode(hoscode, depcode);
if(depcode != null){
//删除
departmentRepository.deleteById(department.getId());
}
}
//根据医院编号,查询所有科室列表
@Override
public List<DepartmentVo> findDepTree(String hoscode) {
//创建List集合,用于最终数据封装
List<DepartmentVo> result = new ArrayList<>();
//根据医院编号,查询所有科室信息
Department departmentQuery = new Department();
departmentQuery.setHoscode(hoscode);
Example<Department> example = Example.of(departmentQuery);
//所有科室列表信息
List<Department> departmentList = departmentRepository.findAll(example);
//根据大科室编号bigcode进行分组,获取每个大科室里面的下级子科室
Map<String, List<Department>> departmentMap =
departmentList.stream().collect(Collectors.groupingBy(Department::getBigcode));
//遍历map集合
for(Map.Entry<String,List<Department>> entry : departmentMap.entrySet()){
//大科室编号
String bigcode = entry.getKey();
//大科室编号对应的全部数据
List<Department> department1List = entry.getValue();
//封装大科室
DepartmentVo departmentVo1 = new DepartmentVo();
departmentVo1.setDepcode(bigcode);
departmentVo1.setDepname(department1List.get(0).getBigname());
//封装小科室
List<DepartmentVo> children = new ArrayList<>();
for(Department department : department1List){
DepartmentVo departmentVo2 = new DepartmentVo();
departmentVo2.setDepcode(department.getDepcode());
departmentVo2.setDepname(department.getDepname());
//封装到List集合
children.add(departmentVo2);
}
//把小科室list集合放到大科室children里面
departmentVo1.setChildren(children);
//放到最终result里面
result.add(departmentVo1);
}
return result;
}
//根据医院编号和科室编号查询科室名称
@Override
public String getDepName(String hoscode, String depcode) {
Department department = departmentRepository.getDepartmentByHoscodeAndDepcode(hoscode, depcode);
if(department != null){
return department.getDepname();
}
return null;
}
//根据医院编号和科室编号查询科室
@Override
public Department getDepartment(String hoscode, String depcode) {
return departmentRepository.getDepartmentByHoscodeAndDepcode(hoscode, depcode);
}
}
@Service
public class ScheduleServiceImpl extends ServiceImpl<ScheduleMapper,Schedule> implements ScheduleService {
@Autowired
private ScheduleRepository scheduleRepository;
@Autowired
private MongoTemplate mongoTemplate;
@Autowired
private HospitalService hospitalService;
@Autowired
private DepartmentService departmentService;
//上传排班
@Override
public void save(Map<String, Object> parampMap) {
//parampMap转换成Department对象
String parampMapString = JSONObject.toJSONString(parampMap);
Schedule schedule = JSONObject.parseObject(parampMapString, Schedule.class);
//根据医院编号和排班编号进行查询
Schedule scheduleExist = scheduleRepository
.getScheduleByHoscodeAndHosScheduleId(schedule.getHoscode(),schedule.getHosScheduleId()); //取名采取spring DATA规范
//判断排班是否存在
if(scheduleExist != null){
//如果存在,做更改
scheduleExist.setUpdateTime(new Date());
scheduleExist.setIsDeleted(0);
scheduleExist.setStatus(1);
scheduleRepository.save(scheduleExist);
}else{
schedule.setCreateTime(new Date());
schedule.setUpdateTime(new Date());
schedule.setIsDeleted(0);
schedule.setStatus(1);
scheduleRepository.save(schedule);
}
}
//查询科室
@Override
public Page<Schedule> finPageSchedule(int page, int limit, ScheduleQueryVo scheduleQueryVo) {
//MongoRepository开发CRUD
//创建Pageble对象,里面设置当前页和每页记录数
Pageable pageable = PageRequest.of(page - 1,limit); // 当前页从0开始,但是我们从1开始传的
//将departmentQueryVo对象转换为department对象
Schedule schedule = new Schedule();
BeanUtils.copyProperties(scheduleQueryVo,schedule);
schedule.setIsDeleted(0);
schedule.setStatus(1);
//创建Example对象
ExampleMatcher matcher = ExampleMatcher.matching()
.withStringMatcher(ExampleMatcher.StringMatcher.CONTAINING)
.withIgnoreCase(true);
Example<Schedule> example = Example.of(schedule,matcher);
Page<Schedule> all = scheduleRepository.findAll(example,pageable);
return all;
}
//删除排班
@Override
public void remove(String hoscode, String hosScheduleId) {
//根据医院编号和排班编号查询相关信息
Schedule schedule = scheduleRepository.getScheduleByHoscodeAndHosScheduleId(hoscode, hosScheduleId);
if(schedule != null){
scheduleRepository.deleteById(schedule.getId());
}
}
//根据医院编号和科室编号,查询排班规则数据
@Override
public Map<String, Object> getReleSchedule(Long page, Long limit, String hoscode, String depcode) {
//根据医院编号和科室编号查询
Criteria criteria = Criteria.where("hoscode").is(hoscode).and("depcode").is(depcode);
//根据工作日期workdate进行分组 采用MongoTemplate方式
Aggregation agg = Aggregation.newAggregation(
Aggregation.match(criteria), //匹配条件
Aggregation.group("workDate") //分组字段
.first("workDate").as("workDate")
//统计号源数量
.count().as("docCount")
.sum("reservedNumber").as("reservedNumber") //科室可预约数
.sum("availableNumber").as("availableNumber"), //科室剩余预约数
Aggregation.sort(Sort.Direction.DESC,"workDate"),
//实现分页
Aggregation.skip((page - 1) * limit),
Aggregation.limit(limit)
);
//调用方法,最终执行
//BookingScheduleRuleVo封装返回数据
AggregationResults<BookingScheduleRuleVo> aggResults = mongoTemplate.aggregate(agg, Schedule.class, BookingScheduleRuleVo.class);
List<BookingScheduleRuleVo> bookingScheduleRuleVoList = aggResults.getMappedResults();
//分组查询的总记录数
Aggregation totalAgg = Aggregation.newAggregation(
Aggregation.match(criteria),
Aggregation.group("workDate")
);
AggregationResults<BookingScheduleRuleVo> totalAggResultS = mongoTemplate.aggregate(totalAgg, Schedule.class, BookingScheduleRuleVo.class);
int total = totalAggResultS.getMappedResults().size();
//把workDate日期对应的星期获取
for(BookingScheduleRuleVo bookingScheduleRuleVo : bookingScheduleRuleVoList){
Date workDate = bookingScheduleRuleVo.getWorkDate();
String dayOfWeek = this.getDayOfWeek(new DateTime(workDate));
bookingScheduleRuleVo.setDayOfWeek(dayOfWeek);
}
//设置最终数据进行返回
Map<String,Object> result = new HashMap<>();
result.put("bookingScheduleRuleList",bookingScheduleRuleVoList);
result.put("total",total);
//获取医院名称
String hosName = hospitalService.getHospName(hoscode);
//其他基础数据(医院名称)
Map<String, String> baseMap = new HashMap<>();
baseMap.put("hosname",hosName);
result.put("baseMap",baseMap);
return result;
}
//根据医院编号、科室编号和工作日期,查询排班详情信息
@Override
public List<Schedule> getDetailSchedule(String hoscode, String depcode, String workDate) {
//根据参数查询mongodb,得到数据
List<Schedule> scheduleList =
scheduleRepository.findScheduleByHoscodeAndDepcodeAndWorkDate(hoscode,depcode,new DateTime(workDate).toDate());
//把得到的list遍历,向其中添加医院名称、科室名称、日期对应的星期
scheduleList.stream().forEach(item -> {
this.packageSchedule(item);
});
return scheduleList;
}
//获取可预约排班数据
@Override
public Map<String,Object> getBookingScheduleRule(Integer page, Integer limit, String hoscode, String depcode) {
Map<String,Object> result = new HashMap<>();
//根据医院编号获取预约规则
Hospital hospital = hospitalService.getByHoscode(hoscode);
if(hospital == null){
throw new YyghException(ResultCodeEnum.DATA_ERROR);
}
BookingRule bookingRule = hospital.getBookingRule();
//根据预约规则获取可预约数据(分页)
IPage iPage = this.getListData(page,limit,bookingRule);
//获取当前可预约日期
List<Date> dateList = iPage.getRecords();
//获取可预约日期里面科室的剩余数据
Criteria criteria = Criteria.where("hoscode").is(hoscode).and("depcode").is(depcode).and("workDate").in(dateList);
Aggregation agg = Aggregation.newAggregation(
Aggregation.match(criteria),
Aggregation.group("workDate").first("workDate").as("workDate")
.count().as("docCount")
.sum("availableNumber").as("availableNumber")
.sum("reservedNumber").as("reservedNumber")
);
AggregationResults<BookingScheduleRuleVo> aggregateResult = mongoTemplate.aggregate(agg, Schedule.class, BookingScheduleRuleVo.class);
List<BookingScheduleRuleVo> scheduleVoList = aggregateResult.getMappedResults();
//合并数据 map集合 key:日期 value:预约规则和剩余数量等
Map<Date, BookingScheduleRuleVo> scheduleVoMap = new HashMap<>();
if(!CollectionUtils.isEmpty(scheduleVoList)) {
scheduleVoMap = scheduleVoList.stream().collect(Collectors.toMap(BookingScheduleRuleVo::getWorkDate, BookingScheduleRuleVo -> BookingScheduleRuleVo));
}
//获取可预约排版规则
List<BookingScheduleRuleVo> bookingScheduleRuleVoList = new ArrayList<>();
for(int i=0, len=dateList.size(); i<len; i++) {
Date date = dateList.get(i);
//从map集合中根据key日期获取value值
BookingScheduleRuleVo bookingScheduleRuleVo = scheduleVoMap.get(date);
if(bookingScheduleRuleVo == null){
bookingScheduleRuleVo = new BookingScheduleRuleVo();
//就诊医生人数
bookingScheduleRuleVo.setDocCount(0);
//科室剩余预约数 -1表示无号
bookingScheduleRuleVo.setAvailableNumber(-1);
}
bookingScheduleRuleVo.setWorkDate(date);
bookingScheduleRuleVo.setWorkDateMd(date);
//计算当前预约日期对应的星期
String dayOfWeek = this.getDayOfWeek(new DateTime(date));
bookingScheduleRuleVo.setDayOfWeek(dayOfWeek);
//最后一页最后一条记录为即将预约 状态 0:正常 1:即将放号 -1:当天已停止挂号
if(i == len-1 && page == iPage.getPages()) {
bookingScheduleRuleVo.setStatus(1);
} else {
bookingScheduleRuleVo.setStatus(0);
}
//当天预约如果过了停号时间, 不能预约
if(i == 0 && page == 1) {
DateTime stopTime = this.getDateTime(new Date(), bookingRule.getStopTime());
if(stopTime.isBeforeNow()) {
//停止预约
bookingScheduleRuleVo.setStatus(-1);
}
}
bookingScheduleRuleVoList.add(bookingScheduleRuleVo);
}
//可预约日期规则数据
result.put("bookingScheduleList", bookingScheduleRuleVoList);
result.put("total", iPage.getTotal());
//其他基础数据
Map<String, String> baseMap = new HashMap<>();
//医院名称
baseMap.put("hosname", hospitalService.getHospName(hoscode));
//科室
Department department =departmentService.getDepartment(hoscode, depcode);
//大科室名称
baseMap.put("bigname", department.getBigname());
//科室名称
baseMap.put("depname", department.getDepname());
//月
baseMap.put("workDateString", new DateTime().toString("yyyy年MM月"));
//放号时间
baseMap.put("releaseTime", bookingRule.getReleaseTime());
//停号时间
baseMap.put("stopTime", bookingRule.getStopTime());
result.put("baseMap", baseMap);
return result;
}
//根据排班id获取排班数据
@Override
public Schedule getScheduleId(String scheduleId) {
Optional<Schedule> optional = scheduleRepository.findById(scheduleId);
Schedule schedule = optional.get();
return this.packageSchedule(schedule);
}
//根据排班id获取预约下单数据
@Override
public ScheduleOrderVo getScheduleOrderVo(String scheduleId) {
ScheduleOrderVo scheduleOrderVo = new ScheduleOrderVo();
Schedule schedule = this.getScheduleId(scheduleId);
// Schedule schedule = baseMapper.selectById(scheduleId);
if(schedule == null){
throw new YyghException(ResultCodeEnum.PARAM_ERROR);
}
//获取预约规则信息,从hospital中获取
Hospital hospital = hospitalService.getByHoscode(schedule.getHoscode());
if(hospital == null){
throw new YyghException(ResultCodeEnum.PARAM_ERROR);
}
BookingRule bookingRule = hospital.getBookingRule();
if(bookingRule == null){
throw new YyghException(ResultCodeEnum.PARAM_ERROR);
}
//把获取的数据设置到scheduleOrderVo中
scheduleOrderVo.setHoscode(schedule.getHoscode());
scheduleOrderVo.setHosname(hospitalService.getHospName(schedule.getHoscode()));
scheduleOrderVo.setDepcode(schedule.getDepcode());
scheduleOrderVo.setDepname(departmentService.getDepName(schedule.getHoscode(), schedule.getDepcode()));
scheduleOrderVo.setHosScheduleId(schedule.getHosScheduleId());
scheduleOrderVo.setAvailableNumber(schedule.getAvailableNumber());
scheduleOrderVo.setTitle(schedule.getTitle());
scheduleOrderVo.setReserveDate(schedule.getWorkDate());
scheduleOrderVo.setReserveTime(schedule.getWorkTime());
scheduleOrderVo.setAmount(schedule.getAmount());
//退号截止天数(如:就诊前一天为-1,当天为0)
int quitDay = bookingRule.getQuitDay();
DateTime quitTime = this.getDateTime(new DateTime(schedule.getWorkDate()).plusDays(quitDay).toDate(), bookingRule.getQuitTime());
scheduleOrderVo.setQuitTime(quitTime.toDate());
//预约开始时间
DateTime startTime = this.getDateTime(new Date(), bookingRule.getReleaseTime());
scheduleOrderVo.setStartTime(startTime.toDate());
//预约截止时间
DateTime endTime = this.getDateTime(new DateTime().plusDays(bookingRule.getCycle()).toDate(), bookingRule.getStopTime());
scheduleOrderVo.setEndTime(endTime.toDate());
//当天停止挂号时间
DateTime stopTime = this.getDateTime(new Date(), bookingRule.getStopTime());
scheduleOrderVo.setStartTime(stopTime.toDate());
return scheduleOrderVo;
}
//更新排班,用于mq
@Override
public void update(Schedule schedule) {
schedule.setUpdateTime(new Date());
scheduleRepository.save(schedule);
}
//根据预约规则获取可预约数据(分页)
private IPage getListData(Integer page, Integer limit, BookingRule bookingRule) {
//获取当天放号时间 yyyy-MM-dd HH:mm
DateTime releaseTime = this.getDateTime(new Date(), bookingRule.getReleaseTime());
//获取预约周期
Integer cycle = bookingRule.getCycle();
//如果当天放号时间已过,预约周期从后一天开始计算,周期+1
if(releaseTime.isBeforeNow()){
cycle += 1;
}
//获取可预约所有日期,最后一天显示即将放号
List<Date> dateList = new ArrayList<>();
for(int i = 0;i < cycle;i++){
DateTime curDateTime = new DateTime().plusDays(i);
String dateString = curDateTime.toString("yyyy-MM-dd");
dateList.add(new DateTime(dateString).toDate());
}
//因为预约周期不同,每页最多显示7天,预约周期大于7天的要进行分页
List<Date> pageDateList = new ArrayList<>();
int start = (page-1) * limit;
int end = (page -1) * limit + limit;
//如果预约周期<=7,直接显示
if(dateList.size() < end){
end = dateList.size();
}
for(int i = start;i < end;i++){
pageDateList.add(dateList.get(i));
}
//如果>7,则进行分页
IPage<Date> iPage = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(page,7,dateList.size());
iPage.setRecords(pageDateList);
return iPage;
}
/**
* 将Date日期(yyyy-MM-dd HH:mm)转换为DateTime
*/
private DateTime getDateTime(Date date, String timeString) {
String dateTimeString = new DateTime(date).toString("yyyy-MM-dd") + " "+ timeString;
DateTime dateTime = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm").parseDateTime(dateTimeString);
return dateTime;
}
//把医院名称、科室名称、日期对应的星期封装到排班详情
private Schedule packageSchedule(Schedule schedule) {
//设置医院名称
schedule.getParam().put("hosname",hospitalService.getHospName(schedule.getHoscode()));
//设置科室名称
schedule.getParam().put("depname",departmentService.getDepName(schedule.getHoscode(),schedule.getDepcode()));
//设置日期对应星期
schedule.getParam().put("dayOfWeek",this.getDayOfWeek(new DateTime(schedule.getWorkDate())));
return schedule;
}
/**
* 根据日期获取周几数据
* @param dateTime
* @return
*/
private String getDayOfWeek(DateTime dateTime) {
String dayOfWeek = "";
switch (dateTime.getDayOfWeek()) {
case DateTimeConstants.SUNDAY:
dayOfWeek = "周日";
break;
case DateTimeConstants.MONDAY:
dayOfWeek = "周一";
break;
case DateTimeConstants.TUESDAY:
dayOfWeek = "周二";
break;
case DateTimeConstants.WEDNESDAY:
dayOfWeek = "周三";
break;
case DateTimeConstants.THURSDAY:
dayOfWeek = "周四";
break;
case DateTimeConstants.FRIDAY:
dayOfWeek = "周五";
break;
case DateTimeConstants.SATURDAY:
dayOfWeek = "周六";
default:
break;
}
return dayOfWeek;
}
}
controller:由于统一预约平台要提供接口给外面数据上传形象所以这里弄个api供给外部使用
@RestController
@RequestMapping("/api/hosp")
public class ApiController {
@Autowired
private HospitalService hospitalService;
@Autowired
private HospitalSetService hospitalSetService;
@Autowired
private DepartmentService departmentService;
@Autowired
private ScheduleService scheduleService;
//上传医院接口
@PostMapping("saveHospital")
public Result saveHosp(HttpServletRequest request){
//获取医院传递过来的信息
Map<String, String[]> parameterMap = request.getParameterMap();
//为避免后面遍历,将map中的String[]转换成Object
Map<String, Object> parampMap = HttpRequestHelper.switchMap(parameterMap);
//核验签名是否一致
//1.获取医院系统传递过来的签名
String hospSign = (String) parampMap.get("sign");
//2.根据传递过来的医院编码,查询数据库,查询签名
String hoscode = (String) parampMap.get("hoscode");
String signKey = hospitalSetService.getSignKey(hoscode);
//3.把查询出来的签名进行MD5加密
String signKeyMD5 = MD5.encrypt(signKey);
//4.判断签名是否一致
if(!hospSign.equals(signKeyMD5)){
throw new YyghException(ResultCodeEnum.SIGN_ERROR);
}
//图片数据采取base64工具类传输,在传输过程中“+”转换为了“ ”,因此我们要转换回来
String logoData = (String) parampMap.get("logoData");
logoData = logoData.replace(" ","+");
parampMap.put("logoData",logoData);
//调用service的方法
hospitalService.save(parampMap);
return Result.ok();
}
//查询医院接口
@PostMapping("hospital/show")
public Result getHospital(HttpServletRequest request){
//获取医院传递过来的信息
Map<String, String[]> parameterMap = request.getParameterMap();
//为避免后面遍历,将map中的String[]转换成Object
Map<String, Object> parampMap = HttpRequestHelper.switchMap(parameterMap);
//获取传递过来的医院编号
String hoscode = (String) parampMap.get("hoscode");
//签名校验
String hospSign = (String) parampMap.get("sign");
String signKey = hospitalSetService.getSignKey(hoscode);
String signKeyMD5 = MD5.encrypt(signKey);
if(!hospSign.equals(signKeyMD5)){
throw new YyghException(ResultCodeEnum.SIGN_ERROR);
}
//调用service方法
Hospital hospital = hospitalService.getByHoscode(hoscode);
return Result.ok(hospital);
}
//上传科室接口
@PostMapping("saveDepartment")
public Result saveDepartment(HttpServletRequest request){
//获取传递过来的科室信息
Map<String, String[]> parameterMap = request.getParameterMap();
Map<String, Object> parampMap = HttpRequestHelper.switchMap(parameterMap);
//核验签名是否一致
String hospSign = (String) parampMap.get("sign");
String hoscode = (String) parampMap.get("hoscode");
String signKey = hospitalSetService.getSignKey(hoscode);
String signKeyMD5 = MD5.encrypt(signKey);
if(!hospSign.equals(signKeyMD5)){
throw new YyghException(ResultCodeEnum.SIGN_ERROR);
}
//调用service方法
departmentService.save(parampMap);
return Result.ok();
}
//科室查询接口
@PostMapping("department/list")
public Result findDepartment(HttpServletRequest request){
//获取传递过来的科室信息
Map<String, String[]> parameterMap = request.getParameterMap();
Map<String, Object> parampMap = HttpRequestHelper.switchMap(parameterMap);
//医院编号
String hoscode = (String) parampMap.get("hoscode");
//当前页
int page = Integer.parseInt((String) parampMap.get("page"));
if(StringUtils.isEmpty(page)){
page = 1;
}
//每页显示记录数
int limit = Integer.parseInt((String) parampMap.get("limit"));
if(StringUtils.isEmpty(limit)){
limit = 1;
}
//签名校验
String hospSign = (String) parampMap.get("sign");
String signKey = hospitalSetService.getSignKey(hoscode);
String signKeyMD5 = MD5.encrypt(signKey);
if(!hospSign.equals(signKeyMD5)){
throw new YyghException(ResultCodeEnum.SIGN_ERROR);
}
//调用service查询
//查询条件的值封装到departmentQueryVo中
DepartmentQueryVo departmentQueryVo = new DepartmentQueryVo();
departmentQueryVo.setHoscode(hoscode);
Page<Department> pageModel = departmentService.finPageDepartment(page,limit,departmentQueryVo);
return Result.ok(pageModel);
}
//删除科室接口
@PostMapping("department/remove")
public Result removeDepartment(HttpServletRequest request){
//获取传递过来的科室信息
Map<String, String[]> parameterMap = request.getParameterMap();
Map<String, Object> parampMap = HttpRequestHelper.switchMap(parameterMap);
//获取医院编号和科室编号
String hoscode = (String) parampMap.get("hoscode");
String depcode = (String) parampMap.get("depcode");
//签名校验
String hospSign = (String) parampMap.get("sign");
String signKey = hospitalSetService.getSignKey(hoscode);
String signKeyMD5 = MD5.encrypt(signKey);
if(!hospSign.equals(signKeyMD5)){
throw new YyghException(ResultCodeEnum.SIGN_ERROR);
}
departmentService.remove(hoscode,depcode);
return Result.ok();
}
//上传排班
@PostMapping("saveSchedule")
public Result saveSchedule(HttpServletRequest request){
//获取传递过来的科室信息
Map<String, String[]> parameterMap = request.getParameterMap();
Map<String, Object> parampMap = HttpRequestHelper.switchMap(parameterMap);
//签名校验
String hospSign = (String) parampMap.get("sign");
String hoscode = (String) parampMap.get("hoscode");
String signKey = hospitalSetService.getSignKey(hoscode);
String signKeyMD5 = MD5.encrypt(signKey);
if(!hospSign.equals(signKeyMD5)){
throw new YyghException(ResultCodeEnum.SIGN_ERROR);
}
//调用service方法
scheduleService.save(parampMap);
return Result.ok();
}
//查询排班
@PostMapping("schedule/list")
public Result findSchedule(HttpServletRequest request) {
//获取传递过来的科室信息
Map<String, String[]> parameterMap = request.getParameterMap();
Map<String, Object> parampMap = HttpRequestHelper.switchMap(parameterMap);
//医院编号
String hoscode = (String) parampMap.get("hoscode");
//科室编号
String depcode = (String) parampMap.get("depcode");
//当前页
int page = Integer.parseInt((String) parampMap.get("page"));
if (StringUtils.isEmpty(page)) {
page = 1;
}
//每页显示记录数
int limit = Integer.parseInt((String) parampMap.get("limit"));
if (StringUtils.isEmpty(limit)) {
limit = 1;
}
//签名校验
String hospSign = (String) parampMap.get("sign");
String signKey = hospitalSetService.getSignKey(hoscode);
String signKeyMD5 = MD5.encrypt(signKey);
if (!hospSign.equals(signKeyMD5)) {
throw new YyghException(ResultCodeEnum.SIGN_ERROR);
}
//调用service查询
//查询条件的值封装到departmentQueryVo中
ScheduleQueryVo scheduleQueryVo = new ScheduleQueryVo();
scheduleQueryVo.setHoscode(hoscode);
scheduleQueryVo.setDepcode(depcode);
Page<Schedule> pageModel = scheduleService.finPageSchedule(page, limit, scheduleQueryVo);
return Result.ok(pageModel);
}
//删除排班
@PostMapping("schedule/remove")
public Result remove(HttpServletRequest request){
//获取传递过来的科室信息
Map<String, String[]> parameterMap = request.getParameterMap();
Map<String, Object> parampMap = HttpRequestHelper.switchMap(parameterMap);
//获取医院编号和排班编号
String hoscode = (String) parampMap.get("hoscode");
String hosScheduleId = (String) parampMap.get("hosScheduleId");
//签名校验
String hospSign = (String) parampMap.get("sign");
String signKey = hospitalSetService.getSignKey(hoscode);
String signKeyMD5 = MD5.encrypt(signKey);
if(!hospSign.equals(signKeyMD5)){
throw new YyghException(ResultCodeEnum.SIGN_ERROR);
}
scheduleService.remove(hoscode,hosScheduleId);
return Result.ok();
}
}
@Api("医院管理接口")
@RestController
@RequestMapping("/api/hosp/hospital")
public class HospitalApiController {
@Autowired
private HospitalService hospitalService;
@Autowired
private DepartmentService departmentService;
@Autowired
private ScheduleService scheduleService;
@Autowired
private HospitalSetService hospitalSetService;
//查询医院列表
@ApiOperation("查询医院列表")
@GetMapping("findHospList/{page}/{limit}")
public Result findHospList(@PathVariable("page") Integer page,
@PathVariable("limit") Integer limit,
HospitalQueryVo hospitalQueryVo){
Page<Hospital> hospitals = hospitalService.selectHospPage(page, limit, hospitalQueryVo);
List<Hospital> content = hospitals.getContent(); //供前端调用
int totalPages = hospitals.getTotalPages(); //供前端调用
return Result.ok(hospitals);
}
//根据医院名称查询
@ApiOperation("根据医院名称查询")
@GetMapping("findByHosname/{hosname}")
public Result findHospList(@PathVariable("hosname") String hosname){
List<Hospital> list = hospitalService.findByHosname(hosname); //模糊查询 可能返回多个,用list接收
return Result.ok(list);
}
//根据医院编号获取科室列表
@ApiOperation("根据医院编号获取科室列表")
@GetMapping("department/{hoscode}")
public Result index(@PathVariable("hoscode") String hoscode){
List<DepartmentVo> list = departmentService.findDepTree(hoscode);
return Result.ok(list);
}
//根据医院编号获取预约挂号详情
@ApiOperation(value = "根据医院编号获取预约挂号详情")
@GetMapping("findHospDetail/{hoscode}")
public Result item(@PathVariable("hoscode") String hoscode){
Map<String,Object> map = hospitalService.item(hoscode);
return Result.ok(map);
}
//获取可预约排班数据
@ApiOperation(value = "获取可预约排班数据")
@GetMapping("auth/getBookingScheduleRule/{page}/{limit}/{hoscode}/{depcode}")
public Result getBookingSchedule(
@ApiParam(name = "page", value = "当前页码", required = true)
@PathVariable Integer page,
@ApiParam(name = "limit", value = "每页记录数", required = true)
@PathVariable Integer limit,
@ApiParam(name = "hoscode", value = "医院code", required = true)
@PathVariable String hoscode,
@ApiParam(name = "depcode", value = "科室code", required = true)
@PathVariable String depcode) {
return Result.ok(scheduleService.getBookingScheduleRule(page, limit, hoscode, depcode));
}
//获取排班具体数据
@ApiOperation(value = "获取排班具体数据")
@GetMapping("auth/findScheduleList/{hoscode}/{depcode}/{workDate}")
public Result findScheduleList(
@ApiParam(name = "hoscode", value = "医院code", required = true)
@PathVariable String hoscode,
@ApiParam(name = "depcode", value = "科室code", required = true)
@PathVariable String depcode,
@ApiParam(name = "workDate", value = "排班日期", required = true)
@PathVariable String workDate) {
return Result.ok(scheduleService.getDetailSchedule(hoscode, depcode, workDate));
}
//根据排班id获取排班数据
@ApiOperation(value = "根据排班id获取排班数据")
@GetMapping("getSchedule/{scheduleId}")
public Result getSchedule(@PathVariable("scheduleId") String scheduleId){
Schedule schedule = scheduleService.getScheduleId(scheduleId);
return Result.ok(schedule);
}
//根据排班id获取预约下单数据
@ApiOperation(value = "根据排班id获取预约下单数据")
@GetMapping("inner/getScheduleOrderVo/{scheduleId}")
public ScheduleOrderVo getScheduleOrderVo(@PathVariable("scheduleId") String scheduleId) {
return scheduleService.getScheduleOrderVo(scheduleId);
}
//获取医院签名信息
@ApiOperation(value = "获取医院签名信息")
@GetMapping("inner/getSignInfoVo/{hoscode}")
public SignInfoVo getSignInfoVo(@PathVariable("hoscode") String hoscode) {
return hospitalSetService.getSignInfoVo(hoscode);
}
}
上传医院、上传科室,上传排班的信息是在预约统一平台实现的接口,然后由每个医院来调用预约统一平台的接口,上床自己医院的相关信息
这里用hosp_manager来模拟医院上传医院信息
这里有个bug 你的hospital_set表必须有一条id为1的数据
上传医院信息是吧医院的json字符串解析为map 对象然后通过地址保存在mongodb 数据库中
JSONObject respone = HttpRequestHelper.sendRequest(paramMap,this.getApiUrl()+"/api/hosp/saveHospital")
注意这里api 地址是service_hosp里面的端口然后service_hosp实现这里controller 的/api/hosp/saveHospital
service
import com.wang.yygh.model.hosp.Hospital;
import com.wang.yygh.vo.hosp.HospitalQueryVo;
import org.springframework.data.domain.Page;
import java.util.List;
import java.util.Map;
/**
* @author wangyihui
* @create 2021-11-11 18:16
*/
public interface HospitalService {
//上传医院接口
void save(Map parapMap);
//实现根据医院编号查询
Hospital getByHoscode(String hoscode);
//医院列表(条件查询分页)
Page selectHospPage(Integer page, Integer limit, HospitalQueryVo hospitalQueryVo);
//更新医院的上限状态
void updateStatus(String id, Integer status);
//查询医院详情
Map getHospById(String id);
//获取医院名称
String getHospName(String hoscode);
//根据医院名称查询
List findByHosname(String hosname);
//根据医院编号获取预约挂号详情
Map item(String hoscode);
}
service impl
@Service
public class HospitalSevriceImpl implements HospitalService {
@Autowired
private HospitalRepository hospitalRepository;
@Autowired
private DictFeignClient dictFeignClient;
@Override
public void save(Map<String, Object> parapMap) {
//把参数的map集合转换成对象Hospital,方便操作
String mapString = JSONObject.toJSONString(parapMap); //先把map转换成字符串
Hospital hospital = JSONObject.parseObject(mapString, Hospital.class); // 把字符串转换成Hospital对象
//判断是否存在相同数据
String hoscode = hospital.getHoscode();
Hospital hospitalExist = hospitalRepository.getHospitalByHoscode(hoscode);
//如果存在,进行修改
if(hospitalExist != null){
hospital.setStatus(hospitalExist.getStatus());
hospital.setCreateTime(hospitalExist.getCreateTime());
hospital.setUpdateTime(new Date());
hospital.setIsDeleted(0);
hospitalRepository.save(hospital);
}else{
//如果不存在,进行添加
hospital.setStatus(0);
hospital.setCreateTime(new Date());
hospital.setUpdateTime(new Date());
hospital.setIsDeleted(0);
hospitalRepository.save(hospital);
}
}
//实现根据医院编号查询
@Override
public Hospital getByHoscode(String hoscode) {
Hospital hospital = hospitalRepository.getHospitalByHoscode(hoscode);
return hospital;
}
//医院列表(条件查询分页)
@Override
public Page<Hospital> selectHospPage(Integer page, Integer limit, HospitalQueryVo hospitalQueryVo) {
//创建pageable对象
Pageable pageable = PageRequest.of(page - 1,limit);
//创建条件匹配器
ExampleMatcher matcher = ExampleMatcher.matching()
.withStringMatcher(ExampleMatcher.StringMatcher.CONTAINING)
.withIgnoreCase(true);
//hospitalSetQueryVo转换成hospital对象
Hospital hospital = new Hospital();
BeanUtils.copyProperties(hospitalQueryVo,hospital);
//创建Example对象
Example<Hospital> example = Example.of(hospital,matcher);
//调用方法实现查询
Page<Hospital> pages = hospitalRepository.findAll(example, pageable);
//查询到所有医院集合并遍历,然后获取到医院等级信息
//采用流的方式
pages.getContent().stream().forEach(item -> {
this.setHospitalHosType(item);
});
return pages;
}
//更新医院的上线状态
@Override
public void updateStatus(String id, Integer status) {
//根据id查询医院信息
Hospital hospital = hospitalRepository.findById(id).get();
hospital.setStatus(status);
hospital.setUpdateTime(new Date());
hospitalRepository.save(hospital);
}
//查询医院详情
@Override
public Map<String, Object> getHospById(String id) {
Map<String, Object> result = new HashMap<>();
//根据id查询医院信息并将等级信息也封装进去
Hospital hospital = this.setHospitalHosType(hospitalRepository.findById(id).get());
result.put("hospital",hospital);
//单独处理更直观
result.put("bookingRule", hospital.getBookingRule());
//不需要重复返回
hospital.setBookingRule(null);
return result;
}
//获取医院名称
@Override
public String getHospName(String hoscode) {
Hospital hospital = hospitalRepository.getHospitalByHoscode(hoscode);
if(hospital != null){
return hospital.getHosname();
}
return null;
}
//根据医院名称查询
@Override
public List<Hospital> findByHosname(String hosname) {
List<Hospital> list = hospitalRepository.findHospitalByHosnameLike(hosname);
return list;
}
//根据医院编号获取预约挂号详情
@Override
public Map<String, Object> item(String hoscode) {
Map<String, Object> result = new HashMap<>();
//医院详情
Hospital hospital = this.setHospitalHosType(this.getByHoscode(hoscode));
result.put("hospital", hospital);
//预约规则
result.put("bookingRule", hospital.getBookingRule());
//不需要重复返回
hospital.setBookingRule(null);
return result;
}
//获取查询到的医院集合,遍历进行医院等级封装
private Hospital setHospitalHosType(Hospital hospital) {
//根据dictCode和value获取医院等级名称
String hostypeString = dictFeignClient.getName("Hostype", hospital.getHostype());
//查询省,市,地区
String provinceString = dictFeignClient.getName(hospital.getProvinceCode());
String cityString = dictFeignClient.getName(hospital.getCityCode());
String districtString = dictFeignClient.getName(hospital.getDistrictCode());
hospital.getParam().put("hostypeString",hostypeString);
hospital.getParam().put("fullAddress",provinceString + cityString + districtString);
return hospital;
}
}
controller
@RestController
@RequestMapping("/api/hosp")
public class ApiController {
@Autowired
private HospitalService hospitalService;
@Autowired
private HospitalSetService hospitalSetService;
@Autowired
private DepartmentService departmentService;
@Autowired
private ScheduleService scheduleService;
//上传医院接口
@PostMapping("saveHospital")
public Result saveHosp(HttpServletRequest request){
//获取医院传递过来的信息
Map<String, String[]> parameterMap = request.getParameterMap();
//为避免后面遍历,将map中的String[]转换成Object
Map<String, Object> parampMap = HttpRequestHelper.switchMap(parameterMap);
//核验签名是否一致
//1.获取医院系统传递过来的签名
String hospSign = (String) parampMap.get("sign");
//2.根据传递过来的医院编码,查询数据库,查询签名
String hoscode = (String) parampMap.get("hoscode");
String signKey = hospitalSetService.getSignKey(hoscode);
//3.把查询出来的签名进行MD5加密
String signKeyMD5 = MD5.encrypt(signKey);
//4.判断签名是否一致
if(!hospSign.equals(signKeyMD5)){
throw new YyghException(ResultCodeEnum.SIGN_ERROR);
}
//图片数据采取base64工具类传输,在传输过程中“+”转换为了“ ”,因此我们要转换回来
String logoData = (String) parampMap.get("logoData");
logoData = logoData.replace(" ","+");
parampMap.put("logoData",logoData);
//调用service的方法
hospitalService.save(parampMap);
return Result.ok();
}
//查询医院接口
@PostMapping("hospital/show")
public Result getHospital(HttpServletRequest request){
//获取医院传递过来的信息
Map<String, String[]> parameterMap = request.getParameterMap();
//为避免后面遍历,将map中的String[]转换成Object
Map<String, Object> parampMap = HttpRequestHelper.switchMap(parameterMap);
//获取传递过来的医院编号
String hoscode = (String) parampMap.get("hoscode");
//签名校验
String hospSign = (String) parampMap.get("sign");
String signKey = hospitalSetService.getSignKey(hoscode);
String signKeyMD5 = MD5.encrypt(signKey);
if(!hospSign.equals(signKeyMD5)){
throw new YyghException(ResultCodeEnum.SIGN_ERROR);
}
//调用service方法
Hospital hospital = hospitalService.getByHoscode(hoscode);
return Result.ok(hospital);
}
//上传科室接口
@PostMapping("saveDepartment")
public Result saveDepartment(HttpServletRequest request){
//获取传递过来的科室信息
Map<String, String[]> parameterMap = request.getParameterMap();
Map<String, Object> parampMap = HttpRequestHelper.switchMap(parameterMap);
//核验签名是否一致
String hospSign = (String) parampMap.get("sign");
String hoscode = (String) parampMap.get("hoscode");
String signKey = hospitalSetService.getSignKey(hoscode);
String signKeyMD5 = MD5.encrypt(signKey);
if(!hospSign.equals(signKeyMD5)){
throw new YyghException(ResultCodeEnum.SIGN_ERROR);
}
//调用service方法
departmentService.save(parampMap);
return Result.ok();
}
//科室查询接口
@PostMapping("department/list")
public Result findDepartment(HttpServletRequest request){
//获取传递过来的科室信息
Map<String, String[]> parameterMap = request.getParameterMap();
Map<String, Object> parampMap = HttpRequestHelper.switchMap(parameterMap);
//医院编号
String hoscode = (String) parampMap.get("hoscode");
//当前页
int page = Integer.parseInt((String) parampMap.get("page"));
if(StringUtils.isEmpty(page)){
page = 1;
}
//每页显示记录数
int limit = Integer.parseInt((String) parampMap.get("limit"));
if(StringUtils.isEmpty(limit)){
limit = 1;
}
//签名校验
String hospSign = (String) parampMap.get("sign");
String signKey = hospitalSetService.getSignKey(hoscode);
String signKeyMD5 = MD5.encrypt(signKey);
if(!hospSign.equals(signKeyMD5)){
throw new YyghException(ResultCodeEnum.SIGN_ERROR);
}
//调用service查询
//查询条件的值封装到departmentQueryVo中
DepartmentQueryVo departmentQueryVo = new DepartmentQueryVo();
departmentQueryVo.setHoscode(hoscode);
Page<Department> pageModel = departmentService.finPageDepartment(page,limit,departmentQueryVo);
return Result.ok(pageModel);
}
//删除科室接口
@PostMapping("department/remove")
public Result removeDepartment(HttpServletRequest request){
//获取传递过来的科室信息
Map<String, String[]> parameterMap = request.getParameterMap();
Map<String, Object> parampMap = HttpRequestHelper.switchMap(parameterMap);
//获取医院编号和科室编号
String hoscode = (String) parampMap.get("hoscode");
String depcode = (String) parampMap.get("depcode");
//签名校验
String hospSign = (String) parampMap.get("sign");
String signKey = hospitalSetService.getSignKey(hoscode);
String signKeyMD5 = MD5.encrypt(signKey);
if(!hospSign.equals(signKeyMD5)){
throw new YyghException(ResultCodeEnum.SIGN_ERROR);
}
departmentService.remove(hoscode,depcode);
return Result.ok();
}
//上传排班
@PostMapping("saveSchedule")
public Result saveSchedule(HttpServletRequest request){
//获取传递过来的科室信息
Map<String, String[]> parameterMap = request.getParameterMap();
Map<String, Object> parampMap = HttpRequestHelper.switchMap(parameterMap);
//签名校验
String hospSign = (String) parampMap.get("sign");
String hoscode = (String) parampMap.get("hoscode");
String signKey = hospitalSetService.getSignKey(hoscode);
String signKeyMD5 = MD5.encrypt(signKey);
if(!hospSign.equals(signKeyMD5)){
throw new YyghException(ResultCodeEnum.SIGN_ERROR);
}
//调用service方法
scheduleService.save(parampMap);
return Result.ok();
}
//查询排班
@PostMapping("schedule/list")
public Result findSchedule(HttpServletRequest request) {
//获取传递过来的科室信息
Map<String, String[]> parameterMap = request.getParameterMap();
Map<String, Object> parampMap = HttpRequestHelper.switchMap(parameterMap);
//医院编号
String hoscode = (String) parampMap.get("hoscode");
//科室编号
String depcode = (String) parampMap.get("depcode");
//当前页
int page = Integer.parseInt((String) parampMap.get("page"));
if (StringUtils.isEmpty(page)) {
page = 1;
}
//每页显示记录数
int limit = Integer.parseInt((String) parampMap.get("limit"));
if (StringUtils.isEmpty(limit)) {
limit = 1;
}
//签名校验
String hospSign = (String) parampMap.get("sign");
String signKey = hospitalSetService.getSignKey(hoscode);
String signKeyMD5 = MD5.encrypt(signKey);
if (!hospSign.equals(signKeyMD5)) {
throw new YyghException(ResultCodeEnum.SIGN_ERROR);
}
//调用service查询
//查询条件的值封装到departmentQueryVo中
ScheduleQueryVo scheduleQueryVo = new ScheduleQueryVo();
scheduleQueryVo.setHoscode(hoscode);
scheduleQueryVo.setDepcode(depcode);
Page<Schedule> pageModel = scheduleService.finPageSchedule(page, limit, scheduleQueryVo);
return Result.ok(pageModel);
}
//删除排班
@PostMapping("schedule/remove")
public Result remove(HttpServletRequest request){
//获取传递过来的科室信息
Map<String, String[]> parameterMap = request.getParameterMap();
Map<String, Object> parampMap = HttpRequestHelper.switchMap(parameterMap);
//获取医院编号和排班编号
String hoscode = (String) parampMap.get("hoscode");
String hosScheduleId = (String) parampMap.get("hosScheduleId");
//签名校验
String hospSign = (String) parampMap.get("sign");
String signKey = hospitalSetService.getSignKey(hoscode);
String signKeyMD5 = MD5.encrypt(signKey);
if(!hospSign.equals(signKeyMD5)){
throw new YyghException(ResultCodeEnum.SIGN_ERROR);
}
scheduleService.remove(hoscode,hosScheduleId);
return Result.ok();
}
}
医院接口模拟系统 测试数据
{
"hoscode": "1000_0",
"hosname": "北京协和医院",
"hostype": "1",
"provinceCode": "110000",
"cityCode": "110100",
"districtCode": "110102",
"address": "大望路",
"intro": "北京协和医院是集医疗、教学、科研于一体的大型三级甲等综合医院,是国家卫生计生委指定的全国疑难重症诊治指导中心,也是最早承担高干保健和外宾医疗任务的医院之一,以学科齐全、技术力量雄厚、特色专科突出、多学科综合优势强大享誉海内外。在2010、2011、2012、2013、2014年复旦大学医院管理研究所公布的“中国最佳医院排行榜”中连续五年名列榜首。\n\n医院建成于1921年,由洛克菲勒基金会创办。建院之初,就志在“建成亚洲最好的医学中心”。90余年来,医院形成了“严谨、求精、勤奋、奉献”的协和精神和兼容并蓄的特色文化风格,创立了“三基”、“三严”的现代医学教育理念,形成了以“教授、病案、图书馆”著称的协和“三宝”,培养造就了张孝骞、林巧稚等一代医学大师和多位中国现代医学的领军人物,并向全国输送了大批的医学管理人才,创建了当今知名的10余家大型综合及专科医院。2011年在总结90年发展经验的基础上,创新性提出了“待病人如亲人,提高病人满意度;待同事如家人,提高员工幸福感”新办院理念。\n\n目前,医院共有2个院区、总建筑面积53万平方米,在职职工4000余名、两院院士5人、临床和医技科室53个、国家级重点学科20个、国家临床重点专科29个、博士点16个、硕士点29个、国家级继续医学教育基地6个、二级学科住院医师培养基地18个、三级学科专科医师培养基地15个。开放住院床位2000余张,单日最高门诊量约1.5万人次、年出院病人约8万余人次。被评为“全国文明单位”、“全国创先争优先进基层党组织”、“全国卫生系统先进集体”、“首都卫生系统文明单位”、“最受欢迎三甲医院”,荣获全国五一劳动奖章。同时,医院还承担着支援老少边穷地区、国家重要活动和突发事件主力医疗队的重任,在2008年北京奥运工作中荣获“特别贡献奖”。\n\n90多年来,协和人以执着的医志、高尚的医德、精湛的医术和严谨的学风书写了辉煌的历史,今天的协和人正为打造“国际知名、国内一流”医院的目标而继续努力。",
"route": "东院区乘车路线:106、108、110、111、116、684、685路到东单路口北;41、104快、814路到东单路口南;1、52、802路到东单路口西;20、25、37、39路到东单路口东;103、104、420、803路到新东安市场;地铁1、5号线到东单。\n西院区乘车路线:68路到辟才胡同东口;更多乘车路线详见须知。",
"logoData": "iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAMAAABOo35HAAADAFBMVEUAAAD///79/v3///0BTyP8/f39/v///v/8/Pv6+vv//P8DTyb8/f6orrMFTSYITSWosLX7/v7+/f0ETiQBUCYCTyWmr7WorrEBUSMETiL8+/3m6uuosLQGTSL6/PsGTyTKztIKTCnS19oMSSgGTSQJSyOmsLIBUiX5+vn6/P0HTSkHUCgMTCags7H3+vz++/0HSyb5/v2lrrGqr7K9w8cCUCExY0z2/foPSCcKSiW5vsKct7D19vf7//+yuLwTTi4NSCwISiejsLSjs7KArZAMSSOksrDy9fctYUT9+fr1+fru8PH5//+0ur3v8/Sus7ddjXGHqJ0fWDgRRiv4+Pjp6+zg4uSqsredta4mXEPR1NYaUTWqsLSqrrT2/v3q7vDf4OAyZ0eetLMPTCnz/ffa3+GioqJaj3MnYkCWq6arsrTl5ueZuKxfjXTMzM2YurCvtbmmsrXh5ujAxsm6wcU3a0yNpZ90l4mhsrYTSCrGy86/v79BdVkNUCyRs5w4ZUj1+/ft7e5rnIFDcVrX295oi3xBQUHM0dR+oZRMd13HzdDt/fawsLGHr5iBspYUVDHz8/OqqqqdnZ2HqpWBgYEDAwPU2NthYWFIemBdi3jc4eNkinPc3NyMtp12nYt8mYtciG1+nZJGd1sjVDry/vyrtrdSeWXDycyhtK08Z1EzMzNrln7HycihsK50mYJvlIIaSzHv/vqdvqlTgGs9bFiHqY8fXjrR597Y2NjDw8S5vL16enrh8OiSr6ZLcV9aWlpQUFAyX0XPz9Du+fKYsasrKyvG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3jk6VQ6PeBErcmL3ZqgO20LVC0LVcnXrpS22uBApvLTuAByby3OzeUYIooZBiSolpcDP09DBWkZIye+5m6pB4RxOK25ZwvsfADRwxOMWKA6Zn+eVUy2/hAK/UH8DLOGfCiwXPbV+dG5jrWrbME+Gw3ACN8j6qsXU8XE/mjULzCD/YWFx9oUzLMNy6Wx+R7QOiuazOZMxUV/PYIUYWPvnYYGEB5MRiIjch6AP288weARPYRGlw/Gvw3onBCdE8kgSt492fQypcD+Y8n6x/iJYfUkr6Lew+ttgvWnXTnEABIAgCILh/0+GEDAkiBZcocqua7uzO47Obmn1lVjT5vy+vISu9pVYLyGWWCuxArECsQKxArECsQKxArECsQKxArGCd8Uaf2YAAAAAAAAAAADgATPJQLrcXis54wAAAABJRU5ErkJggg==",
"bookingRule": {
"cycle": "10",
"releaseTime": "08:30",
"stopTime": "11:30",
"quitDay": "-1",
"quitTime": "15:30",
"rule": [
"西院区预约号取号地点:西院区门诊楼一层大厅挂号窗口取号",
"东院区预约号取号地点:东院区老门诊楼一层大厅挂号窗口或新门诊楼各楼层挂号/收费窗口取号"
]
}
}
注意这里上传的医院信息以及模拟系统和统一挂号的医院信息一致
上传科室与上传医院信息一样,先本地处理然后交割统一预约平台进行保存
@Override
public boolean saveDepartment(String data) {
JSONArray jsonArray = new JSONArray();
if(!data.startsWith("[")) {
JSONObject jsonObject = JSONObject.parseObject(data);
jsonArray.add(jsonObject);
} else {
jsonArray = JSONArray.parseArray(data);
}
for(int i=0, len=jsonArray.size(); i<len; i++) {
JSONObject jsonObject = jsonArray.getJSONObject(i);
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("hoscode",this.getHoscode());
paramMap.put("depcode",jsonObject.getString("depcode"));
paramMap.put("depname",jsonObject.getString("depname"));
paramMap.put("intro",jsonObject.getString("intro"));
paramMap.put("bigcode", jsonObject.getString("bigcode"));
paramMap.put("bigname",jsonObject.getString("bigname"));
paramMap.put("timestamp", HttpRequestHelper.getTimestamp());
paramMap.put("sign",MD5.encrypt(this.getSignKey()));
JSONObject respone = HttpRequestHelper.sendRequest(paramMap,this.getApiUrl()+"/api/hosp/saveDepartment");
System.out.println(respone.toJSONString());
if(null == respone || 200 != respone.getIntValue("code")) {
throw new YyghException(respone.getString("message"), 201);
}
}
return true;
}
发送过去之前进行自定义MD5加密,预约统一挂号平台接受之后又拿出签名进行解密,然后从数据库里面进行比对如果有,则将科室保存在mongodb数据库中
map转换为科室对象,添加之前根据医院编号和科室编号查询,有就更新,没有就添加
医院的排班信息,一个科室里面有很多医生,每个医生的出诊时间都是不一样,