| | |
| | | package com.kidgrow.oprationcenter.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.common.model.SysDoctor; |
| | | import com.kidgrow.common.model.SysUser; |
| | | import com.kidgrow.common.service.impl.SuperServiceImpl; |
| | | import com.kidgrow.oprationcenter.mapper.DataNeedMapper; |
| | | import com.kidgrow.oprationcenter.model.DataNeed; |
| | | import com.kidgrow.oprationcenter.service.IDataNeedService; |
| | | import com.kidgrow.oprationcenter.vo.DataNeedExcel; |
| | | import com.kidgrow.usercenter.feign.SysDoctorService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.cglib.beans.BeanCopier; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | |
| | | @Slf4j |
| | | @Service |
| | | public class DataNeedServiceImpl extends SuperServiceImpl<DataNeedMapper, DataNeed> implements IDataNeedService { |
| | | @Autowired |
| | | private SysDoctorService sysDoctorService; |
| | | /** |
| | | * 列表 |
| | | * @param params |
| | |
| | | |
| | | @Override |
| | | public ResultBody FindAllByHId(Map<String, Object> map, SysUser sysUser) { |
| | | if (sysUser != null&&sysUser.isHAdminUser()) { |
| | | Map<String,Object> doctoerMap =new HashMap<>(); |
| | | doctoerMap.put("user_id",sysUser.getId()); |
| | | ResultBody listByMap = sysDoctorService.getListByMap(doctoerMap); |
| | | List<SysDoctor> sysDoctors = JSON.parseArray(JSON.toJSONString(listByMap.getData()), SysDoctor.class); |
| | | if (sysDoctors!=null&&sysDoctors.size()>0){ |
| | | List<DataNeed> dataNeedList=baseMapper.findHList(map); |
| | | return ResultBody.ok().data(dataNeedList); |
| | | } |
| | | else |
| | | { |
| | | }else { |
| | | return ResultBody.failed("非管理用户无权查看"); |
| | | } |
| | | } |