| | |
| | | package com.kidgrow.oprationcenter.service.impl; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.common.service.impl.SuperServiceImpl; |
| | | import com.kidgrow.oprationcenter.mapper.HospitalScreeningMapper; |
| | | import com.kidgrow.oprationcenter.model.HospitalScreening; |
| | | import com.kidgrow.oprationcenter.service.IHospitalScreeningService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import com.kidgrow.oprationcenter.model.HospitalScreening; |
| | | import com.kidgrow.oprationcenter.mapper.HospitalScreeningMapper; |
| | | import com.kidgrow.oprationcenter.service.IHospitalScreeningService; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | |
| | | public HospitalScreening findByObject(HospitalScreening hospitalScreening){ |
| | | return baseMapper.findByObject(hospitalScreening); |
| | | } |
| | | |
| | | /** |
| | | * 更新状态:推送装填,启停状态 |
| | | * @param params 包含:1、type:0推送,1启停 |
| | | * 2、ID :ID |
| | | * 3、val:对用的值 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ResultBody updateEnabled(Map<String, Object> params) { |
| | | int type = MapUtils.getInteger(params,"type"); |
| | | int val = MapUtils.getInteger(params,"objVal"); |
| | | long id = MapUtils.getLong(params,"objId"); |
| | | |
| | | HospitalScreening hospitalScreening = baseMapper.selectById(id); |
| | | |
| | | if(hospitalScreening == null){ |
| | | return ResultBody.failed("医院数据不存在!"); |
| | | } |
| | | |
| | | switch (type){ |
| | | case 0: |
| | | hospitalScreening.setIsScreeningPush(val); |
| | | break; |
| | | case 1: |
| | | hospitalScreening.setEnabled(val); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | |
| | | int count = baseMapper.updateById(hospitalScreening); |
| | | |
| | | return count > 0 ? ResultBody.ok().msg("更新成功") : ResultBody.failed("更新失败"); |
| | | } |
| | | |
| | | /** |
| | | * 根据医院名称模糊查询医院数据列表 |
| | | * @param hospitalName |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ResultBody<HospitalScreening> findByName(String hospitalName) { |
| | | return ResultBody.ok().data(baseMapper.findByName(hospitalName)).msg("查询成功"); |
| | | } |
| | | } |