浏览代码

恢复FoundationMedicalSystemParam的无参构造函数

Sand 8 年之前
父节点
当前提交
7a3a97395a

+ 2 - 0
src/main/java/com/yihu/wlyy/entity/dict/FoundationMedicalSystemParam.java

@ -24,6 +24,8 @@ public class FoundationMedicalSystemParam implements java.io.Serializable {
	private String bmlevel;//表码级别(1国家,2省,3市,4自定义)
	private String description;//描述
    public FoundationMedicalSystemParam(){}
	public FoundationMedicalSystemParam(String paramname, String code, Integer ord,
                                        String paramchina, String namespell, String iscustom,
                                        String cancel, String paramdesc, String canceldate,

+ 32 - 60
src/main/java/com/yihu/wlyy/entity/doctor/profile/Doctor.java

@ -14,81 +14,53 @@ import com.fasterxml.jackson.annotation.JsonFormat;
/**
 * 医生信息
 * @author George
 *
 */
@Entity
@Table(name = "wlyy_doctor")
public class Doctor extends IdEntity {
	/**
	 * 
	 */
	private static final long serialVersionUID = -6585552029939285364L;
	// 业务主键
	private String code;
	// 姓名
    
	private String code;        // 业务主键
	
	private String name;
	// 性别(1男,2女)
	private Integer sex;
	// 生日
	private Integer sex;        // 性别(1男,2女)
	private Date birthday;
	// 头像
	private String photo;
	// 手机号
	private String mobile;
	// 登录密码
	private String password;
	// 密码标识
	private String salt;
	// 状态(1正常,0禁用)
	private Integer status;
	// 省
	private String salt;        // 密码标识
	private Integer status;     // 状态(1正常,0禁用)
	
	private String province;
	// 市
	private String city;	
	// 區縣代碼
	private String city;
	private String town;
	// 省名
	private String provinceName;
	// 市名
	private String cityName;
	// 區縣名
    private String townName;
	// 医院标识
	private String hospital;
	// 医院名称
	
	private String hospital;        // 医院代码
	private String hosptialName;
	// 科室标识
	private String dept;
	// 科室名
	private String dept;            // 科室代码
	private String deptName;
	// 职称
	private String job;
	// 职称名
	private String jobName;
	// 医生专长
	private String expertise;
	// 医生介绍
	private String introduce;
	// 类型:1专科医生,2全科医生,3健康管理师
	private Integer level;
	// 资格是否认证通过,1是,0否
	private Integer iscertified;
	// 二维码
	private String qrcode;
	// 更新时间
	private Date czrq;
	// 状态(1正常,0删除)
	private Integer del;
	private String idcard;//身份证号
	private String job;             // 职称代码
	private String jobName;         // 职称名
	
	private String expertise;       // 医生专长
	private String introduce;       // 医生介绍
	
	private Integer level;          // 类型:1专科医生,2全科医生,3健康管理师
	private Integer isCertified;   // 资格是否认证通过,1是,0否
	
	private String qrcode;          // 二维码
	
	private Date czrq;              // 更新时间
	private Integer del;            // 状态(1正常,0删除)
	private Integer isFamous;//是否是名医 1是  0或者空不是
	private String idcard;          //身份证号
	private Integer isFamous;       //是否是名医 1是  0或者空不是
	public Doctor() {
	}
	public Doctor() {}
	public String getCode() {
		return code;
@ -290,12 +262,12 @@ public class Doctor extends IdEntity {
		this.level = level;
	}
	public Integer getIscertified() {
		return iscertified;
	public Integer getIsCertified() {
		return isCertified;
	}
	public void setIscertified(Integer iscertified) {
		this.iscertified = iscertified;
	public void setIsCertified(Integer isCertified) {
		this.isCertified = isCertified;
	}
	public String getQrcode() {

+ 3 - 1
src/main/java/com/yihu/wlyy/repository/doctor/DoctorAdminTeamMemberDao.java

@ -27,7 +27,9 @@ public interface DoctorAdminTeamMemberDao extends
    @Query("SELECT d FROM AdminTeamMember m, AdminTeam t, Doctor d WHERE t.id = :teamId AND t.id = m" +
            ".teamId AND m.doctorCode = d.code")
    List<Doctor> findTeamMembers(@Param(value = "teamId") long teamId);
    List<Doctor> findAllMembers(@Param(value = "teamId") long teamId);
    //List<Doctor> findMembersByRole(@Param(value = "teamId") long teamId, @Param(value = "role") String role);
    @Query("SELECT 1 FROM AdminTeamMember WHERE teamId = :teamId AND doctorCode = :doctorCode")
    Integer isMemberExist(@Param(value = "teamId") long teamId, @Param(value = "doctorCode") String doctorCode);

+ 8 - 2
src/main/java/com/yihu/wlyy/service/app/team/AdminTeamService.java

@ -9,6 +9,7 @@ import com.yihu.wlyy.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import java.util.Date;
import java.util.List;
@ -93,8 +94,13 @@ public class AdminTeamService extends BaseService {
        if(member != null) memberDao.delete(member);
    }
    public List<Doctor> getMembers(long teamId){
        return memberDao.findTeamMembers(teamId);
    public List<Doctor> getMembers(long teamId, String role){
        return memberDao.findAllMembers(teamId);
        /*if(StringUtils.isEmpty(role)){
            return memberDao.findAllMembers(teamId);
        } else {
            return memberDao.findMembersByRole(teamId, role);
        }*/
    }
    private void saveTeam(AdminTeam team) {

+ 7 - 6
src/main/java/com/yihu/wlyy/web/doctor/team/AdminTeamController.java

@ -95,7 +95,7 @@ public class AdminTeamController extends BaseController {
    @RequestMapping(value = "/{team_id}/leader", method = RequestMethod.PUT)
    @ApiOperation(value = "更新团队领导")
    public String updateTeamLeader(@PathVariable("team_id") long teamId,
                                 @RequestParam("doctor_code") String doctorCode) {
                                   @RequestParam("doctor_code") String doctorCode) {
        try {
            AdminTeam team = teamService.updateTeamLeader(teamId, doctorCode);
@ -122,7 +122,7 @@ public class AdminTeamController extends BaseController {
    @ResponseBody
    @RequestMapping(value = "/{team_id}/members", method = RequestMethod.POST)
    @ApiOperation(value = "添加成员")
    @ApiOperation(value = "添加团队成员")
    public String addMember(@PathVariable("team_id") long teamId,
                            @RequestParam("doctor_code") String doctorCode) {
        try {
@ -138,9 +138,10 @@ public class AdminTeamController extends BaseController {
    @ResponseBody
    @RequestMapping(value = "/{team_id}/members", method = RequestMethod.GET)
    @ApiOperation(value = "获取团队成员")
    public String getTeamMembers(@PathVariable("team_id") long teamId) {
    public String getTeamMembers(@PathVariable("team_id") long teamId,
                                 @RequestParam(value = "doctor_role", required = false) String role) {
        try {
            List<Doctor> members = memberService.getMembers(teamId);
            List<Doctor> members = memberService.getMembers(teamId, role);
            return write(200, "OK", "data", new JSONArray(members));
        } catch (Exception e) {
@ -170,11 +171,11 @@ public class AdminTeamController extends BaseController {
    @RequestMapping(value = "/team/{doctor_code}/teams", method = RequestMethod.GET)
    @ApiOperation(value = "获取医生团队列表")
    public String getDoctorTeams(@PathVariable("doctor_code") String doctorCode) {
        try{
        try {
            List<AdminTeam> teamList = teamService.getDoctorTeams(doctorCode);
            return write(200, "OK", "data", new JSONArray(teamList));
        } catch (Exception e){
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
        }