25 changed files with 444 additions and 39 deletions
@ -1,9 +1,22 @@ |
|||||
package com.ccsens.tcm.bean.dto; |
package com.ccsens.tcm.bean.dto; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
/** |
/** |
||||
* @description: |
* @description: |
||||
* @author: whj |
* @author: whj |
||||
* @time: 2021/5/8 11:48 |
* @time: 2021/5/8 11:48 |
||||
*/ |
*/ |
||||
public class DoctorDto { |
public class DoctorDto { |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("查询医院/全部主治医生-请求") |
||||
|
public static class Simple { |
||||
|
@ApiModelProperty("查看权限 1:自己所在医院 2:全部") |
||||
|
private byte authority = 1; |
||||
|
@ApiModelProperty("角色 0:主治医生 1:项目助理 2:医院负责人 3:课题助理 4课题负责人") |
||||
|
private byte role = 0; |
||||
|
} |
||||
} |
} |
||||
|
|||||
@ -1,9 +1,33 @@ |
|||||
package com.ccsens.tcm.service; |
package com.ccsens.tcm.service; |
||||
|
|
||||
|
import com.ccsens.tcm.bean.dto.DoctorDto; |
||||
|
import com.ccsens.tcm.bean.vo.DoctorVo; |
||||
|
import com.ccsens.tcm.persist.dao.DoctorDao; |
||||
|
import com.ccsens.tcm.uitl.Constant; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Propagation; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import java.util.List; |
||||
|
|
||||
/** |
/** |
||||
* @description: |
* @description: |
||||
* @author: whj |
* @author: whj |
||||
* @time: 2021/5/8 11:49 |
* @time: 2021/5/8 11:49 |
||||
*/ |
*/ |
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) |
||||
public class DoctorService implements IDoctorService { |
public class DoctorService implements IDoctorService { |
||||
|
|
||||
|
@Resource |
||||
|
private DoctorDao doctorDao; |
||||
|
|
||||
|
@Override |
||||
|
public List<DoctorVo.Simple> queryDoctor(DoctorDto.Simple param, Long userId) { |
||||
|
|
||||
|
return doctorDao.querySimple(param, userId); |
||||
|
} |
||||
} |
} |
||||
|
|||||
@ -1,4 +1,16 @@ |
|||||
package com.ccsens.tcm.service; |
package com.ccsens.tcm.service; |
||||
|
|
||||
|
import com.ccsens.tcm.bean.dto.DoctorDto; |
||||
|
import com.ccsens.tcm.bean.vo.DoctorVo; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
public interface IDoctorService { |
public interface IDoctorService { |
||||
|
/** |
||||
|
* 查询医生信息 |
||||
|
* @param param 查看权限 1:自己所在医院 2:全部 |
||||
|
* @param userId 根据查询者确认医院ID |
||||
|
* @return 医生信息 |
||||
|
*/ |
||||
|
List<DoctorVo.Simple> queryDoctor(DoctorDto.Simple param, Long userId); |
||||
} |
} |
||||
|
|||||
Loading…
Reference in new issue